Skip to content
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

Feature Request: Allow disabling of prune on certain resources #237

Closed
bcbrockway opened this issue Jan 15, 2021 · 1 comment · Fixed by #267
Closed

Feature Request: Allow disabling of prune on certain resources #237

bcbrockway opened this issue Jan 15, 2021 · 1 comment · Fixed by #267
Labels
enhancement New feature or request

Comments

@bcbrockway
Copy link

We have our EKS clusters created by Terraform. Terraform then installs Flux which takes over from there but one of the repos that Flux points at has manifests for the kube-system, kube-public, default, etc. namespaces (they add a couple of labels). As soon as it applies the manifest Flux also becomes the "owner" of the namespace so we run the risk of it trying to delete kube-system if we delete the Kustomization object from flux-system and getting in a state when Kubernetes says "don't you be touching my damn namespaces".

Options at the moment:

  1. We could split those specific manifests into their own folder and disable prune on a new Flux Kustomization
  2. We could disable prune altogether for that repo
  3. We could add the label using the Kubernetes provider in Terraform

For now we're gonna go with option 3 but ideally we'd like to be able to add an annotation to a resource (kustomize.toolkit.fluxcd.io/prune: false or something) to tell Flux not to touch it. What do you think?

@stefanprodan
Copy link
Member

I think you should split the manifests into directories and disable pruning with spec.prune: false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants