Skip to content

Commit

Permalink
update refresh_sts.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyu committed May 6, 2024
1 parent b64b3f4 commit 5165f83
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions build/installer/refresh_sts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ get_shell_exec(){

repaire_crd_terminus() {
local patch
export KUBECONFIG=/root/.kube/config # for ubuntu
KUBECTL=$(command -v kubectl)

if [ ! -z "${AWS_SESSION_TOKEN_SETUP}" ]; then
patch='[{"op":"add","path":"/metadata/annotations/bytetrade.io~1s3-sts","value":"'"$AWS_SESSION_TOKEN_SETUP"'"},{"op":"add","path":"/metadata/annotations/bytetrade.io~1s3-ak","value":"'"$AWS_ACCESS_KEY_ID_SETUP"'"},{"op":"add","path":"/metadata/annotations/bytetrade.io~1s3-sk","value":"'"$AWS_SECRET_ACCESS_KEY_SETUP"'"},{"op":"add","path":"/metadata/annotations/bytetrade.io~1cluster-id","value":"'"$CLUSTER_ID"'"}]'
$sh_c "${KUBECTL} patch terminus.sys.bytetrade.io terminus -n os-system --type='json' -p='$patch'"
Expand Down

0 comments on commit 5165f83

Please sign in to comment.