Incorrect EDB Postgres operator environment variable configuration
When you upgrade IBM Cloud Pak foundational services version 3.12.x or older to newer version, to deploy EDB Postgres, you need to manually update the common-service
NamesapceScope Custom Resource (CR) to correctly configure the EDB
Postgres environment variable.
Symptom
After upgrade, cloud-native-postgresql
does not work correctly in namespaces other than ibm-comon-services
namespace.
To check the cloud-native-postgresql
CSV, run the following command:
oc get csv <cloud-native-postgresql-name> -n <EDB-installed-namespace> -oyaml
The cloud-native-postgresql
CSV has the following configuration for `WATCH_NAMESPACE:
env:
- name: WATCH_NAMESPACE
valueFrom:
fieldRef:
fieldPath: 'metadata.annotations[''olm.targetNamespaces'']'
Cause
This is a known limitation for updating the common-service
NamesapceScope CR from old version of IBM Cloud Pak foundational services. CSVInjector
is not enabled by default in NamespaceScope CR.
Resolving the problem
Complete the following steps to resolve the issue:
-
Edit the
common-service
NamespaceScope CR to enable theCSVInjector
by running the following command:-
Open the CR for editing.
oc edit namespacescope common-service -n <NamsapceScope-operator-installed-namespace>
-
Add
CSVInjector
enabled underspec
section in the custom resourcespec: csvInjector: enable: true
-
Save the changes and close the CR.
-
-
Run the following command to re-install the EDB Postgres operator.
-
Uninstall the existing EDB Postgres operator.
oc delete sub cloud-native-postgresql -n <EDB-installed-namespace> oc delete csv <cloud-native-postgresql-name> -n <EDB-installed-namespace>
-
Restart the ODLM pod to re-install EDB Postgres operator,
oc delete pod -l name=operand-deployment-lifecycle-manager -n <ODLM-installed-namespace>
-