Bug 2021461

Summary: Operator installation do not work with CLI
Product: OpenShift Container Platform Reporter: Federico Paolinelli <fpaoline>
Component: DocumentationAssignee: Mike McKiernan <mmckiern>
Status: CLOSED CURRENTRELEASE QA Contact: Arti Sood <asood>
Severity: medium Docs Contact: Vikram Goyal <vigoyal>
Priority: high    
Version: 4.9CC: aos-bugs, fbaudin, jokerman, mmckiern
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-24 18:39:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Federico Paolinelli 2021-11-09 10:44:36 UTC
Description of problem:

Following the instructions for installing from CLI doesn't deploy the operator.
https://docs.openshift.com/container-platform/4.9/networking/metallb/metallb-operator-install.html

Version-Release number of selected component (if applicable):
oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.9.0-0.nightly-2021-11-08-212454   True        False         18m     Cluster version is 4.9.0-0.nightly-2021-11-08-212454


How reproducible:
Always

Steps to Reproduce:
1. Follow the instructions


Actual results:

➜  ~ oc get packagemanifests -n openshift-marketplace metallb-operator
NAME               CATALOG             AGE
metallb-operator   Red Hat Operators   31m
➜  ~ cat << EOF | oc apply -f -
apiVersion: v1
kind: Namespace
metadata:
  name: metallb-system
EOF
namespace/metallb-system created
➜  ~ cat << EOF | oc apply -f -
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
  name: metallb-operator
  namespace: metallb-system
spec:
  targetNamespaces:
  - metallb-system
EOF
operatorgroup.operators.coreos.com/metallb-operator created
➜  ~ oc get operatorgroup -n metallb-system
NAME               AGE
metallb-operator   7s
➜  ~ oc get installplan -n metallb-system
No resources found in metallb-system namespace.

Expected results:

A valid install plan

Additional info:

Comment 1 Arti Sood 2021-11-09 14:45:56 UTC
Doc fixes needed.

1. Subscription manifest should be:-


cat << EOF| oc apply -f -
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: metallb-operator-sub
  namespace: metallb-system
spec:
  channel: "${OC_VERSION}"
  name: metallb-operator
  source: redhat-operators----> CORRECT SOURCE
  sourceNamespace: openshift-marketplace
EOF



2. Output of "oc get packagemanifests -n openshift-marketplace metallb-operator" 
This will show catalog source is Red Hat Operators instead of community operator.
3. "oc get installplan -n metallb-system" should be after subscription has been created. 
Swap step #5 and #6
4. Custom Resource Definition to create metallb should be:-

cat << EOF | oc apply -f -
apiVersion: metallb.io/v1beta1 ---> CORRECT VERSION
kind: MetalLB
metadata:
  name: metallb
  namespace: metallb-system
EOF

Comment 2 Mike McKiernan 2021-11-17 15:58:24 UTC
PR ready for review: https://github.com/openshift/openshift-docs/pull/38864