how to change default installation namespace of a kubernetes operator via olm

4/29/2020

I have a bare-metal kubernetes 1.18 and I would like to use olm 0.14.1 in order to install CrunchyData Operator on namespace: pgo

The operator installation procedure (https://operatorhub.io/install/postgresql.yaml) is prepared for namespace: my-postgresql but I would like to install the operator to pgo, not to my-postgresql.

I take a copy of postgresql.yaml, replace my-postgresql with pgo and apply the yaml

`apiVersion: v1
kind: Namespace
metadata:
  name: pgo
---
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
  name: operatorgroup
  namespace: pgo
spec:
  targetNamespaces:
  - pgo
---
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: pgo
  namespace: pgo
spec:
  channel: stable
  name: postgresql
  source: operatorhubio-catalog
  sourceNamespace: olm`

kubectl create -f postgresql.yaml

I see Subscription and OperatorGroup is exist in namespace pgo as expected but the operator is not installed. Threre is no csv.

What am I missing?

-- Tireli Efe
bare-metal-server
kubernetes
kubernetes-namespace
kubernetes-operator
postgresql

0 Answers