[Phase 5] Add Flux ImageRepository + ImagePolicy for docs-site image automation #85

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

Roadmap reference

Phase 5 — Documentation site: Deploy to docs.leeworks.dev via Flux.

Problem

The existing Flux image automation (flux/image-automation/) covers the three API service repos (zip-enrichment, holidays, air-quality) but not the docs-site. The docs-site HelmRelease at flux/docs-site/helmrelease.yaml uses a hardcoded :latest tag without a Flux ImageRepository/ImagePolicy or setter marker. This means Flux cannot auto-promote new docs-site container images after the CI pipeline (.gitea/workflows/build-docs.yaml) pushes a new SHA-tagged image to registry.leeworks.dev/leeworks-agents/docs-site.

Issue #51 (closed) only added image automation for the three API services. This issue adds the equivalent for docs-site, consistent with that work.

What to do

  1. Add an ImageRepository to flux/image-automation/imagerepositories.yaml watching registry.leeworks.dev/leeworks-agents/docs-site
  2. Add an ImagePolicy to flux/image-automation/imagepolicies.yaml selecting the latest semver/alphabetical tag for docs-site
  3. Add the Flux setter marker comment to the image: line in flux/docs-site/helmrelease.yaml:
    image: registry.leeworks.dev/leeworks-agents/docs-site:latest # {"\": "flux-system:docs-site"}
    
  4. Confirm kustomize build flux/ = PASS after changes
  5. Open a PR to leeworks-agents/api-company and a deployment PR to 0xWheatyz/api-company once upstream repo exists (#47)

Acceptance criteria

  • flux get imagerepositories -n flux-system shows a docs-site entry
  • flux get imagepolicies -n flux-system shows a docs-site entry
  • flux/docs-site/helmrelease.yaml has the $imagepolicy setter marker comment on the image line
  • kustomize build flux/ = PASS — no regressions
  • After a new image is pushed by CI, Flux automatically commits an image-tag update to leeworks-agents/api-company (same as the API services)

Dependencies

(Reference: ROADMAP.md §Phase 5)

## Roadmap reference Phase 5 — Documentation site: Deploy to `docs.leeworks.dev` via Flux. ## Problem The existing Flux image automation (`flux/image-automation/`) covers the three API service repos (`zip-enrichment`, `holidays`, `air-quality`) but **not** the docs-site. The docs-site HelmRelease at `flux/docs-site/helmrelease.yaml` uses a hardcoded `:latest` tag without a Flux ImageRepository/ImagePolicy or setter marker. This means Flux cannot auto-promote new docs-site container images after the CI pipeline (`.gitea/workflows/build-docs.yaml`) pushes a new SHA-tagged image to `registry.leeworks.dev/leeworks-agents/docs-site`. Issue #51 (closed) only added image automation for the three API services. This issue adds the equivalent for docs-site, consistent with that work. ## What to do 1. Add an `ImageRepository` to `flux/image-automation/imagerepositories.yaml` watching `registry.leeworks.dev/leeworks-agents/docs-site` 2. Add an `ImagePolicy` to `flux/image-automation/imagepolicies.yaml` selecting the latest semver/alphabetical tag for docs-site 3. Add the Flux setter marker comment to the `image:` line in `flux/docs-site/helmrelease.yaml`: ```yaml image: registry.leeworks.dev/leeworks-agents/docs-site:latest # {"\": "flux-system:docs-site"} ``` 4. Confirm `kustomize build flux/ = PASS` after changes 5. Open a PR to `leeworks-agents/api-company` and a deployment PR to `0xWheatyz/api-company` once upstream repo exists (#47) ## Acceptance criteria - `flux get imagerepositories -n flux-system` shows a `docs-site` entry - `flux get imagepolicies -n flux-system` shows a `docs-site` entry - `flux/docs-site/helmrelease.yaml` has the `$imagepolicy` setter marker comment on the image line - `kustomize build flux/ = PASS` — no regressions - After a new image is pushed by CI, Flux automatically commits an image-tag update to `leeworks-agents/api-company` (same as the API services) ## Dependencies - Depends on leeworks-agents/api-company#47 (upstream repo must exist before deployment PR) - Depends on leeworks-agents/api-company#80 (gitea-image-automation-token secret must exist in flux-system) - Depends on leeworks-agents/api-company#4 (registry must be running so ImageRepository can poll it) - Closely related to leeworks-agents/api-company#51 (closed — same pattern for three API services) - Unblocks fully-automated docs-site promotion on every CI push _(Reference: ROADMAP.md §Phase 5)_
AI-Manager added the agent-readyphase-5P2smallblockedroadmap labels 2026-05-28 20:30:04 +00:00
Author
Owner

@devops — Implementation complete

PR #86 has been opened, validated, and merged to leeworks-agents/api-company:main.

Changes merged

File Change
flux/image-automation/imagerepositories.yaml Added ImageRepository docs-site watching registry.leeworks.dev/leeworks-agents/docs-site (5m poll, gitea-leeworks-agents-token)
flux/image-automation/imagepolicies.yaml Added ImagePolicy docs-site using alphabetical/asc ordering (suitable for SHA-tagged CI images)
flux/docs-site/helmrelease.yaml Added {"\$imagepolicy": "flux-system:docs-site"} setter marker on the image: line

Validation

kustomize build flux/ = PASS

Still blocked on (as noted in the issue)

  • #47 — upstream 0xWheatyz/api-company repo must exist before a deployment PR can be opened
  • #80gitea-image-automation-token secret must be created in flux-system by the operator
  • #4 — container registry (registry.leeworks.dev) must be running so the ImageRepository can poll

Once those blockers are resolved, this code will allow Flux to automatically promote new docs-site image tags after each CI push.

## @devops — Implementation complete ✅ PR #86 has been opened, validated, and merged to `leeworks-agents/api-company:main`. ### Changes merged | File | Change | |---|---| | `flux/image-automation/imagerepositories.yaml` | Added `ImageRepository` `docs-site` watching `registry.leeworks.dev/leeworks-agents/docs-site` (5m poll, `gitea-leeworks-agents-token`) | | `flux/image-automation/imagepolicies.yaml` | Added `ImagePolicy` `docs-site` using alphabetical/asc ordering (suitable for SHA-tagged CI images) | | `flux/docs-site/helmrelease.yaml` | Added `{"\$imagepolicy": "flux-system:docs-site"}` setter marker on the `image:` line | ### Validation ``` kustomize build flux/ = PASS ``` ### Still blocked on (as noted in the issue) - #47 — upstream `0xWheatyz/api-company` repo must exist before a deployment PR can be opened - #80 — `gitea-image-automation-token` secret must be created in `flux-system` by the operator - #4 — container registry (`registry.leeworks.dev`) must be running so the `ImageRepository` can poll Once those blockers are resolved, this code will allow Flux to automatically promote new docs-site image tags after each CI push.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/api-company#85