Git repo watching: Watch changes on a tag, fallback to a branch if the tag does not exist. #5246
Replies: 2 comments 2 replies
-
A fallback from a tag to a branch is not something I would consider doing in Flux. Git tags should be immutable, you don't delete tags, instead you would increment semver and move forward with a new tag. Take a look at Ephemeral Environments for GitHub Pull Requests |
Beta Was this translation helpful? Give feedback.
-
I got you. I did not invent this, the company ditched semver and moves tags. Actually it's quite a trend. If you have a coherent system, you do not really have versions, you rather have a history of states where things work together. That said: Moving a tag in Git is quite standard operation. The claim that Git tags should be immutable is subjective at best. If they should be immutable, then there would be no FluxCD allows to observe a tag, and apply when the tag changes. Another hint that tags are meant to move - what would be the point of this feature otherwise? So, the only step missing is to put a 2nd entry into FluxCD config (a fallback branch), and apply the branch tag disappears. |
Beta Was this translation helpful? Give feedback.
-
Hi. We have a setup:
Most of the K8s setup is shared, and then there are some parametrizations per environment.
FluxCD watches the K8s repo tags, one per environment, and applies the changes to the respective cluster.
We would like to change this to observe a branch
main
, so that any push to that branch would be picked up (applied).However, sometimes, we would like to hold that behavior for experiments on the shared K8s setup, and/or deploy a test environment from another branch, by pinning a tag.
For that, it would be great if FluxCD could be configured to:
Currently, AFAIK, it can only be either a branch, OR a tag.
Which means:
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions