-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better docs around patches broadly (new guide) #1214
Comments
@kingdonb Flux TF provider does not support patching at all. Even if you add a patch, it will not be executed at install time. Only after Flux is installed from the original files, the patch will be applied by kustomize-controller, which is too late in most case. |
Thanks for that detail; it might be too late if the gitrepo is protected by a secret that you need to decrypt from KMS. All of this worth making part of the patching guide. (You just saved me going down a rabbit hole later on when I get to that step in my tf learning goals to achieve relative to my talks before KubeCon, so double thanks 😄) |
The |
Let me give you an example when you need to patch the Flux controllers before installation. Let's assume all your nodes are tainted, if you run But if you want to enable KMS access to some other Kustomization than |
I was suggesting that you might have the So, that whole idea that: once Flux is installed with terraform, as long as the bootstrap is successful then at that point, Flux can use That's all information that seems like it would definitely be in scope for a guide about patching. 👍 |
We have a lot of different places that you can apply patches and a veritable diaspora of information spread around all the various locations that document various components of Flux and adjacent tools like Kustomize
We have this guide for Flux's built-in Kustomization
patches
:https://fluxcd.io/flux/components/kustomize/kustomization/#patches
Kustomize has various examples for patches of different types:
There are some differences between Flux's
patches
and Kustomize CLIpatches
that make it somewhat difficult to narrow down what is the correct syntax to use in "this instance of patching" whatever it is you're about to try, and there are some also apparently disjoint implementations apparently owing to deprecations that have not been fully deprecated, like Flux Kustomization'spatchesStrategicMerge
field.So depending on where you are when you want to patch your Flux-controlled resources, when you need them patched, and where else you might be able to move laterally to from there (eg. sometimes Flux
Kustomization.spec.patches
may be your only option, but other times you can editkustomization.yaml
and use a patch file.)... it would be great to have one guide that covers all the options, that we can point people towards when they have trouble related to patching.This latest issue report from
fluxcd/terraform-provider-flux
(fluxcd/terraform-provider-flux#333) that we discussed at today's Bug Scrub drove the point home for me, (I need to spend some more time getting familiar with Flux+terraform before I'll be ready to write something like this.)The text was updated successfully, but these errors were encountered: