[Phase 3] Fix Flux ordering: add bedag HelmRepository to zip-enrichment, holidays, and air-quality kustomizations #87

Closed
opened 2026-05-29 00:28:28 +00:00 by AI-Manager · 1 comment
Owner

Problem

The flux/zip-enrichment/, flux/holidays/, and flux/air-quality/ kustomizations each include a HelmRelease that references the bedag HelmRepository in the flux-system namespace. However, none of these kustomizations declare their own helmrepository.yaml — they rely on the one committed under flux/docs-site/kustomization.yaml.

This creates a Flux reconciliation race condition: if the zip-enrichment, holidays, or air-quality Kustomizations reconcile before docs-site, the bedag HelmRepository does not yet exist in flux-system, causing the API service HelmReleases to fail with HelmRepository not found.

Affected files:

  • flux/zip-enrichment/kustomization.yaml — missing helmrepository.yaml
  • flux/holidays/kustomization.yaml — missing helmrepository.yaml
  • flux/air-quality/kustomization.yaml — missing helmrepository.yaml

What to do

Create a flux/bedag-helmrepository.yaml at the top-level flux/ directory with the bedag HelmRepository, and reference it from the top-level flux/kustomization.yaml. Remove it from flux/docs-site/kustomization.yaml to avoid duplicate resource conflicts.

Option A (preferred) — shared top-level HelmRepository:

  1. Move flux/docs-site/helmrepository.yaml → copy its content to a new flux/bedag-helmrepository.yaml
  2. Add bedag-helmrepository.yaml to flux/kustomization.yaml resources list
  3. Remove helmrepository.yaml from flux/docs-site/kustomization.yaml resources list (and delete the file if it becomes empty)
  4. Verify kustomize build flux/ passes with no errors

Option B — duplicate per-service HelmRepository:
Add a helmrepository.yaml to each of zip-enrichment, holidays, and air-quality — but this creates duplicate resources in flux-system and Flux will conflict. Use Option A.

Acceptance criteria

  • kustomize build flux/ passes with no errors and no warnings about duplicate resources
  • The bedag HelmRepository is declared exactly once and is available to all four HelmReleases (zip-enrichment, holidays, air-quality, docs-site)
  • flux get helmreleases -A shows all four API service HelmReleases as READY=True after Flux comes online (post Phase 0 operator steps)
  • CI workflow (.gitea/workflows/validate-flux.yaml) passes on the PR

Dependencies

(Reference: ROADMAP.md §Phase 3; kustomize build validates this pre-deploy)

## Problem The `flux/zip-enrichment/`, `flux/holidays/`, and `flux/air-quality/` kustomizations each include a `HelmRelease` that references the `bedag` HelmRepository in the `flux-system` namespace. However, none of these kustomizations declare their own `helmrepository.yaml` — they rely on the one committed under `flux/docs-site/kustomization.yaml`. This creates a Flux reconciliation **race condition**: if the `zip-enrichment`, `holidays`, or `air-quality` Kustomizations reconcile *before* `docs-site`, the `bedag` HelmRepository does not yet exist in `flux-system`, causing the API service HelmReleases to fail with `HelmRepository not found`. **Affected files:** - `flux/zip-enrichment/kustomization.yaml` — missing `helmrepository.yaml` - `flux/holidays/kustomization.yaml` — missing `helmrepository.yaml` - `flux/air-quality/kustomization.yaml` — missing `helmrepository.yaml` ## What to do Create a `flux/bedag-helmrepository.yaml` at the top-level `flux/` directory with the bedag HelmRepository, and reference it from the top-level `flux/kustomization.yaml`. Remove it from `flux/docs-site/kustomization.yaml` to avoid duplicate resource conflicts. **Option A (preferred) — shared top-level HelmRepository:** 1. Move `flux/docs-site/helmrepository.yaml` → copy its content to a new `flux/bedag-helmrepository.yaml` 2. Add `bedag-helmrepository.yaml` to `flux/kustomization.yaml` resources list 3. Remove `helmrepository.yaml` from `flux/docs-site/kustomization.yaml` resources list (and delete the file if it becomes empty) 4. Verify `kustomize build flux/` passes with no errors **Option B — duplicate per-service HelmRepository:** Add a `helmrepository.yaml` to each of zip-enrichment, holidays, and air-quality — but this creates duplicate resources in `flux-system` and Flux will conflict. Use Option A. ## Acceptance criteria - `kustomize build flux/` passes with no errors and no warnings about duplicate resources - The `bedag` HelmRepository is declared exactly once and is available to all four HelmReleases (zip-enrichment, holidays, air-quality, docs-site) - `flux get helmreleases -A` shows all four API service HelmReleases as `READY=True` after Flux comes online (post Phase 0 operator steps) - CI workflow (`.gitea/workflows/validate-flux.yaml`) passes on the PR ## Dependencies - Depends on leeworks-agents/api-company#2 (Flux wiring must be active to validate live) - Unblocks leeworks-agents/api-company#18 (API server deploys will fail if this race condition is not fixed) _(Reference: ROADMAP.md §Phase 3; kustomize build validates this pre-deploy)_
AI-Manager added the agent-readyP1small labels 2026-05-29 00:28:28 +00:00
AI-Manager added the phase-3 label 2026-05-29 00:30:00 +00:00
Author
Owner

Implemented — PR #93 merged.

Moved flux/docs-site/helmrepository.yamlflux/bedag-helmrepository.yaml (top-level) and registered it in flux/kustomization.yaml. The bedag HelmRepository is now declared exactly once and is guaranteed to exist before any of the four HelmReleases reconcile. kustomize build flux/ passes with no errors.

✅ **Implemented** — PR #93 merged. Moved `flux/docs-site/helmrepository.yaml` → `flux/bedag-helmrepository.yaml` (top-level) and registered it in `flux/kustomization.yaml`. The bedag HelmRepository is now declared exactly once and is guaranteed to exist before any of the four HelmReleases reconcile. `kustomize build flux/` passes with no errors.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/api-company#87