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:
@@ -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())
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user