Merge pull request #68334 from BoCloud/master

Apply user configurations for local etcd
pull/8/head
k8s-ci-robot 2018-09-10 15:03:18 -07:00 committed by GitHub
commit ef62882f62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -184,6 +184,13 @@ func getAPIServerCommand(cfg *kubeadmapi.InitConfiguration) []string {
defaultArguments["etcd-cafile"] = filepath.Join(cfg.CertificatesDir, kubeadmconstants.EtcdCACertName)
defaultArguments["etcd-certfile"] = filepath.Join(cfg.CertificatesDir, kubeadmconstants.APIServerEtcdClientCertName)
defaultArguments["etcd-keyfile"] = filepath.Join(cfg.CertificatesDir, kubeadmconstants.APIServerEtcdClientKeyName)
// Apply user configurations for local etcd
if cfg.Etcd.Local != nil {
if value, ok := cfg.Etcd.Local.ExtraArgs["listen-client-urls"]; ok {
defaultArguments["etcd-servers"] = value
}
}
}
if features.Enabled(cfg.FeatureGates, features.HighAvailability) {