fix: switch tenant apps to native OCIRepository semver selection#1588
Merged
Conversation
Tenant image automation never reached the cluster: the cluster reconciles solely from the platform OCI artifact, so ImageUpdateAutomation tag bumps committed to Git only landed after a full platform release republished the artifact — coupling every tenant release to a platform redeploy. Select the newest manifest tag directly in each tenant OCIRepository via ref.semver (the cheatsheet's "deploy stable on production" pattern). The cluster now pulls new tenant versions on its own interval, independent of the platform release cycle. Cosign verification is unchanged. Remove the now-unused machinery: per-app ImageRepository/ImagePolicy, the image-automation GitRepository/ImageUpdateAutomation/ExternalSecret, the image-reflector/image-automation controllers from the FluxInstance, and the vault-seed GitHub App git key + PushSecret that fed git auth.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR decouples tenant app updates from the platform release cycle by switching tenant OCIRepository resources to Flux’s native semver-based tag selection, and removes the now-unneeded Git-based image automation stack (controllers, manifests, and Vault seeding materials).
Changes:
- Switch
wedding-appandascoachingogvanerOCIRepository.spec.reffrom pinnedtag(set via$imagepolicy) tosemver: ">=1.0.0". - Remove Git-based image automation resources (ImagePolicy/Repository, ImageUpdateAutomation, automation GitRepository + ExternalSecret) and stop installing Flux image automation controllers.
- Remove the obsolete SOPS-encrypted GitHub App private key and its Vault seeding PushSecret from the Hetzner vault-seed overlay.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| k8s/providers/hetzner/infrastructure/vault-seed/seed-image-automation-git.yaml | Removes PushSecret that seeded the image-automation GitHub App key into OpenBao. |
| k8s/providers/hetzner/infrastructure/vault-seed/kustomization.yaml | Drops the deleted git key secret + PushSecret from vault-seed resources. |
| k8s/providers/hetzner/infrastructure/vault-seed/git-key-secret.enc.yaml | Deletes the SOPS-encrypted GitHub App private key Secret that was only used for removed git automation. |
| k8s/providers/hetzner/infrastructure/controllers/flux-instance/flux-instance.yaml | Removes image-reflector/image-automation controllers from the prod FluxInstance components list. |
| k8s/providers/hetzner/apps/kustomization.yaml | Stops including the removed image-automation/ overlay. |
| k8s/providers/hetzner/apps/image-automation/kustomization.yaml | Deletes the image-automation overlay kustomization. |
| k8s/providers/hetzner/apps/image-automation/image-update-automation.yaml | Deletes ImageUpdateAutomation that previously committed tag bumps back to Git. |
| k8s/providers/hetzner/apps/image-automation/git-repository.yaml | Deletes the GitRepository used solely by ImageUpdateAutomation. |
| k8s/providers/hetzner/apps/image-automation/external-secret.yaml | Deletes ExternalSecret that generated the GitHub App auth Secret for git automation. |
| k8s/bases/apps/wedding-app/sync.yaml | Switches OCIRepository.ref to semver selection for native updates. |
| k8s/bases/apps/wedding-app/kustomization.yaml | Removes the app’s ImagePolicy/ImageRepository resource from the base. |
| k8s/bases/apps/wedding-app/image-policy.yaml | Deletes the app’s ImageRepository + ImagePolicy resources. |
| k8s/bases/apps/ascoachingogvaner/sync.yaml | Switches OCIRepository.ref to semver selection for native updates. |
| k8s/bases/apps/ascoachingogvaner/kustomization.yaml | Removes the app’s ImagePolicy/ImageRepository resource from the base. |
| k8s/bases/apps/ascoachingogvaner/image-policy.yaml | Deletes the app’s ImageRepository + ImagePolicy resources. |
Contributor
|
🎉 This PR is included in version 1.2.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Tenant image automation (
wedding-app,ascoachingogvaner) was effectively broken.The prod cluster reconciles everything from the platform's own OCI artifact (
ghcr.io/devantler-tech/platform/manifests:latest) — never from Git directly (every FluxKustomizationink8s/bases/cluster/sourcesOCIRepository/flux-system). The old design usedImageUpdateAutomationto commit tenantOCIRepository.ref.tagbumps into Gitmain. But for such a commit to reach the cluster it had to trigger a full platform release: semantic-release tag →cd.yaml→ republish the platform OCI:latest→ cluster pulls → re-appliessync.yaml. Every tenant app update was therefore coupled to a full platform redeploy — fragile and, in practice, not landing.What
Switch each tenant
OCIRepositoryto native semver selection — the "deploy stable on production" pattern from the Flux OCI cheatsheet:The cluster's per-app
OCIRepositorynow polls the tenant registry directly and pulls the newest matching tag everyinterval(1m) — no Git commit, no image controllers, no platform release loop. Tenant apps update independently of the platform release cycle. Cosign verification (verify.matchOIDCIdentity) is unchanged.Removed the now-unused machinery:
ImageRepository+ImagePolicy(k8s/bases/apps/*/image-policy.yaml)image-automation/overlay dir (GitRepository+ImageUpdateAutomation+ExternalSecret)image-reflector-controller+image-automation-controllerfrom theFluxInstancePushSecretthat fed git auth (incl. the now-orphanedgit-key-secret.enc.yaml)The tenant app repos (
wedding-app,ascoachingogvaner) need no changes — they already publish semver-tagged OCI manifest artifacts via the reusablepublish-app.yamlworkflow.Validation
kustomize buildsucceeds for both overlays and all affected paths:k8s/clusters/local/,k8s/clusters/prod/k8s/providers/hetzner/apps,.../infrastructure,.../infrastructure/controllersk8s/bases/apps/wedding-app,k8s/bases/apps/ascoachingogvanerRendered output confirms: no
ImageRepository/ImagePolicy/ImageUpdateAutomation/automationGitRepositoryremain; both tenantOCIRepositoryresources usesemver: ">=1.0.0"; theFluxInstancelists only the four core controllers.Test plan
OCIRepository/wedding-appandOCIRepository/ascoachingogvanerreconcile to the latest published tag and roll their appsGenerated by Claude Code