Add stable secret to woodpecker agent

This commit is contained in:
2026-08-22 23:57:43 +03:00
parent 825d4cf602
commit 20df574678
2 changed files with 26 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
---
# Stable shared agent secret. The Helm chart's built-in
# woodpecker-default-agent-secret is generated with randAlphaNum at
# template time, so every ArgoCD render/sync produced a new value and
# agents started after a sync could no longer authenticate against the
# running server ("individual agent not found by token").
apiVersion: codemowers.cloud/v1beta1
kind: SecretClaim
metadata:
name: woodpecker-agent-secret
namespace: woodpecker
spec:
size: 32
mapping:
- key: WOODPECKER_AGENT_SECRET
value: "%(plaintext)s"

View File

@@ -16,6 +16,8 @@ helmCharts:
env: env:
WOODPECKER_BACKEND_K8S_STORAGE_CLASS: woodpecker WOODPECKER_BACKEND_K8S_STORAGE_CLASS: woodpecker
WOODPECKER_BACKEND_K8S_VOLUME_SIZE: 100Mi WOODPECKER_BACKEND_K8S_VOLUME_SIZE: 100Mi
extraSecretNamesForEnvFrom:
- woodpecker-agent-secret
persistence: persistence:
enabled: false enabled: false
server: server:
@@ -42,9 +44,16 @@ helmCharts:
WOODPECKER_GITEA_URL: https://git.k-space.ee WOODPECKER_GITEA_URL: https://git.k-space.ee
WOODPECKER_HOST: https://woodpecker.k-space.ee WOODPECKER_HOST: https://woodpecker.k-space.ee
WOODPECKER_OPEN: true WOODPECKER_OPEN: true
# the chart's built-in woodpecker-default-agent-secret is random on
# every template render, breaking agent auth after each ArgoCD sync.
# It cannot be disabled (the agent subchart hardcodes the envFrom
# reference), so a stable SecretClaim-generated secret is layered
# after it: for duplicate keys the last envFrom source wins, making
# the random one inert (see agent-secret.yaml)
extraSecretNamesForEnvFrom: extraSecretNamesForEnvFrom:
- woodpecker-gitea-oauth2 - woodpecker-gitea-oauth2
- mariadb-secrets - mariadb-secrets
- woodpecker-agent-secret
image: image:
registry: mirror.gcr.io registry: mirror.gcr.io
# persistentVolume: # persistentVolume:
@@ -55,3 +64,4 @@ helmCharts:
resources: resources:
- ssh://git@git.k-space.ee/secretspace/kube/woodpecker - ssh://git@git.k-space.ee/secretspace/kube/woodpecker
- ./mariadb.yaml - ./mariadb.yaml
- ./agent-secret.yaml