Skip to content

Latest commit

 

History

History
167 lines (140 loc) · 3.81 KB

File metadata and controls

167 lines (140 loc) · 3.81 KB

Table of Contents generated with DocToc

Install the operand deployment lifecycle manager On OCP 4.3+

1. Create CatalogSource

apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: opencloud-operators
  namespace: olm
spec:
  displayName: IBMCS Operators
  publisher: IBM
  sourceType: grpc
  image: docker.io/ibmcom/ibm-common-service-catalog:latest
  updateStrategy:
    registryPoll:
      interval: 45m

2. Create Operator NS, Group, Subscription

apiVersion: v1
kind: Namespace
metadata:
  name: odlm

---
apiVersion: operators.coreos.com/v1alpha2
kind: OperatorGroup
metadata:
  name: operatorgroup
  namespace: odlm
spec:
  targetNamespaces:
  - odlm

---
apiVersion: v1
data:
  namespaces: odlm
kind: ConfigMap
metadata:
  name: namespace-scope
  namespace: odlm

---
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: operand-deployment-lifecycle-manager
  namespace: odlm
spec:
  channel: v3.20
  name: ibm-odlm
  source: opencloud-operators
  sourceNamespace: olm
  config:
    env:
    - name: INSTALL_SCOPE
      value: namespaced
END

3. Check Operator CSV

oc -n ibm-common-services get csv

4. Create OperandRegistry and OperandConfig instance

Create OperandConfig

kubectl apply -f - <<END
apiVersion: operator.ibm.com/v1alpha1
kind: OperandConfig
metadata:
  name: common-service
  namespace: odlm
spec:
  services:
  - name: ibm-cert-manager-operator
    spec:
      certManager: {}
      issuer: {}
      certificate: {}
END

Create OperandRegistry

kubectl apply -f - <<END
apiVersion: operator.ibm.com/v1alpha1
apiVersion: operator.ibm.com/v1alpha1
kind: OperandRegistry
metadata:
  name: common-service
  namespace: odlm
spec:
  operators:
  - name: ibm-cert-manager-operator
    namespace: odlm
    channel: v3.20
    packageName: ibm-cert-manager-operator
    scope: public
    sourceName: opencloud-operators
    sourceNamespace: olm
END

5. Create OperandRequest instance

Create Operand Request

kubectl apply -f - <<END
apiVersion: operator.ibm.com/v1alpha1
kind: OperandRequest
metadata:
  name: common-service
  namespace: odlm
spec:
  requests:
  - registry: common-service
    registryNamespace: odlm
    operands:
    - name: ibm-cert-manager-operator
END

After the OperandRequest created, we can check if our common services install successfully by command.

kubectl get csv -A

Enable or Delete an Operator

  • Enable an operator, you can add the operator into the OperandRequest

  • Delete an operator, you can remove the operator from theOperandRequest

Post-installation

The operators and their custom resource would be deployed in the cluster, and thus the installation of operands will also triggered by the CR.