1
0
mirror of https://github.com/rancher/rke.git synced 2025-08-31 14:36:32 +00:00

Fix panic on empty k8s version

This commit is contained in:
moelsayed
2018-02-01 13:31:33 +02:00
parent 8d6c7d303a
commit 3f3275da6d

View File

@@ -183,7 +183,8 @@ func (c *Cluster) setClusterKubernetesImageVersion(ctx context.Context) {
VersionedImageNamed, _ = ref.WithTag(ref.TrimNamed(k8sImageNamed), c.Version)
c.SystemImages.Kubernetes = VersionedImageNamed.String()
}
if c.SystemImages.Kubernetes != k8sImageNamed.String() {
normalizedSystemImage, _ := ref.ParseNormalizedNamed(c.SystemImages.Kubernetes)
if normalizedSystemImage.String() != k8sImageNamed.String() {
log.Infof(ctx, "Overrding Kubernetes image [%s] with tag [%s]", VersionedImageNamed.Name(), VersionedImageNamed.Tag())
}
}