mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 00:34:24 -04:00
Add option to use pod name rather than IP address for Kubernetes (#1190)
Change to use a new 'endpoints' directive and use a constant Add initial docs for 'endpoints' directive Add tests to Kubernetes setup for endpoints Changes based on PR feedback endpoint_pod_names is a boolean config option. Chahanged docs to reflect this. Add a test when endpoints_pod_names is not set Update README.md Remove endpointNameModeName as it is no longer used
This commit is contained in:
committed by
John Belamaric
parent
c6ce769fc6
commit
3527be6c00
@@ -104,6 +104,13 @@ func kubernetesParse(c *caddy.Controller) (*Kubernetes, dnsControlOpts, error) {
|
||||
|
||||
for c.NextBlock() {
|
||||
switch c.Val() {
|
||||
case "endpoint_pod_names":
|
||||
args := c.RemainingArgs()
|
||||
if len(args) > 0 {
|
||||
return nil, opts, c.ArgErr()
|
||||
}
|
||||
k8s.endpointNameMode = true
|
||||
continue
|
||||
case "pods":
|
||||
args := c.RemainingArgs()
|
||||
if len(args) == 1 {
|
||||
|
||||
Reference in New Issue
Block a user