File tree 3 files changed +66
-15
lines changed
3 files changed +66
-15
lines changed Original file line number Diff line number Diff line change @@ -98,3 +98,37 @@ imagePullSecrets:
98
98
value: { { $object .image | quote } }
99
99
{ {- end } }
100
100
{ {- end } }
101
+
102
+
103
+ { {- define " install.defaultEnv" -} }
104
+ - name: CRUNCHY_DEBUG
105
+ value: { { .Values.debug | ne false | quote } }
106
+ - name: PGO_NAMESPACE
107
+ valueFrom: { fieldRef: { apiVersion: v1, fieldPath: metadata.namespace } }
108
+ { {- if .Values.singleNamespace } }
109
+ - name: PGO_TARGET_NAMESPACE
110
+ valueFrom: { fieldRef: { apiVersion: v1, fieldPath: metadata.namespace } }
111
+ { {- end } }
112
+ { {- if .Values.workers } }
113
+ - name: PGO_WORKERS
114
+ value: { { .Values.workers | quote } }
115
+ { {- end } }
116
+ { {- include " install.relatedImages" . } }
117
+ { {- if .Values.disable_check_for_upgrades } }
118
+ - name: CHECK_FOR_UPGRADES
119
+ value: "false"
120
+ { {- end } }
121
+ { {- if .Values.features } }
122
+ { {- $value := .Values.features } }
123
+ - name: PGO_FEATURE_GATES
124
+ { {- $out := " " -} }
125
+ { {- if eq (kindOf $value ) " map" -} }
126
+ { {- range $key , $val := $value -} }
127
+ { {- $out = (print $out $key " =" $val " ," ) -} }
128
+ { {- end } }
129
+ { {- end } }
130
+ value: "{ { trimSuffix " ," $out } }"
131
+ { {- end } }
132
+ { {- end } }{ {/* define */} }
133
+
134
+
Original file line number Diff line number Diff line change @@ -24,22 +24,13 @@ spec:
24
24
- name : operator
25
25
image : {{ required ".Values.controllerImages.cluster is required" .Values.controllerImages.cluster | quote }}
26
26
env :
27
- - name : CRUNCHY_DEBUG
28
- value : {{ .Values.debug | ne false | quote }}
29
- - name : PGO_NAMESPACE
30
- valueFrom : { fieldRef: { apiVersion: v1, fieldPath: metadata.namespace } }
31
- {{- if .Values.singleNamespace }}
32
- - name : PGO_TARGET_NAMESPACE
33
- valueFrom : { fieldRef: { apiVersion: v1, fieldPath: metadata.namespace } }
27
+ {{- if .Values.envOverride }}
28
+ {{- toYaml .Values.envOverride | nindent 10 }}
29
+ {{- else -}}
30
+ {{- include "install.defaultEnv" . | nindent 10 }}
34
31
{{- end }}
35
- {{- if .Values.workers }}
36
- - name : PGO_WORKERS
37
- value : {{ .Values.workers | quote }}
38
- {{- end }}
39
- {{- include "install.relatedImages" . | indent 8 }}
40
- {{- if .Values.disable_check_for_upgrades }}
41
- - name : CHECK_FOR_UPGRADES
42
- value : " false"
32
+ {{- if .Values.extraEnv }}
33
+ {{- toYaml .Values.extraEnv | nindent 10 }}
43
34
{{- end }}
44
35
{{- if .Values.resources.controller }}
45
36
resources :
Original file line number Diff line number Diff line change @@ -49,3 +49,29 @@ resources:
49
49
# postgres-operator.crunchydata.com, will cause an error
50
50
# customPodLabels:
51
51
# example.com: custom-label
52
+
53
+ # Enable feature gates for PGO, by explicitly seting the value for the flags
54
+ # features:
55
+ # AutoGrowVolumes: true
56
+ # Feature2: false
57
+ # Feature3: somevalue
58
+
59
+ # Define extra environment variables for the chart, which will get added to the container's env
60
+ # extraEnv:
61
+ # - name: MY_VAR
62
+ # value: "myvalue"
63
+ # - name: MY_CONFIGMAP_VAR
64
+ # valueFrom:
65
+ # configMapKeyRef:
66
+ # name: s3-settings
67
+ # key: bucket
68
+ # - name: MY_SECRET_VAR
69
+ # valueFrom:
70
+ # secretKeyRef:
71
+ # name: s3-secret
72
+ # key: key
73
+
74
+ # Override environment variables entirely !!DANGEROUS!!
75
+ # envOverride:
76
+ # - name: PG_DEBUG
77
+ # value: "true"
You can’t perform that action at this time.
0 commit comments