Skip to content
Merged
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
2 changes: 1 addition & 1 deletion helm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Selector labels
{{- define "mapproxy.selectorLabels" -}}
app.kubernetes.io/name: {{ include "mapproxy.name" . }}-{{ .type }}
app.kubernetes.io/instance: {{ .Release.Name }}-{{ .type }}
{{ include "mclabels.selectorLabels" . }}
{{- include "mclabels.selectorLabels" . }}
{{- end }}

{{/*
Expand Down
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
13 changes: 6 additions & 7 deletions helm/templates/mapproxy-bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,22 @@
app: {{ .chartName }}-{{ .type }}
release: {{ .releaseName }}-{{ .type }}
run: {{ .releaseName }}-{{ .chartName }}-{{ .type }}
{{ include "mapproxy.selectorLabels" . | nindent 6 }}
{{- include "mapproxy.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
app: {{ .chartName }}-{{ .type }}
release: {{ .releaseName }}-{{ .type }}
run: {{ .releaseName }}-{{ .chartName }}-{{ .type }}
{{ include "mapproxy.labels" . | nindent 8 }}
{{- include "mapproxy.labels" . | nindent 8 }}
annotations:
{{- if .Values.resetOnConfigChange }}
checksum/configmap: {{
include (print $.Template.BasePath "/mapproxy/mapproxy-configmap.yaml") . | sha256sum }}
checksum/configmap: {{ include (print $.Template.BasePath "/mapproxy/mapproxy-configmap.yaml") . | sha256sum }}
{{- end }}
{{- if .Values.podAnnotations }}
{{- toYaml .Values.podAnnotations | nindent 8 }}
{{- end }}
{{ include "mclabels.annotations" . | nindent 8 }}
{{- include "mclabels.annotations" . | nindent 8 }}
spec:
{{- if $cloudProviderImagePullSecretName }}
imagePullSecrets:
Expand Down Expand Up @@ -73,12 +72,12 @@
items:
- key: certFile
path: cert.pem
{{- end }}
{{- end }}
{{- if .Values.global.ca.secretName }}
- name: root-ca
secret:
secretName: {{ .Values.global.ca.secretName }}
{{- end }}
{{- end }}
{{- if .Values.authentication.ssl.enabled }}
- name: open-ssl
secret:
Expand Down
2 changes: 1 addition & 1 deletion helm/templates/mapproxy/mapproxy-container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{{- $fs := (include "common.fs.merged" .) | fromYaml }}
- name: mapproxy
image: {{ .cloudProviderDockerRegistryUrl }}{{ .Values.mapproxy.image.repository }}:{{ .Values.mapproxy.image.tag }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
env:
- name: REDIS_TLS
value: {{ .Values.mapproxy.redis.tls | quote }}
Expand Down
13 changes: 12 additions & 1 deletion 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 @@ -112,7 +113,7 @@ mclabels:
partOf: serving
owner: raster
gisDomain: raster
prometheus:
prometheus:
enabled: true
port: 9117
logScraping: true
Expand Down Expand Up @@ -192,6 +193,11 @@ initContainer:
image:
repository: mapproxinator
tag: "latest"
configManagement:
offlineMode: false
name: 'mapproxinator'
version: ''
serverUrl: ''
env:
logLevel: warn
ssl:
Expand Down Expand Up @@ -321,6 +327,11 @@ mapproxinator:
port: 80
targetPort: 8081
nodePort: 30002
configManagement:
offlineMode: false
name: 'mapproxinator'
version: ''
serverUrl: ''
env:
logLevel: warn
poll:
Expand Down
Loading