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

add: get permission on resources #1043

Merged

Conversation

zdtsw
Copy link
Member

@zdtsw zdtsw commented Jun 7, 2024

  • since we already have these resource for create, list, delete etc, no harm to add get on them

Description

related to some offline discussion for the error seen recently:
"buildconfigs.build.openshift.io "rstudio-server-rhel9" is forbidden: User "system:serviceaccount:redhat-ods-operator:redhat-ods-operator-controller-manager" cannot get resource "buildconfigs" in API group "build.openshift.io" in the namespace "redhat-ods-applications"
root cause has not been identify, but should be no harm to have all our resource with get permission.

How Has This Been Tested?

Merge criteria:

  • The commits are squashed in a cohesive manner and have meaningful messages.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

- since we already have these resource for create, list, delete etc, no
harm to add get on them

Signed-off-by: Wen Zhou <[email protected]>
@zdtsw zdtsw requested review from jstourac and VaishnaviHire and removed request for cam-garrison June 7, 2024 07:19
Copy link

openshift-ci bot commented Jun 7, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ykaliuta

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

@openshift-ci openshift-ci bot added the approved label Jun 7, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit bd9b83c into opendatahub-io:incubation Jun 7, 2024
8 checks passed
@jstourac
Copy link
Member

jstourac commented Jun 7, 2024

FTR - I raised this issue based on the discussion on slack https://issues.redhat.com/browse/RHOAIENG-8297 - this PR may be fixing it or maybe not.

VaishnaviHire pushed a commit to VaishnaviHire/opendatahub-operator that referenced this pull request Jun 10, 2024
- since we already have these resource for create, list, delete etc, no
harm to add get on them

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit bd9b83c)
VaishnaviHire pushed a commit to VaishnaviHire/opendatahub-operator that referenced this pull request Jun 10, 2024
- since we already have these resource for create, list, delete etc, no
harm to add get on them

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit bd9b83c)

fix: when delete resource if no CRD in the cluster (opendatahub-io#1044)

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit c040f77)

deploy: refactor getResource to return NotFound for both cases (opendatahub-io#1046)

Avoid returning (nil, nil), convert error if CRD not present to
NotFound and handle them in the caller code.

Avoid checking for found == nil but handle only error code.

This is more idiomatic and less error prone.

Signed-off-by: Yauheni Kaliuta <[email protected]>
(cherry picked from commit 9651b76)

Handle Kserve exception

Fix csv
VaishnaviHire pushed a commit to VaishnaviHire/opendatahub-operator that referenced this pull request Jun 10, 2024
- since we already have these resource for create, list, delete etc, no
harm to add get on them

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit bd9b83c)

fix: when delete resource if no CRD in the cluster (opendatahub-io#1044)

Signed-off-by: Wen Zhou <[email protected]>
(cherry picked from commit c040f77)

deploy: refactor getResource to return NotFound for both cases (opendatahub-io#1046)

Avoid returning (nil, nil), convert error if CRD not present to
NotFound and handle them in the caller code.

Avoid checking for found == nil but handle only error code.

This is more idiomatic and less error prone.

Signed-off-by: Yauheni Kaliuta <[email protected]>
(cherry picked from commit 9651b76)

Handle Kserve exception

Fix csv

(cherry picked from commit e5f65bd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants