chore(CI install script): Fail early if the rhdh-operator namespace already has some unexpected Operator Groups - #1037
Merged
rm3l merged 1 commit intoApr 11, 2025
Conversation
… some unexpected OperatorGroups
Because OLM expects only a single Operator Group per namespace, it will refuse to install the Operator,
with a `MultipleOperatorGroupsFound` like so:
```
{"level":"info","ts":"2025-03-13T09:58:15Z","logger":"controllers.adoption","msg":"Could not find Subscription","request":{"name":"sk-op","namespace":"rhdh-operator"}}
time="2025-03-13T09:59:27Z" level=warning msg="fail to upgrade operator group status og=rhdh-operator-group with condition {Type:MultipleOperatorGroup Status:True ObservedGeneration:0 LastTransitionTime:0001-01-01 00:00:00 +0000 UTC Reason:MultipleOperatorGroupsFound Message:Multiple OperatorGroup found in the same namespace}: OperatorGroup.operators.coreos.com \"rhdh-operator-group\" is invalid: lastUpdated: Required value" namespace=rhdh-operator operatorGroup=sk-op-operator-group
time="2025-03-13T09:59:27Z" level=warning msg="fail to upgrade operator group status og=rhdh-operator-group with condition {Type:MultipleOperatorGroup Status:True ObservedGeneration:0 LastTransitionTime:0001-01-01 00:00:00 +0000 UTC Reason:MultipleOperatorGroupsFound Message:Multiple OperatorGroup found in the same namespace}: OperatorGroup.operators.coreos.com \"rhdh-operator-group\" is invalid: lastUpdated: Required value" namespace=rhdh-operator operatorGroup=rhdh-operator-group
```
This detects such situation and errors out much earlier in the process,
asking the caller to fix the OperatorGroups accordingly.
Because OperatorGroups can be created externally, the script cannot decide which ones make sense, and which ones do not.
|
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
rm3l
deleted the
RHIDP-6407--install-with-existing-operator-group-in-the-operator-ns
branch
April 11, 2025 10:03
Fortune-Ndlovu
pushed a commit
to Fortune-Ndlovu/rhdh-operator
that referenced
this pull request
Sep 6, 2025
… already has some unexpected Operator Groups [RHIDP-6407] (redhat-developer#1037) Because OLM expects only a single Operator Group per namespace, it will refuse to install the Operator, with a `MultipleOperatorGroupsFound` like so: ``` {"level":"info","ts":"2025-03-13T09:58:15Z","logger":"controllers.adoption","msg":"Could not find Subscription","request":{"name":"sk-op","namespace":"rhdh-operator"}} time="2025-03-13T09:59:27Z" level=warning msg="fail to upgrade operator group status og=rhdh-operator-group with condition {Type:MultipleOperatorGroup Status:True ObservedGeneration:0 LastTransitionTime:0001-01-01 00:00:00 +0000 UTC Reason:MultipleOperatorGroupsFound Message:Multiple OperatorGroup found in the same namespace}: OperatorGroup.operators.coreos.com \"rhdh-operator-group\" is invalid: lastUpdated: Required value" namespace=rhdh-operator operatorGroup=sk-op-operator-group time="2025-03-13T09:59:27Z" level=warning msg="fail to upgrade operator group status og=rhdh-operator-group with condition {Type:MultipleOperatorGroup Status:True ObservedGeneration:0 LastTransitionTime:0001-01-01 00:00:00 +0000 UTC Reason:MultipleOperatorGroupsFound Message:Multiple OperatorGroup found in the same namespace}: OperatorGroup.operators.coreos.com \"rhdh-operator-group\" is invalid: lastUpdated: Required value" namespace=rhdh-operator operatorGroup=rhdh-operator-group ``` This detects such situation and errors out much earlier in the process, asking the caller to fix the OperatorGroups accordingly. Because OperatorGroups can be created externally, the script cannot decide which ones make sense, and which ones do not.
2 tasks
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Because OLM expects only a single Operator Group per namespace, it will refuse to install the Operator,
with a
MultipleOperatorGroupsFoundlike so:This detects such situation and errors out much earlier in the process,
asking the caller to fix the OperatorGroups accordingly.
Because OperatorGroups can be created externally, the script cannot decide which ones make sense, and which ones do not.
Which issue(s) does this PR fix or relate to
PR acceptance criteria
How to test changes / Special notes to the reviewer