From 7af2605b445d8e0f1697dc4d27f6ff984b5f72c4 Mon Sep 17 00:00:00 2001 From: Roi Cohen Date: Mon, 1 Dec 2025 14:01:53 +0200 Subject: [PATCH 01/12] chore: add infra helm annotations and mclabels --- .DS_Store | Bin 0 -> 6148 bytes helm/Chart.yaml | 6 +++--- helm/templates/_helpers.tpl | 10 ++++++++++ helm/templates/mapproxy-bundle.yaml | 1 + helm/values.yaml | 10 ++++++++++ 5 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..c422fdb823de4aaf253d0e6742421815d90417cc GIT binary patch literal 6148 zcmeH~&u-H|5XNU)3zDLsz=@+@ppkmw8mbhD0~fd>^2a0*PF-48kPGr_aN!Yo1^CVE zs@iqK6;)_Q+MV_K`*vo&*xsy&xbxf9naEf~1~m1>3EctH``Yf=QJ8s#cecirv~ns- znbWdm1+oGUT>*V}$MRCncyH$tzrP!)T_X_U=#a1BvD2URuR4!s&GsiIER!`( zWEQQVb=6X(9L+D`6ewMR+od?m?|YQrV=#@Z$z+RW+Z1i9#^|BElM8u8K5y|8a$ltk zTmM(I{uoUw`C`AIj&`(5bi0Aw$~S3ye62m^k3eogR`^rn&UqfFzaQChjhO=&{655Q ziFNR~IrlAgmDbMl0{m9=8>RyMKvp0taHoKN zA4;0~Y4Dx*_UWLrBLKc&+KjQDC6rSJKMlU~o;#THRJ^CUaKvz)&U_hg)8ISrJzZQl ze7F$Vg%gUi=&WBFT-? Date: Tue, 2 Dec 2025 14:28:52 +0200 Subject: [PATCH 02/12] fix: remove duplicate prometheus annotations, using mclabels template --- .editorconfig | 59 +++++++++++++++++++ helm/rendered.yaml | 0 helm/templates/mapproxy-bundle.yaml | 6 +- .../mapproxy/mapproxy-configmap.yaml | 4 +- helm/values.yaml | 5 +- 5 files changed, 66 insertions(+), 8 deletions(-) create mode 100644 .editorconfig create mode 100644 helm/rendered.yaml diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..1639887 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,59 @@ +[*] +cpp_indent_braces=false +cpp_indent_multi_line_relative_to=innermost_parenthesis +cpp_indent_within_parentheses=indent +cpp_indent_preserve_within_parentheses=false +cpp_indent_case_labels=false +cpp_indent_case_contents=true +cpp_indent_case_contents_when_block=false +cpp_indent_lambda_braces_when_parameter=true +cpp_indent_goto_labels=one_left +cpp_indent_preprocessor=leftmost_column +cpp_indent_access_specifiers=false +cpp_indent_namespace_contents=true +cpp_indent_preserve_comments=false +cpp_new_line_before_open_brace_namespace=ignore +cpp_new_line_before_open_brace_type=ignore +cpp_new_line_before_open_brace_function=ignore +cpp_new_line_before_open_brace_block=ignore +cpp_new_line_before_open_brace_lambda=ignore +cpp_new_line_scope_braces_on_separate_lines=false +cpp_new_line_close_brace_same_line_empty_type=false +cpp_new_line_close_brace_same_line_empty_function=false +cpp_new_line_before_catch=true +cpp_new_line_before_else=true +cpp_new_line_before_while_in_do_while=false +cpp_space_before_function_open_parenthesis=remove +cpp_space_within_parameter_list_parentheses=false +cpp_space_between_empty_parameter_list_parentheses=false +cpp_space_after_keywords_in_control_flow_statements=true +cpp_space_within_control_flow_statement_parentheses=false +cpp_space_before_lambda_open_parenthesis=false +cpp_space_within_cast_parentheses=false +cpp_space_after_cast_close_parenthesis=false +cpp_space_within_expression_parentheses=false +cpp_space_before_block_open_brace=true +cpp_space_between_empty_braces=false +cpp_space_before_initializer_list_open_brace=false +cpp_space_within_initializer_list_braces=true +cpp_space_preserve_in_initializer_list=true +cpp_space_before_open_square_bracket=false +cpp_space_within_square_brackets=false +cpp_space_before_empty_square_brackets=false +cpp_space_between_empty_square_brackets=false +cpp_space_group_square_brackets=true +cpp_space_within_lambda_brackets=false +cpp_space_between_empty_lambda_brackets=false +cpp_space_before_comma=false +cpp_space_after_comma=true +cpp_space_remove_around_member_operators=true +cpp_space_before_inheritance_colon=true +cpp_space_before_constructor_colon=true +cpp_space_remove_before_semicolon=true +cpp_space_after_semicolon=false +cpp_space_remove_around_unary_operator=true +cpp_space_around_binary_operator=insert +cpp_space_around_assignment_operator=insert +cpp_space_pointer_reference_alignment=left +cpp_space_around_ternary_operator=insert +cpp_wrap_preserve_blocks=one_liners diff --git a/helm/rendered.yaml b/helm/rendered.yaml new file mode 100644 index 0000000..e69de29 diff --git a/helm/templates/mapproxy-bundle.yaml b/helm/templates/mapproxy-bundle.yaml index dfc5181..b5d3bfc 100644 --- a/helm/templates/mapproxy-bundle.yaml +++ b/helm/templates/mapproxy-bundle.yaml @@ -12,6 +12,7 @@ replicas: {{ .replicaCount }} selector: matchLabels: + {{ include "mclabels.selectorLabels" . | nindent 6 }} app: {{ .chartName }}-{{ .type }} release: {{ .releaseName }}-{{ .type }} run: {{ .releaseName }}-{{ .chartName }}-{{ .type }} @@ -20,6 +21,7 @@ template: metadata: labels: + {{ include "mclabels.selectorLabels" . | nindent 8 }} app: {{ .chartName }}-{{ .type }} release: {{ .releaseName }}-{{ .type }} run: {{ .releaseName }}-{{ .chartName }}-{{ .type }} @@ -31,10 +33,6 @@ checksum/configmap: {{ include (print $.Template.BasePath "/mapproxy/mapproxy-configmap.yaml") . | sha256sum }} {{- end }} - {{- if $metrics.enabled }} - prometheus.io/port: {{ $metrics.prometheus.port | quote }} - prometheus.io/scrape: {{ $metrics.prometheus.scrape | quote }} - {{- end }} {{- if .Values.podAnnotations }} {{- toYaml .Values.podAnnotations | nindent 8 }} {{- end }} diff --git a/helm/templates/mapproxy/mapproxy-configmap.yaml b/helm/templates/mapproxy/mapproxy-configmap.yaml index 85bcf49..4c86eaa 100644 --- a/helm/templates/mapproxy/mapproxy-configmap.yaml +++ b/helm/templates/mapproxy/mapproxy-configmap.yaml @@ -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 }} diff --git a/helm/values.yaml b/helm/values.yaml index 273d32e..6e65cef 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -16,7 +16,7 @@ global: environment: "" authentication: jwtPublicKeySecretName: map-colonies-jwks - opalaEnabled: false + opalaEnabled: true storage: tilesStorageProvider: "" mapproxyConfigProvider: "" @@ -107,6 +107,7 @@ cloudProvider: flavor: openshift mclabels: + #environment: development component: backend partOf: serving owner: raster @@ -238,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 From c72b514d6aba2f00a8817570d30db0d006b8f3c7 Mon Sep 17 00:00:00 2001 From: roicohen Date: Tue, 2 Dec 2025 15:21:29 +0200 Subject: [PATCH 03/12] fix: remove unused files --- .editorconfig | 59 ---------------------------------------------- helm/rendered.yaml | 0 2 files changed, 59 deletions(-) delete mode 100644 .editorconfig delete mode 100644 helm/rendered.yaml diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 1639887..0000000 --- a/.editorconfig +++ /dev/null @@ -1,59 +0,0 @@ -[*] -cpp_indent_braces=false -cpp_indent_multi_line_relative_to=innermost_parenthesis -cpp_indent_within_parentheses=indent -cpp_indent_preserve_within_parentheses=false -cpp_indent_case_labels=false -cpp_indent_case_contents=true -cpp_indent_case_contents_when_block=false -cpp_indent_lambda_braces_when_parameter=true -cpp_indent_goto_labels=one_left -cpp_indent_preprocessor=leftmost_column -cpp_indent_access_specifiers=false -cpp_indent_namespace_contents=true -cpp_indent_preserve_comments=false -cpp_new_line_before_open_brace_namespace=ignore -cpp_new_line_before_open_brace_type=ignore -cpp_new_line_before_open_brace_function=ignore -cpp_new_line_before_open_brace_block=ignore -cpp_new_line_before_open_brace_lambda=ignore -cpp_new_line_scope_braces_on_separate_lines=false -cpp_new_line_close_brace_same_line_empty_type=false -cpp_new_line_close_brace_same_line_empty_function=false -cpp_new_line_before_catch=true -cpp_new_line_before_else=true -cpp_new_line_before_while_in_do_while=false -cpp_space_before_function_open_parenthesis=remove -cpp_space_within_parameter_list_parentheses=false -cpp_space_between_empty_parameter_list_parentheses=false -cpp_space_after_keywords_in_control_flow_statements=true -cpp_space_within_control_flow_statement_parentheses=false -cpp_space_before_lambda_open_parenthesis=false -cpp_space_within_cast_parentheses=false -cpp_space_after_cast_close_parenthesis=false -cpp_space_within_expression_parentheses=false -cpp_space_before_block_open_brace=true -cpp_space_between_empty_braces=false -cpp_space_before_initializer_list_open_brace=false -cpp_space_within_initializer_list_braces=true -cpp_space_preserve_in_initializer_list=true -cpp_space_before_open_square_bracket=false -cpp_space_within_square_brackets=false -cpp_space_before_empty_square_brackets=false -cpp_space_between_empty_square_brackets=false -cpp_space_group_square_brackets=true -cpp_space_within_lambda_brackets=false -cpp_space_between_empty_lambda_brackets=false -cpp_space_before_comma=false -cpp_space_after_comma=true -cpp_space_remove_around_member_operators=true -cpp_space_before_inheritance_colon=true -cpp_space_before_constructor_colon=true -cpp_space_remove_before_semicolon=true -cpp_space_after_semicolon=false -cpp_space_remove_around_unary_operator=true -cpp_space_around_binary_operator=insert -cpp_space_around_assignment_operator=insert -cpp_space_pointer_reference_alignment=left -cpp_space_around_ternary_operator=insert -cpp_wrap_preserve_blocks=one_liners diff --git a/helm/rendered.yaml b/helm/rendered.yaml deleted file mode 100644 index e69de29..0000000 From 1e3a22f0145f9c99f4e4b27b0202429aae8886a8 Mon Sep 17 00:00:00 2001 From: roicohen Date: Tue, 2 Dec 2025 16:50:00 +0200 Subject: [PATCH 04/12] fix: removed duplicates --- helm/templates/mapproxinator/mapproxinator-container.yaml | 4 ---- helm/templates/mapproxy/mapproxy-container.yaml | 4 ---- 2 files changed, 8 deletions(-) diff --git a/helm/templates/mapproxinator/mapproxinator-container.yaml b/helm/templates/mapproxinator/mapproxinator-container.yaml index f9ddf1a..808659f 100644 --- a/helm/templates/mapproxinator/mapproxinator-container.yaml +++ b/helm/templates/mapproxinator/mapproxinator-container.yaml @@ -48,10 +48,6 @@ name: {{ .postgresSecretName }} key: password {{- end }} - {{- if .Values.global.ca.secretName }} - - name: REQUESTS_CA_BUNDLE - value: {{ printf "%s/%s" .Values.global.ca.path .Values.global.ca.key | quote }} - {{- end }} envFrom: - configMapRef: name: {{ $mapproxinatorConfigmapName }} diff --git a/helm/templates/mapproxy/mapproxy-container.yaml b/helm/templates/mapproxy/mapproxy-container.yaml index 72615ac..7283a0d 100644 --- a/helm/templates/mapproxy/mapproxy-container.yaml +++ b/helm/templates/mapproxy/mapproxy-container.yaml @@ -30,10 +30,6 @@ name: {{ .s3SecretName }} key: secretAccessKey {{- end }} - {{- if .Values.global.ca.enabled }} - - name: REQUESTS_CA_BUNDLE - value: '/usr/local/share/ca-certificates/ca.crt' - {{- end }} envFrom: - configMapRef: name: {{ $configmapName }} From e8ea82224cf64329b6cd10c09aa5d76ceb38cef4 Mon Sep 17 00:00:00 2001 From: roicohen Date: Wed, 3 Dec 2025 11:03:30 +0200 Subject: [PATCH 05/12] removed ds_store file --- .DS_Store | Bin 6148 -> 0 bytes helm/values-dev.yaml | 364 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 364 insertions(+) delete mode 100644 .DS_Store create mode 100644 helm/values-dev.yaml diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index c422fdb823de4aaf253d0e6742421815d90417cc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~&u-H|5XNU)3zDLsz=@+@ppkmw8mbhD0~fd>^2a0*PF-48kPGr_aN!Yo1^CVE zs@iqK6;)_Q+MV_K`*vo&*xsy&xbxf9naEf~1~m1>3EctH``Yf=QJ8s#cecirv~ns- znbWdm1+oGUT>*V}$MRCncyH$tzrP!)T_X_U=#a1BvD2URuR4!s&GsiIER!`( zWEQQVb=6X(9L+D`6ewMR+od?m?|YQrV=#@Z$z+RW+Z1i9#^|BElM8u8K5y|8a$ltk zTmM(I{uoUw`C`AIj&`(5bi0Aw$~S3ye62m^k3eogR`^rn&UqfFzaQChjhO=&{655Q ziFNR~IrlAgmDbMl0{m9=8>RyMKvp0taHoKN zA4;0~Y4Dx*_UWLrBLKc&+KjQDC6rSJKMlU~o;#THRJ^CUaKvz)&U_hg)8ISrJzZQl ze7F$Vg%gUi=&WBFT-? Date: Wed, 3 Dec 2025 11:45:25 +0200 Subject: [PATCH 06/12] removed unnecessary file --- helm/values-dev.yaml | 364 ------------------------------------------- 1 file changed, 364 deletions(-) delete mode 100644 helm/values-dev.yaml diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml deleted file mode 100644 index 9afd936..0000000 --- a/helm/values-dev.yaml +++ /dev/null @@ -1,364 +0,0 @@ -global: - cloudProvider: - dockerRegistryUrl: my-registry-url.io - imagePullSecretName: "my-registry-secret" - flavor: openshift - tracing: - enabled: false - url: "" - samplingRatioDenominator: 1000 - metrics: - enabled: false - url: "" - prometheus: - scrape: false - port: 9117 - environment: "" - authentication: - jwtPublicKeySecretName: map-colonies-jwks - opalaEnabled: true - storage: - tilesStorageProvider: "" - mapproxyConfigProvider: "" - fs: - internalPvc: - enabled: false - name: "" - tilesSubPath: "" - s3: - endpointUrl: "" - tilesBucket: "" - sslEnabled: false - secretName: "" - db: - host: "10.0.4.4" - name: "raster-dev" - port: 5432 - sslEnabled: false - schema: "MapproxyConfig" - rejectUnauthorized: false - secrets: - useExternal: true - externalSecretName: "postgres-secret" - ca: - secretName: "root-ca" - path: "/usr/local/share/ca-certificates" - key: "ca.crt" - gracefulReloadMaxSeconds: 300 - -authentication: - ssl: - enabled: false - useExternal: false - externalSecretName: "" - -storage: - tilesStorageProvider: "FS" - mapproxyConfigProvider: "DB" - fs: - internalPvc: - enabled: true - name: "shared-ingestion-source" - tilesSubPath: "tiles" - s3: - endpointUrl: "10.8.0.9" - tilesBucket: "raster-dev" - sslEnabled: false - secretName: "s3-secret" - -db: - host: "" - name: "" - port: 5432 - sslEnabled: false - schema: "" - rejectUnauthorized: false - secrets: - useExternal: false - externalSecretName: "" - -tracing: - enabled: false - url: "" - # samplingRatioDenominator: 1000 -metrics: - enabled: false - url: "" - prometheus: - scrape: false - port: 9117 - -# add pod annotations -# example: -# podAnnotations: -# annotation1: annotation-value-1 -# annotation2: annotation-value-2 -podAnnotations: {} - -environment: development -initialDelaySeconds: 60 -splunkIndex: "" -resetOnConfigChange: true -imagePullPolicy: Always - -cloudProvider: - dockerRegistryUrl: acrarolibotnonprod.azurecr.io - imagePullSecretName: "acr-registry" - flavor: openshift - -mclabels: - #environment: development - component: backend - partOf: serving - owner: raster - gisDomain: raster - prometheus: - enabled: true - port: 9117 - logScraping: true - -mapproxy: - enabled: true - socket: - connectionTimeoutSeconds: 0.1 # Set a connection timeout, nonnegative floating point number expressing *seconds*. - timeoutSeconds: 0.1 # Set a operation timeout nonnegative, floating point number expressing *seconds*. - redis: - tls: false - wms: - enabled: false - replicaCount: 1 - resources: - enabled: true - value: - limits: - cpu: 200m - memory: 128Mi - requests: - cpu: 200m - memory: 128Mi - nodePort: 30001 - wmts: - enabled: true - replicaCount: 1 - resources: - enabled: true - value: - limits: - cpu: 100m - memory: 128Mi - requests: - cpu: 100m - memory: 128Mi - nodePort: 30002 - image: - repository: docker-mapproxy - tag: "v1.8.6" - db: - nameOverride: - schema: MapproxyConfig - port: 80 - targetPort: 8080 - uwsgi: - socket: 3031 - httpSocket: 8080 - processes: 6 - threads: 10 - disableLogging: true - timeoutSeconds: 8 - statsServer: - stats: 1717 - statsMinify: true - - env: - cors: - enabled: true - allowedOrigin: "*" - allowedHeaders: "x-api-key" - ssl: # external paths - CA_DIR: /opt/certs/ca/ - KEY_DIR: /opt/certs/key/ - CERT_DIR: /opt/certs/cert/ - CA_FILE_LOCATION: /opt/certs/ca/ca.pem - KEY_FILE_LOCATION: /opt/certs/key/key.pem - CERT_FILE_LOCATION: /opt/certs/cert/cert.pem - openApiFilePath: ./openapi3.yaml - requestsLogLevel: WARNING - logLevel: WARNING - logPrettyPrintEnabled: false - responseCompressionEnabled: true - requestPayloadLimit: 1mb - -initContainer: - image: - repository: mapproxinator - tag: "v1.2.5" - env: - logLevel: warn - ssl: - CA_DIR: /opt/certs/ca/ - KEY_DIR: /opt/certs/key/ - CERT_DIR: /opt/certs/cert/ - CA_FILE_LOCATION: /opt/certs/ca/ca.pem - KEY_FILE_LOCATION: /opt/certs/key/key.pem - CERT_FILE_LOCATION: /opt/certs/cert/cert.pem - resources: - enabled: true - value: - limits: - cpu: 100m - memory: 128Mi - requests: - cpu: 100m - memory: 128Mi - -nginx: - enabled: true - fullnameOverride: "" - replicaCount: 1 - image: - repository: nginx-otel-unprivileged - tag: "v1.0.0" - volume: - storage: 1000Mi - accessModes: ReadWriteOnce - cache: - enabled: true - cachePath: /cache - levels: "1:2" # levels sets up a two‑level directory hierarchy under - keysZone: mapproxy_cache - keysZoneSize: 10m # 10m is about 80,000 keys - maxSize: 900m # physical memory - inactive: 60m - expirationTime: 60m - useTempPath: "off" - - port: 8080 - internalServicePort: 80 - nginxTargetPort: 8080 - targetPort: 8080 - nodePort: 30003 - - authorization: - enabled: false - url: http://opa-int-opa-service.infra-services/v1/data/http/authz/decision - token: - queryName: token - wms: - enabled: true - domain: "rasterWms" - wmts: - domain: "raster" - - extraVolumes: - - name: nginx-config - configMap: - name: "{{ .Release.Name }}-nginx-configmap" - - name: cache #TODO: Find solution to mount cache volume with condition - emptyDir: - sizeLimit: "{{ .Values.volume.storage }}" - medium: "Memory" - - extraVolumeMounts: - - name: nginx-config - mountPath: "/etc/nginx/conf.d/default.conf" - subPath: default.conf - - name: nginx-config - mountPath: "/etc/nginx/nginx.conf" - subPath: nginx.conf - - name: nginx-config - mountPath: "/etc/nginx/log_format.conf" - subPath: log_format.conf - - name: nginx-config - mountPath: "/etc/nginx/nginx.mapproxy.conf" - subPath: nginx.mapproxy.conf - - name: nginx-config - mountPath: "/etc/nginx/nginx.mapproxy.wmts.conf" - subPath: nginx.mapproxy.wmts.conf - - name: cache - mountPath: "/cache" - - route: - enabled: true - routesMapping: - - host: - path: /api/raster/v1 - timeout: - enabled: false # defaults to 30s by openshift - duration: 60s # supported units (us, ms, s, m, h, d) - rewriteTarget: "" - tls: - enabled: true - useCerts: false - certificate: "" - key: "" - caCertificate: "" - - ingress: - enabled: false - type: "nginx-org" # supported values: 'nginx-org' | 'nginx-kubernetes' - path: /api/raster/v1 - host: "localhost" - tls: - enabled: true - useExternal: "" - - resources: - enabled: true - value: - limits: - cpu: 100m - memory: 128Mi - requests: - cpu: 100m - memory: 128Mi - -mapproxinator: - enabled: true - replicaCount: 1 - image: - repository: mapproxinator - tag: "v1.2.5" - port: 80 - targetPort: 8081 - nodePort: 30002 - env: - logLevel: warn - poll: - timeout: - frequencyMS: 5000 - logPrettyPrintEnabled: false - responseCompressionEnabled: true - requestPayloadLimit: 1mb - ssl: # external paths - CA_DIR: /opt/certs/ca/ - KEY_DIR: /opt/certs/key/ - CERT_DIR: /opt/certs/cert/ - CA_FILE_LOCATION: /opt/certs/ca/ca.pem - KEY_FILE_LOCATION: /opt/certs/key/key.pem - CERT_FILE_LOCATION: /opt/certs/cert/cert.pem - resources: - enabled: false - value: - limits: - cpu: 500m - memory: 500Mi - requests: - cpu: 100m - memory: 128Mi - -uwsgiExporter: - image: - repository: "timonwong/uwsgi-exporter" - tag: "latest" - env: - logLevel: info # one of [debug, info, warn, error] - port: 9117 - resources: - enabled: true - value: - limits: - cpu: 100m - memory: 128Mi - requests: - cpu: 100m - memory: 128Mi From 4b57033d1c2a8422e79fac975227a610bb7a982a Mon Sep 17 00:00:00 2001 From: Roi Cohen Date: Wed, 3 Dec 2025 14:44:47 +0200 Subject: [PATCH 07/12] Update helm/templates/_helpers.tpl Co-authored-by: Shlomi k <65117898+CL-SHLOMIKONCHA@users.noreply.github.com> --- helm/templates/_helpers.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/templates/_helpers.tpl b/helm/templates/_helpers.tpl index ac30921..4877db3 100644 --- a/helm/templates/_helpers.tpl +++ b/helm/templates/_helpers.tpl @@ -44,7 +44,7 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} Selector labels */}} {{- define "mapproxy.selectorLabels" -}} -app.kubernetes.io/name: {{ include "mapproxy.name" . }} +app.kubernetes.io/name: {{ include "mapproxy.name" . }}-{{ .type }} app.kubernetes.io/instance: {{ .Release.Name }} {{ include "mclabels.selectorLabels" . }} {{- end }} From a9bc62965248e89612f83605a8938934bd6e1b4e Mon Sep 17 00:00:00 2001 From: roicohen Date: Wed, 3 Dec 2025 15:11:40 +0200 Subject: [PATCH 08/12] fix: remove duplicate app.kubernetes.io labels from mapproxy-bundle XXxX --- helm/Chart.yaml | 4 ++++ helm/templates/_helpers.tpl | 2 -- helm/templates/mapproxy-bundle.yaml | 8 ++------ helm/templates/mapproxy/service.yaml | 2 -- helm/values.yaml | 2 +- 5 files changed, 7 insertions(+), 11 deletions(-) diff --git a/helm/Chart.yaml b/helm/Chart.yaml index c58e0d7..8a2799f 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -5,6 +5,10 @@ type: application version: 1.8.6 appVersion: 1.8.6 dependencies: + - name: nginx + version: 1.3.0 + repository: oci://acrarolibotnonprod.azurecr.io/helm + - name: mclabels version: 1.0.1 repository: oci://acrarolibotnonprod.azurecr.io/helm/infra diff --git a/helm/templates/_helpers.tpl b/helm/templates/_helpers.tpl index 4877db3..f0a9130 100644 --- a/helm/templates/_helpers.tpl +++ b/helm/templates/_helpers.tpl @@ -44,8 +44,6 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} Selector labels */}} {{- define "mapproxy.selectorLabels" -}} -app.kubernetes.io/name: {{ include "mapproxy.name" . }}-{{ .type }} -app.kubernetes.io/instance: {{ .Release.Name }} {{ include "mclabels.selectorLabels" . }} {{- end }} diff --git a/helm/templates/mapproxy-bundle.yaml b/helm/templates/mapproxy-bundle.yaml index b5d3bfc..5514897 100644 --- a/helm/templates/mapproxy-bundle.yaml +++ b/helm/templates/mapproxy-bundle.yaml @@ -16,19 +16,14 @@ app: {{ .chartName }}-{{ .type }} release: {{ .releaseName }}-{{ .type }} run: {{ .releaseName }}-{{ .chartName }}-{{ .type }} - app.kubernetes.io/name: {{ include "mapproxy.name" . }}-{{ .type }} - app.kubernetes.io/instance: {{ .releaseName }}-{{ .type }} template: metadata: labels: - {{ include "mclabels.selectorLabels" . | nindent 8 }} 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 "mclabels.selectorLabels" . | nindent 8 }} annotations: - {{ include "mclabels.annotations" . | nindent 8 }} {{- if .Values.resetOnConfigChange }} checksum/configmap: {{ include (print $.Template.BasePath "/mapproxy/mapproxy-configmap.yaml") . | sha256sum }} @@ -36,6 +31,7 @@ {{- if .Values.podAnnotations }} {{- toYaml .Values.podAnnotations | nindent 8 }} {{- end }} + {{ include "mclabels.annotations" . | nindent 8 }} spec: {{- if $cloudProviderImagePullSecretName }} imagePullSecrets: diff --git a/helm/templates/mapproxy/service.yaml b/helm/templates/mapproxy/service.yaml index 6dcdd78..45dd21b 100644 --- a/helm/templates/mapproxy/service.yaml +++ b/helm/templates/mapproxy/service.yaml @@ -29,6 +29,4 @@ spec: app: {{ $chartName }}-{{ .type }} release: {{ $releaseName }}-{{ .type }} run: {{ $releaseName }}-{{ $chartName }}-{{ .type }} - app.kubernetes.io/name: {{ include "mapproxy.name" . }}-{{ .type }} - app.kubernetes.io/instance: {{ $releaseName }}-{{ .type }} {{- end }} diff --git a/helm/values.yaml b/helm/values.yaml index 6e65cef..19b0f9e 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -16,7 +16,7 @@ global: environment: "" authentication: jwtPublicKeySecretName: map-colonies-jwks - opalaEnabled: true + opalaEnabled: false storage: tilesStorageProvider: "" mapproxyConfigProvider: "" From 76c4db474abfd98f1feea36ee0f0b218683153be Mon Sep 17 00:00:00 2001 From: roicohen Date: Thu, 4 Dec 2025 11:48:17 +0200 Subject: [PATCH 09/12] fix : fixed selector labels identification --- helm/templates/_helpers.tpl | 2 ++ helm/templates/mapproxy-bundle.yaml | 4 ++-- helm/templates/mapproxy/service.yaml | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/helm/templates/_helpers.tpl b/helm/templates/_helpers.tpl index f0a9130..853035b 100644 --- a/helm/templates/_helpers.tpl +++ b/helm/templates/_helpers.tpl @@ -44,6 +44,8 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} Selector labels */}} {{- define "mapproxy.selectorLabels" -}} +app.kubernetes.io/name: {{ include "mapproxy.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }}-{{ .type }} {{ include "mclabels.selectorLabels" . }} {{- end }} diff --git a/helm/templates/mapproxy-bundle.yaml b/helm/templates/mapproxy-bundle.yaml index 5514897..e6e34c7 100644 --- a/helm/templates/mapproxy-bundle.yaml +++ b/helm/templates/mapproxy-bundle.yaml @@ -12,17 +12,17 @@ replicas: {{ .replicaCount }} selector: matchLabels: - {{ include "mclabels.selectorLabels" . | nindent 6 }} app: {{ .chartName }}-{{ .type }} release: {{ .releaseName }}-{{ .type }} run: {{ .releaseName }}-{{ .chartName }}-{{ .type }} + {{ include "mclabels.selectorLabels" . | nindent 6 }} template: metadata: labels: app: {{ .chartName }}-{{ .type }} release: {{ .releaseName }}-{{ .type }} run: {{ .releaseName }}-{{ .chartName }}-{{ .type }} - {{ include "mclabels.selectorLabels" . | nindent 8 }} + {{ include "mclabels.labels" . | nindent 8 }} annotations: {{- if .Values.resetOnConfigChange }} checksum/configmap: {{ diff --git a/helm/templates/mapproxy/service.yaml b/helm/templates/mapproxy/service.yaml index 45dd21b..10160ac 100644 --- a/helm/templates/mapproxy/service.yaml +++ b/helm/templates/mapproxy/service.yaml @@ -29,4 +29,5 @@ spec: app: {{ $chartName }}-{{ .type }} release: {{ $releaseName }}-{{ .type }} run: {{ $releaseName }}-{{ $chartName }}-{{ .type }} + {{- include "mapproxy.selectorLabels" . | nindent 4 }} {{- end }} From 4edb3959c0ca34e9f071726cc6018607009e38cb Mon Sep 17 00:00:00 2001 From: roicohen Date: Thu, 4 Dec 2025 15:15:41 +0200 Subject: [PATCH 10/12] fix - mclabels and selectormclabels missing labels idetification --- helm/templates/_helpers.tpl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/helm/templates/_helpers.tpl b/helm/templates/_helpers.tpl index 853035b..dd1b1f9 100644 --- a/helm/templates/_helpers.tpl +++ b/helm/templates/_helpers.tpl @@ -32,6 +32,8 @@ 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 }} @@ -44,7 +46,7 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} Selector labels */}} {{- define "mapproxy.selectorLabels" -}} -app.kubernetes.io/name: {{ include "mapproxy.name" . }} +app.kubernetes.io/name: {{ include "mapproxy.name" . }}-{{ .type }} app.kubernetes.io/instance: {{ .Release.Name }}-{{ .type }} {{ include "mclabels.selectorLabels" . }} {{- end }} From 0c775663572db798c7c78e1ae9bfb2e40f8a4730 Mon Sep 17 00:00:00 2001 From: roicohen Date: Thu, 4 Dec 2025 16:26:41 +0200 Subject: [PATCH 11/12] fix : modiffied include mapproxy labels --- helm/templates/_helpers.tpl | 2 +- helm/templates/mapproxy-bundle.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/helm/templates/_helpers.tpl b/helm/templates/_helpers.tpl index dd1b1f9..661c57f 100644 --- a/helm/templates/_helpers.tpl +++ b/helm/templates/_helpers.tpl @@ -114,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 -}} \ No newline at end of file diff --git a/helm/templates/mapproxy-bundle.yaml b/helm/templates/mapproxy-bundle.yaml index e6e34c7..edb3fb5 100644 --- a/helm/templates/mapproxy-bundle.yaml +++ b/helm/templates/mapproxy-bundle.yaml @@ -15,14 +15,14 @@ app: {{ .chartName }}-{{ .type }} release: {{ .releaseName }}-{{ .type }} run: {{ .releaseName }}-{{ .chartName }}-{{ .type }} - {{ include "mclabels.selectorLabels" . | nindent 6 }} + {{ include "mapproxy.selectorLabels" . | nindent 6 }} template: metadata: labels: app: {{ .chartName }}-{{ .type }} release: {{ .releaseName }}-{{ .type }} run: {{ .releaseName }}-{{ .chartName }}-{{ .type }} - {{ include "mclabels.labels" . | nindent 8 }} + {{ include "mapproxy.labels" . | nindent 8 }} annotations: {{- if .Values.resetOnConfigChange }} checksum/configmap: {{ From b6cae4cc2176201f6029d195e636c80d133a981e Mon Sep 17 00:00:00 2001 From: shlomiko Date: Thu, 4 Dec 2025 17:30:35 +0200 Subject: [PATCH 12/12] chore: pass type argument for both of wms and wmts deployments labels --- helm/templates/mapproxy/mapproxy-wms-deployment.yaml | 2 +- helm/templates/mapproxy/mapproxy-wmts-deployment.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/helm/templates/mapproxy/mapproxy-wms-deployment.yaml b/helm/templates/mapproxy/mapproxy-wms-deployment.yaml index 7810016..e1c368d 100644 --- a/helm/templates/mapproxy/mapproxy-wms-deployment.yaml +++ b/helm/templates/mapproxy/mapproxy-wms-deployment.yaml @@ -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 -}} diff --git a/helm/templates/mapproxy/mapproxy-wmts-deployment.yaml b/helm/templates/mapproxy/mapproxy-wmts-deployment.yaml index b3a150c..c4fc8a0 100644 --- a/helm/templates/mapproxy/mapproxy-wmts-deployment.yaml +++ b/helm/templates/mapproxy/mapproxy-wmts-deployment.yaml @@ -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 -}}