From 20738b3662572a98adade0481d6646293b18b1c1 Mon Sep 17 00:00:00 2001 From: shlomiko Date: Thu, 10 Sep 2026 15:56:58 +0300 Subject: [PATCH 1/4] fix(helm): set imagePullPolicy and offlineMode defaults The raster-ingestion umbrella chart and site-values override imagePullPolicy to IfNotPresent and configManagement.offlineMode to true on every deployment. Make them the chart defaults so the overrides can be removed. 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 1823f24..57a271a 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -39,7 +39,7 @@ revisionHistoryLimit: 5 # Amount of revisions we keep initialDelaySeconds: 60 nodePort: 30030 #for minikube deployment only resetOnConfigChange: true -imagePullPolicy: Always +imagePullPolicy: IfNotPresent serviceUrls: mapproxyApi: "" @@ -82,7 +82,7 @@ tracing: url: '' configManagement: - offlineMode: false + offlineMode: true name: 'ingestion-trigger' version: 'latest' serverUrl: 'http://localhost:8080/api' From 0bd1378ac26a96298fbfc7164a52e3c28840e538 Mon Sep 17 00:00:00 2001 From: shlomiko Date: Thu, 10 Sep 2026 15:56:58 +0300 Subject: [PATCH 2/4] 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, protocol, requestPayloadLimit, responseCompressionEnabled) and a telemetry scope (logger, tracing); the ingestion-trigger specific keys stay under env - rename logger keys to level and prettyPrint to match the config schema - export the otlp logger url as OTLP_LOGGER_ENDPOINT_URL and resource attributes as OTEL_RESOURCE_ATTRIBUTES in key=value,key=value format, the names the commonBoilerplateV3 schema and the OpenTelemetry SDK read - always export OPENTELEMETRY_LOGGING_ENABLED and TELEMETRY_TRACING_ENABLED with their value - 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 - drop the top-level tracing block, env.tracing and the common.tracing.merged / common.openTelemetryOptions.merged helpers - reference server.* in the deployment, service and ingress templates Co-Authored-By: Claude Fable 5.1 --- helm/templates/_helpers.tpl | 33 +++++++++++++++++++++++++ helm/templates/_tplValues.tpl | 8 ------- helm/templates/configmap.yaml | 44 +++++++++++++++++++--------------- helm/templates/deployment.yaml | 8 +++---- helm/templates/ingress.yaml | 2 +- helm/templates/service.yaml | 6 ++--- helm/values.yaml | 39 ++++++++++++++++-------------- 7 files changed, 87 insertions(+), 53 deletions(-) diff --git a/helm/templates/_helpers.tpl b/helm/templates/_helpers.tpl index 9c4f974..049f3fc 100644 --- a/helm/templates/_helpers.tpl +++ b/helm/templates/_helpers.tpl @@ -103,3 +103,36 @@ Returns the cloud provider image pull secret name from global if exists or from {{- end -}} {{- end -}} +{{/* +Returns the tracing url from global if set, otherwise from the chart's values +*/}} +{{- define "ingestion-trigger.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 "ingestion-trigger.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 "ingestion-trigger.otelResourceAttributes" .resourceAttributes }} +*/}} +{{- define "ingestion-trigger.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 18d048e..e783929 100644 --- a/helm/templates/_tplValues.tpl +++ b/helm/templates/_tplValues.tpl @@ -64,11 +64,3 @@ Custom definitions {{- define "common.ingestion.merged" -}} {{- include "common.tplvalues.merge" ( dict "values" ( list .Values.ingestion .Values.global.ingestion ) "context" . ) }} {{- end -}} - -{{- define "common.tracing.merged" -}} -{{- include "common.tplvalues.merge" ( dict "values" ( list .Values.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 57123b7..7bf586f 100644 --- a/helm/templates/configmap.yaml +++ b/helm/templates/configmap.yaml @@ -1,7 +1,9 @@ {{- $chartName := include "ingestion-trigger.name" . -}} {{- $configmapName := include "configmap.fullname" . }} -{{- $tracing := (include "common.tracing.merged" .) | fromYaml }} -{{- $openTelemetryOptions := (include "common.openTelemetryOptions.merged" .) | fromYaml }} +{{- $server := .Values.server -}} +{{- $telemetry := .Values.telemetry -}} +{{- $tracingUrl := include "ingestion-trigger.tracingUrl" . -}} +{{- $opentelemetryLoggingUrl := include "ingestion-trigger.opentelemetryLoggingUrl" . -}} {{- $serviceUrls := (include "common.serviceUrls.merged" .) | fromYaml }} {{- $jobDefinitions := (include "common.jobDefinitions.merged" .) | fromYaml }} {{- $storage := (include "common.storage.merged" .) | fromYaml }} @@ -12,10 +14,27 @@ kind: ConfigMap metadata: name: {{ $configmapName }} data: - REQUEST_PAYLOAD_LIMIT: {{ .Values.env.requestPayloadLimit | quote }} - RESPONSE_COMPRESSION_ENABLED: {{ .Values.env.responseCompressionEnabled | quote }} - LOG_LEVEL: {{ .Values.env.logLevel | quote }} - LOG_PRETTY_PRINT_ENABLED: {{ .Values.env.logPrettyPrintEnabled | quote }} + {{- with $server }} + REQUEST_PAYLOAD_LIMIT: {{ .requestPayloadLimit | quote }} + RESPONSE_COMPRESSION_ENABLED: {{ .responseCompressionEnabled | quote }} + {{- end }} + {{- with $telemetry }} + LOG_LEVEL: {{ .logger.level | quote }} + LOG_PRETTY_PRINT_ENABLED: {{ .logger.prettyPrint | quote }} + {{- with .logger.opentelemetryOptions }} + OPENTELEMETRY_LOGGING_ENABLED: {{ .enabled | quote }} + {{- if .enabled }} + OTLP_LOGGER_ENDPOINT_URL: {{ $opentelemetryLoggingUrl | quote }} + {{- if .resourceAttributes }} + OTEL_RESOURCE_ATTRIBUTES: {{ include "ingestion-trigger.otelResourceAttributes" .resourceAttributes | quote }} + {{- end }} + {{- end }} + {{- end }} + TELEMETRY_TRACING_ENABLED: {{ .tracing.enabled | quote }} + {{- if .tracing.enabled }} + TELEMETRY_TRACING_URL: {{ $tracingUrl | quote }} + {{- end }} + {{- end }} JOB_DOMAIN: {{ .Values.global.domain | quote }} PRODUCT_READER_MAX_VERTICES_PER_CHUNK: {{ .Values.env.productReader.maxVerticesPerChunk | quote }} JOB_MANAGER_URL: {{ $serviceUrls.jobManager | quote }} @@ -46,19 +65,6 @@ data: TILE_SIZE: {{ .Values.env.validationValuesByInfo.tileSize | quote}} RESOLUTION_FIXED_POINT_TOLERANCE: {{ .Values.env.validationValuesByInfo.resolutionFixedPointTolerance | quote }} EXTENT_BUFFER_IN_METERS: {{ .Values.env.validationValuesByInfo.extentBufferInMeters | quote }} - TELEMETRY_TRACING_ENABLED: {{ $tracing.enabled | quote }} - {{ if $tracing.enabled }} - TELEMETRY_TRACING_URL: {{ $tracing.url }} - {{ end }} - {{- with $openTelemetryOptions }} - OPENTELEMETRY_LOGGING_ENABLED: {{ .enabled | quote }} - {{ if .enabled }} - OPENTELEMETRY_LOGGING_URL: {{ .url | quote }} - {{ if .resourceAttributes }} - OPENTELEMETRY_RESOURCE_ATTRIBUTES: {{ .resourceAttributes | toJson | quote }} - {{ end }} - {{ end }} - {{- end }} {{- with .Values.configManagement }} CONFIG_SERVER_URL: {{ .serverUrl | quote }} CONFIG_NAME: {{ .name | quote }} diff --git a/helm/templates/deployment.yaml b/helm/templates/deployment.yaml index b901398..0f86c07 100644 --- a/helm/templates/deployment.yaml +++ b/helm/templates/deployment.yaml @@ -70,7 +70,7 @@ spec: fieldRef: fieldPath: metadata.uid - name: SERVER_PORT - value: {{ .Values.env.targetPort | quote }} + value: {{ .Values.server.targetPort | quote }} {{- if .Values.global.ca.secretName }} - name: REQUESTS_CA_BUNDLE value: {{ printf "%s/%s" .Values.global.ca.path .Values.global.ca.key | quote }} @@ -82,13 +82,13 @@ spec: name: {{ $configmapName }} ports: - name: http - containerPort: {{ .Values.env.targetPort }} - protocol: {{ .Values.env.protocol }} + containerPort: {{ .Values.server.targetPort }} + protocol: {{ .Values.server.protocol }} livenessProbe: initialDelaySeconds: {{ .Values.initialDelaySeconds }} httpGet: path: /liveness - port: {{ .Values.env.targetPort }} + port: {{ .Values.server.targetPort }} {{- if .Values.resources.enabled }} resources: {{- toYaml .Values.resources.value | nindent 12 }} diff --git a/helm/templates/ingress.yaml b/helm/templates/ingress.yaml index 119e19a..2561159 100644 --- a/helm/templates/ingress.yaml +++ b/helm/templates/ingress.yaml @@ -39,6 +39,6 @@ spec: service: name: {{ $serviceName }} port: - number: {{ .Values.env.port }} + number: {{ .Values.server.port }} host: {{ $ingressHost }} {{- end -}} diff --git a/helm/templates/service.yaml b/helm/templates/service.yaml index be55771..81b59a1 100644 --- a/helm/templates/service.yaml +++ b/helm/templates/service.yaml @@ -18,9 +18,9 @@ spec: type: NodePort {{- end }} ports: - - port: {{ .Values.env.port }} - targetPort: {{ .Values.env.targetPort }} - protocol: {{ .Values.env.protocol }} + - port: {{ .Values.server.port }} + targetPort: {{ .Values.server.targetPort }} + protocol: {{ .Values.server.protocol }} name: http {{- if eq $cloudProviderFlavor "minikube" }} nodePort: {{ .Values.nodePort }} diff --git a/helm/values.yaml b/helm/values.yaml index 57a271a..719ac5b 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -1,13 +1,12 @@ global: cloudProvider: {} - tracing: {} + telemetry: + tracing: {} + logger: + opentelemetryOptions: {} environment: '' domain: "RASTER" serviceUrls: {} - openTelemetryOptions: - enabled: false - url: '' - resourceAttributes: {} jobDefinitions: {} storage: fs: @@ -77,10 +76,6 @@ cloudProvider: imagePullSecretName: 'my-registry-secret' flavor: openshift -tracing: - enabled: false - url: '' - configManagement: offlineMode: true name: 'ingestion-trigger' @@ -128,21 +123,29 @@ caSecretName: '' caPath: '/usr/local/share/ca-certificates' caKey: 'ca.crt' -env: +server: port: 8080 targetPort: 8080 protocol: TCP - logLevel: info - logPrettyPrintEnabled: false - openTelemetryOptions: - enabled: false - url: '' - resourceAttributes: {} responseCompressionEnabled: true requestPayloadLimit: 1mb + +telemetry: + logger: + level: info + prettyPrint: false + opentelemetryOptions: + enabled: true + url: http://localhost:4317 + # Rendered as OTEL_RESOURCE_ATTRIBUTES in "key=value,key=value" format + # resourceAttributes: + # service.namespace: namespace + # deployment.environment: dev tracing: - enabled: false - url: '' + enabled: true + url: http://localhost:55681/v1/traces + +env: storageExplorer: layerSourceDir: '/layerSources' displayNameDir: "\\layerSources" From 34bb1d2695698f2a57d4a786327e407f87a54259 Mon Sep 17 00:00:00 2001 From: shlomiko Date: Thu, 10 Sep 2026 15:56:58 +0300 Subject: [PATCH 3/4] fix(config): map otlp logger url and resource attributes from the new env names Read telemetry.logger.opentelemetryOptions.url from OTLP_LOGGER_ENDPOINT_URL and resourceAttributes from OTEL_RESOURCE_ATTRIBUTES, matching the helm configmap and the commonBoilerplateV3 schema. Co-Authored-By: Claude Fable 5.1 --- config/custom-environment-variables.json | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/config/custom-environment-variables.json b/config/custom-environment-variables.json index 5a96fd8..75d7cda 100644 --- a/config/custom-environment-variables.json +++ b/config/custom-environment-variables.json @@ -17,11 +17,8 @@ "__name": "OPENTELEMETRY_LOGGING_ENABLED", "__format": "boolean" }, - "url": "OPENTELEMETRY_LOGGING_URL", - "resourceAttributes": { - "__name": "OPENTELEMETRY_RESOURCE_ATTRIBUTES", - "__format": "json" - } + "url": "OTLP_LOGGER_ENDPOINT_URL", + "resourceAttributes": "OTEL_RESOURCE_ATTRIBUTES" } }, "tracing": { From b92a9fb7ca043df535561beaa98fbedd396364ca Mon Sep 17 00:00:00 2001 From: shlomiko Date: Tue, 15 Sep 2026 13:45:51 +0300 Subject: [PATCH 4/4] 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 208fdd0..7ba60e0 100644 --- a/src/containerConfig.ts +++ b/src/containerConfig.ts @@ -27,7 +27,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();