infra/stacks/woodpecker/values.yaml
Viktor Barzin 1cd767652d fix: migrate woodpecker database credentials to runtime-refreshed ExternalSecret
The woodpecker server was crashing repeatedly with database authentication failures
because Vault rotates the database password every 24 hours, but the Helm release
had hardcoded the password into WOODPECKER_DATABASE_DATASOURCE at plan time.

Changes:
- Updated ExternalSecret to provide the full DATABASE_DATASOURCE URI dynamically
- Modified Helm values to use envFrom to inject the secret instead of hardcoding
- ExternalSecret refreshes every 15 minutes, automatically picking up rotated passwords
- Pod will auto-restart when secret changes (via reloader.stakater.com annotation)
- This eliminates the plan-time password snapshot that goes stale within 24h

The pod still has an unrelated image pull issue on k8s-node4 (containerd blob
corruption), but the database credentials mechanism is now correctly implemented.
2026-03-18 08:04:04 +00:00

61 lines
1.7 KiB
YAML

server:
enabled: true
podAnnotations:
reloader.stakater.com/search: "true"
statefulSet:
replicaCount: 1
image:
registry: docker.io
repository: woodpeckerci/woodpecker-server
tag: "v3.13.0"
env:
WOODPECKER_HOST: "https://ci.viktorbarzin.me"
WOODPECKER_ADMIN: "${woodpecker_admins}"
WOODPECKER_OPEN: "true"
WOODPECKER_GITHUB: "true"
WOODPECKER_GITHUB_URL: "https://github.com"
WOODPECKER_GITHUB_CLIENT: "${github_client_id}"
WOODPECKER_GITHUB_SECRET: "${github_client_secret}"
WOODPECKER_AGENT_SECRET: "${agent_secret}"
WOODPECKER_DATABASE_DRIVER: "postgres"
WOODPECKER_PLUGINS_PRIVILEGED: "woodpeckerci/plugin-docker-buildx,plugins/docker"
WOODPECKER_PLUGINS_TRUSTED_CLONE: "woodpeckerci/plugin-git,alpine"
WOODPECKER_LOG_LEVEL: "info"
WOODPECKER_FORGEJO: "true"
WOODPECKER_FORGEJO_CLIENT: "${forgejo_client_id}"
WOODPECKER_FORGEJO_SECRET: "${forgejo_client_secret}"
WOODPECKER_FORGEJO_URL: "${forgejo_url}"
envFrom:
- secretRef:
name: woodpecker-db-creds
service:
type: ClusterIP
port: 80
# Disable built-in ingress (using ingress_factory)
ingress:
enabled: false
# Disable PVC (using PostgreSQL instead of SQLite)
persistence:
enabled: false
agent:
enabled: true
podAnnotations:
reloader.stakater.com/search: "true"
replicaCount: 2
image:
registry: docker.io
repository: woodpeckerci/woodpecker-agent
tag: "v3.13.0"
env:
WOODPECKER_BACKEND: "kubernetes"
WOODPECKER_BACKEND_K8S_NAMESPACE: "woodpecker"
WOODPECKER_MAX_WORKFLOWS: "2"
WOODPECKER_AGENT_SECRET: "${agent_secret}"
persistence:
enabled: false
rbac:
create: true
serviceAccount:
create: true
name: "woodpecker-agent"