[Phase 3] Add Flux ImageRepository + ImagePolicy + ImageUpdateAutomation for all three API services #51
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?
Roadmap reference
Phase 3 — Servers: Close the CI→GitOps loop by automating image tag updates in Flux manifests.
Problem
The Flux HelmRelease manifests scaffolded in PR #48 (closes #46) use placeholder image tags (
latestor pinned stubs). When CI builds and pushes a new image toregistry.leeworks.dev, Flux won't automatically pick it up — the tag in the manifest must be updated.Flux's Image Automation controller solves this:
ImageRepository— tells Flux what registry to pollImagePolicy— selects the latest image matching a semver or regex patternImageUpdateAutomation— writes the updated tag back into the Git repoWhat to do
For each of the three API services (zip-enrichment, holidays, air-quality):
flux/<service>/image-repository.yaml—ImageRepositorypointing toregistry.leeworks.dev/leeworks-agents/<service>flux/<service>/image-policy.yaml—ImagePolicyselectingsemver:>=0.1.0(or latest-stable regex)flux/<service>/image-update-automation.yaml—ImageUpdateAutomationcommitting tag changes toleeworks-agents/api-company:main# {"\": "<service>:<service>"}marker comment to the HelmRelease image field so Flux knows where to write the tagflux/<service>/kustomization.yamlkustomize build flux/— must pass with zero errorsAcceptance criteria
ImageRepository,ImagePolicy, andImageUpdateAutomationmanifests committedkustomize build flux/passes\marker in the image fieldDependencies
Closed by PR #52. flux/image-automation/ committed: ImageRepository + ImagePolicy + ImageUpdateAutomation for zip-enrichment, holidays, air-quality. Setter markers added to all three HelmReleases. kustomize build flux/ passes.