Commit 645cf7a4 authored by Erik Forsberg's avatar Erik Forsberg

Makes kubectl annotate work in Helm 2to3 migration Jobs

Closes https://gitlab.com/gitlab-org/gitlab/-/issues/340922

Changelog: fixed
parent eb506c84
......@@ -41,9 +41,9 @@
echo "Adopting Helm v2 manifests from $release"
# some resource kinds must be listed explicitly https://github.com/kubernetes/kubernetes/issues/42885
for name in $(kubectl -n "$KUBE_NAMESPACE" get all,ingress,daemonset -o name -l chart="$chart"); do
kubectl annotate --overwrite "$name" meta.helm.sh/release-name="$release"
kubectl annotate --overwrite "$name" meta.helm.sh/release-namespace="$KUBE_NAMESPACE"
kubectl label --overwrite "$name" app.kubernetes.io/managed-by=Helm
kubectl annotate -n "$KUBE_NAMESPACE" --overwrite "$name" meta.helm.sh/release-name="$release"
kubectl annotate -n "$KUBE_NAMESPACE" --overwrite "$name" meta.helm.sh/release-namespace="$KUBE_NAMESPACE"
kubectl label -n "$KUBE_NAMESPACE" --overwrite "$name" app.kubernetes.io/managed-by=Helm
done
done
# migrate each release
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment