fix: cleanup
All checks were successful
ZeroDownTime/zdt-argocd/pipeline/head This commit looks good
ZeroDownTime/zdt-argocd/pipeline/tag This commit looks good

This commit is contained in:
Stefan Reimer 2024-05-20 11:30:43 +00:00
parent 0fd61d86b8
commit fa2e7dfcf0

View File

@ -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