mirror of https://github.com/kubernetes/kops.git
When channel is unavailable, don't try to validate things from it
Update upup/pkg/fi/cloudup/apply_cluster.go Co-authored-by: Ciprian Hacman <ciprianhacman@gmail.com>
This commit is contained in:
parent
40b92e7d29
commit
48a72467c2
|
|
@ -863,6 +863,11 @@ func (c *ApplyClusterCmd) validateKopsVersion() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
if c.channel == nil {
|
||||
klog.Warning("channel unavailable, skipping version validation")
|
||||
return nil
|
||||
}
|
||||
|
||||
versionInfo := kops.FindKopsVersionSpec(c.channel.Spec.KopsVersions, kopsVersion)
|
||||
if versionInfo == nil {
|
||||
klog.Warningf("unable to find version information for kops version %q in channel", kopsVersion)
|
||||
|
|
@ -975,6 +980,11 @@ func (c *ApplyClusterCmd) validateKubernetesVersion() error {
|
|||
// TODO: make util.ParseKubernetesVersion not return a pointer
|
||||
kubernetesVersion := *parsed
|
||||
|
||||
if c.channel == nil {
|
||||
klog.Warning("unable to load channel, skipping kubernetes version recommendation/requirements checks")
|
||||
return nil
|
||||
}
|
||||
|
||||
versionInfo := kops.FindKubernetesVersionSpec(c.channel.Spec.KubernetesVersions, kubernetesVersion)
|
||||
if versionInfo == nil {
|
||||
klog.Warningf("unable to find version information for kubernetes version %q in channel", kubernetesVersion)
|
||||
|
|
|
|||
Loading…
Reference in New Issue