Uh oh!
There was an error while loading. Please reload this page.
Feat/delete os pod - #206
Conversation
openshift-bot
commented
Mar 14, 2025
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
alvlkov
commented
Mar 18, 2025
/remove-lifecycle stale |
iamkirkbater
left a comment
There was a problem hiding this comment.
Requested change relates to the name of the script. The additional check for a replicaset would be more of a nice-to-have, but we can also add that after this is merged so that we can start using this sooner rather than later.
| @@ -0,0 +1,21 @@ | |||
| # Delete Openshift Pod Script | |||
There was a problem hiding this comment.
Can we simplify this to just be delete-pod instead of adding the delete-os-pod? From a UX perspective, it will be easier to remember the closer the syntax name is to the actual OC command.
| main(){ | ||
| delete_pod |
There was a problem hiding this comment.
Would it be a huge lift here to validate if a pod is owned by a replicaset before proceeding? We might also need to add a "force" flag/parameter to bypass that as well, but it might be a nice protection for the rare chance that a pod isn't managed in an openshift namespace, this way we can make sure it will come back as a default behavior, but have the option to bypass it if we need to.
| author: Alex Volkov | ||
| allowedGroups: | ||
| - CEE | ||
| - SREP |
There was a problem hiding this comment.
| - SREP | |
| - SREP | |
| - MCSTierTwo |
There was a problem hiding this comment.
added the suggestions, thanks @iamkirkbater
feichashao
commented
Apr 1, 2025
Thanks @iamkirkbater for the review! I would suggest we add the safeguard in this PR to validate if a pod is backed by a replicaset, otherwise the delete operation can be too wide.
Another nice-to-have is that we put a list of allowed namespace instead of |
iamkirkbater
commented
Apr 1, 2025
@feichashao - a few questions:
|
feichashao
commented
Apr 1, 2025
I would say Healthy = A pod with all containers in running state; The other should be non-healthy, eg, pending, crashloopbackoff, pod in running state but not all containers are running, showing like: (I mocked this) |
Added replicaset check and --force flag.
|
alvlkov
commented
Jul 2, 2025
/retest |
Uh oh!
There was an error while loading. Please reload this page.
| clusterRoleRules: | ||
| - apiGroups: | ||
| - "" | ||
| resources: | ||
| - "pods" | ||
| verbs: | ||
| - "delete" | ||
| - "get" |
There was a problem hiding this comment.
This is valid for all namespaces. There's no limitation to from openshift's reserved namespace. as mentioned above.
This permission extends beyond the scope even SRE-P has.
There was a problem hiding this comment.
The above limitation applies to the NAMESPACE parameter, to avoid deleting Openshift related pods. AFAIK I cant scope namespaces within clusterRoleRules. Please elaborate about the suggestion.
Co-authored-by: typeid <github@typeid.org>
typeid
commented
Jul 22, 2025
/retest |
typeid
commented
Jul 28, 2025
/lgtm |
typeid
commented
Jul 28, 2025
Code LGTM. Pending approval from compliance: https://issues.redhat.com/browse/HCMSEC-611 |
typeid
commented
Jul 28, 2025
/hold for compliance approve |
typeid
commented
Sep 18, 2025
/unhold Merging this as we have not received any feedback from compliance. This does not provide read access to customer data so I'm okay just stamping this off. |
typeid
commented
Sep 18, 2025
/retest |
openshift-bot
commented
Dec 19, 2025
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
openshift-bot
commented
Jan 18, 2026
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
openshift-bot
commented
Feb 18, 2026
Rotten issues close after 30d of inactivity. Reopen the issue by commenting /close |
@openshift-bot: Closed this PR. DetailsIn 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-sigs/prow repository. |
alvlkov
commented
Feb 26, 2026
/reopen |
alvlkov
commented
Feb 26, 2026
/remove-lifecycle rotten |
@alvlkov: Reopened this PR. DetailsIn 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-sigs/prow repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: alvlkov The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
@alvlkov: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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-sigs/prow repository. I understand the commands that are listed here. |
What type of PR is this?
This adds a new managed script to delete a pod from Openshift's reserved namespace.
What this PR does / Why we need it?
This will help fixing errors related to openshift reserved namespaces, essentially when pod restart is required.
Which Jira/Github issue(s) does this PR fix?
OSD_20528
Special notes for your reviewer
Pre-checks (if applicable)