mirror of
https://github.com/coredns/coredns.git
synced 2025-11-03 10:43:20 -05:00
* Adding parsing for label selector to Corefile * Updating comment typo in k8sCorefile * Adding implementation of label support to filter exposed objects * Updating TODO list
26 lines
1.0 KiB
Plaintext
26 lines
1.0 KiB
Plaintext
# Serve on port 53
|
|
.:53 {
|
|
# use kubernetes middleware for domain "coredns.local"
|
|
kubernetes coredns.local {
|
|
# Kubernetes data API resync period
|
|
# Example values: 60s, 5m, 1h
|
|
resyncperiod 5m
|
|
# Use url for k8s API endpoint
|
|
endpoint http://localhost:8080
|
|
# Assemble k8s record names with the template
|
|
template {service}.{namespace}.{zone}
|
|
# Only expose the k8s namespace "demo"
|
|
namespaces demo
|
|
# Only expose the records for kubernetes objects
|
|
# that matches this label selector. The label
|
|
# selector syntax is described in the kubernetes
|
|
# API documentation: http://kubernetes.io/docs/user-guide/labels/
|
|
# Example selector below only exposes objects tagged as
|
|
# "application=nginx" in the staging or qa environments.
|
|
#labels environment in (staging, qa),application=nginx
|
|
}
|
|
# Perform DNS response caching for the coredns.local zone
|
|
# Cache timeout is provided by the integer in seconds
|
|
#cache 180 coredns.local
|
|
}
|