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:
parent
c6ce769fc6
commit
3527be6c00
6 changed files with 114 additions and 23 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue