Commit e716bb03 authored by Shinya Maeda's avatar Shinya Maeda

Merge branch 'helm-2to3-namespace-in-adopt' into 'master'

Makes kubectl annotate work in Helm 2to3 migration Jobs

See merge request gitlab-org/gitlab!70389
parents c722cbf0 645cf7a4
......@@ -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