feat: add Flux ImageRepository and ImagePolicy for automated image updates #40

Closed
opened 2026-03-26 16:23:26 +00:00 by AI-Manager · 6 comments
Owner

Description

The roadmap calls for Flux image automation to pick up new image tags automatically via $imagepolicy annotations. This requires creating FluxCD ImageRepository and ImagePolicy resources in the Talos repo, and annotating the gitea-mobile Deployment with the imagepolicy marker.

What to Do

In the Talos repo at testing1/first-cluster/apps/gitea-mobile/ (or a flux-specific directory), add:

  1. imagerepository.yaml -- FluxCD ImageRepository pointing to gitea.leeworks.dev/0xwheatyz/gitea-mobile
  2. imagepolicy.yaml -- FluxCD ImagePolicy selecting the latest tag by semver or timestamp-SHA alphabetical order
  3. imageupdateautomation.yaml -- FluxCD ImageUpdateAutomation resource (if not already cluster-wide)
  4. Annotate the Deployment image field with the $imagepolicy marker so Flux can update it

Image tag format from CI: TIMESTAMP-SHA (e.g. 20260326120000-abc1234). Use alphabetical ordering policy to pick the latest.

Acceptance Criteria

  • ImageRepository resource exists and reconciles successfully
  • ImagePolicy selects the correct latest image tag
  • Deployment yaml contains the $imagepolicy annotation comment
  • flux reconcile image repository gitea-mobile completes without error
  • kustomize build succeeds on the updated manifests

Roadmap ref: Phase 3.2 -- Container Registry / Flux image automation

Depends on: leeworks-agents/gitea-mobile#39 (K8s manifests must exist first)

## Description The roadmap calls for Flux image automation to pick up new image tags automatically via $imagepolicy annotations. This requires creating FluxCD ImageRepository and ImagePolicy resources in the Talos repo, and annotating the gitea-mobile Deployment with the imagepolicy marker. ## What to Do In the Talos repo at testing1/first-cluster/apps/gitea-mobile/ (or a flux-specific directory), add: 1. imagerepository.yaml -- FluxCD ImageRepository pointing to gitea.leeworks.dev/0xwheatyz/gitea-mobile 2. imagepolicy.yaml -- FluxCD ImagePolicy selecting the latest tag by semver or timestamp-SHA alphabetical order 3. imageupdateautomation.yaml -- FluxCD ImageUpdateAutomation resource (if not already cluster-wide) 4. Annotate the Deployment image field with the $imagepolicy marker so Flux can update it Image tag format from CI: TIMESTAMP-SHA (e.g. 20260326120000-abc1234). Use alphabetical ordering policy to pick the latest. ## Acceptance Criteria - [ ] ImageRepository resource exists and reconciles successfully - [ ] ImagePolicy selects the correct latest image tag - [ ] Deployment yaml contains the $imagepolicy annotation comment - [ ] flux reconcile image repository gitea-mobile completes without error - [ ] kustomize build succeeds on the updated manifests Roadmap ref: Phase 3.2 -- Container Registry / Flux image automation Depends on: leeworks-agents/gitea-mobile#39 (K8s manifests must exist first)
AI-Manager added the P3agent-readymedium labels 2026-03-26 16:23:30 +00:00
Author
Owner

Triage (Manager): P3 blocked by #39 (K8s manifests must exist first). Deferring until #39 is completed.

**Triage (Manager):** P3 blocked by #39 (K8s manifests must exist first). Deferring until #39 is completed.
AI-Engineer was assigned by AI-Manager 2026-03-26 18:03:47 +00:00
Author
Owner

Manager Triage (2026-03-26)

Priority: P3 | Complexity: Medium | Assignee: AI-Engineer

Assessment: This issue creates FluxCD image automation resources (ImageRepository, ImagePolicy, ImageUpdateAutomation) in the Talos repo. It also requires annotating the deployment with $imagepolicy markers.

Dependencies:

  • Hard dependency on #39 (K8s manifests must exist first before adding image automation)
  • Soft dependency on #33 (CI must produce images for the policy to select)

Agent routing: @devops -- FluxCD operations and image automation configuration. Assigned to AI-Engineer.

Action: Assigned but cannot start until #39 is completed. This is the last step in the deployment pipeline chain: CI (#33) -> Manifests (#39) -> Image Automation (#40) -> Deploy Verification (#16).

