Bug 1805693 - Checkbox to Enable Operator Monitoring does not appears when operatorframework.io/cluster-monitoring=true is added to CSV
Summary: Checkbox to Enable Operator Monitoring does not appears when operatorframewor...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: bpeterse
QA Contact: Bruno Andrade
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-21 11:46 UTC by Bruno Andrade
Modified: 2020-02-21 20:10 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-21 20:10:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Bruno Andrade 2020-02-21 11:46:31 UTC
Description of problem:

When trying to add an Operator that has operatorframework.io/cluster-monitoring=true annotation to a namespace that is labeled with openshift.io/cluster-monitoring: "true" and starts with prefix openshit-test, console should show an option to user choose whether if operator should be monitored or not. At this time this option is not shown.

 
Version-Release number of selected component (if applicable):
4.4.0-0.nightly-2020-02-21-045519

How reproducible:
Always

Steps to Reproduce:
1) Select a namespace that has openshift-* prefix and ensure it is labeled with openshift.io/cluster-monitoring: "true"

 oc get ns openshift-operator-lifecycle-manager -o yaml 
apiVersion: v1
kind: Namespace
metadata:
  annotations:
    openshift.io/node-selector: ""
    openshift.io/sa.scc.mcs: s0:c13,c7
    openshift.io/sa.scc.supplemental-groups: 1000170000/10000
    openshift.io/sa.scc.uid-range: 1000170000/10000
    openstack.org/kuryr-namespace-label: '{"openshift.io/cluster-monitoring": "true",
      "openshift.io/run-level": "1"}'
    openstack.org/kuryr-net-crd: ns-openshift-operator-lifecycle-manager
  creationTimestamp: "2020-02-21T08:54:08Z"
  labels:
    openshift.io/cluster-monitoring: "true"
    openshift.io/run-level: "1"
  name: openshift-operator-lifecycle-manager


2) Create Configmap and CatalogSource
oc create -f https://raw.githubusercontent.com/bandrade/v3-testfiles/v4.1/olm/configmap/configmap-1497.yaml -n openshift-marketplace    
configmap/installed-community-global-operators created
 
oc create -f https://raw.githubusercontent.com/bandrade/v3-testfiles/v4.1/olm/catalogsource/catalogsource.yaml -n openshift-marketplace
catalogsource.operators.coreos.com/installed-community-global-operators created
 
3) Check packagemanifest, note that etcd-olm-1450 has operatorframework.io/cluster-monitoring: "true" annotation
 
oc get packagemanifest etcd-olm-1450 -o yaml  
apiVersion: packages.operators.coreos.com/v1
kind: PackageManifest
metadata:
  creationTimestamp: "2020-02-18T18:24:45Z"
  labels:
    catalog: installed-community-global-operators
    catalog-namespace: openshift-marketplace
    operatorframework.io/arch.amd64: supported
    operatorframework.io/os.linux: supported
    provider: CoreOS, Inc
    provider-url: ""
  name: etcd-olm-1450
  namespace: default
  selfLink: /apis/packages.operators.coreos.com/v1/namespaces/default/packagemanifests/etcd-olm-1450
spec: {}
status:
  catalogSource: installed-community-global-operators
  catalogSourceDisplayName: Community Operators
  catalogSourceNamespace: openshift-marketplace
  catalogSourcePublisher: Community
  channels:
  - currentCSV: etcdoperator.v0.9.4
    currentCSVDesc:
      annotations:
        alm-examples: '[{"apiVersion":"etcd.database.coreos.com/v1beta2","kind":"EtcdCluster","metadata":{"name":"example","namespace":"default"},"spec":{"size":3,"version":"3.2.13"}},{"apiVersion":"etcd.database.coreos.com/v1beta2","kind":"EtcdRestore","metadata":{"name":"example-etcd-cluster"},"spec":{"etcdCluster":{"name":"example-etcd-cluster"},"backupStorageType":"S3","s3":{"path":"<full-s3-path>","awsSecret":"<aws-secret>"}}},{"apiVersion":"etcd.database.coreos.com/v1beta2","kind":"EtcdBackup","metadata":{"name":"example-etcd-cluster-backup"},"spec":{"etcdEndpoints":["<etcd-cluster-endpoints>"],"storageType":"S3","s3":{"path":"<full-s3-path>","awsSecret":"<aws-secret>"}}}]'
        operatorframework.io/cluster-monitoring: "true"

4) Install the Operator, Openshift Console should ask the user if they want to enable monitoring the operator and apply the label to the created namespace

At this time As shown at  http://pics.osci.redhat.com/hkuade.png, the option to monitor the namespace does not appear.


Actual results:
Console is not showing the option to user add the Operator to Cluster Monitoring

Expected results:
Should show the option to user add the Operator to Cluster Monitoring

Additional info:

Comment 1 Samuel Padgett 2020-02-21 20:10:39 UTC
> 1) Select a namespace that has openshift-* prefix and ensure it is labeled with openshift.io/cluster-monitoring: "true"

Console will *only* show the checkbox if creating a new namespace by design. All console does is label the namespace, so you shouldn't need console to prompt in this case. It's up to the operator to fulfill the other requirements for monitoring.

This is working as intended.


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