diff --git a/cluster/plan.go b/cluster/plan.go index 197d6e86..01c35193 100644 --- a/cluster/plan.go +++ b/cluster/plan.go @@ -154,7 +154,7 @@ func (c *Cluster) BuildKubeAPIProcess(prefixPath string) v3.Process { if len(c.CloudProvider.Name) > 0 { c.Services.KubeAPI.ExtraEnv = append( c.Services.KubeAPI.ExtraEnv, - fmt.Sprintf("%s=%s", CloudConfigSumEnv, getCloudConfigChecksum(c.CloudProvider))) + fmt.Sprintf("%s=%s", CloudConfigSumEnv, getCloudConfigChecksum(c.CloudConfigFile))) } // check if our version has specific options for this component serviceOptions := c.GetKubernetesServicesOptions() @@ -258,7 +258,7 @@ func (c *Cluster) BuildKubeControllerProcess(prefixPath string) v3.Process { if len(c.CloudProvider.Name) > 0 { c.Services.KubeController.ExtraEnv = append( c.Services.KubeController.ExtraEnv, - fmt.Sprintf("%s=%s", CloudConfigSumEnv, getCloudConfigChecksum(c.CloudProvider))) + fmt.Sprintf("%s=%s", CloudConfigSumEnv, getCloudConfigChecksum(c.CloudConfigFile))) } // check if our version has specific options for this component serviceOptions := c.GetKubernetesServicesOptions() @@ -364,7 +364,7 @@ func (c *Cluster) BuildKubeletProcess(host *hosts.Host, prefixPath string) v3.Pr if len(c.CloudProvider.Name) > 0 { c.Services.Kubelet.ExtraEnv = append( c.Services.Kubelet.ExtraEnv, - fmt.Sprintf("%s=%s", CloudConfigSumEnv, getCloudConfigChecksum(c.CloudProvider))) + fmt.Sprintf("%s=%s", CloudConfigSumEnv, getCloudConfigChecksum(c.CloudConfigFile))) } if len(c.PrivateRegistriesMap) > 0 { kubeletDcokerConfig, _ := docker.GetKubeletDockerConfig(c.PrivateRegistriesMap) @@ -763,8 +763,8 @@ func getTagMajorVersion(tag string) string { return strings.Join(splitTag[:2], ".") } -func getCloudConfigChecksum(config v3.CloudProvider) string { - configByteSum := md5.Sum([]byte(fmt.Sprintf("%v", config))) +func getCloudConfigChecksum(config string) string { + configByteSum := md5.Sum([]byte(config)) return fmt.Sprintf("%x", configByteSum) }