1
0
mirror of https://github.com/rancher/rke.git synced 2025-08-02 07:43:04 +00:00

Merge pull request #1372 from zhaofengli/mixed-arch-etcd-cluster

Use the node's architecture to build etcd process
This commit is contained in:
Sebastiaan van Steenis 2021-05-31 10:44:31 +02:00 committed by GitHub
commit 88a4d73e79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -825,15 +825,11 @@ func (c *Cluster) BuildSidecarProcess(host *hosts.Host) v3.Process {
func (c *Cluster) BuildEtcdProcess(host *hosts.Host, etcdHosts []*hosts.Host, serviceOptions v3.KubernetesServicesOptions) v3.Process {
nodeName := pki.GetCrtNameForHost(host, pki.EtcdCertName)
initCluster := ""
architecture := "amd64"
architecture := host.DockerInfo.Architecture
if len(etcdHosts) == 0 {
initCluster = services.GetEtcdInitialCluster(c.EtcdHosts)
if len(c.EtcdHosts) > 0 {
architecture = c.EtcdHosts[0].DockerInfo.Architecture
}
} else {
initCluster = services.GetEtcdInitialCluster(etcdHosts)
architecture = etcdHosts[0].DockerInfo.Architecture
}
clusterState := "new"