Skip to content

Commit

Permalink
chore: add scripts to change the addon release owner (#8491)
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyelei authored Nov 21, 2024
1 parent 16cc9f3 commit 9776e82
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions deploy/helm/scripts/change_addon_release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
release=$1
namespace=$2

function updateRelease() {
local kind=$1
crs=$(kubectl get $kind -l app.kubernetes.io/instance=${release} --no-headers)
OLD_IFS=$IFS
IFS=$'\n'
for line in $crs; do
name=$(echo "$line" | awk '{print $1}')
kubectl annotate $kind $name --overwrite meta.helm.sh/release-name=$release
kubectl annotate $kind $name --overwrite meta.helm.sh/release-namespace=$namespace
done
IFS=$OLD_IFS
}

updateRelease clusterdefinition
updateRelease componentversion

File renamed without changes.

0 comments on commit 9776e82

Please sign in to comment.