Make env var overwrite configmap setting for watching namespaces

This commit is contained in:
Sergey Dudoladov
2018-02-06 16:12:47 +01:00
parent 0ef801f4e0
commit 8b7bbde06e
4 changed files with 23 additions and 14 deletions
+1
View File
@@ -4,6 +4,7 @@ metadata:
name: postgres-operator
data:
# assumes the ns exists before the operator starts
# the env var with the same name may overwrite it in the operator pod
# watched_namespace: development
service_account_name: operator
cluster_labels: application:spilo
+5 -4
View File
@@ -15,9 +15,10 @@ spec:
image: registry.opensource.zalan.do/acid/postgres-operator:c17aabb
imagePullPolicy: IfNotPresent
env:
- name: WATCH_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
# uncomment to overwrite a similar setting from operator configmap
# - name: WATCHED_NAMESPACE
# valueFrom:
# fieldRef:
# fieldPath: metadata.namespace
- name: CONFIG_MAP_NAME
value: "postgres-operator"