diff --git a/build/ks-controller-manager/Dockerfile b/build/ks-controller-manager/Dockerfile index dc0049d91..664742a89 100644 --- a/build/ks-controller-manager/Dockerfile +++ b/build/ks-controller-manager/Dockerfile @@ -4,7 +4,7 @@ FROM alpine:3.11 ARG HELM_VERSION=v3.5.2 -ARG KUSTOMIZE_VERSION=v4.0.5 +ARG KUSTOMIZE_VERSION=v4.1.0 RUN apk add --no-cache ca-certificates # install helm diff --git a/pkg/simple/client/openpitrix/helmwrapper/helm_wrapper.go b/pkg/simple/client/openpitrix/helmwrapper/helm_wrapper.go index 2ba34c028..55f34da90 100644 --- a/pkg/simple/client/openpitrix/helmwrapper/helm_wrapper.go +++ b/pkg/simple/client/openpitrix/helmwrapper/helm_wrapper.go @@ -35,7 +35,7 @@ import ( helmrelease "helm.sh/helm/v3/pkg/release" "k8s.io/klog" kpath "k8s.io/utils/path" - "sigs.k8s.io/kustomize/pkg/types" + "sigs.k8s.io/kustomize/api/types" "kubesphere.io/kubesphere/pkg/server/errors" "kubesphere.io/kubesphere/pkg/utils/idutils" @@ -299,8 +299,8 @@ func (c *helmWrapper) setupPostRenderEnvironment() error { kustomizationConfig := types.Kustomization{ Resources: []string{"./.local-helm-output.yaml"}, - CommonAnnotations: c.annotations, // add extra annotations to output - CommonLabels: c.labels, // add extra labels to output + CommonAnnotations: c.annotations, // add extra annotations to output + Labels: []types.Label{types.Label{Pairs: c.labels}}, // Labels to add to all objects but not selectors. } err = yaml.NewEncoder(kustomization).Encode(kustomizationConfig)