Skip to content

Commit f0f8918

Browse files
authored
Merge pull request #51 from northvolt/pc/data-config-through-secrets
Support setting dataSourceConfig through secrets or extraEnv
2 parents cc3f37f + a4702d8 commit f0f8918

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

templates/deployment-client.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ spec:
4545
{{- if .Values.server }}
4646
- name: OPAL_SERVER_URL
4747
value: {{ printf "http://%s:%v" (include "opal.serverName" .) .Values.server.port | quote }}
48-
{{- if not (or (.Values.server.dataConfigSources.external_source_url) (.Values.server.dataConfigSources.config) ) }}
48+
{{- if not (or (.Values.server.dataConfigSources.external_source_url) (.Values.server.dataConfigSources.config) (hasKey .Values.server.extraEnv "OPAL_DATA_UPDATER_ENABLED") ) }}
4949
- name: OPAL_DATA_UPDATER_ENABLED
5050
value: "False"
5151
{{- end }}

templates/deployment-server.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,10 @@ spec:
9090
{{- end }}
9191
- name: UVICORN_NUM_WORKERS
9292
value: {{ .Values.server.uvicornWorkers | quote }}
93+
{{- if or .Values.server.dataConfigSources.config .Values.server.dataConfigSources.external_source_url }}
9394
- name: OPAL_DATA_CONFIG_SOURCES
9495
value: {{ .Values.server.dataConfigSources | toRawJson | squote }}
96+
{{- end}}
9597
{{- if .Values.server.broadcastUri }}
9698
- name: OPAL_BROADCAST_URI
9799
value: {{ .Values.server.broadcastUri | quote }}

values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ server:
3232
# topics: ["policy_data"]
3333
# dst_path: "/static"
3434

35+
# Option #4 - Leave config empty and instead supply using the OPAL_DATA_CONFIG_SOURCES environment variable through env or secret
36+
# config: null
37+
3538
broadcastUri: null
3639
broadcastPgsql: true
3740
uvicornWorkers: 4

0 commit comments

Comments
 (0)