Skip to content

Commit

Permalink
Add endpoint-reconciler support
Browse files Browse the repository at this point in the history
  • Loading branch information
moelsayed authored and Alena Prokharchyk committed Jun 13, 2018
1 parent 2f28cb2 commit af9ab4f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cluster/plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ func (c *Cluster) BuildKubeAPIProcess(prefixPath string) v3.Process {
etcdClientCert := pki.GetCertPath(pki.KubeNodeCertName)
etcdClientKey := pki.GetKeyPath(pki.KubeNodeCertName)
etcdCAClientCert := pki.GetCertPath(pki.CACertName)
// check apiserver count
apiserverCount := len(c.ControlPlaneHosts)

if len(c.Services.Etcd.ExternalURLs) > 0 {
etcdConnectionString = strings.Join(c.Services.Etcd.ExternalURLs, ",")
etcdPathPrefix = c.Services.Etcd.Path
Expand Down Expand Up @@ -129,7 +128,6 @@ 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),
"apiserver-count": strconv.Itoa(apiserverCount),
}
if len(c.CloudProvider.Name) > 0 && c.CloudProvider.Name != aws.AWSCloudProviderName {
CommandArgs["cloud-config"] = CloudConfigPath
Expand All @@ -141,6 +139,10 @@ func (c *Cluster) BuildKubeAPIProcess(prefixPath string) v3.Process {
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{
"--etcd-cafile=" + etcdCAClientCert,
Expand Down

0 comments on commit af9ab4f

Please sign in to comment.