I have an existing deployment that has the label importance: normal
in spec/template/metadata/labels (all the pods spawned from this deployment have that label in them).
The current deployment yaml does NOT have that importance: normal
label in it. It was in an older version of the deployment yaml.
So everything that was deployed with the original deployment yaml has this importance label in it. After we perform a helm upgrade --install
and use the latest deployment yaml(which does not have this label) and when we look at the deployment in the cluster is still has this label in it. The deployment does have the changes we made but it does not delete this old label.
I want to be able to remove that label when a helm upgrade is performed.
I tried the following trying to use the --set flag but have had no luck.
Command I tried - which did nothing:
helm upgrade --install echo service-standard/service-standard --namespace qa --set-string spec.template.metadata.labels.importance="" -f ./helm-chart/values.shared.yaml --wait --timeout 600s
I also tried using --reset-values
and that also had no effect.
Here is the snippet of the deployment that I am trying to remove the label from - The label is in the first spec block (not the second) right before app: echo-selector
:
apiVersion: apps/v1kind: Deploymentmetadata: annotations: deployment.kubernetes.io/revision: "8" creationTimestamp: "2022-12-14T15:24:04Z" generation: 9 labels: app.kubernetes.io/managed-by: Helm name: echo-deploymentspec: replicas: 2 revisionHistoryLimit: 5 template: metadata: annotations: linkerd.io/inject: enabled creationTimestamp: null labels: app: echo-selector importance: normal version: current spec: containers: - env: - name: TEST
We do not want to have to delete the deployment and re install it (which would remove the label).Any help or advice is greatly appreciated!!!!