|
|
@ -21,11 +21,11 @@ import (
|
|
|
|
"strconv"
|
|
|
|
"strconv"
|
|
|
|
|
|
|
|
|
|
|
|
"helm.sh/helm/v4/pkg/chart/common"
|
|
|
|
"helm.sh/helm/v4/pkg/chart/common"
|
|
|
|
|
|
|
|
"helm.sh/helm/v4/pkg/kube"
|
|
|
|
|
|
|
|
|
|
|
|
"k8s.io/apimachinery/pkg/runtime"
|
|
|
|
"k8s.io/apimachinery/pkg/runtime"
|
|
|
|
"k8s.io/apimachinery/pkg/runtime/schema"
|
|
|
|
"k8s.io/apimachinery/pkg/runtime/schema"
|
|
|
|
"k8s.io/apiserver/pkg/endpoints/deprecation"
|
|
|
|
"k8s.io/apiserver/pkg/endpoints/deprecation"
|
|
|
|
kscheme "k8s.io/client-go/kubernetes/scheme"
|
|
|
|
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
var (
|
|
|
|
var (
|
|
|
@ -93,11 +93,8 @@ func validateNoDeprecations(resource *k8sYamlStruct, kubeVersion *common.KubeVer
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func resourceToRuntimeObject(resource *k8sYamlStruct) (runtime.Object, error) {
|
|
|
|
func resourceToRuntimeObject(resource *k8sYamlStruct) (runtime.Object, error) {
|
|
|
|
scheme := runtime.NewScheme()
|
|
|
|
|
|
|
|
kscheme.AddToScheme(scheme)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gvk := schema.FromAPIVersionAndKind(resource.APIVersion, resource.Kind)
|
|
|
|
gvk := schema.FromAPIVersionAndKind(resource.APIVersion, resource.Kind)
|
|
|
|
out, err := scheme.New(gvk)
|
|
|
|
out, err := kube.NativeScheme.New(gvk)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|