mirror of
https://github.com/rancher/rke.git
synced 2025-09-01 06:56:29 +00:00
Allow etcd parameters to be overridden
This commit is contained in:
committed by
Alena Prokharchyk
parent
eb1fcc3857
commit
d155cc8e76
@@ -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
|
||||
@@ -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"
|
||||
}
|
||||
@@ -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),
|
||||
|
Reference in New Issue
Block a user