Bug 1826097

Summary: OLM does not create secrets from the bundle
Product: OpenShift Container Platform Reporter: Daniel Sover <dsover>
Component: OLMAssignee: Evan Cordell <ecordell>
OLM sub component: OLM QA Contact: yhui
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: high CC: kuiwang, scolange, yhui
Version: 4.5   
Target Milestone: ---   
Target Release: 4.5.0   
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: 2020-07-13 17:29:33 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:

Comment 4 yhui 2020-05-08 02:19:14 UTC
Cluster version is 4.5.0-0.nightly-2020-05-07-144853
$ oc exec catalog-operator-6c5576474-hb276 -n openshift-operator-lifecycle-manager -- olm --version
OLM version: 0.14.2
git commit: 6544650f2bff3d58b60af24e4eab2b9d4cb06b1b


steps to test:
1. Add secrets in a bundle, and create bundle image using the bundle.
$ opm alpha bundle build -d ... -t ... -c alpha -p ...
$ docker push ...

2. Create bundle index image using the above bundle image.
$ opm index add -b ... -t ...
$ docker push ...

3. Create catalogsource using the bundle index image.
$ cat catsrc.yaml 
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: etcd-catalog
  namespace: openshift-marketplace
spec:
  displayName: Etcd Operator Catalog
  image: quay.io/yuhui12/etcd-index-test:0.9.0
  publisher: QE
  sourceType: grpc

$ oc apply -f catsrc.yaml

4. Create operatorgroup in the project test-operators
$ cat og-new.yaml 
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
  name: test-operators-og
  namespace: test-operators
spec:
  targetNamespaces:
  - test-operators

$ oc apply -f og-new.yaml 

5. Create sub in the project test-operators
$ cat sub.yaml 
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: etcd
  namespace: test-operators
spec:
  channel: alpha
  installPlanApproval: Automatic
  name: etcd
  source: etcd-catalog
  sourceNamespace: openshift-marketplace
  startingCSV: etcdoperator.v0.9.0

$ oc apply -f sub.yaml

6. Verify the secrets is created successfully.
$ oc get secret mysecret -o yaml
apiVersion: v1
data:
  password: MWYyZDFlMmU2N2Rm
  username: YWRtaW4=
kind: Secret
metadata:
  creationTimestamp: "2020-05-08T02:15:02Z"
  managedFields:
  - apiVersion: v1
    fieldsType: FieldsV1
    fieldsV1:
      f:data:
        .: {}
        f:password: {}
        f:username: {}
      f:type: {}
    manager: catalog
    operation: Update
    time: "2020-05-08T02:15:02Z"
  name: mysecret
  namespace: test-operators
  resourceVersion: "30173"
  selfLink: /api/v1/namespaces/test-operators/secrets/mysecret
  uid: afcbaa65-cb49-4e1f-bf5f-f76d83b9bebc
type: Opaque

The secret is created by OLM successfully. Verify the bug.

Comment 5 errata-xmlrpc 2020-07-13 17:29:33 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:2409