kubernetes: Conflict validation on kubeproxyconfig.HealthzBindAddress/MetricsBindAddress and flags

What happened: From https://github.com/kubernetes/kubernetes/issues/53754#issuecomment-371092964.

We used to allow using ip or ip:port in --healthz-bind-address and --metrics-bind-address. Now the validation on kubeproxyconfig disallow that (it only allows ip:port): https://github.com/kubernetes/kubernetes/blob/dbcb2c9b27c16da8bd35e0f0898af552bb5ba9fd/pkg/proxy/apis/kubeproxyconfig/validation/validation.go#L192-L212. This seems to break backward compatibility for those two flags.

Please comment if I’m missing something. cc @xiangpengzhao @Avanpourm

How to reproduce it (as minimally and precisely as possible): Try --metrics-bind-address=0.0.0.0 with kube-proxy.

Environment:

  • Kubernetes version (use kubectl version):
Server Version: version.Info{Major:"1", Minor:"11+", GitVersion:"v1.11.0-alpha.0.1688+c2f67c9459499d-dirty", GitCommit:"c2f67c9459499d3ae5d03f6d54ecc4cb05df3e22", GitTreeState:"dirty", BuildDate:"2018-03-26T23:45:13Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (9 by maintainers)

Most upvoted comments

@MrHohn find the root cause of #54191 not working as expected. https://github.com/kubernetes/kubernetes/pull/57672 introduced the regression:

-	fs.Var(componentconfig.IPPortVar{Val: &options.config.HealthzBindAddress}, "healthz-bind-address", "The IP address and port for the health check server to serve on (set to `0.0.0.0` for all IPv4 interfaces and `::` for all IPv6 interfaces)")
-	fs.Var(componentconfig.IPPortVar{Val: &options.config.MetricsBindAddress}, "metrics-bind-address", "The IP address and port for the metrics server to serve on (set to `0.0.0.0` for all IPv4 interfaces and `::` for all IPv6 interfaces)")
+	fs.Var(componentconfig.IPVar{Val: &o.config.HealthzBindAddress}, "healthz-bind-address", "The IP address and port for the health check server to serve on (set to `0.0.0.0` for all IPv4 interfaces and `::` for all IPv6 interfaces)")
+	fs.Var(componentconfig.IPVar{Val: &o.config.MetricsBindAddress}, "metrics-bind-address", "The IP address and port for the metrics server to serve on (set to `0.0.0.0` for all IPv4 interfaces and `::` for all IPv6 interfaces)")

I send a PR https://github.com/kubernetes/kubernetes/pull/62582 to fix the two issues we mentioned in this thread.