kubenix icon indicating copy to clipboard operation
kubenix copied to clipboard

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

Open pizzapim opened this issue 1 year ago • 1 comments

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 avatar Nov 28 '23 20:11 pizzapim

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/

pizzapim avatar Jul 13 '24 14:07 pizzapim

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?

mibmo avatar Oct 11 '24 10:10 mibmo