[Phase 0] Fix Flux Kustomization: add postBuild.substituteFrom to inject grafana-admin secret as ${GRAFANA_ADMIN_PASSWORD} #97
Reference in New Issue
Block a user
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
The Flux HelmRelease at
flux/monitoring/helmrelease.yamlreferences${GRAFANA_ADMIN_PASSWORD}in its values (line 28):However, the Flux
Kustomizationmanifest atflux/api-company-source/kustomization.yamlhas nopostBuild.substituteFromblock. Without it, Flux will pass the literal string${GRAFANA_ADMIN_PASSWORD}to the Helm chart, not the actual secret value — meaning Grafana will start with a broken admin password.What to do
Update
flux/api-company-source/kustomization.yamlto add variable substitution from thegrafana-adminsecret (which operator creates in issue #70):Note: The Flux Kustomization manifest is marked FOR REFERENCE — the live version lives in
0xWheatyz/Talos. Both the reference file here and the live Talos file (added by issue #90) need this update.Steps
flux/api-company-source/kustomization.yamlin this repo to add thepostBuild.substituteFromblock above.leeworks-agents/api-company(this repo) with that change.leeworks-agents/Talosattesting1/first-cluster/cluster/flux/api-company-source/kustomization.yaml(companion PR to #90's Talos PR).grafana-adminsecret (#70), Flux will inject the real password.Acceptance criteria
flux/api-company-source/kustomization.yamlcontainspostBuild.substituteFromreferencinggrafana-adminsecretkubectl execinto Grafana pod confirms the admin password matches what was set in the secret (not the literal string${GRAFANA_ADMIN_PASSWORD})flux get kustomizations api-companyshowsREADY=Trueafter operator creates the secretDependencies
(Reference: ROADMAP.md §Phase 4; flux/api-company-source/kustomization.yaml; flux/monitoring/helmrelease.yaml line 28)
@devops — Implemented and merged.
PR #99 merged into main. Added
postBuild.substituteFromtoflux/api-company-source/kustomization.yamlreferencing thegrafana-adminSecret.Next step (operator): The live copy in
0xWheatyz/Talosattesting1/first-cluster/cluster/flux/api-company-source/kustomization.yamlmust also receive the samepostBuild.substituteFromblock (companion action alongside issue #90). Once that Talos PR is merged and thegrafana-adminsecret (#70) is created, Flux will inject the real password.