Last active
November 23, 2023 09:14
-
-
Save suresh-sendinblue/7d8cd16f8916439c5a7984bd2d047c3e to your computer and use it in GitHub Desktop.
Revisions
-
suresh-sendinblue revised this gist
Apr 12, 2023 . 1 changed file with 7 additions and 7 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 @@ -7,12 +7,12 @@ KUBECONFIG=$2 SA_TOKEN=$3 client_domain=$4 if (test -f $KUBECONFIG && ! test -f $SA_TOKEN); then if curl -s --insecure --connect-timeout 10 $kubeserver > /dev/null; then echo "$KUBESERVER is able to connect"; kubectl --kubeconfig $KUBECONFIG create serviceaccount argocd-sa -n kube-system kubectl --kubeconfig $KUBECONFIG create token argocd-sa -n kube-system --audience https://$client_domain > $SA_TOKEN; else echo "Connection refused: $KUBESERVER"; fi fi -
suresh-sendinblue revised this gist
Apr 12, 2023 . 1 changed file with 2 additions and 2 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 @@ -10,8 +10,8 @@ client_domain=$4 if curl -s --insecure --connect-timeout 10 $kubeserver > /dev/null; then echo "$KUBESERVER is able to connect"; if ! test -f $SA_TOKEN; then kubectl --kubeconfig $KUBECONFIG create serviceaccount argocd-sa -n kube-system kubectl --kubeconfig $KUBECONFIG create token argocd-sa -n kube-system --audience https://$client_domain > $SA_TOKEN; fi else echo "Connection refused: $KUBESERVER"; -
suresh-sendinblue revised this gist
Apr 12, 2023 . 1 changed file with 3 additions and 1 deletion.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 @@ -5,11 +5,13 @@ set -x kubeserver=$1 KUBECONFIG=$2 SA_TOKEN=$3 client_domain=$4 if curl -s --insecure --connect-timeout 10 $kubeserver > /dev/null; then echo "$KUBESERVER is able to connect"; if ! test -f $SA_TOKEN; then kubectl --kubeconfig $KUBECONFIG create serviceaccount argocd-$kubeserver-sa -n kube-system kubectl --kubeconfig $KUBECONFIG create token argocd-$kubeserver-sa -n kube-system --audience https://$client_domain > $SA_TOKEN; fi else echo "Connection refused: $KUBESERVER"; -
suresh-sendinblue created this gist
Apr 12, 2023 .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,16 @@ #!/bin/bash set -x kubeserver=$1 KUBECONFIG=$2 SA_TOKEN=$3 if curl -s --insecure --connect-timeout 10 $kubeserver > /dev/null; then echo "$KUBESERVER is able to connect"; if ! test -f $SA_TOKEN; then kubectl --kubeconfig $KUBECONFIG create token default --duration 600s > $SA_TOKEN; fi else echo "Connection refused: $KUBESERVER"; fi