python
python copied to clipboard
feat: add yaml processor to create/delete resources from yaml manifest files
- Implement delete_from_yaml functionality
- Combine create_from_yaml and delete_from_yaml into yaml_processor, preserving existing signatures for create (original PR #1392 by @DiptoChakrabarty)
What type of PR is this?
/kind feature
What this PR does / why we need it:
The kubernetes python client has the ability to create resources from yaml files but lacks the ability to delete resources from yaml files. A delete action is provided to delete kubernetes resources in addition to the existing create.
This closes a long standing feature request in #940, and refactors the existing logic into a combined internal module while preserving backwards compatibility for existing users.
Which issue(s) this PR fixes:
Fixes #940
Special notes for your reviewer:
- Original implementation started in PR #1392 by @DiptoChakrabarty
- This PR revives and modernizes that work, rebased on latest
master - All relevant tests pass locally; 4 unrelated (outside of scope of change) test failures/errors occur before and after changes
Does this PR introduce a user-facing change?
Added the ability to choose to create or delete resources from yaml manifest files.
Refactored into a new internal `yaml_processor` module (backwards-compatible).
The committers listed above are authorized under a signed CLA.
- :white_check_mark: login: kocarba (b18352f9084096b87850db9fe7145f887769c5f2, 5f486fb1be5ad915f16979bddb57d32d880f8526)
Welcome @kocarba!
It looks like this is your first PR to kubernetes-client/python 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.
You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.
You can also check if kubernetes-client/python has its own contribution guidelines.
You may want to refer to our testing guide if you run into trouble with your tests not passing.
If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!
Thank you, and welcome to Kubernetes. :smiley:
/assign @yliaog
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: kocarba Once this PR has been reviewed and has the lgtm label, please ask for approval from yliaog. For more information see the Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.
This bot triages PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the PR is closed
You can:
- Mark this PR as fresh with
/remove-lifecycle stale - Close this PR with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.
This bot triages PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the PR is closed
You can:
- Mark this PR as fresh with
/remove-lifecycle stale - Close this PR with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale