From b63289c007f95f6cd2952420130f54834e2f00d7 Mon Sep 17 00:00:00 2001 From: shlomiko Date: Wed, 9 Sep 2026 10:08:46 +0300 Subject: [PATCH 01/10] fix(helm): align chart defaults with raster-core values and merge telemetry from global - configManagement.offlineMode: true, version: latest - env.targetPort: 8080 (deployment/probes already reference it) - env.jobnik.worker.concurrency: 1 (configmap referenced a missing key) - worker.capabilities.pairs: Ingestion_Update + Delete_Layer tiles-deletion - env.tracing and env.openTelemetryOptions are now merged with global.tracing / global.openTelemetryOptions like the other raster services - drop the unused cleaner.tracingUrl helper --- helm/templates/_helpers.tpl | 11 ----------- helm/templates/_tplValues.tpl | 8 ++++++++ helm/templates/configmap.yaml | 9 +++++---- helm/values.yaml | 11 ++++++++--- 4 files changed, 21 insertions(+), 18 deletions(-) diff --git a/helm/templates/_helpers.tpl b/helm/templates/_helpers.tpl index 1169686..4ed6295 100644 --- a/helm/templates/_helpers.tpl +++ b/helm/templates/_helpers.tpl @@ -95,17 +95,6 @@ Returns the cloud provider image pull secret name from global if exists or from {{- end -}} {{- end -}} -{{/* -Returns the tracing url from global if exists or from the chart's values -*/}} -{{- define "cleaner.tracingUrl" -}} -{{- if .Values.global.tracing.url }} - {{- .Values.global.tracing.url -}} -{{- else if .Values.cloudProvider -}} - {{- .Values.env.tracing.url -}} -{{- end -}} -{{- end -}} - {{/* Returns the metrics url from global if exists or from the chart's values */}} diff --git a/helm/templates/_tplValues.tpl b/helm/templates/_tplValues.tpl index 55da75a..19d8b5a 100644 --- a/helm/templates/_tplValues.tpl +++ b/helm/templates/_tplValues.tpl @@ -60,3 +60,11 @@ Custom definitions {{- define "common.ca.merged" -}} {{- include "common.tplvalues.merge" ( dict "values" ( list .Values.ca .Values.global.ca ) "context" . ) }} {{- end -}} + +{{- define "common.tracing.merged" -}} +{{- include "common.tplvalues.merge" ( dict "values" ( list .Values.env.tracing .Values.global.tracing ) "context" . ) }} +{{- end -}} + +{{- define "common.openTelemetryOptions.merged" -}} +{{- include "common.tplvalues.merge" ( dict "values" ( list .Values.env.openTelemetryOptions .Values.global.openTelemetryOptions ) "context" . ) }} +{{- end -}} diff --git a/helm/templates/configmap.yaml b/helm/templates/configmap.yaml index 95bc4c1..6b345c2 100644 --- a/helm/templates/configmap.yaml +++ b/helm/templates/configmap.yaml @@ -1,4 +1,5 @@ -{{- $tracingUrl := include "cleaner.tracingUrl" . -}} +{{- $tracing := fromYaml (include "common.tracing.merged" .) -}} +{{- $openTelemetryOptions := fromYaml (include "common.openTelemetryOptions.merged" .) -}} {{- $serviceUrls := fromYaml (include "common.serviceUrls.merged" .) -}} {{- $storage := fromYaml (include "common.storage.merged" .) -}} {{- $s3 := ($storage.s3) | default dict -}} @@ -13,16 +14,16 @@ metadata: data: LOG_LEVEL: {{ .Values.env.logLevel | quote }} LOG_PRETTY_PRINT_ENABLED: {{ .Values.env.prettyPrintEnabled | quote }} - {{- with .Values.env.openTelemetryOptions }} + {{- with $openTelemetryOptions }} TELEMETRY_LOGGER_OTEL_ENABLED: {{ .enabled | default false | quote }} {{- if .enabled }} TELEMETRY_LOGGER_OTEL_URL: {{ .url | default "" | quote }} TELEMETRY_LOGGER_OTEL_RESOURCE_ATTRIBUTES: {{ .resourceAttributes | default dict | toJson | quote }} {{- end}} {{- end }} - {{- if .Values.env.tracing.enabled }} + {{- if $tracing.enabled }} TELEMETRY_TRACING_ENABLED: 'true' - TELEMETRY_TRACING_URL: {{ $tracingUrl }} + TELEMETRY_TRACING_URL: {{ $tracing.url | default "" | quote }} {{- end }} npm_config_cache: /tmp/ {{- with .Values.configManagement }} diff --git a/helm/values.yaml b/helm/values.yaml index 70f01e9..c0612b5 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -1,6 +1,7 @@ global: cloudProvider: {} tracing: {} + openTelemetryOptions: {} metrics: {} jobDefinitions: {} storage: {} @@ -49,9 +50,9 @@ nameOverride: "" fullnameOverride: "" configManagement: - offlineMode: false + offlineMode: true name: 'cleaner' - version: '' + version: 'latest' serverUrl: '' jobDefinitions: {} @@ -103,6 +104,7 @@ image: env: port: 8080 + targetPort: 8080 logLevel: info prettyPrintEnabled: false openTelemetryOptions: @@ -115,12 +117,15 @@ env: queue: heartbeatIntervalMs: 1000 dequeueIntervalMs: 3000 + jobnik: + worker: + concurrency: 1 worker: capabilities: pairs: - job: "Ingestion_Update" task: "tiles-deletion" - - job: "Ingestion_Swap_Update" + - job: "Delete_Layer" task: "tiles-deletion" httpRetry: attempts: 3 From 03ce151b16600b8136317e53793cd0768413c7e6 Mon Sep 17 00:00:00 2001 From: shlomiko Date: Thu, 10 Sep 2026 13:45:18 +0300 Subject: [PATCH 02/10] fix(helm): split env values into server and telemetry scopes Align the chart with ts-server-boilerplate: - replace the flat env block with a server scope (port, targetPort) and a telemetry scope (logger, tracing); move the cleaner specific keys (queue, jobnik, worker, httpRetry, disableHttpClientLogs, strategies) to top-level scopes with the same names - rename logger keys to level and prettyPrint to match the config schema - export OPENTELEMETRY_LOGGING_ENABLED, OTLP_LOGGER_ENDPOINT_URL and OTEL_RESOURCE_ATTRIBUTES (key=value,key=value), the names the commonWorkerBoilerplateV2 schema and the OpenTelemetry SDK read, and map them in config/custom-environment-variables.json - always export the enabled flags, urls only when enabled - move global overrides under global.telemetry; only the tracing and otlp logger urls are overridable from global and take precedence over chart values, enabled flags stay chart-level - enable tracing and opentelemetry logging by default - drop the metricsUrl helper and the merged telemetry helpers Co-Authored-By: Claude Fable 5.1 --- config/custom-environment-variables.json | 9 +-- helm/templates/_helpers.tpl | 35 ++++++++-- helm/templates/_tplValues.tpl | 8 --- helm/templates/configmap.yaml | 41 +++++++----- helm/templates/deployment.yaml | 7 +- helm/values.yaml | 84 ++++++++++++++---------- 6 files changed, 110 insertions(+), 74 deletions(-) diff --git a/config/custom-environment-variables.json b/config/custom-environment-variables.json index 67aa92f..b53d147 100644 --- a/config/custom-environment-variables.json +++ b/config/custom-environment-variables.json @@ -14,14 +14,11 @@ }, "opentelemetryOptions": { "enabled": { - "__name": "TELEMETRY_LOGGER_OTEL_ENABLED", + "__name": "OPENTELEMETRY_LOGGING_ENABLED", "__format": "boolean" }, - "url": "TELEMETRY_LOGGER_OTEL_URL", - "resourceAttributes": { - "__name": "TELEMETRY_LOGGER_OTEL_RESOURCE_ATTRIBUTES", - "__format": "json" - } + "url": "OTLP_LOGGER_ENDPOINT_URL", + "resourceAttributes": "OTEL_RESOURCE_ATTRIBUTES" } } }, diff --git a/helm/templates/_helpers.tpl b/helm/templates/_helpers.tpl index 4ed6295..778663b 100644 --- a/helm/templates/_helpers.tpl +++ b/helm/templates/_helpers.tpl @@ -96,12 +96,35 @@ Returns the cloud provider image pull secret name from global if exists or from {{- end -}} {{/* -Returns the metrics url from global if exists or from the chart's values +Returns the tracing url from global if set, otherwise from the chart's values */}} -{{- define "cleaner.metricsUrl" -}} -{{- if .Values.global.metrics.url }} - {{- .Values.global.metrics.url -}} -{{- else -}} - {{- .Values.env.metrics.url | default "" -}} +{{- define "cleaner.tracingUrl" -}} +{{- if .Values.global.telemetry.tracing.url }} + {{- .Values.global.telemetry.tracing.url -}} +{{- else if .Values.telemetry.tracing.url -}} + {{- .Values.telemetry.tracing.url -}} +{{- end -}} +{{- end -}} + +{{/* +Returns the opentelemetry logging url from global if set, otherwise from the chart's values +*/}} +{{- define "cleaner.opentelemetryLoggingUrl" -}} +{{- if .Values.global.telemetry.logger.opentelemetryOptions.url }} + {{- .Values.global.telemetry.logger.opentelemetryOptions.url -}} +{{- else if .Values.telemetry.logger.opentelemetryOptions.url -}} + {{- .Values.telemetry.logger.opentelemetryOptions.url -}} {{- end -}} {{- end -}} + +{{/* +Renders a map of resource attributes as key=value,key=value for OTEL_RESOURCE_ATTRIBUTES. +Usage: {{ include "cleaner.otelResourceAttributes" .resourceAttributes }} +*/}} +{{- define "cleaner.otelResourceAttributes" -}} +{{- $attributes := list }} +{{- range $key, $value := . }} +{{- $attributes = append $attributes (printf "%s=%s" $key (toString $value)) }} +{{- end }} +{{- join "," $attributes }} +{{- end -}} diff --git a/helm/templates/_tplValues.tpl b/helm/templates/_tplValues.tpl index 19d8b5a..55da75a 100644 --- a/helm/templates/_tplValues.tpl +++ b/helm/templates/_tplValues.tpl @@ -60,11 +60,3 @@ Custom definitions {{- define "common.ca.merged" -}} {{- include "common.tplvalues.merge" ( dict "values" ( list .Values.ca .Values.global.ca ) "context" . ) }} {{- end -}} - -{{- define "common.tracing.merged" -}} -{{- include "common.tplvalues.merge" ( dict "values" ( list .Values.env.tracing .Values.global.tracing ) "context" . ) }} -{{- end -}} - -{{- define "common.openTelemetryOptions.merged" -}} -{{- include "common.tplvalues.merge" ( dict "values" ( list .Values.env.openTelemetryOptions .Values.global.openTelemetryOptions ) "context" . ) }} -{{- end -}} diff --git a/helm/templates/configmap.yaml b/helm/templates/configmap.yaml index 6b345c2..0cc8c23 100644 --- a/helm/templates/configmap.yaml +++ b/helm/templates/configmap.yaml @@ -1,5 +1,6 @@ -{{- $tracing := fromYaml (include "common.tracing.merged" .) -}} -{{- $openTelemetryOptions := fromYaml (include "common.openTelemetryOptions.merged" .) -}} +{{- $telemetry := .Values.telemetry -}} +{{- $tracingUrl := include "cleaner.tracingUrl" . -}} +{{- $opentelemetryLoggingUrl := include "cleaner.opentelemetryLoggingUrl" . -}} {{- $serviceUrls := fromYaml (include "common.serviceUrls.merged" .) -}} {{- $storage := fromYaml (include "common.storage.merged" .) -}} {{- $s3 := ($storage.s3) | default dict -}} @@ -12,18 +13,22 @@ kind: ConfigMap metadata: name: {{ printf "%s-configmap" (include "cleaner.fullname" .) }} data: - LOG_LEVEL: {{ .Values.env.logLevel | quote }} - LOG_PRETTY_PRINT_ENABLED: {{ .Values.env.prettyPrintEnabled | quote }} - {{- with $openTelemetryOptions }} - TELEMETRY_LOGGER_OTEL_ENABLED: {{ .enabled | default false | quote }} + {{- with $telemetry }} + LOG_LEVEL: {{ .logger.level | quote }} + LOG_PRETTY_PRINT_ENABLED: {{ .logger.prettyPrint | quote }} + {{- with .logger.opentelemetryOptions }} + OPENTELEMETRY_LOGGING_ENABLED: {{ .enabled | quote }} {{- if .enabled }} - TELEMETRY_LOGGER_OTEL_URL: {{ .url | default "" | quote }} - TELEMETRY_LOGGER_OTEL_RESOURCE_ATTRIBUTES: {{ .resourceAttributes | default dict | toJson | quote }} - {{- end}} + OTLP_LOGGER_ENDPOINT_URL: {{ $opentelemetryLoggingUrl | quote }} + {{- if .resourceAttributes }} + OTEL_RESOURCE_ATTRIBUTES: {{ include "cleaner.otelResourceAttributes" .resourceAttributes | quote }} + {{- end }} + {{- end }} + {{- end }} + TELEMETRY_TRACING_ENABLED: {{ .tracing.enabled | quote }} + {{- if .tracing.enabled }} + TELEMETRY_TRACING_URL: {{ $tracingUrl | quote }} {{- end }} - {{- if $tracing.enabled }} - TELEMETRY_TRACING_ENABLED: 'true' - TELEMETRY_TRACING_URL: {{ $tracing.url | default "" | quote }} {{- end }} npm_config_cache: /tmp/ {{- with .Values.configManagement }} @@ -32,14 +37,14 @@ data: CONFIG_OFFLINE_MODE: {{ .offlineMode | quote }} CONFIG_SERVER_URL: {{ .serverUrl | quote }} {{- end }} - {{- with .Values.env.worker.capabilities }} + {{- with .Values.worker.capabilities }} WORKER_CAPABILITY_PAIRS: {{ .pairs | toJson | quote }} {{- end }} QUEUE_JOB_MANAGER_BASE_URL: {{ $serviceUrls.jobManager | default "" | quote }} QUEUE_HEARTBEAT_BASE_URL: {{ $serviceUrls.heartbeatManager | default "" | quote }} SERVICES_URL_JOB_TRACKER: {{ $serviceUrls.jobTracker | default "" | quote }} - DISABLE_HTTP_CLIENT_LOGS: {{ .Values.env.disableHttpClientLogs | default false | quote }} - {{- with .Values.env.queue }} + DISABLE_HTTP_CLIENT_LOGS: {{ .Values.disableHttpClientLogs | default false | quote }} + {{- with .Values.queue }} QUEUE_HEARTBEAT_INTERVAL_MS: {{ .heartbeatIntervalMs | default 1000 | quote }} QUEUE_DEQUEUE_INTERVAL_MS: {{ .dequeueIntervalMs | default 3000 | quote }} {{- end }} @@ -47,13 +52,13 @@ data: {{- if $jobDefinitions }} JOB_DEFINITIONS: {{ $jobDefinitions | toJson | quote }} {{- end }} - {{- with .Values.env.httpRetry }} + {{- with .Values.httpRetry }} HTTP_RETRY_ATTEMPTS: {{ .attempts | quote }} HTTP_RETRY_DELAY: {{ .delay | quote }} HTTP_RETRY_SHOULD_RESET_TIMEOUT: {{ .shouldResetTimeout | quote }} {{- end }} JOBNIK_SDK_BASE_URL: {{ $serviceUrls.jobManager | default "" | quote }} - {{- with .Values.env.jobnik.worker }} + {{- with .Values.jobnik.worker }} JOBNIK_WORKER_CONCURRENCY: {{ .concurrency | default 1 | quote }} {{- end }} CLEANUP_STORAGE_PROVIDERS: {{ $storage.cleanupStorageProviders | toJson | quote }} @@ -75,7 +80,7 @@ data: {{- end }} FS_SUB_PATHS: {{ $subPaths | toJson | quote }} {{- end }} - {{- with .Values.env.strategies.tilesDeletion }} + {{- with .Values.strategies.tilesDeletion }} TILES_DELETION_BATCH_SIZE: {{ .batchSize | default 1000 | quote }} TILES_DELETION_CONCURRENCY: {{ .concurrency | default 10 | quote }} {{- end }} diff --git a/helm/templates/deployment.yaml b/helm/templates/deployment.yaml index 0b8be5f..db0bc7f 100644 --- a/helm/templates/deployment.yaml +++ b/helm/templates/deployment.yaml @@ -4,6 +4,7 @@ {{- $cloudProviderDockerRegistryUrl := include "cleaner.cloudProviderDockerRegistryUrl" . -}} {{- $cloudProviderImagePullSecretName := include "cleaner.cloudProviderImagePullSecretName" . -}} {{- $imageTag := include "cleaner.tag" . -}} +{{- $server := .Values.server -}} {{- $ca := fromYaml (include "common.ca.merged" .) -}} {{- $storage := fromYaml (include "common.storage.merged" .) -}} {{- $s3 := ($storage.s3) | default dict -}} @@ -80,7 +81,7 @@ spec: fieldRef: fieldPath: metadata.uid - name: SERVER_PORT - value: {{ .Values.env.targetPort | quote }} + value: {{ $server.targetPort | quote }} {{- if $ca.secretName }} - name: REQUESTS_CA_BUNDLE value: {{ printf "%s/%s" $ca.path $ca.key | quote }} @@ -112,7 +113,7 @@ spec: failureThreshold: {{ .Values.livenessProbe.failureThreshold }} httpGet: path: {{ .Values.livenessProbe.path }} - port: {{ .Values.env.targetPort }} + port: {{ $server.targetPort }} {{- end }} {{- if .Values.readinessProbe.enabled }} readinessProbe: @@ -121,7 +122,7 @@ spec: failureThreshold: {{ .Values.readinessProbe.failureThreshold }} httpGet: path: {{ .Values.readinessProbe.path }} - port: {{ .Values.env.targetPort }} + port: {{ $server.targetPort }} {{- end }} {{- if .Values.resources.enabled }} resources: diff --git a/helm/values.yaml b/helm/values.yaml index c0612b5..91bbd9b 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -1,8 +1,9 @@ global: cloudProvider: {} - tracing: {} - openTelemetryOptions: {} - metrics: {} + telemetry: + tracing: {} + logger: + opentelemetryOptions: {} jobDefinitions: {} storage: {} serviceUrls: {} @@ -102,40 +103,57 @@ image: # tag: 'latest' pullPolicy: IfNotPresent -env: +server: port: 8080 targetPort: 8080 - logLevel: info - prettyPrintEnabled: false - openTelemetryOptions: - enabled: false - url: "" - resourceAttributes: {} + +telemetry: + logger: + level: info + prettyPrint: false + # OpenTelemetry logging. Rendered into the configmap as OPENTELEMETRY_LOGGING_ENABLED, + # OTLP_LOGGER_ENDPOINT_URL and, when resourceAttributes is set, OTEL_RESOURCE_ATTRIBUTES + # as a key=value,key=value list. All three are mapped in + # config/custom-environment-variables.json. + # url can be overridden from global.telemetry.logger.opentelemetryOptions.url. + opentelemetryOptions: + enabled: true + url: http://localhost:4317 + # resourceAttributes: + # service.namespace: namespace + # deployment.environment: dev tracing: - enabled: false - url: "" - queue: - heartbeatIntervalMs: 1000 - dequeueIntervalMs: 3000 - jobnik: - worker: - concurrency: 1 + enabled: true + # url can be overridden from global.telemetry.tracing.url + url: http://localhost:4318/v1/traces + +queue: + heartbeatIntervalMs: 1000 + dequeueIntervalMs: 3000 + +jobnik: worker: - capabilities: - pairs: - - job: "Ingestion_Update" - task: "tiles-deletion" - - job: "Delete_Layer" - task: "tiles-deletion" - httpRetry: - attempts: 3 - delay: "exponential" - shouldResetTimeout: true - disableHttpClientLogs: false - strategies: - tilesDeletion: - batchSize: 1000 - concurrency: 10 + concurrency: 1 + +worker: + capabilities: + pairs: + - job: "Ingestion_Update" + task: "tiles-deletion" + - job: "Delete_Layer" + task: "tiles-deletion" + +httpRetry: + attempts: 3 + delay: "exponential" + shouldResetTimeout: true + +disableHttpClientLogs: false + +strategies: + tilesDeletion: + batchSize: 1000 + concurrency: 10 resources: enabled: true From 7ab933c5d2032168f30568834305447e0a9eb19d Mon Sep 17 00:00:00 2001 From: shlomiko Date: Thu, 10 Sep 2026 13:45:18 +0300 Subject: [PATCH 03/10] fix(helm): default configManagement.serverUrl and empty cleanupStorageProviders Set configManagement.serverUrl to http://localhost:8080/api as in the raster-core umbrella chart and make storage.cleanupStorageProviders an empty list so rendering without providers no longer fails on has "S3". Co-Authored-By: Claude Fable 5.1 --- helm/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helm/values.yaml b/helm/values.yaml index 91bbd9b..68b74ec 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -15,7 +15,7 @@ serviceUrls: jobTracker: "" storage: - cleanupStorageProviders: {} + cleanupStorageProviders: [] # e.g. [S3, FS] s3: delete: batchSize: 1000 @@ -54,7 +54,7 @@ configManagement: offlineMode: true name: 'cleaner' version: 'latest' - serverUrl: '' + serverUrl: 'http://localhost:8080/api' jobDefinitions: {} From 50b56363d7fb64fd09fe29c425b1ac071fe54d2a Mon Sep 17 00:00:00 2001 From: shlomiko Date: Thu, 10 Sep 2026 14:45:44 +0300 Subject: [PATCH 04/10] fix(helm): keep cleaner keys under the env scope Only the server and telemetry values leave env. The cleaner specific keys (queue, jobnik, worker, httpRetry, disableHttpClientLogs, strategies) stay under env as on master. Co-Authored-By: Claude Fable 5.1 --- helm/templates/configmap.yaml | 12 ++++----- helm/values.yaml | 48 ++++++++++++++++------------------- 2 files changed, 28 insertions(+), 32 deletions(-) diff --git a/helm/templates/configmap.yaml b/helm/templates/configmap.yaml index 0cc8c23..c8ade63 100644 --- a/helm/templates/configmap.yaml +++ b/helm/templates/configmap.yaml @@ -37,14 +37,14 @@ data: CONFIG_OFFLINE_MODE: {{ .offlineMode | quote }} CONFIG_SERVER_URL: {{ .serverUrl | quote }} {{- end }} - {{- with .Values.worker.capabilities }} + {{- with .Values.env.worker.capabilities }} WORKER_CAPABILITY_PAIRS: {{ .pairs | toJson | quote }} {{- end }} QUEUE_JOB_MANAGER_BASE_URL: {{ $serviceUrls.jobManager | default "" | quote }} QUEUE_HEARTBEAT_BASE_URL: {{ $serviceUrls.heartbeatManager | default "" | quote }} SERVICES_URL_JOB_TRACKER: {{ $serviceUrls.jobTracker | default "" | quote }} - DISABLE_HTTP_CLIENT_LOGS: {{ .Values.disableHttpClientLogs | default false | quote }} - {{- with .Values.queue }} + DISABLE_HTTP_CLIENT_LOGS: {{ .Values.env.disableHttpClientLogs | default false | quote }} + {{- with .Values.env.queue }} QUEUE_HEARTBEAT_INTERVAL_MS: {{ .heartbeatIntervalMs | default 1000 | quote }} QUEUE_DEQUEUE_INTERVAL_MS: {{ .dequeueIntervalMs | default 3000 | quote }} {{- end }} @@ -52,13 +52,13 @@ data: {{- if $jobDefinitions }} JOB_DEFINITIONS: {{ $jobDefinitions | toJson | quote }} {{- end }} - {{- with .Values.httpRetry }} + {{- with .Values.env.httpRetry }} HTTP_RETRY_ATTEMPTS: {{ .attempts | quote }} HTTP_RETRY_DELAY: {{ .delay | quote }} HTTP_RETRY_SHOULD_RESET_TIMEOUT: {{ .shouldResetTimeout | quote }} {{- end }} JOBNIK_SDK_BASE_URL: {{ $serviceUrls.jobManager | default "" | quote }} - {{- with .Values.jobnik.worker }} + {{- with .Values.env.jobnik.worker }} JOBNIK_WORKER_CONCURRENCY: {{ .concurrency | default 1 | quote }} {{- end }} CLEANUP_STORAGE_PROVIDERS: {{ $storage.cleanupStorageProviders | toJson | quote }} @@ -80,7 +80,7 @@ data: {{- end }} FS_SUB_PATHS: {{ $subPaths | toJson | quote }} {{- end }} - {{- with .Values.strategies.tilesDeletion }} + {{- with .Values.env.strategies.tilesDeletion }} TILES_DELETION_BATCH_SIZE: {{ .batchSize | default 1000 | quote }} TILES_DELETION_CONCURRENCY: {{ .concurrency | default 10 | quote }} {{- end }} diff --git a/helm/values.yaml b/helm/values.yaml index 68b74ec..cf010be 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -127,33 +127,29 @@ telemetry: # url can be overridden from global.telemetry.tracing.url url: http://localhost:4318/v1/traces -queue: - heartbeatIntervalMs: 1000 - dequeueIntervalMs: 3000 - -jobnik: +env: + queue: + heartbeatIntervalMs: 1000 + dequeueIntervalMs: 3000 + jobnik: + worker: + concurrency: 1 worker: - concurrency: 1 - -worker: - capabilities: - pairs: - - job: "Ingestion_Update" - task: "tiles-deletion" - - job: "Delete_Layer" - task: "tiles-deletion" - -httpRetry: - attempts: 3 - delay: "exponential" - shouldResetTimeout: true - -disableHttpClientLogs: false - -strategies: - tilesDeletion: - batchSize: 1000 - concurrency: 10 + capabilities: + pairs: + - job: "Ingestion_Update" + task: "tiles-deletion" + - job: "Delete_Layer" + task: "tiles-deletion" + httpRetry: + attempts: 3 + delay: "exponential" + shouldResetTimeout: true + disableHttpClientLogs: false + strategies: + tilesDeletion: + batchSize: 1000 + concurrency: 10 resources: enabled: true From 51d5ea76597baa379bc89c79deacbbb2ef3c2324 Mon Sep 17 00:00:00 2001 From: shlomiko Date: Thu, 10 Sep 2026 14:49:01 +0300 Subject: [PATCH 05/10] style(helm): drop the opentelemetryOptions explanatory comment Co-Authored-By: Claude Fable 5.1 --- helm/values.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/helm/values.yaml b/helm/values.yaml index cf010be..7644735 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -111,11 +111,6 @@ telemetry: logger: level: info prettyPrint: false - # OpenTelemetry logging. Rendered into the configmap as OPENTELEMETRY_LOGGING_ENABLED, - # OTLP_LOGGER_ENDPOINT_URL and, when resourceAttributes is set, OTEL_RESOURCE_ATTRIBUTES - # as a key=value,key=value list. All three are mapped in - # config/custom-environment-variables.json. - # url can be overridden from global.telemetry.logger.opentelemetryOptions.url. opentelemetryOptions: enabled: true url: http://localhost:4317 From 77937e6627e49ce3789e769e0d1e051674cf524e Mon Sep 17 00:00:00 2001 From: shlomiko Date: Thu, 10 Sep 2026 15:00:24 +0300 Subject: [PATCH 06/10] fix(helm): drop jobnik.worker.concurrency value, keep the default in the template The configmap already falls back to 1, so the value is not required. Use a nil-safe lookup so the key renders without the block and still honors env.jobnik.worker.concurrency when set. Co-Authored-By: Claude Fable 5.1 --- helm/templates/configmap.yaml | 4 +--- helm/values.yaml | 3 --- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/helm/templates/configmap.yaml b/helm/templates/configmap.yaml index c8ade63..b82d0f5 100644 --- a/helm/templates/configmap.yaml +++ b/helm/templates/configmap.yaml @@ -58,9 +58,7 @@ data: HTTP_RETRY_SHOULD_RESET_TIMEOUT: {{ .shouldResetTimeout | quote }} {{- end }} JOBNIK_SDK_BASE_URL: {{ $serviceUrls.jobManager | default "" | quote }} - {{- with .Values.env.jobnik.worker }} - JOBNIK_WORKER_CONCURRENCY: {{ .concurrency | default 1 | quote }} - {{- end }} + JOBNIK_WORKER_CONCURRENCY: {{ dig "jobnik" "worker" "concurrency" 1 .Values.env | quote }} CLEANUP_STORAGE_PROVIDERS: {{ $storage.cleanupStorageProviders | toJson | quote }} {{- if has "S3" $storage.cleanupStorageProviders }} S3_DELETE_BATCH_SIZE: {{ $s3.delete.batchSize | default 1000 | quote }} diff --git a/helm/values.yaml b/helm/values.yaml index 7644735..6ae3574 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -126,9 +126,6 @@ env: queue: heartbeatIntervalMs: 1000 dequeueIntervalMs: 3000 - jobnik: - worker: - concurrency: 1 worker: capabilities: pairs: From eae5b21feca89cc9dd5377e19d1e5511e1c0bb0f Mon Sep 17 00:00:00 2001 From: shlomiko Date: Thu, 10 Sep 2026 15:03:39 +0300 Subject: [PATCH 07/10] fix(helm): render jobnik worker concurrency with a nil-safe with block Co-Authored-By: Claude Fable 5.1 --- helm/templates/configmap.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/helm/templates/configmap.yaml b/helm/templates/configmap.yaml index b82d0f5..b3901bb 100644 --- a/helm/templates/configmap.yaml +++ b/helm/templates/configmap.yaml @@ -58,7 +58,9 @@ data: HTTP_RETRY_SHOULD_RESET_TIMEOUT: {{ .shouldResetTimeout | quote }} {{- end }} JOBNIK_SDK_BASE_URL: {{ $serviceUrls.jobManager | default "" | quote }} - JOBNIK_WORKER_CONCURRENCY: {{ dig "jobnik" "worker" "concurrency" 1 .Values.env | quote }} + {{- with (.Values.env.jobnik | default dict).worker }} + JOBNIK_WORKER_CONCURRENCY: {{ .concurrency | default 1 | quote }} + {{- end }} CLEANUP_STORAGE_PROVIDERS: {{ $storage.cleanupStorageProviders | toJson | quote }} {{- if has "S3" $storage.cleanupStorageProviders }} S3_DELETE_BATCH_SIZE: {{ $s3.delete.batchSize | default 1000 | quote }} From ca12eaa492c487cd554c2bb415548fea40359bdb Mon Sep 17 00:00:00 2001 From: shlomiko Date: Thu, 10 Sep 2026 15:11:59 +0300 Subject: [PATCH 08/10] fix(helm): restore env.jobnik.worker.concurrency default Ship the value again and keep the original with block in the configmap. Co-Authored-By: Claude Fable 5.1 --- helm/templates/configmap.yaml | 2 +- helm/values.yaml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/helm/templates/configmap.yaml b/helm/templates/configmap.yaml index b3901bb..c8ade63 100644 --- a/helm/templates/configmap.yaml +++ b/helm/templates/configmap.yaml @@ -58,7 +58,7 @@ data: HTTP_RETRY_SHOULD_RESET_TIMEOUT: {{ .shouldResetTimeout | quote }} {{- end }} JOBNIK_SDK_BASE_URL: {{ $serviceUrls.jobManager | default "" | quote }} - {{- with (.Values.env.jobnik | default dict).worker }} + {{- with .Values.env.jobnik.worker }} JOBNIK_WORKER_CONCURRENCY: {{ .concurrency | default 1 | quote }} {{- end }} CLEANUP_STORAGE_PROVIDERS: {{ $storage.cleanupStorageProviders | toJson | quote }} diff --git a/helm/values.yaml b/helm/values.yaml index 6ae3574..7644735 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -126,6 +126,9 @@ env: queue: heartbeatIntervalMs: 1000 dequeueIntervalMs: 3000 + jobnik: + worker: + concurrency: 1 worker: capabilities: pairs: From 651ec934ade7e186067544e496f0d7dff52731bc Mon Sep 17 00:00:00 2001 From: shlomiko Date: Thu, 10 Sep 2026 16:43:53 +0300 Subject: [PATCH 09/10] fix(helm): read ca values from global like the other raster services (MAPCO-11633) Move the ca defaults (secretName, path, key) under global.ca and read them directly in the deployment instead of merging a chart-level ca scope. Co-Authored-By: Claude Fable 5.1 --- helm/templates/_tplValues.tpl | 4 ---- helm/templates/deployment.yaml | 17 ++++++++--------- helm/values.yaml | 10 ++++------ 3 files changed, 12 insertions(+), 19 deletions(-) diff --git a/helm/templates/_tplValues.tpl b/helm/templates/_tplValues.tpl index 55da75a..6b8e843 100644 --- a/helm/templates/_tplValues.tpl +++ b/helm/templates/_tplValues.tpl @@ -56,7 +56,3 @@ Custom definitions {{- define "common.storage.merged" -}} {{- include "common.tplvalues.merge" ( dict "values" ( list .Values.storage .Values.global.storage ) "context" . ) }} {{- end -}} - -{{- define "common.ca.merged" -}} -{{- include "common.tplvalues.merge" ( dict "values" ( list .Values.ca .Values.global.ca ) "context" . ) }} -{{- end -}} diff --git a/helm/templates/deployment.yaml b/helm/templates/deployment.yaml index db0bc7f..9e4563c 100644 --- a/helm/templates/deployment.yaml +++ b/helm/templates/deployment.yaml @@ -5,7 +5,6 @@ {{- $cloudProviderImagePullSecretName := include "cleaner.cloudProviderImagePullSecretName" . -}} {{- $imageTag := include "cleaner.tag" . -}} {{- $server := .Values.server -}} -{{- $ca := fromYaml (include "common.ca.merged" .) -}} {{- $storage := fromYaml (include "common.storage.merged" .) -}} {{- $s3 := ($storage.s3) | default dict -}} {{- $internalPvc := (($storage.fs).internalPvc) | default dict -}} @@ -63,10 +62,10 @@ spec: {{- end }} {{- end }} volumeMounts: - {{- if $ca.secretName }} - - mountPath: {{ printf "%s/%s" $ca.path $ca.key | quote }} + {{- if .Values.global.ca.secretName }} + - mountPath: {{ printf "%s/%s" .Values.global.ca.path .Values.global.ca.key | quote }} name: root-ca - subPath: {{ quote $ca.key }} + subPath: {{ quote .Values.global.ca.key }} {{- end }} {{- if .Values.extraVolumeMounts -}} {{ toYaml .Values.extraVolumeMounts | nindent 12 }} @@ -82,11 +81,11 @@ spec: fieldPath: metadata.uid - name: SERVER_PORT value: {{ $server.targetPort | quote }} - {{- if $ca.secretName }} + {{- if .Values.global.ca.secretName }} - name: REQUESTS_CA_BUNDLE - value: {{ printf "%s/%s" $ca.path $ca.key | quote }} + value: {{ printf "%s/%s" .Values.global.ca.path .Values.global.ca.key | quote }} - name: NODE_EXTRA_CA_CERTS - value: {{ printf "%s/%s" $ca.path $ca.key | quote }} + value: {{ printf "%s/%s" .Values.global.ca.path .Values.global.ca.key | quote }} {{- end }} {{- if $s3.secretName }} - name: S3_ACCESS_KEY_ID @@ -132,10 +131,10 @@ spec: {{ tpl (toYaml .Values.sidecars) . | nindent 8 }} {{- end }} volumes: - {{- if $ca.secretName }} + {{- if .Values.global.ca.secretName }} - name: root-ca secret: - secretName: {{ $ca.secretName }} + secretName: {{ .Values.global.ca.secretName }} {{- end }} {{- if .Values.extraVolumes -}} {{ tpl (toYaml .Values.extraVolumes) . | nindent 8 }} diff --git a/helm/values.yaml b/helm/values.yaml index 7644735..9bd6e92 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -7,7 +7,10 @@ global: jobDefinitions: {} storage: {} serviceUrls: {} - ca: {} + ca: + secretName: '' + path: '/usr/local/share/ca-certificates' + key: 'ca.crt' serviceUrls: jobManager: "" @@ -92,11 +95,6 @@ cloudProvider: imagePullSecretName: '' flavor: openshift -ca: - secretName: '' - path: '/usr/local/share/ca-certificates' - key: 'ca.crt' - image: repository: cleaner # If commented, appVersion will be taken. See: _helpers.tpl From 6c2f1a62f1081656bfa9912c13834658446d9530 Mon Sep 17 00:00:00 2001 From: shlomiko Date: Tue, 15 Sep 2026 13:45:36 +0300 Subject: [PATCH 10/10] refactor: remove redundant prettyPrint option from logger configuration Aligns with ts-server-boilerplate#477: loggerConfig already carries prettyPrint, so spreading it is enough. Co-Authored-By: Claude Fable 5.1 --- src/containerConfig.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/containerConfig.ts b/src/containerConfig.ts index f7826d3..c2b1c04 100644 --- a/src/containerConfig.ts +++ b/src/containerConfig.ts @@ -29,7 +29,7 @@ export const registerExternalValues = async (options?: RegisterOptions): Promise const loggerConfig = configInstance.get('telemetry.logger'); - const logger = await jsLogger({ ...loggerConfig, prettyPrint: loggerConfig.prettyPrint, mixin: getOtelMixin() }); + const logger = await jsLogger({ ...loggerConfig, mixin: getOtelMixin() }); const tracer = trace.getTracer(SERVICE_NAME); const metricsRegistry = new Registry();