From 1a7f4722dfa91f496c5c43d3385e4283c7c917c5 Mon Sep 17 00:00:00 2001 From: Stefan Reimer Date: Thu, 13 Mar 2025 21:35:41 +0000 Subject: [PATCH] feat: remove sa2kubeconfig.sh aas vals support inCluster now --- Dockerfile | 3 --- sa2kubeconfig.sh | 29 ----------------------------- 2 files changed, 32 deletions(-) delete mode 100755 sa2kubeconfig.sh diff --git a/Dockerfile b/Dockerfile index bebc168..0236f98 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,9 +39,6 @@ RUN curl -fsSL https://github.com/helmfile/vals/releases/download/${VALS_VERSION RUN ln -sf "$(helm env HELM_PLUGINS)/helm-secrets/scripts/wrapper/helm.sh" /usr/local/sbin/helm -# Add init script to convert SA token into kubeconfig for vals -ADD sa2kubeconfig.sh /usr/local/bin/sa2kubeconfig.sh - USER ${ARGOCD_USER_ID} RUN helm plugin install --version ${HELM_SECRETS_VERSION#v} https://github.com/jkroepke/helm-secrets diff --git a/sa2kubeconfig.sh b/sa2kubeconfig.sh deleted file mode 100755 index bde4194..0000000 --- a/sa2kubeconfig.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -e - -KUBECONFIG=$1 -SA_NAME=argo-argocd-repo-server - -CA64=$(cat /run/secrets/kubernetes.io/serviceaccount/ca.crt | base64 -w0) -TOKEN=$(cat /run/secrets/kubernetes.io/serviceaccount/token) - -cat > $KUBECONFIG << EOF -apiVersion: v1 -kind: Config -clusters: -- name: local - cluster: - server: https://$KUBERNETES_SERVICE_HOST:$KUBERNETES_SERVICE_PORT_HTTPS - certificate-authority-data: $CA64 -users: -- name: $SA_NAME - user: - token: "$TOKEN" -contexts: -- name: ${SA_NAME}_context - context: - cluster: local - user: $SA_NAME -current-context: ${SA_NAME}_context -EOF - -chmod 600 $KUBECONFIG