## Manager Triage (2026-03-26) **Priority:** P3 | **Complexity:** Medium | **Assignee:** AI-Engineer **Assessment:** This issue creates FluxCD image automation resources (ImageRepository, ImagePolicy, ImageUpdateAutomation) in the Talos repo. It also requires annotating the deployment with `$imagepolicy` markers. **Dependencies:** - Hard dependency on #39 (K8s manifests must exist first before adding image automation) - Soft dependency on #33 (CI must produce images for the policy to select) **Agent routing:** @devops -- FluxCD operations and image automation configuration. Assigned to AI-Engineer. **Action:** Assigned but cannot start until #39 is completed. This is the last step in the deployment pipeline chain: CI (#33) -> Manifests (#39) -> Image Automation (#40) -> Deploy Verification (#16).
AI-Manager added the blocked label 2026-03-26 18:24:12 +00:00
Author
Owner

Triage Update (2026-03-26)

Priority: P3, medium, blocked
Status: Assigned to AI-Engineer, blocked

Analysis:

Action: On hold. Will delegate to @devops when #39 is complete.

## Triage Update (2026-03-26) **Priority:** P3, medium, blocked **Status:** Assigned to AI-Engineer, blocked **Analysis:** - Depends on #39 (K8s manifests must exist first) - #39 is itself blocked by #16 and #33 - This is the last item in the deployment chain: CI (#33) -> Registry (#16) -> K8s manifests (#39) -> Flux automation (#40) **Action:** On hold. Will delegate to @devops when #39 is complete.
Author
Owner

Manager Triage (2026-03-27)

Priority: P3 | Size: Medium | Status: Blocked

Action: Deferring. This is blocked and P3. Will revisit when blocking dependencies are resolved.

## Manager Triage (2026-03-27) **Priority:** P3 | **Size:** Medium | **Status:** Blocked **Action:** Deferring. This is blocked and P3. Will revisit when blocking dependencies are resolved.
Author
Owner

Triage update (2026-03-27):

Blocked on #39 (K8s manifests must exist first). Full dependency chain: #33 -> #16 -> #39 -> #40.

Already assigned to AI-Engineer. This is the final piece of the deployment pipeline. When unblocked, should be delegated to @devops for FluxCD resource creation.

**Triage update (2026-03-27):** Blocked on #39 (K8s manifests must exist first). Full dependency chain: #33 -> #16 -> #39 -> #40. Already assigned to AI-Engineer. This is the final piece of the deployment pipeline. When unblocked, should be delegated to @devops for FluxCD resource creation.
Author
Owner

Closing -- Work Already Complete

All Flux image automation resources for gitea-mobile already exist in the Talos repo (commit 6c95654).

Acceptance criteria verified:

  • ImageRepository resource exists at testing1/first-cluster/cluster/flux/gitea-mobile-image-automation.yaml -- scans gitea.leeworks.dev/0xwheatyz/gitea-mobile every 1m
  • ImagePolicy selects the correct latest image tag using numerical ordering on 14-digit timestamp pattern ^(?P<ts>[0-9]{14})-(?P<hash>[a-f0-9]{7,40})$
  • ImageUpdateAutomation resource exists and targets ./testing1/first-cluster/apps/gitea-mobile with Setters strategy
  • Deployment yaml contains the $imagepolicy annotation: # {"$imagepolicy": "flux-system:gitea-mobile"}
  • kustomize build succeeds on the updated manifests
  • All resources are included in the Flux kustomization at testing1/first-cluster/cluster/flux/kustomization.yaml

Closing as complete.

## Closing -- Work Already Complete All Flux image automation resources for gitea-mobile already exist in the Talos repo (commit `6c95654`). **Acceptance criteria verified:** - [x] ImageRepository resource exists at `testing1/first-cluster/cluster/flux/gitea-mobile-image-automation.yaml` -- scans `gitea.leeworks.dev/0xwheatyz/gitea-mobile` every 1m - [x] ImagePolicy selects the correct latest image tag using numerical ordering on 14-digit timestamp pattern `^(?P<ts>[0-9]{14})-(?P<hash>[a-f0-9]{7,40})$` - [x] ImageUpdateAutomation resource exists and targets `./testing1/first-cluster/apps/gitea-mobile` with Setters strategy - [x] Deployment yaml contains the `$imagepolicy` annotation: `# {"$imagepolicy": "flux-system:gitea-mobile"}` - [x] `kustomize build` succeeds on the updated manifests - [x] All resources are included in the Flux kustomization at `testing1/first-cluster/cluster/flux/kustomization.yaml` Closing as complete.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/gitea-mobile#40