Christopher Tineo 2 weeks ago committed by GitHub
commit b69f9d0a80
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -372,6 +372,29 @@ func (cfg *Configuration) renderResources(ch *chart.Chart, values common.Values,
return hs, b, notes, nil
}
// ensureKubeCompatibility verifies the chart's kubeVersion requirement.
func ensureKubeCompatibility(ch *chart.Chart, caps *common.Capabilities) error {
if ch == nil || caps == nil {
return nil
}
meta := ch.Metadata
if meta == nil {
return nil
}
kubeReq := meta.KubeVersion
if kubeReq == "" {
return nil
}
kubeVer := caps.KubeVersion.String()
if chartutil.IsCompatibleRange(kubeReq, kubeVer) {
return nil
}
return fmt.Errorf("chart requires kubeVersion: %s which is incompatible with Kubernetes %s", kubeReq, kubeVer)
}
// RESTClientGetter gets the rest client
type RESTClientGetter interface {
ToRESTConfig() (*rest.Config, error)

Loading…
Cancel
Save