Files
odo/scripts/configure-cluster/common/setup-postgres-operator.sh
Girish Ramnani 9cfcbc3485 param based odo service create for operator backed services (#4704)
* initial work towards param based odo service create

* change

* add type data to cr

* add to devfile

* update olm

* remove logs

* towards tests

* init tests

* more test

* fix tests

* fix unit again

* set default service name

* mod fix

* addressed some comments

* add postgres operator in setup and in test

* fix

* fix some tests

* fix helpers

* helper flag

* merge conflicts

* add tests and install operator

* certain cases fix

* fix intg tests

* update scripts

* fix intg test

* changed function name

* changes

* fix comments

* docs update

* link fix

* small fix

* comment

* unit tests

* doc fix

* renamed as per comments

* comment
2021-06-24 03:42:47 -04:00

28 lines
577 B
Bash

#!/bin/bash
install_postgres_operator(){
oc create -f - <<EOF
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
generateName: ${1}-
namespace: ${1}
spec:
targetNamespaces:
- ${1}
EOF
oc create -f - <<EOF
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: postgresql-operator-dev4devs-com
namespace: ${1}
spec:
channel: alpha
name: postgresql-operator-dev4devs-com
source: community-operators
sourceNamespace: openshift-marketplace
installPlanApproval: "Automatic"
EOF
}