Bug 1985129 - OperatorGroup status is not updated when it has cardinality conflits when selector is used
Summary: OperatorGroup status is not updated when it has cardinality conflits when sel...
Keywords:
Status: CLOSED DUPLICATE of bug 1985125
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.9
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Vu Dinh
QA Contact: Bruno Andrade
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-07-22 23:42 UTC by Bruno Andrade
Modified: 2021-07-30 01:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-30 01:11:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Bruno Andrade 2021-07-22 23:42:31 UTC
Description of problem:

OperatorGroup status should be updated when selector is used.


Version-Release number of selected component (if applicable):
4.9.0-0.nightly-2021-07-21-081948
OLM version: 0.18.3
git commit: 1dc76f08ed05a635458420ffa979aebbe59a3890


How reproducible:
Always

Steps to Reproduce:
1. Create two namespaces test and test-1
2. Create a label for the two namespaces
oc label ns test1 env="test"
oc label ns test-1 env="test"


3. Create an OperatorGroup with targetNamespaces for test and test-1, as below:
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
  name: og-group
  namespace: test
  spec:
    selector:
      matchLabels:
       env: "test"

4. Create a second Operator in test-1 namespace with only test-1 as targetNamespaces.

apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
  name: og-group-1
  namespace: test-1
spec:
  targetNamespaces:
  - test-1

Actual results:

The status of the OperatorGroup does not have the conflict reported:

oc get og og-group -o yaml -n test                             
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
  creationTimestamp: "2021-07-22T23:33:16Z"
  generation: 1
  name: og-group
  namespace: test
  resourceVersion: "597257"
  uid: 0c4b3045-0502-4ebc-bf25-67edf019b9a4
status:
  lastUpdated: "2021-07-22T23:33:16Z"
  namespaces:
  - ""


oc get og og-group-1 -o yaml -n test-1                                                             
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
  creationTimestamp: "2021-07-22T23:02:07Z"
  generation: 1
  name: og-group-1
  namespace: test-1
  resourceVersion: "582731"
  uid: 552cb9c7-8004-4893-bd03-87a779632d9d
spec:
  targetNamespaces:
  - test-1
status:
  lastUpdated: "2021-07-22T23:02:07Z"
  namespaces:
  - test-1


Expected results:
It should have added MultipleOperatorGroupsFound error in both

Additional info:

Comment 1 Vu Dinh 2021-07-30 01:11:39 UTC
This issue is pretty much a duplicate of #1985125 so will close this one as a dup.

*** This bug has been marked as a duplicate of bug 1985125 ***


Note You need to log in before you can comment on or make changes to this bug.