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

Deprecated: kubectl apply will no longer prune non-namespaced resources by default #47

Open
pizzapim opened this issue Nov 28, 2023 · 2 comments

Comments

@pizzapim
Copy link
Contributor

pizzapim commented Nov 28, 2023

Running the built-in deployer yields the following warning:

# result/bin/kubenix
W1128 21:21:52.260311  310470 prune.go:71] Deprecated: kubectl apply will no longer prune non-namespaced resources by default when used with the --namespace flag in a future release. To preserve the current behaviour, list the resources you want to target explicitly in the --prune-allowlist flag.

Relevant documentation: https://kubernetes.io/docs/tasks/manage-kubernetes-objects/declarative-config/#alternative-kubectl-apply-f-directory-prune

Running this on NixOS 23.05 with the k3s service.

@pizzapim
Copy link
Contributor Author

Apparently there exists an experimental feature called ApplySets, which might be something Kubenix can use for pruning:
https://kubernetes.io/blog/2023/05/09/introducing-kubectl-applyset-pruning/

@mibmo
Copy link

mibmo commented Oct 11, 2024

also having this issue. Any plans to update kubenix to deal with this? doesn't seem like pruning works at all in kubenix anymore. Would be happy to help; might be as simple as adding --prune-allowlist ... to the kubectl invocations?

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

No branches or pull requests

2 participants