Last active
October 15, 2022 20:54
-
-
Save techmexdev/5183be77abb26679e3f5d7ff99171731 to your computer and use it in GitHub Desktop.
Revisions
-
Rodolfo Rodriguez revised this gist
Jan 7, 2020 . 1 changed file with 6 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,22 +1,24 @@ #!/usr/bin/env bash ENV=$1 APP=$2 NAMESPACE=$3 FILENAME=upgrade-error.txt while true do function upgrade() { helm upgrade $APP . \ --install --namespace $NAMESPACE \ -f values.yaml -f $ENV.values.yaml -f $ENV.secrets.yaml \ 2>&1 | tee $FILENAME } upgrade kind=$(cat $FILENAME | grep -oE 'kind:\ (\S[^,]*)' \ | sed 's/kind:\ //g' | awk '{print tolower($0)}') name=$(cat $FILENAME | grep -oE 'name:\ (\S[^,]*)' \ | sed 's/name:\ //g') -
Rodolfo Rodriguez renamed this gist
Dec 12, 2019 . 1 changed file with 14 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,13 +1,19 @@ #!/usr/bin/env bash ENV=dev APP=cert-manager NAMESPACE=cert-manager FILENAME=upgrade-error.txt while true do function upgrade() { helm upgrade $APP . \ --install --namespace $NAMESPACE \ -f $ENV.values.yaml -f $ENV.secrets.yaml \ 2>&1 | tee $FILENAME } upgrade kind=$(cat $FILENAME | grep -oE 'kind:\ (\S[^,]*)' \ | sed 's/kind:\ //g' | awk '{print tolower($0)}') @@ -25,3 +31,5 @@ if [[ "$shouldContinue" != "y" ]]; then fi kubectl delete $kind $name done -
Rodolfo Rodriguez created this gist
Dec 12, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ #!/usr/bin/env bash ENV=dev APP=app NAMESPACE=namespace FILENAME=upgrade-error.txt upgrade=$(helm upgrade $APP . \ --install --namespace $NAMESPACE \ -f $ENV.values.yaml -f $ENV.secrets.yaml \ 2>&1 | tee $FILENAME) kind=$(cat $FILENAME | grep -oE 'kind:\ (\S[^,]*)' \ | sed 's/kind:\ //g' | awk '{print tolower($0)}') name=$(cat $FILENAME | grep -oE 'name:\ (\S[^,]*)' \ | sed 's/name:\ //g') echo "Delete kind: $kind with name: $name? Only 'y' will be accepted to approve." read -p "Enter a value: " shouldContinue if [[ "$shouldContinue" != "y" ]]; then echo "You have canceled the upgrade" exit fi kubectl delete $kind $name