From 2f87febdb4a337fec483ed4fb0a4a378badcb95c Mon Sep 17 00:00:00 2001 From: Nikolai Rodionov Date: Sat, 18 Feb 2023 21:39:15 +0100 Subject: [PATCH] Add somewhat migrating script --- bin/migrate.sh | 3 +++ 1 file changed, 3 insertions(+) create mode 100755 bin/migrate.sh diff --git a/bin/migrate.sh b/bin/migrate.sh new file mode 100755 index 0000000..617cf43 --- /dev/null +++ b/bin/migrate.sh @@ -0,0 +1,3 @@ +#kubectl get all,cm,secret,ing,role,clusterrole,rolebindings,clusterrolebindings -l app.kubernetes.io/managed-by=Helm -l app.kubernetes.io/instance=cert-manager -A --no-headers --output custom-columns="POD-NAME":.kind,"NAMESPACE":.metadata.name | while read -r var1 var2; do kubectl annotate $var1 $var2 "meta.helm.sh/release-namespace"="cert-manager" "meta.helm.sh/release-name"="cert-manager" --overwrite; done + +kubectl get ValidatingWebhookConfiguration,all,cm,secret,ing,role,clusterrole,rolebindings,clusterrolebindings,MutatingWebhookConfiguration -l app.kubernetes.io/managed-by=Helm -l app.kubernetes.io/instance=cert-manager -A --no-headers --output custom-columns="POD-NAME":.kind,"NAMESPACE":.metadata.name,"ns":.metadata.namespace | while read -r var1 var2 var3; do kubectl annotate $var1 $var2 -n $var3 "meta.helm.sh/release-namespace"="cert-manager" "meta.helm.sh/release-name"="cert-manager"; done