chore(flux): migrate image-automation API v1beta2 -> v1
Migrate image.toolkit.fluxcd.io/v1beta2 -> /v1 for ImageRepository,
ImagePolicy, and ImageUpdateAutomation ahead of the Flux v2.7+ upgrade
(cluster-upgrade-plan §3.2). Flux v2.4 (current) already serves /v1, so
migrating the manifests now is a safe no-op at runtime.
- catalog/render.py: r_image_automation emits v1 for ImageRepository/ImagePolicy
- platform/image-automation/{image-update-automation,per-service/pihole.example}
- conformance L3 hands-off-update chainsaw applies v1 CRs
- conformance L1 goldens re-rendered to match (apiVersion-only diff)
No spec-field changes required: all spec fields used (image, interval,
imageRepositoryRef, filterTags.pattern/extract, policy.semver.range,
sourceRef, git.*, update.strategy/path) are unchanged in v1; the v1
messageTemplate already uses .Changed (not the removed .Updated).
apps/ golden unaffected (canonical render uses --no-image-automation).
Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
8dfb42f6c0
commit
d24a443c7d
8 files changed
+16
-16
No files matched your search
+2
-2
@@ -667,7 +667,7 @@ def r_image_automation(s: dict) -> list:
|
|||||||
upd = s["update"]
|
upd = s["update"]
|
||||||
interval = "1h0m0s"
|
interval = "1h0m0s"
|
||||||
imagerepo = {
|
imagerepo = {
|
||||||
"apiVersion": "image.toolkit.fluxcd.io/v1beta2",
|
"apiVersion": "image.toolkit.fluxcd.io/v1",
|
||||||
"kind": "ImageRepository",
|
"kind": "ImageRepository",
|
||||||
"metadata": {"name": s["name"], "namespace": s["name"]},
|
"metadata": {"name": s["name"], "namespace": s["name"]},
|
||||||
"spec": {"image": image, "interval": interval},
|
"spec": {"image": image, "interval": interval},
|
||||||
@@ -682,7 +682,7 @@ def r_image_automation(s: dict) -> list:
|
|||||||
else:
|
else:
|
||||||
policy_spec["policy"] = {"semver": {"range": ">=0.0.0"}}
|
policy_spec["policy"] = {"semver": {"range": ">=0.0.0"}}
|
||||||
imagepolicy = {
|
imagepolicy = {
|
||||||
"apiVersion": "image.toolkit.fluxcd.io/v1beta2",
|
"apiVersion": "image.toolkit.fluxcd.io/v1",
|
||||||
"kind": "ImagePolicy",
|
"kind": "ImagePolicy",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"name": s["name"],
|
"name": s["name"],
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ spec:
|
|||||||
interval: 30s
|
interval: 30s
|
||||||
---
|
---
|
||||||
# Flux ImageRepository (R-UPD)
|
# Flux ImageRepository (R-UPD)
|
||||||
apiVersion: image.toolkit.fluxcd.io/v1beta2
|
apiVersion: image.toolkit.fluxcd.io/v1
|
||||||
kind: ImageRepository
|
kind: ImageRepository
|
||||||
metadata:
|
metadata:
|
||||||
name: paas-demo
|
name: paas-demo
|
||||||
@@ -172,7 +172,7 @@ spec:
|
|||||||
interval: 1h0m0s
|
interval: 1h0m0s
|
||||||
---
|
---
|
||||||
# Flux ImagePolicy (R-UPD)
|
# Flux ImagePolicy (R-UPD)
|
||||||
apiVersion: image.toolkit.fluxcd.io/v1beta2
|
apiVersion: image.toolkit.fluxcd.io/v1
|
||||||
kind: ImagePolicy
|
kind: ImagePolicy
|
||||||
metadata:
|
metadata:
|
||||||
name: paas-demo
|
name: paas-demo
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ spec:
|
|||||||
interval: 30s
|
interval: 30s
|
||||||
---
|
---
|
||||||
# Flux ImageRepository (R-UPD)
|
# Flux ImageRepository (R-UPD)
|
||||||
apiVersion: image.toolkit.fluxcd.io/v1beta2
|
apiVersion: image.toolkit.fluxcd.io/v1
|
||||||
kind: ImageRepository
|
kind: ImageRepository
|
||||||
metadata:
|
metadata:
|
||||||
name: baseline-demo
|
name: baseline-demo
|
||||||
@@ -103,7 +103,7 @@ spec:
|
|||||||
interval: 1h0m0s
|
interval: 1h0m0s
|
||||||
---
|
---
|
||||||
# Flux ImagePolicy (R-UPD)
|
# Flux ImagePolicy (R-UPD)
|
||||||
apiVersion: image.toolkit.fluxcd.io/v1beta2
|
apiVersion: image.toolkit.fluxcd.io/v1
|
||||||
kind: ImagePolicy
|
kind: ImagePolicy
|
||||||
metadata:
|
metadata:
|
||||||
name: baseline-demo
|
name: baseline-demo
|
||||||
|
|||||||
+2
-2
@@ -212,7 +212,7 @@ spec:
|
|||||||
description: 'sonarr has been unreachable for 5m (SLI: up).'
|
description: 'sonarr has been unreachable for 5m (SLI: up).'
|
||||||
---
|
---
|
||||||
# Flux ImageRepository (R-UPD)
|
# Flux ImageRepository (R-UPD)
|
||||||
apiVersion: image.toolkit.fluxcd.io/v1beta2
|
apiVersion: image.toolkit.fluxcd.io/v1
|
||||||
kind: ImageRepository
|
kind: ImageRepository
|
||||||
metadata:
|
metadata:
|
||||||
name: sonarr
|
name: sonarr
|
||||||
@@ -222,7 +222,7 @@ spec:
|
|||||||
interval: 1h0m0s
|
interval: 1h0m0s
|
||||||
---
|
---
|
||||||
# Flux ImagePolicy (R-UPD)
|
# Flux ImagePolicy (R-UPD)
|
||||||
apiVersion: image.toolkit.fluxcd.io/v1beta2
|
apiVersion: image.toolkit.fluxcd.io/v1
|
||||||
kind: ImagePolicy
|
kind: ImagePolicy
|
||||||
metadata:
|
metadata:
|
||||||
name: sonarr
|
name: sonarr
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ spec:
|
|||||||
description: 'sonarr has been unreachable for 5m (SLI: up).'
|
description: 'sonarr has been unreachable for 5m (SLI: up).'
|
||||||
---
|
---
|
||||||
# Flux ImageRepository (R-UPD)
|
# Flux ImageRepository (R-UPD)
|
||||||
apiVersion: image.toolkit.fluxcd.io/v1beta2
|
apiVersion: image.toolkit.fluxcd.io/v1
|
||||||
kind: ImageRepository
|
kind: ImageRepository
|
||||||
metadata:
|
metadata:
|
||||||
name: sonarr
|
name: sonarr
|
||||||
@@ -222,7 +222,7 @@ spec:
|
|||||||
interval: 1h0m0s
|
interval: 1h0m0s
|
||||||
---
|
---
|
||||||
# Flux ImagePolicy (R-UPD)
|
# Flux ImagePolicy (R-UPD)
|
||||||
apiVersion: image.toolkit.fluxcd.io/v1beta2
|
apiVersion: image.toolkit.fluxcd.io/v1
|
||||||
kind: ImagePolicy
|
kind: ImagePolicy
|
||||||
metadata:
|
metadata:
|
||||||
name: sonarr
|
name: sonarr
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ spec:
|
|||||||
# resolution — proving it advanced the selection with zero hand-authored change.
|
# resolution — proving it advanced the selection with zero hand-authored change.
|
||||||
# =========================================================================================
|
# =========================================================================================
|
||||||
kubectl -n "$NS" apply -f - <<'EOF'
|
kubectl -n "$NS" apply -f - <<'EOF'
|
||||||
apiVersion: image.toolkit.fluxcd.io/v1beta2
|
apiVersion: image.toolkit.fluxcd.io/v1
|
||||||
kind: ImageRepository
|
kind: ImageRepository
|
||||||
metadata:
|
metadata:
|
||||||
name: podinfo
|
name: podinfo
|
||||||
@@ -80,7 +80,7 @@ spec:
|
|||||||
image: ghcr.io/stefanprodan/podinfo
|
image: ghcr.io/stefanprodan/podinfo
|
||||||
interval: 1m
|
interval: 1m
|
||||||
---
|
---
|
||||||
apiVersion: image.toolkit.fluxcd.io/v1beta2
|
apiVersion: image.toolkit.fluxcd.io/v1
|
||||||
kind: ImagePolicy
|
kind: ImagePolicy
|
||||||
metadata:
|
metadata:
|
||||||
name: podinfo-stable
|
name: podinfo-stable
|
||||||
@@ -94,7 +94,7 @@ spec:
|
|||||||
semver:
|
semver:
|
||||||
range: '>=6.0.0 <7.0.0'
|
range: '>=6.0.0 <7.0.0'
|
||||||
---
|
---
|
||||||
apiVersion: image.toolkit.fluxcd.io/v1beta2
|
apiVersion: image.toolkit.fluxcd.io/v1
|
||||||
kind: ImagePolicy
|
kind: ImagePolicy
|
||||||
metadata:
|
metadata:
|
||||||
name: podinfo-pinned
|
name: podinfo-pinned
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
# flux-system install (bootstrap/flux/bootstrap.sh `--components-extra`), so the image.toolkit CRDs
|
# flux-system install (bootstrap/flux/bootstrap.sh `--components-extra`), so the image.toolkit CRDs
|
||||||
# pre-exist before reconcile — this CR applies cleanly without the F-MON1 controllers/configs split
|
# pre-exist before reconcile — this CR applies cleanly without the F-MON1 controllers/configs split
|
||||||
# (the CRD is present at bootstrap, exactly like GitRepository/Kustomization are). See README.md.
|
# (the CRD is present at bootstrap, exactly like GitRepository/Kustomization are). See README.md.
|
||||||
apiVersion: image.toolkit.fluxcd.io/v1beta2
|
apiVersion: image.toolkit.fluxcd.io/v1
|
||||||
kind: ImageUpdateAutomation
|
kind: ImageUpdateAutomation
|
||||||
metadata:
|
metadata:
|
||||||
name: flux-image-automation
|
name: flux-image-automation
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
#
|
#
|
||||||
# See ./README.md for the field-by-field contract.
|
# See ./README.md for the field-by-field contract.
|
||||||
# ---------------------------------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------------------------------
|
||||||
apiVersion: image.toolkit.fluxcd.io/v1beta2
|
apiVersion: image.toolkit.fluxcd.io/v1
|
||||||
kind: ImageRepository
|
kind: ImageRepository
|
||||||
metadata:
|
metadata:
|
||||||
name: pihole
|
name: pihole
|
||||||
@@ -21,7 +21,7 @@ spec:
|
|||||||
interval: 6h # scan schedule; nearest Flux duration to cadence "0 4 * * *" (daily-ish)
|
interval: 6h # scan schedule; nearest Flux duration to cadence "0 4 * * *" (daily-ish)
|
||||||
# provider: generic # dockerhub anon; a pull secret goes here if registry rate-limits bite
|
# provider: generic # dockerhub anon; a pull secret goes here if registry rate-limits bite
|
||||||
---
|
---
|
||||||
apiVersion: image.toolkit.fluxcd.io/v1beta2
|
apiVersion: image.toolkit.fluxcd.io/v1
|
||||||
kind: ImagePolicy
|
kind: ImagePolicy
|
||||||
metadata:
|
metadata:
|
||||||
name: pihole
|
name: pihole
|
||||||
|
|||||||
Reference in new issue
Block a user