Why having gotk-sync.yaml changed is a bad idea? #5685
-
|
Ok, this may sound dumb at first, but I do have a reason for this. Following the documentation for the sops-based age secrets management, you're supposed to have your secrets in a separate directory where a custom defined flux Kustomization picks it up and those get decrypted on the fly and applied to the cluster. The setup I want is to have a single sops key for my entire cluster rather than setting up per-app sops keys. Considering that, I find this setup quite limiting, because I'd like to have my secrets be a part of my apps definition. This way whenever I need to disable an app I just comment it out of the parent Kustomization managing my apps. This also removes the secret so that I don't have to manually manage them separately. The documented way doesn't let me have this because both the The gotk-sync.yaml file explicitly says "DO NOT MODIFY" in the header, however I don't find any convenient way of just including my sops key into it without modification. Is it fine to edit gotk-sync here if all I need to add is this: spec:
decryption:
provider: sops
secretRef:
name: sops-age |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
It's a bad idea because it's an auto-generated file. If you use Even better, you should stop using https://fluxoperator.dev/docs/guides/migration/ This way you don't have a tool committing files to your repo at all. |
Beta Was this translation helpful? Give feedback.
It's a bad idea because it's an auto-generated file. If you use
flux bootstrapto bootstrap and upgrade clusters, next time it will undo all your changes. You should add patches tokustomization.yamlinstead.Even better, you should stop using
gotk-sync.yamlandgotk-components.yamlaltogether and start using Flux Operator's FluxInstance:https://fluxoperator.dev/docs/guides/migration/
This way you don't have a tool committing files to your repo at all.