From 69a81765385c5561c3299974436cd92dadc2390e Mon Sep 17 00:00:00 2001 From: allaun Date: Sun, 5 Jul 2026 23:22:47 -0500 Subject: [PATCH] fix(webhook): configure in-cluster service account authentication and remove KUBECONFIG dependency --- infra/webhook/deploy.sh | 5 ++--- infra/webhook/deployment.yaml | 2 -- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/infra/webhook/deploy.sh b/infra/webhook/deploy.sh index 3b20f022..7f538454 100644 --- a/infra/webhook/deploy.sh +++ b/infra/webhook/deploy.sh @@ -9,7 +9,6 @@ fi export SOPS_AGE_KEY_FILE="/secrets/age.agekey" SECRETS_DIR="/repos/SilverSight/infra/secrets" -KUBECONFIG="/etc/rancher/k3s/k3s.yaml" log() { echo "[$(date -u +%H:%M:%S)] $*"; } @@ -27,7 +26,7 @@ case "$REPO" in log "Deploying Homarr..." sops --decrypt --output-type yaml "$SECRETS_DIR/homarr-values.enc.yaml" > /tmp/homarr-values.yaml helm upgrade --install homarr oci://ghcr.io/homarr-labs/charts/homarr \ - --namespace homarr --kubeconfig "$KUBECONFIG" \ + --namespace homarr \ -f /tmp/homarr-values.yaml --wait --timeout 4m rm -f /tmp/homarr-values.yaml log "Homarr deployed ✅" @@ -38,7 +37,7 @@ case "$REPO" in log "Deploying Authentik..." sops --decrypt --output-type yaml "$SECRETS_DIR/authentik-values.enc.yaml" > /tmp/authentik-values.yaml helm upgrade --install authentik oci://ghcr.io/goauthentik/helm-charts/authentik \ - --namespace authentik --kubeconfig "$KUBECONFIG" \ + --namespace authentik \ -f /tmp/authentik-values.yaml --wait --timeout 8m rm -f /tmp/authentik-values.yaml log "Authentik deployed ✅" diff --git a/infra/webhook/deployment.yaml b/infra/webhook/deployment.yaml index d106e18b..f687bfdf 100644 --- a/infra/webhook/deployment.yaml +++ b/infra/webhook/deployment.yaml @@ -45,8 +45,6 @@ spec: key: webhook-secret - name: SOPS_AGE_KEY_FILE value: /secrets/age.agekey - - name: KUBECONFIG - value: /etc/rancher/k3s/k3s.yaml volumeMounts: - name: hooks-config mountPath: /config