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
4 changes: 4 additions & 0 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ dependencies:
- name: nginx
Comment thread
razbroc marked this conversation as resolved.
version: 1.3.0
repository: oci://acrarolibotnonprod.azurecr.io/helm

- name: mclabels
version: 1.0.1
repository: oci://acrarolibotnonprod.azurecr.io/helm/infra
14 changes: 13 additions & 1 deletion helm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,23 @@ Create chart name and version as used by the chart label.
Common labels
*/}}
{{- define "mapproxy.labels" -}}
app.kubernetes.io/name: {{ include "mapproxy.name" . }}-{{ .type }}
app.kubernetes.io/instance: {{ .Release.Name }}-{{ .type }}
helm.sh/chart: {{ include "mapproxy.chart" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{ include "mclabels.labels" . }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "mapproxy.selectorLabels" -}}
Comment thread
CL-SHLOMIKONCHA marked this conversation as resolved.
app.kubernetes.io/name: {{ include "mapproxy.name" . }}-{{ .type }}
app.kubernetes.io/instance: {{ .Release.Name }}-{{ .type }}
{{ include "mclabels.selectorLabels" . }}
{{- end }}

{{/*
Expand Down Expand Up @@ -102,4 +114,4 @@ Returns the cloud provider image pull secret name from global if exists or from
{{- $headerList = uniq $headerList -}}
{{- quote (join "," $headerList) -}}
{{- end -}}
{{- end -}}
{{- end -}}
4 changes: 0 additions & 4 deletions helm/templates/mapproxinator/mapproxinator-container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@
name: {{ .postgresSecretName }}
key: password
{{- end }}
{{- if .Values.global.ca.secretName }}
Comment thread
razbroc marked this conversation as resolved.
- name: REQUESTS_CA_BUNDLE
value: {{ printf "%s/%s" .Values.global.ca.path .Values.global.ca.key | quote }}
{{- end }}
envFrom:
- configMapRef:
name: {{ $mapproxinatorConfigmapName }}
Expand Down
11 changes: 3 additions & 8 deletions helm/templates/mapproxy-bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,23 @@
app: {{ .chartName }}-{{ .type }}
release: {{ .releaseName }}-{{ .type }}
run: {{ .releaseName }}-{{ .chartName }}-{{ .type }}
app.kubernetes.io/name: {{ include "mapproxy.name" . }}-{{ .type }}
app.kubernetes.io/instance: {{ .releaseName }}-{{ .type }}
{{ include "mapproxy.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
app: {{ .chartName }}-{{ .type }}
release: {{ .releaseName }}-{{ .type }}
run: {{ .releaseName }}-{{ .chartName }}-{{ .type }}
app.kubernetes.io/name: {{ include "mapproxy.name" . }}-{{ .type }}
app.kubernetes.io/instance: {{ .releaseName }}-{{ .type }}
{{ include "mapproxy.labels" . | nindent 8 }}
annotations:
{{- if .Values.resetOnConfigChange }}
checksum/configmap: {{
include (print $.Template.BasePath "/mapproxy/mapproxy-configmap.yaml") . | sha256sum }}
{{- end }}
{{- if $metrics.enabled }}
Comment thread
razbroc marked this conversation as resolved.
prometheus.io/port: {{ $metrics.prometheus.port | quote }}
prometheus.io/scrape: {{ $metrics.prometheus.scrape | quote }}
{{- end }}
{{- if .Values.podAnnotations }}
{{- toYaml .Values.podAnnotations | nindent 8 }}
{{- end }}
{{ include "mclabels.annotations" . | nindent 8 }}
spec:
{{- if $cloudProviderImagePullSecretName }}
imagePullSecrets:
Expand Down
4 changes: 2 additions & 2 deletions helm/templates/mapproxy/mapproxy-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ data:
CORS_ALLOWED_HEADERS: {{ template "map-proxy.cors.allowedHeaders" . }}
CORS_ALLOWED_ORIGIN: {{ .Values.mapproxy.env.cors.allowedOrigin | quote }}
AUTH_ENABLED: {{ .Values.nginx.authorization.enabled | quote }}
{{ if (and (.Values.global.opalaEnabled) (.Values.nginx.authorization.enabled) }}
{{ if (and (.Values.global.opalaEnabled) (.Values.nginx.authorization.enabled))}}
AUTH_VALID_DOMAIN: {{ .Values.nginx.authorization.wms.domain | quote }}
AUTH_HEADER_NAME: {{ .Values.mapproxy.env.cors.allowedHeaders | quote }}
AUTH_QUERY_NAME: {{ .Values.nginx.authorization.token.queryName | quote }}
{{- end}}
{{- end }}
{{- end }}
4 changes: 0 additions & 4 deletions helm/templates/mapproxy/mapproxy-container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@
name: {{ .s3SecretName }}
key: secretAccessKey
{{- end }}
{{- if .Values.global.ca.enabled }}
Comment thread
razbroc marked this conversation as resolved.
- name: REQUESTS_CA_BUNDLE
value: '/usr/local/share/ca-certificates/ca.crt'
{{- end }}
envFrom:
- configMapRef:
name: {{ $configmapName }}
Expand Down
2 changes: 1 addition & 1 deletion helm/templates/mapproxy/mapproxy-wms-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ metadata:
component: {{ $chartName }}
environment: {{ include "mapproxy.environment" . }}
release: {{ $releaseName }}
{{- include "mapproxy.labels" . | nindent 4 }}
{{- include "mapproxy.labels" (dict "type" $type | merge .) | nindent 4 }}
spec:
{{- template "mapproxy-chart.mapproxy-bundle" (merge (dict "releaseName" $releaseName "chartName" $chartName "type" $type "replicaCount" $replicaCount "resources" .Values.mapproxy.wms.resources) .)}}
{{- end -}}
2 changes: 1 addition & 1 deletion helm/templates/mapproxy/mapproxy-wmts-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ metadata:
component: {{ $chartName }}
environment: {{ include "mapproxy.environment" . }}
release: {{ $releaseName }}
{{- include "mapproxy.labels" . | nindent 4 }}
{{- include "mapproxy.labels" (dict "type" $type | merge .) | nindent 4 }}
spec:
{{- template "mapproxy-chart.mapproxy-bundle" (merge (dict "releaseName" $releaseName "chartName" $chartName "type" $type "replicaCount" $replicaCount "resources" .Values.mapproxy.wmts.resources) .)}}
{{- end -}}
3 changes: 1 addition & 2 deletions helm/templates/mapproxy/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,5 @@ spec:
app: {{ $chartName }}-{{ .type }}
release: {{ $releaseName }}-{{ .type }}
run: {{ $releaseName }}-{{ $chartName }}-{{ .type }}
Comment thread
CL-SHLOMIKONCHA marked this conversation as resolved.
app.kubernetes.io/name: {{ include "mapproxy.name" . }}-{{ .type }}
app.kubernetes.io/instance: {{ $releaseName }}-{{ .type }}
{{- include "mapproxy.selectorLabels" . | nindent 4 }}
{{- end }}
13 changes: 12 additions & 1 deletion helm/values.yaml
Comment thread
razbroc marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,17 @@ cloudProvider:
imagePullSecretName: "my-registry-secret"
flavor: openshift

mclabels:
Comment thread
razbroc marked this conversation as resolved.
#environment: development
component: backend
partOf: serving
owner: raster
gisDomain: raster
prometheus:
enabled: true
port: 9117
logScraping: true

mapproxy:
enabled: true
socket:
Expand Down Expand Up @@ -228,7 +239,7 @@ nginx:
nodePort: 30003

authorization:
enabled: true
enabled: false
url: http://opa-int-opa-service.infra-services/v1/data/http/authz/decision
token:
queryName: token
Expand Down