Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions helm/templates/_tplValues.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ End of usage example
Custom definitions
*/}}

{{- define "common.initContainer.configManagement.merged" -}}
{{- include "common.tplvalues.merge" ( dict "values" ( list .Values.initContainer.configManagement .Values.global.configManagement ) "context" . ) }}
{{- end -}}

{{- define "common.mapproxinator.configManagement.merged" -}}
{{- include "common.tplvalues.merge" ( dict "values" ( list .Values.mapproxinator.configManagement .Values.global.configManagement ) "context" . ) }}
{{- end -}}

{{- define "common.storage.merged" -}}
{{- include "common.tplvalues.merge" ( dict "values" ( list .Values.storage .Values.global.storage ) "context" . ) }}
{{- end -}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{{- $chartName := include "mapproxy.name" . -}}
{{- $releaseName := .Release.Name -}}
{{- $initConfigmapName := include "init-configmap.fullname" . -}}
{{- $configManagement := (include "common.initContainer.configManagement.merged" .) | fromYaml }}
{{- $db := (include "common.db.merged" .) | fromYaml }}
{{- $s3 := (include "common.s3.merged" .) | fromYaml }}
{{- $storage := (include "common.storage.merged" .) | fromYaml }}
Expand All @@ -16,6 +17,12 @@ metadata:
release: {{ $releaseName }}
data:
LOG_LEVEL: {{ .Values.initContainer.env.logLevel | quote }}
{{- with $configManagement }}
CONFIG_NAME: {{ .name | quote }}
CONFIG_VERSION: {{ .version | quote }}
CONFIG_OFFLINE_MODE: {{ .offlineMode | quote }}
CONFIG_SERVER_URL: {{ .serverUrl | quote }}
{{- end }}
CONFIG_PROVIDER: {{ $storage.mapproxyConfigProvider }}
S3_ENDPOINT_URL: {{ $s3.endpointUrl }}
S3_BUCKET: {{ $s3.tilesBucket }}
Expand Down
15 changes: 11 additions & 4 deletions helm/templates/mapproxinator/mapproxinator-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{{- $chartName := include "mapproxy.name" . -}}
{{- $releaseName := .Release.Name -}}
{{- $mapproxinatorConfigmapName := include "mapproxinator-configmap.fullname" . -}}
{{- $configManagement := (include "common.mapproxinator.configManagement.merged" .) | fromYaml }}
{{- $db := (include "common.db.merged" .) | fromYaml }}
{{- $s3 := (include "common.s3.merged" .) | fromYaml }}
{{- $storage := (include "common.storage.merged" .) | fromYaml }}
Expand All @@ -22,14 +23,20 @@ data:
RESPONSE_COMPRESSION_ENABLED: {{ .Values.mapproxinator.env.responseCompressionEnabled | quote }}
LOG_LEVEL: {{ .Values.mapproxinator.env.logLevel | quote }}
LOG_PRETTY_PRINT_ENABLED: {{ .Values.mapproxinator.env.logPrettyPrintEnabled | quote }}
{{ if $tracing.enabled }}
{{- if $tracing.enabled }}
TELEMETRY_TRACING_ENABLED: 'true'
TELEMETRY_TRACING_URL: {{ $tracing.url }}
{{ end }}
{{ if $metrics.enabled }}
{{- end }}
{{- if $metrics.enabled }}
TELEMETRY_METRICS_ENABLED: 'true'
TELEMETRY_METRICS_URL: {{ $metrics.url }}
{{ end }}
{{- end }}
{{- with $configManagement }}
CONFIG_NAME: {{ .name | quote }}
CONFIG_VERSION: {{ .version | quote }}
CONFIG_OFFLINE_MODE: {{ .offlineMode | quote }}
CONFIG_SERVER_URL: {{ .serverUrl | quote }}
{{- end }}
SERVER_PORT: {{ .Values.mapproxinator.targetPort | quote }}
CONFIG_PROVIDER: {{ $storage.mapproxyConfigProvider | quote }}
POLL_TIMEOUT_FREQUENCY_MS: {{ .Values.mapproxinator.env.poll.timeout.frequencyMS | quote }}
Expand Down
11 changes: 11 additions & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ global:
dockerRegistryUrl: my-registry-url.io
imagePullSecretName: "my-registry-secret"
flavor: openshift
configManagement: {}
tracing:
enabled: false
url: ""
Expand Down Expand Up @@ -213,6 +214,11 @@ initContainer:
image:
repository: mapproxinator
tag: "latest"
configManagement:
offlineMode: false
name: 'mapproxinator'
version: 'latest'
serverUrl: 'http://localhost:8080/api'
env:
logLevel: warn
ssl:
Expand Down Expand Up @@ -394,6 +400,11 @@ mapproxinator:
port: 80
targetPort: 8081
nodePort: 30002
configManagement:
offlineMode: false
name: 'mapproxinator'
version: 'latest'
serverUrl: 'http://localhost:8080/api'
env:
logLevel: warn
poll:
Expand Down
Loading