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

handle operator namespace could be optional in OperandRegistry #963

Merged
merged 2 commits into from
Aug 25, 2023

Conversation

YCShen1010
Copy link
Contributor

@YCShen1010 YCShen1010 commented Aug 24, 2023

Fix bug for missing operator ns when retrieving CatalogSource from packagemanifest to address the ODLM permission issue
issue: https://github.ibm.com/IBMPrivateCloud/roadmap/issues/60042

Verified

  1. create keycloak operator in OperandReigstry without namespace
    - channel: stable
      installPlanApproval: Automatic
      name: edb-keycloak
      packageName: cloud-native-postgresql
      scope: public
    
  2. get pending status for keycloak operandrequest
    status:
      members:
        - name: keycloak-operator
          phase:
            operandPhase: Not Found
            operatorPhase: Not Found
      phase: Pending
    
  3. error msg in ODLM pod log
    E0821 04:58:58.540533 1 reconcile_operator.go:87] Failed to get suitable OperandRegistry keycloak-simple/keycloak-registry: packagemanifests.packages.operators.coreos.com "cloud-native-postgresql" is forbidden: User "system:serviceaccount:keycloak-simple:operand-deployment-lifecycle-manager" cannot list resource "packagemanifests" in API group "packages.operators.coreos.com" at the cluster scope
    E0821 04:58:58.541656 1 operandrequest_controller.go:148] failed to reconcile Operators for OperandRequest keycloak-simple/keycloak-request: packagemanifests.packages.operators.coreos.com "cloud-native-postgresql" is forbidden: User "system:serviceaccount:keycloak-simple:operand-deployment-lifecycle-manager" cannot list resource "packagemanifests" in API group "packages.operators.coreos.com" at the cluster scope
    E0821 04:58:58.551331 1 operandconfig_controller.go:83] failed to update the status for OperandConfig keycloak-simple/keycloak-registry : packagemanifests.packages.operators.coreos.com "cloud-native-postgresql" is forbidden: User "system:serviceaccount:keycloak-simple:operand-deployment-lifecycle-manager" cannot list resource "packagemanifests" in API group "packages.operators.coreos.com" at the cluster scope
    
  4. fix the code, opreq status comes back to running.
    test image: quay.io/yuchen_shen/odlm:opreg_optn

Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca>
Copy link
Contributor

@Daniel-Fan Daniel-Fan left a comment

Choose a reason for hiding this comment

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

/retest

@Daniel-Fan
Copy link
Contributor

/retest

Signed-off-by: YuChen <yuchen.shen@mail.utoronto.ca>
Copy link
Contributor

@Daniel-Fan Daniel-Fan left a comment

Choose a reason for hiding this comment

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

/lgtm

@ibm-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Daniel-Fan, YCShen1010

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:
  • OWNERS [Daniel-Fan,YCShen1010]

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

@ibm-ci-bot ibm-ci-bot merged commit b5dcb6a into IBM:master Aug 25, 2023
1 check passed
@YCShen1010 YCShen1010 deleted the odlm_optns branch August 29, 2023 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants