Merge pull request #9559 from olemarkus/unavailable-channel

When channel is unavailable, don't try to validate things from it
This commit is contained in:
Kubernetes Prow Robot 2020-08-04 01:52:20 -07:00 committed by GitHub
commit ab9c2a5960
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -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)