Is there a way to ignore changes made by a given field manager, similar to ignoreDifferences in argo? #4925
Replies: 4 comments 1 reply
-
There's a few differences between what you suggested and what's available in Flux, but yes you can, sort of. The default mode is designed to override any differences because that's the core expectation of the majority of Flux users. There is an There are a few more details I can provide when I can get back to the reference material, but why don't you tell us a bit about your use case and if that solves your issue before I go into any more details? I don't want to give too much irrelevant information. There are a number of different special cases like the blessed list of field managers, and common issues where there would be a conflict but isn't because of how Flux worked around them. (Like with persistent volumes managed in Git for example.) |
Beta Was this translation helpful? Give feedback.
-
Here is an example: say there is a deployment in the cluster called "hello" with one container. In the git repo, the "hello" container is defined as requesting 500m CPU. Our agent changes the CPU request to 50m. We want flux to leave the deployment as it is, even though it diverges from the definition in git. On the other hand, we want flux to update the deployment if there are any other changes, e.g. the container image or env vars or anything else. In that case, our admission controller will preserve our changes. We just don't want flux to be trying to change the deployment every time flux reconciles the cluster (e.g. every 5 minutes). In an environment with argo, we can solve this problem by setting a property Can we accomplish something like this with the |
Beta Was this translation helpful? Give feedback.
-
Currently only the fields that are mutated at admission are left in place. |
Beta Was this translation helpful? Give feedback.
-
@stefanprodan Not sure what you mean. Do you mean that any field that is mutated by an admission controller is not considered a divergence by flux the next time it tries to reconcile the cluster? Or are you saying that flux will try to revert the deployment every time it reconciles (e.g. every five minutes), and our admission controller will have to preserve our changes? |
Beta Was this translation helpful? Give feedback.
-
We have an agent that dynamically changes fields of deployments running in the cluster. Is there any way to tell flux to ignore changes made by this agent, similar to
resource.customizations.ignoreDifferences.all
withmanagedFieldManagers
in argo cd?Beta Was this translation helpful? Give feedback.
All reactions