mirror of
https://github.com/rancher/rke.git
synced 2025-09-09 19:09:51 +00:00
Add endpoint-reconciler support
This commit is contained in:
committed by
Alena Prokharchyk
parent
2f28cb24ee
commit
af9ab4fb94
@@ -96,8 +96,7 @@ func (c *Cluster) BuildKubeAPIProcess(prefixPath string) v3.Process {
|
|||||||
etcdClientCert := pki.GetCertPath(pki.KubeNodeCertName)
|
etcdClientCert := pki.GetCertPath(pki.KubeNodeCertName)
|
||||||
etcdClientKey := pki.GetKeyPath(pki.KubeNodeCertName)
|
etcdClientKey := pki.GetKeyPath(pki.KubeNodeCertName)
|
||||||
etcdCAClientCert := pki.GetCertPath(pki.CACertName)
|
etcdCAClientCert := pki.GetCertPath(pki.CACertName)
|
||||||
// check apiserver count
|
|
||||||
apiserverCount := len(c.ControlPlaneHosts)
|
|
||||||
if len(c.Services.Etcd.ExternalURLs) > 0 {
|
if len(c.Services.Etcd.ExternalURLs) > 0 {
|
||||||
etcdConnectionString = strings.Join(c.Services.Etcd.ExternalURLs, ",")
|
etcdConnectionString = strings.Join(c.Services.Etcd.ExternalURLs, ",")
|
||||||
etcdPathPrefix = c.Services.Etcd.Path
|
etcdPathPrefix = c.Services.Etcd.Path
|
||||||
@@ -129,7 +128,6 @@ func (c *Cluster) BuildKubeAPIProcess(prefixPath string) v3.Process {
|
|||||||
"kubelet-client-certificate": pki.GetCertPath(pki.KubeAPICertName),
|
"kubelet-client-certificate": pki.GetCertPath(pki.KubeAPICertName),
|
||||||
"kubelet-client-key": pki.GetKeyPath(pki.KubeAPICertName),
|
"kubelet-client-key": pki.GetKeyPath(pki.KubeAPICertName),
|
||||||
"service-account-key-file": pki.GetKeyPath(pki.KubeAPICertName),
|
"service-account-key-file": pki.GetKeyPath(pki.KubeAPICertName),
|
||||||
"apiserver-count": strconv.Itoa(apiserverCount),
|
|
||||||
}
|
}
|
||||||
if len(c.CloudProvider.Name) > 0 && c.CloudProvider.Name != aws.AWSCloudProviderName {
|
if len(c.CloudProvider.Name) > 0 && c.CloudProvider.Name != aws.AWSCloudProviderName {
|
||||||
CommandArgs["cloud-config"] = CloudConfigPath
|
CommandArgs["cloud-config"] = CloudConfigPath
|
||||||
@@ -141,6 +139,10 @@ func (c *Cluster) BuildKubeAPIProcess(prefixPath string) v3.Process {
|
|||||||
CommandArgs[k] = v
|
CommandArgs[k] = v
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// check api server count for k8s v1.8
|
||||||
|
if getTagMajorVersion(c.Version) == "v1.8" {
|
||||||
|
CommandArgs["apiserver-count"] = strconv.Itoa(len(c.ControlPlaneHosts))
|
||||||
|
}
|
||||||
|
|
||||||
args := []string{
|
args := []string{
|
||||||
"--etcd-cafile=" + etcdCAClientCert,
|
"--etcd-cafile=" + etcdCAClientCert,
|
||||||
|
Reference in New Issue
Block a user