Skip to content

Commit

Permalink
Allow etcd parameters to be overridden
Browse files Browse the repository at this point in the history
  • Loading branch information
moelsayed authored and Alena Prokharchyk committed Jul 6, 2018
1 parent eb1fcc3 commit d155cc8
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions cluster/plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ func (c *Cluster) BuildKubeAPIProcess(prefixPath string) v3.Process {
"kubelet-client-certificate": pki.GetCertPath(pki.KubeAPICertName),
"kubelet-client-key": pki.GetKeyPath(pki.KubeAPICertName),
"service-account-key-file": pki.GetKeyPath(pki.KubeAPICertName),
"etcd-cafile": etcdCAClientCert,
"etcd-certfile": etcdClientCert,
"etcd-keyfile": etcdClientKey,
"etcd-servers": etcdConnectionString,
"etcd-prefix": etcdPathPrefix,
}
if len(c.CloudProvider.Name) > 0 && c.CloudProvider.Name != aws.AWSCloudProviderName {
CommandArgs["cloud-config"] = CloudConfigPath
Expand All @@ -145,14 +150,6 @@ func (c *Cluster) BuildKubeAPIProcess(prefixPath string) v3.Process {
CommandArgs["apiserver-count"] = strconv.Itoa(len(c.ControlPlaneHosts))
}

args := []string{
"--etcd-cafile=" + etcdCAClientCert,
"--etcd-certfile=" + etcdClientCert,
"--etcd-keyfile=" + etcdClientKey,
"--etcd-servers=" + etcdConnectionString,
"--etcd-prefix=" + etcdPathPrefix,
}

if c.Authorization.Mode == services.RBACAuthorizationMode {
CommandArgs["authorization-mode"] = "Node,RBAC"
}
Expand Down Expand Up @@ -190,7 +187,6 @@ func (c *Cluster) BuildKubeAPIProcess(prefixPath string) v3.Process {
return v3.Process{
Name: services.KubeAPIContainerName,
Command: Command,
Args: args,
VolumesFrom: VolumesFrom,
Binds: Binds,
Env: getUniqStringList(c.Services.KubeAPI.ExtraEnv),
Expand Down

0 comments on commit d155cc8

Please sign in to comment.