-
Notifications
You must be signed in to change notification settings - Fork 922
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
prune-whitelist
doesn't work for customresourcedefinitions
#1310
Comments
@thetillhoff: This issue is currently awaiting triage. SIG CLI takes a lead on issue triage for this repo, but any Kubernetes member can accept issues by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Prune whitelist works the opposite way. When specified, you are telling kubectl which resources can be pruned, so by specifying that, you are telling kubectl to ONLY prune CRDs. You can specify the flag multiple times for multiple resource types (ie. Or you can use label selectors to indicate which resources are eligible for pruning. |
Please let us know if Brian's answer doesn't make sense. /close |
@eddiezane: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Thank you Eddie for the reminder and thank you Brian for the explanation! It makes sense to me and answers my question. At the same it doesn't solve my problem 🥲 |
What happened:
My kubernetes deployment pipeline has two (relevant) steps;
kubectl apply -k ./crds
kubectl apply --prune --all --prune-whitelist=apiextensions.k8s.io/v1 /customresourcedefinition -k ./
But for some reason, the second command will always prune the CustomResourceDefinitions anyway,
What you expected to happen:
The first step should apply all CustomResourceDefinitions that are located in
./crds/
.The second step should apply all resources and custom resources, prune the ones that don't exist in the folder any more, but not prune the CustomResourceDefinitions.
How to reproduce it (as minimally and precisely as possible):
My use case is cert-manager (v1.10.0), where I moved the CustomResourceDefinitions into the
./crds
folder (taken from https://github.com/cert-manager/cert-manager/releases/download/v1.10.0/cert-manager.crds.yaml).The custom resource I'm trying to deploy in the second step is a ClusterIssuer.
But I think generally any CustomResourceDefinition would be fine to verify this.
Anything else we need to know?:
Environment:
kubectl version
):cat /etc/os-release
): Debian 11The text was updated successfully, but these errors were encountered: