-
Hey! We are migrating from flux v1 to v2, and I can't figure out what's the alternative to
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
There is a slight impedance mismatch between the goal of automating images (this is Flux's key feature, "killer app" part) and pushing a manual release targeting a specific image. Flux (v2) only does image releases via image automation policies, so Flux wants to deploy the latest release based on whatever filter you told it. Setting an image to a specific version is almost anathema, and there is an open issue on Flux v1 repo about how this In the course of managing an incident, you can suspend automation and revert image updates but this is not something which you can do casually as it reflects an image updater that has been stopped, that means Flux is no longer doing the job you hired it for, (so it should arguably register on your observability dashboard as an ongoing incident until this can be un-done.) Assuming that you have the apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deployment.yaml
images:
- name: ghcr.io/stefanprodan/podinfo
newName: ghcr.io/stefanprodan/podinfo
newTag: 5.0.3 # {"$imagepolicy": "flux-system:podinfo:tag"} you can pause the automation for a particular image only
This is such a difficult workflow, because you can set an image tag to a specific version, but as Flux is still doing its regular job of pulling the latest tag as described by the policy, if you wanted your image setting to be sticky, you will not get the desired result without choosing one of these. (Unless you really just wanted Flux to release the latest image anyway...) Alternatively, you may tell Flux to suspend image updates, and/or tell it specifically which image(s) are allowed to be pulled. These commands both describe different ways that you can modify or suspend the image policy to accomplish what you're trying to do in any particular situation. |
Beta Was this translation helpful? Give feedback.
There is a slight impedance mismatch between the goal of automating images (this is Flux's key feature, "killer app" part) and pushing a manual release targeting a specific image. Flux (v2) only does image releases via image automation policies, so Flux wants to deploy the latest release based on whatever filter you told it. Setting an image to a specific version is almost anathema, and there is an open issue on Flux v1 repo about how this
fluxctl
command does not really do all you probably want on its own, link to this discussion: fluxcd/flux#356In the course of managing an incident, you can suspend automation and revert image updates but this is not something which you can do casually …