fix: cleanup
This commit is contained in:
parent
0fd61d86b8
commit
fa2e7dfcf0
@ -1,11 +1,12 @@
|
|||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
SA_NAME=$ARGOCD_REPO_SERVER_NAME
|
KUBECONFIG=$1
|
||||||
|
SA_NAME=argo-argocd-repo-server
|
||||||
|
|
||||||
CA64=$(cat /run/secrets/kubernetes.io/serviceaccount/ca.crt | base64 -w0)
|
CA64=$(cat /run/secrets/kubernetes.io/serviceaccount/ca.crt | base64 -w0)
|
||||||
TOKEN=$(cat /run/secrets/kubernetes.io/serviceaccount/token)
|
TOKEN=$(cat /run/secrets/kubernetes.io/serviceaccount/token)
|
||||||
|
|
||||||
cat > $1 << EOF
|
cat > $KUBECONFIG << EOF
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Config
|
kind: Config
|
||||||
clusters:
|
clusters:
|
||||||
@ -24,3 +25,5 @@ contexts:
|
|||||||
user: $SA_NAME
|
user: $SA_NAME
|
||||||
current-context: ${SA_NAME}_context
|
current-context: ${SA_NAME}_context
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
chmod 600 $KUBECONFIG
|
||||||
|
Loading…
Reference in New Issue
Block a user