From cdb29a2e70270868e09baae7a8253808f53f3bad Mon Sep 17 00:00:00 2001 From: shlomiko Date: Thu, 10 Sep 2026 15:19:26 +0300 Subject: [PATCH 1/5] fix(helm): set imagePullPolicy and offlineMode defaults Default imagePullPolicy to IfNotPresent and configManagement.offlineMode to true so the raster-export umbrella no longer needs to override them. 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 34e5f0c..43e6dd4 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -21,7 +21,7 @@ mclabels: port: 8080 configManagement: - offlineMode: false + offlineMode: true name: 'exporter-trigger' version: 'latest' serverUrl: 'http://localhost:8080/api' @@ -53,7 +53,7 @@ replicaCount: 1 initialDelaySeconds: 60 nodePort: 30030 # for minikube deployment only resetOnConfigChange: true -imagePullPolicy: Always +imagePullPolicy: IfNotPresent cloudProvider: dockerRegistryUrl: my-registry-url.io From 7bf470470508c1e802b371f59ef2ccb113ed31f6 Mon Sep 17 00:00:00 2001 From: shlomiko Date: Thu, 10 Sep 2026 15:21:00 +0300 Subject: [PATCH 2/5] fix(helm): split env values into server and telemetry scopes Align the chart with ts-server-boilerplate: - replace the server and telemetry keys of the flat env block with a server scope (port, targetPort, protocol, requestPayloadLimit, responseCompressionEnabled) and a telemetry scope (logger, tracing); the exporter-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 the tracing and otlp logging enabled flags - 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 common.tracing.merged and common.openTelemetryOptions.merged helpers - service, ingress and deployment read ports from server.*; the ingress backend now targets the service port instead of the container port Co-Authored-By: Claude Fable 5.1 --- helm/templates/_helpers.tpl | 34 +++++++++++++++++++++++++++++ helm/templates/_tplValues.tpl | 7 ------ helm/templates/configmap.yaml | 36 +++++++++++++++++++------------ helm/templates/deployment.yaml | 7 +++--- helm/templates/ingress.yaml | 2 +- helm/templates/service.yaml | 7 +++--- helm/values.yaml | 39 +++++++++++++++++++++------------- 7 files changed, 89 insertions(+), 43 deletions(-) diff --git a/helm/templates/_helpers.tpl b/helm/templates/_helpers.tpl index d074688..0e41edb 100644 --- a/helm/templates/_helpers.tpl +++ b/helm/templates/_helpers.tpl @@ -102,3 +102,37 @@ Returns the cloud provider docker registry url from global if exists or from the {{- else -}} {{- end -}} {{- end -}} + +{{/* +Returns the tracing url from global if set, otherwise from the chart's values +*/}} +{{- define "exporter-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 "exporter-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 "exporter-trigger.otelResourceAttributes" .resourceAttributes }} +*/}} +{{- define "exporter-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 34f6a5d..d3d3286 100644 --- a/helm/templates/_tplValues.tpl +++ b/helm/templates/_tplValues.tpl @@ -61,10 +61,3 @@ Custom definitions {{- include "common.tplvalues.merge" ( dict "values" ( list .Values.jobDefinitions .Values.global.jobDefinitions ) "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 be6f01e..15a024d 100644 --- a/helm/templates/configmap.yaml +++ b/helm/templates/configmap.yaml @@ -1,6 +1,8 @@ {{- $chartName := include "exporter-trigger.name" . -}} -{{- $tracing := (include "common.tracing.merged" .) | fromYaml }} -{{- $openTelemetryOptions := (include "common.openTelemetryOptions.merged" .) | fromYaml }} +{{- $server := .Values.server -}} +{{- $telemetry := .Values.telemetry -}} +{{- $tracingUrl := include "exporter-trigger.tracingUrl" . -}} +{{- $opentelemetryLoggingUrl := include "exporter-trigger.opentelemetryLoggingUrl" . -}} {{- $serviceUrls := (include "common.serviceUrls.merged" .) | fromYaml }} {{- $storage := (include "common.storage.merged" .) | fromYaml }} {{- $configmapName := include "configmap.fullname" . }} @@ -13,21 +15,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 $openTelemetryOptions }} + {{- 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 }} - OPENTELEMETRY_LOGGING_URL: {{ .url | quote }} - OPENTELEMETRY_RESOURCE_ATTRIBUTES: {{ .resourceAttributes | toJson | quote }} + {{- if .enabled }} + OTLP_LOGGER_ENDPOINT_URL: {{ $opentelemetryLoggingUrl | quote }} + {{- if .resourceAttributes }} + OTEL_RESOURCE_ATTRIBUTES: {{ include "exporter-trigger.otelResourceAttributes" .resourceAttributes | quote }} + {{- end }} + {{- end }} + {{- end }} + TELEMETRY_TRACING_ENABLED: {{ .tracing.enabled | quote }} + {{- if .tracing.enabled }} + TELEMETRY_TRACING_URL: {{ $tracingUrl | quote }} {{- end }} {{- end }} - TELEMETRY_TRACING_ENABLED: {{ $tracing.enabled | quote }} - {{ if $tracing.enabled }} - TELEMETRY_TRACING_URL: {{ $tracing.url | quote }} - {{ end }} JOB_MANAGER_URL: {{ $serviceUrls.jobManager | quote }} JOB_TRACKER_URL: {{ $serviceUrls.jobTracker | quote }} CLEANUP_EXPIRATION_DAYS: {{ .Values.env.cleanupExpirationDays | quote }} diff --git a/helm/templates/deployment.yaml b/helm/templates/deployment.yaml index 2c3a374..389fbb6 100644 --- a/helm/templates/deployment.yaml +++ b/helm/templates/deployment.yaml @@ -4,6 +4,7 @@ {{- $cloudProviderDockerRegistryUrl := include "exporter-trigger.cloudProviderDockerRegistryUrl" . -}} {{- $cloudProviderImagePullSecretName := include "exporter-trigger.cloudProviderImagePullSecretName" . -}} {{- $imageTag := include "exporter-trigger.tag" . -}} +{{- $server := .Values.server -}} {{- if .Values.enabled -}} {{- $fs := (include "common.fs.merged" .) | fromYaml }} @@ -60,7 +61,7 @@ spec: fieldRef: fieldPath: metadata.uid - name: SERVER_PORT - value: {{ .Values.env.targetPort | quote }} + value: {{ $server.targetPort | quote }} - name: GPKGS_LOCATION value: {{ $gpkgLocation }} envFrom: @@ -68,8 +69,8 @@ spec: name: {{ $configmapName }} ports: - name: http - containerPort: {{ .Values.env.targetPort }} - protocol: TCP + containerPort: {{ $server.targetPort }} + protocol: {{ $server.protocol }} imagePullPolicy: {{ .Values.imagePullPolicy }} livenessProbe: initialDelaySeconds: {{ .Values.initialDelaySeconds }} diff --git a/helm/templates/ingress.yaml b/helm/templates/ingress.yaml index a373323..0d6a8ef 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 cacc180..228ea02 100644 --- a/helm/templates/service.yaml +++ b/helm/templates/service.yaml @@ -2,6 +2,7 @@ {{- $chartName := include "exporter-trigger.name" . -}} {{- $cloudProviderFlavor := include "exporter-trigger.cloudProviderFlavor" . -}} {{- $serviceName := include "service.fullname" . -}} +{{- $server := .Values.server -}} {{- if .Values.enabled -}} apiVersion: v1 kind: Service @@ -18,9 +19,9 @@ spec: type: NodePort {{- end }} ports: - - port: {{ .Values.env.internalPort }} - targetPort: {{ .Values.env.targetPort }} - protocol: TCP + - port: {{ $server.port }} + targetPort: {{ $server.targetPort }} + protocol: {{ $server.protocol }} name: internal {{- if eq $cloudProviderFlavor "minikube" }} nodePort: {{ .Values.nodePort }} diff --git a/helm/values.yaml b/helm/values.yaml index 43e6dd4..72c9c1d 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -1,7 +1,9 @@ global: cloudProvider: {} - tracing: {} - openTelemetryOptions: {} + telemetry: + tracing: {} + logger: + opentelemetryOptions: {} environment: "" serviceUrls: {} storage: {} @@ -71,22 +73,29 @@ image: # annotation2: annotation-value-2 podAnnotations: {} -tracing: - enabled: false - url: "" - -env: - port: 8080 +server: + port: 80 targetPort: 8080 - internalPort: 80 - logLevel: info - logPrettyPrintEnabled: false - openTelemetryOptions: - enabled: false - url: '' - resourceAttributes: {} + protocol: TCP 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: true + url: http://localhost:55681/v1/traces + +env: disableHttpClientLogs: false cleanupExpirationDays: 30 httpRetry: From c19aa8f6c7c0ed983c5a84cce2bae27f580650f2 Mon Sep 17 00:00:00 2001 From: shlomiko Date: Thu, 10 Sep 2026 15:21:00 +0300 Subject: [PATCH 3/5] fix(config): map otlp logger env vars by their schema names Map 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 6adc807..ec1adf1 100644 --- a/config/custom-environment-variables.json +++ b/config/custom-environment-variables.json @@ -18,11 +18,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 6f66adca9c3b31be208db6aab3e76b1aa5fcb019 Mon Sep 17 00:00:00 2001 From: shlomiko Date: Thu, 10 Sep 2026 15:29:10 +0300 Subject: [PATCH 4/5] fix(helm): disable route by default Co-Authored-By: Claude Fable 5.1 --- helm/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/values.yaml b/helm/values.yaml index 72c9c1d..34e4d8d 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -120,7 +120,7 @@ resources: memory: 128Mi route: - enabled: true + enabled: false host: path: /api/raster/v1 https: true From cc9f107a04434cced56096fd456bd29a4926b6c1 Mon Sep 17 00:00:00 2001 From: shlomiko Date: Tue, 15 Sep 2026 13:45:42 +0300 Subject: [PATCH 5/5] 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 f8de577..0eb4505 100644 --- a/src/containerConfig.ts +++ b/src/containerConfig.ts @@ -21,7 +21,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();