Automate add-service-to-domain (DDNS secret + caddy route) #42
Labels
No labels
Monitoring
automation
bug
duplicate
feature
forgejo
help wanted
invalid
k3s
keycloak
ldap
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lab/homelab#42
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Exposing a new service publicly currently requires manual steps that are error-prone and undocumented in automation:
k3s-ha-cluster/caddy/configmap.yaml(deployed by the caddy-upgrade workflow)temp/config.json(gitignored, real Cloudflare API token)config-cloudflare-ddnssecret by handkubectl rollout restartddns + caddyDetails
.forgejo/workflows/caddy-upgrade.yml(triggered onconfigmap.yamlchanges, withworkflow_dispatchsupport).temp/config.jsonholds the real Cloudflare token and is gitignored, so the committedk3s-ha-cluster/ddns/config-cloudflare-ddns-Secret.yamlis only a placeholder (<my-base64-encoded-config>).temp/config.jsonalso stores the Cloudflare API token in plaintext locally; ideally it moves into a Forgejo secret (e.g.CLOUDFLARE_DDNS_CONFIG) so a workflow can render the Secret.Success criteria
deploy-ddns.yml) that renders the realconfig-cloudflare-ddnsSecret from a Forgejo-stored secret and applies it, triggered on changes to a versioned config or viaworkflow_dispatch.temp/config.jsoneither becomes a template with the token sourced from a secret, or moves behind a small script..kiro/skills/homelab-k3s/references/add-service-to-caddy.mdto the automated flow.Refs #39