Skip to content

chore(CI install script): Fail early if the rhdh-operator namespace already has some unexpected Operator Groups - #1037

Merged
rm3l merged 1 commit into
redhat-developer:mainfrom
rm3l:RHIDP-6407--install-with-existing-operator-group-in-the-operator-ns
Apr 11, 2025
Merged

chore(CI install script): Fail early if the rhdh-operator namespace already has some unexpected Operator Groups#1037
rm3l merged 1 commit into
redhat-developer:mainfrom
rm3l:RHIDP-6407--install-with-existing-operator-group-in-the-operator-ns

Conversation

@rm3l

@rm3l rm3l commented Apr 11, 2025

Copy link
Copy Markdown
Member

Description

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.

Which issue(s) does this PR fix or relate to

PR acceptance criteria

  • Tests
  • Documentation

How to test changes / Special notes to the reviewer

… 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.
@openshift-ci

openshift-ci Bot commented Apr 11, 2025

Copy link
Copy Markdown

[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

Details 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

@rm3l
rm3l merged commit 1ee4618 into redhat-developer:main Apr 11, 2025
@rm3l
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.
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.

1 participant