use etcd endpoint from advertise-client-urls

It makes more sense to use advertised etcd endpoints instead of using
listened client URLS.

I'm solving this use case: Listen on localhost and public IP but I don't
want to add multiple endpoints to kube-apiservers because it's targeting
same etcd server.
This commit is contained in:
Tomáš Kukrál 2018-10-15 21:23:13 +02:00
parent e763a3c56d
commit a031d03501
No known key found for this signature in database
GPG Key ID: 6C859D7162E37242

View File

@ -187,7 +187,7 @@ func getAPIServerCommand(cfg *kubeadmapi.InitConfiguration) []string {
// Apply user configurations for local etcd
if cfg.Etcd.Local != nil {
if value, ok := cfg.Etcd.Local.ExtraArgs["listen-client-urls"]; ok {
if value, ok := cfg.Etcd.Local.ExtraArgs["advertise-client-urls"]; ok {
defaultArguments["etcd-servers"] = value
}
}