Add labels to all objects but not selectors
Signed-off-by: LiHui <andrewli@yunify.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user