kubenix
kubenix copied to clipboard
Deprecated: kubectl apply will no longer prune non-namespaced resources by default
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.
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/
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?