Skip to content
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

OSD-22635: use elevation for oc execs #585

Merged
merged 1 commit into from
Jun 20, 2024

Conversation

typeid
Copy link
Member

@typeid typeid commented Jun 18, 2024

As part of
https://issues.redhat.com/browse/OSD-22635 oc exec and oc debug have been gated to backplane cluster admin. We now need to elevate of oc exec.

SOPs have already been updated for the changes (see here).

https://issues.redhat.com/browse/OSD-22635

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 18, 2024
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jun 18, 2024

@typeid: This pull request references OSD-22635 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.17.0" version, but no target version was set.

In response to this:

As part of
https://issues.redhat.com/browse/OSD-22635 oc exec and oc debug have been gated to backplane cluster admin. We now need to elevate of oc exec.

SOPs have already been updated for the changes (see here).

https://issues.redhat.com/browse/OSD-22635

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 openshift-eng/jira-lifecycle-plugin repository.

@@ -106,7 +115,7 @@ func (o *detachStuckVolumeOptions) detachVolume(clusterID string) error {
}

// Following function gets the volumeID & region of pv for non running state pod & value into global variable
func getVolumeID(clientset *kubernetes.Clientset, namespace, selector string) error {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parameter was unused

}

func ListSilence(clusterID string) {
func ListSilence(cmd *listSilenceCmd) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think of just having that function take two parameters - a "reason" and a "clusterId"? This decouples it entirely from the cobra library and makes it a bit easier to test.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, this is actually already decoupled. listSilenceCmd is just a struct and has nothing to do with cobra, maybe the name is causing confusion? But this is how we do it for the other commands as well (before this change).

@openshift-ci openshift-ci bot requested review from fahlmant and iamkirkbater June 18, 2024 15:30
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 18, 2024
@AlexVulaj
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 20, 2024
Copy link
Contributor

openshift-ci bot commented Jun 20, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AlexVulaj, typeid

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Contributor

openshift-ci bot commented Jun 20, 2024

@typeid: all tests passed!

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit 5cc12f1 into openshift:master Jun 20, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants