-
Notifications
You must be signed in to change notification settings - Fork 79
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 apply to ignore some resources #393
Comments
Why skip existing or non-existing resources? That doesn't seem like "apply" to me. Why not just filter out the resources you don't want to apply before passing it to the applier? Or make a wrapper that has the same API but does filtering? |
If the resource has been applied successfully, filtering it out would cause it to be pruned.
The caller of cli-utils may validate a resource against its schema. |
“Skip apply but don’t prune” seems like a potentially valuable use case, but how does the client know the resource hasn’t been modified by another client? There’s no way to know there’s no changes unless you actually do a server-side apply.
I think your second problem (client side schema validation) could actually be avoiding by switching to package-scoped batch apply instead of namespace-scoped and cluster-scoped batch apply.
If you have package-scoping you would expect the whole package to fail if any of the resources fail schema validation or hydration. And if you wanted independent lifecycle, you’d make a new separate package.
|
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
I'm adding "invalid" object tracking in #488 which are retained in the inventory if they were previously applied but are now invalid. We could treat objects with a "skip" annotation the same way. |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: 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. |
When calling the Applier consecutively in a controller, sometimes we need the Applier to skip ignore some resources in the set. When the resource exists in the cluster, it skips applying for it. When the resource doesn't exist in the cluster, it skips creating it.
@haiyanmeng
The text was updated successfully, but these errors were encountered: