mirror of
https://github.com/helm/helm.git
synced 2026-05-28 04:35:48 -04:00
fix(chartutil): Add the v1 apiextensions to the default scheme
Signed-off-by: Taylor Thomas <taylor.thomas@microsoft.com>
This commit is contained in:
parent
9322910eb9
commit
b6f5762d46
1 changed files with 5 additions and 2 deletions
|
|
@ -18,6 +18,7 @@ package chartutil
|
|||
import (
|
||||
"k8s.io/client-go/kubernetes/scheme"
|
||||
|
||||
apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
|
||||
apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1"
|
||||
)
|
||||
|
||||
|
|
@ -75,9 +76,11 @@ func (v VersionSet) Has(apiVersion string) bool {
|
|||
}
|
||||
|
||||
func allKnownVersions() VersionSet {
|
||||
// Otherwise `helm template` fails validating due to an error like the below:
|
||||
// Error: apiVersion "apiextensions.k8s.io/v1beta1" in mychart/templates/crd.yaml is not available
|
||||
// We should register the built in extension APIs as well so CRDs are
|
||||
// supported in the default version set. This has caused problems with `helm
|
||||
// template` in the past, so let's be safe
|
||||
apiextensionsv1beta1.AddToScheme(scheme.Scheme)
|
||||
apiextensionsv1.AddToScheme(scheme.Scheme)
|
||||
|
||||
groups := scheme.Scheme.PrioritizedVersionsAllGroups()
|
||||
vs := make(VersionSet, 0, len(groups))
|
||||
|
|
|
|||
Loading…
Reference in a new issue