Table of Contents generated with DocToc
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
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
oc -n ibm-common-services get csv
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
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
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 an operator, you can add the operator into the
OperandRequest
-
Delete an operator, you can remove the operator from the
OperandRequest
The operators and their custom resource would be deployed in the cluster, and thus the installation of operands will also triggered by the CR.