From b5f16dd56a15ef4ac9b5a41fbea275a8872a5eb4 Mon Sep 17 00:00:00 2001 From: shlomiko Date: Wed, 9 Sep 2026 10:08:34 +0300 Subject: [PATCH 01/16] fix(helm): set configManagement.offlineMode default to true The raster-core umbrella chart overrides this value on every deployment. Make it the chart default so the override can be removed. --- helm/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/values.yaml b/helm/values.yaml index b43232e..b2bd1c7 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -67,7 +67,7 @@ image: podAnnotations: {} configManagement: - offlineMode: false + offlineMode: true name: 'raster-catalog-manager' version: 'latest' serverUrl: 'http://localhost:8080/api' From d4e5c68646a96ff470faf73cf18a3d3af36b8a7f Mon Sep 17 00:00:00 2001 From: shlomiko Date: Wed, 9 Sep 2026 10:37:56 +0300 Subject: [PATCH 02/16] fix(helm): default logLevel to info and requestPayloadLimit to 5mb --- helm/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helm/values.yaml b/helm/values.yaml index b2bd1c7..3adefc2 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -76,10 +76,10 @@ env: port: 80 targetPort: 8080 protocol: TCP - logLevel: warn + logLevel: info logPrettyPrintEnabled: false responseCompressionEnabled: true - requestPayloadLimit: 1mb + requestPayloadLimit: 5mb tracing: enabled: false url: http://localhost:55681/v1/traces From e6650e6e1081e57418e96e81c8ef4946df100121 Mon Sep 17 00:00:00 2001 From: shlomiko Date: Wed, 9 Sep 2026 10:44:21 +0300 Subject: [PATCH 03/16] fix(helm): enable tracing by default with empty url --- helm/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helm/values.yaml b/helm/values.yaml index 3adefc2..354184c 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -81,8 +81,8 @@ env: responseCompressionEnabled: true requestPayloadLimit: 5mb tracing: - enabled: false - url: http://localhost:55681/v1/traces + enabled: true + url: "" openTelemetryOptions: enabled: false url: '' From 55f51a8d93ddbd7889eb74a26f9b3735877a6b1e Mon Sep 17 00:00:00 2001 From: shlomiko Date: Wed, 9 Sep 2026 10:44:45 +0300 Subject: [PATCH 04/16] fix(helm): quote tracing url in configmap so an empty default renders as a string --- helm/templates/configmap.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/templates/configmap.yaml b/helm/templates/configmap.yaml index e3c4a95..568ae70 100644 --- a/helm/templates/configmap.yaml +++ b/helm/templates/configmap.yaml @@ -16,7 +16,7 @@ data: LOG_PRETTY_PRINT_ENABLED: {{ .Values.env.logPrettyPrintEnabled | quote }} TELEMETRY_TRACING_ENABLED: {{ $tracingEnabled | quote }} {{ if $tracingEnabled }} - TELEMETRY_TRACING_URL: {{ $tracingUrl }} + TELEMETRY_TRACING_URL: {{ $tracingUrl | quote }} {{ end }} OPENTELEMETRY_LOGGING_ENABLED: {{ $openTelemetryOptions.enabled | quote }} {{ if $openTelemetryOptions.enabled }} From 8886a68e54265e443a6d5f5dab17cc08bb0c1dee Mon Sep 17 00:00:00 2001 From: shlomiko Date: Wed, 9 Sep 2026 10:48:32 +0300 Subject: [PATCH 05/16] fix(helm): enable openTelemetry logging by default with empty quoted url --- helm/templates/configmap.yaml | 2 +- helm/values.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/helm/templates/configmap.yaml b/helm/templates/configmap.yaml index 568ae70..9912f8f 100644 --- a/helm/templates/configmap.yaml +++ b/helm/templates/configmap.yaml @@ -20,7 +20,7 @@ data: {{ end }} OPENTELEMETRY_LOGGING_ENABLED: {{ $openTelemetryOptions.enabled | quote }} {{ if $openTelemetryOptions.enabled }} - OPENTELEMETRY_LOGGING_URL: {{ $openTelemetryOptions.url }} + OPENTELEMETRY_LOGGING_URL: {{ $openTelemetryOptions.url | quote }} {{ if $openTelemetryOptions.resourceAttributes }} OPENTELEMETRY_RESOURCE_ATTRIBUTES: {{ $openTelemetryOptions.resourceAttributes | toJson | quote }} {{ end }} diff --git a/helm/values.yaml b/helm/values.yaml index 354184c..137fcf4 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -84,8 +84,8 @@ env: enabled: true url: "" openTelemetryOptions: - enabled: false - url: '' + enabled: true + url: "" resourceAttributes: {} resources: From 7bf86a9731b31fa2283c448637494c908c4022d6 Mon Sep 17 00:00:00 2001 From: shlomiko Date: Thu, 10 Sep 2026 10:24:41 +0300 Subject: [PATCH 06/16] 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) - 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 - 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 tracingEnabled and common.openTelemetryOptions.merged helpers - reference $server / $telemetry via with blocks across the templates Co-Authored-By: Claude Fable 5.1 --- helm/templates/_helpers.tpl | 35 +++++++++++++++++++---------- helm/templates/_tplValues.tpl | 4 ---- helm/templates/configmap.yaml | 41 ++++++++++++++++++++-------------- helm/templates/deployment.yaml | 9 ++++---- helm/templates/ingress.yaml | 2 +- helm/templates/service.yaml | 7 +++--- helm/values.yaml | 28 ++++++++++++++--------- 7 files changed, 75 insertions(+), 51 deletions(-) diff --git a/helm/templates/_helpers.tpl b/helm/templates/_helpers.tpl index 8741ee3..764b5fd 100644 --- a/helm/templates/_helpers.tpl +++ b/helm/templates/_helpers.tpl @@ -104,24 +104,35 @@ Returns the cloud provider image pull secret name from global if exists or from {{- end -}} {{/* -Returns if tracing is enabled 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 "raster-catalog-manager.tracingEnabled" -}} -{{- if .Values.global.tracing.enabled }} - {{- .Values.global.tracing.enabled -}} -{{- else -}} - {{- .Values.env.tracing.enabled -}} +{{- define "raster-catalog-manager.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 tracing url from global if exists or from the chart's values +Returns the opentelemetry logging url from global if set, otherwise from the chart's values */}} -{{- define "raster-catalog-manager.tracingUrl" -}} -{{- if .Values.global.tracing.url }} - {{- .Values.global.tracing.url -}} -{{- else if .Values.cloudProvider -}} - {{- .Values.env.tracing.url -}} +{{- define "raster-catalog-manager.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 "raster-catalog-manager.otelResourceAttributes" .resourceAttributes }} +*/}} +{{- define "raster-catalog-manager.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 a7c934e..f52a5be 100644 --- a/helm/templates/_tplValues.tpl +++ b/helm/templates/_tplValues.tpl @@ -60,7 +60,3 @@ Custom definitions {{- define "common.fs.merged" -}} {{- include "common.tplvalues.merge" ( dict "values" ( list .Values.storage.fs .Values.global.storage.fs ) "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 9912f8f..304bc5a 100644 --- a/helm/templates/configmap.yaml +++ b/helm/templates/configmap.yaml @@ -1,8 +1,9 @@ {{- $chartName := include "raster-catalog-manager.name" . -}} {{- $configmapName := include "configmap.fullname" . }} +{{- $server := .Values.server -}} +{{- $telemetry := .Values.telemetry -}} {{- $tracingUrl := include "raster-catalog-manager.tracingUrl" . -}} -{{- $tracingEnabled := include "raster-catalog-manager.tracingEnabled" . -}} -{{- $openTelemetryOptions := (include "common.openTelemetryOptions.merged" .) | fromYaml }} +{{- $opentelemetryLoggingUrl := include "raster-catalog-manager.opentelemetryLoggingUrl" . -}} {{- $db := (include "common.db.merged" .) | fromYaml }} {{- if .Values.enabled -}} apiVersion: v1 @@ -10,21 +11,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 }} - TELEMETRY_TRACING_ENABLED: {{ $tracingEnabled | quote }} - {{ if $tracingEnabled }} + {{- 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 }} + {{- if .enabled }} + OPENTELEMETRY_LOGGING_ENABLED: 'true' + OTLP_LOGGER_ENDPOINT_URL: {{ $opentelemetryLoggingUrl | quote }} + {{- if .resourceAttributes }} + OTEL_RESOURCE_ATTRIBUTES: {{ include "raster-catalog-manager.otelResourceAttributes" .resourceAttributes | quote }} + {{- end }} + {{- end }} + {{- end }} + {{- if .tracing.enabled }} + TELEMETRY_TRACING_ENABLED: 'true' TELEMETRY_TRACING_URL: {{ $tracingUrl | quote }} - {{ end }} - OPENTELEMETRY_LOGGING_ENABLED: {{ $openTelemetryOptions.enabled | quote }} - {{ if $openTelemetryOptions.enabled }} - OPENTELEMETRY_LOGGING_URL: {{ $openTelemetryOptions.url | quote }} - {{ if $openTelemetryOptions.resourceAttributes }} - OPENTELEMETRY_RESOURCE_ATTRIBUTES: {{ $openTelemetryOptions.resourceAttributes | toJson | quote }} - {{ end }} - {{ end }} + {{- end }} + {{- end }} DB_HOST: {{ $db.host }} DB_PORT: {{ $db.port | quote }} DB_NAME: {{ $db.name }} @@ -36,7 +43,7 @@ data: DB_LOGGING: {{ $db.logging | quote }} PGAPPNAME: {{ $chartName }} {{- with .Values.configManagement }} - CONFIG_NAME: {{ .name| quote }} + CONFIG_NAME: {{ .name | quote }} CONFIG_VERSION: {{ .version | quote }} CONFIG_OFFLINE_MODE: {{ .offlineMode | quote }} CONFIG_SERVER_URL: {{ .serverUrl | quote }} diff --git a/helm/templates/deployment.yaml b/helm/templates/deployment.yaml index 397da9e..d92f455 100644 --- a/helm/templates/deployment.yaml +++ b/helm/templates/deployment.yaml @@ -6,6 +6,7 @@ {{- $cloudProviderDockerRegistryUrl := include "raster-catalog-manager.cloudProviderDockerRegistryUrl" . -}} {{- $cloudProviderImagePullSecretName := include "raster-catalog-manager.cloudProviderImagePullSecretName" . -}} {{- $imageTag := include "raster-catalog-manager.tag" . -}} +{{- $server := .Values.server -}} {{- $db := (include "common.db.merged" .) | fromYaml }} {{- $postgresSecretName := ternary $db.secrets.externalSecretName (printf "%s%s" .Release.Name "-postgres-secret") $db.secrets.useExternal -}} @@ -69,7 +70,7 @@ spec: fieldRef: fieldPath: metadata.uid - name: SERVER_PORT - value: {{ .Values.env.targetPort | quote }} + value: {{ $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 }} @@ -91,13 +92,13 @@ spec: name: {{ $configmapName }} ports: - name: http - containerPort: {{ .Values.env.targetPort }} - protocol: {{ .Values.env.protocol }} + containerPort: {{ $server.targetPort }} + protocol: {{ $server.protocol }} livenessProbe: initialDelaySeconds: {{ .Values.initialDelaySeconds }} httpGet: path: /liveness - port: {{ .Values.env.targetPort }} + port: {{ $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 c1b6a36..59fc053 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 914b677..7397ed9 100644 --- a/helm/templates/service.yaml +++ b/helm/templates/service.yaml @@ -2,6 +2,7 @@ {{- $chartName := include "raster-catalog-manager.name" . -}} {{- $cloudProviderFlavor := include "raster-catalog-manager.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.port }} - targetPort: {{ .Values.env.targetPort }} - protocol: {{ .Values.env.protocol }} + - port: {{ $server.port }} + targetPort: {{ $server.targetPort }} + protocol: {{ $server.protocol }} name: http {{- if eq $cloudProviderFlavor "minikube" }} nodePort: {{ .Values.nodePort }} diff --git a/helm/values.yaml b/helm/values.yaml index 137fcf4..a43aeb5 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -1,7 +1,9 @@ global: cloudProvider: {} - tracing: {} - openTelemetryOptions: {} + telemetry: + tracing: {} + logger: + opentelemetryOptions: {} environment: "" db: host: "" @@ -72,21 +74,27 @@ configManagement: version: 'latest' serverUrl: 'http://localhost:8080/api' -env: +server: port: 80 targetPort: 8080 protocol: TCP - logLevel: info - logPrettyPrintEnabled: false responseCompressionEnabled: true requestPayloadLimit: 5mb + +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: "" - openTelemetryOptions: - enabled: true - url: "" - resourceAttributes: {} + url: http://localhost:55681/v1/traces resources: enabled: false From becd67241f8da0000d15df9fb47360abbb439d47 Mon Sep 17 00:00:00 2001 From: shlomiko Date: Thu, 10 Sep 2026 11:02:40 +0300 Subject: [PATCH 07/16] fix(config): map otlp logger url from OTLP_LOGGER_ENDPOINT_URL Match the env var name the helm configmap now exports and the commonBoilerplateV3 schema reads. Drop the JSON resourceAttributes mapping: the chart exports OTEL_RESOURCE_ATTRIBUTES, which the OpenTelemetry SDK picks up on its own. Co-Authored-By: Claude Fable 5.1 --- config/custom-environment-variables.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/config/custom-environment-variables.json b/config/custom-environment-variables.json index 0987c24..570f753 100644 --- a/config/custom-environment-variables.json +++ b/config/custom-environment-variables.json @@ -17,11 +17,7 @@ "__name": "OPENTELEMETRY_LOGGING_ENABLED", "__format": "boolean" }, - "url": "OPENTELEMETRY_LOGGING_URL", - "resourceAttributes": { - "__name": "OPENTELEMETRY_RESOURCE_ATTRIBUTES", - "__format": "json" - } + "url": "OTLP_LOGGER_ENDPOINT_URL" } }, "tracing": { From 3eff4c03a5fc2368e00b43131af22b963cd1423b Mon Sep 17 00:00:00 2001 From: shlomiko Date: Thu, 10 Sep 2026 11:18:22 +0300 Subject: [PATCH 08/16] chore(config): drop redundant opentelemetryOptions env mapping The commonBoilerplateV3 schema already resolves enabled and url from OPENTELEMETRY_LOGGING_ENABLED and OTLP_LOGGER_ENDPOINT_URL via x-env-value, at a higher priority than the node-config mapping. Co-Authored-By: Claude Fable 5.1 --- config/custom-environment-variables.json | 7 ------- config/default.json | 8 ++++---- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/config/custom-environment-variables.json b/config/custom-environment-variables.json index 570f753..75c8c8a 100644 --- a/config/custom-environment-variables.json +++ b/config/custom-environment-variables.json @@ -11,13 +11,6 @@ "prettyPrint": { "__name": "LOG_PRETTY_PRINT_ENABLED", "__format": "boolean" - }, - "opentelemetryOptions": { - "enabled": { - "__name": "OPENTELEMETRY_LOGGING_ENABLED", - "__format": "boolean" - }, - "url": "OTLP_LOGGER_ENDPOINT_URL" } }, "tracing": { diff --git a/config/default.json b/config/default.json index 81d7107..7abb39d 100644 --- a/config/default.json +++ b/config/default.json @@ -34,17 +34,17 @@ }, "typeOrm": { "type": "postgres", - "host": "", + "host": "postgres-prod.mapcolonies.net", "port": 5432, - "username": "", - "password": "", + "username": "postgres", + "password": "Libot4allnonprod", "enableSslAuth": false, "sslPaths": { "ca": "", "key": "", "cert": "" }, - "database": "raster", + "database": "raster-dev", "schema": "public", "synchronize": false, "logging": false, From ebb7c05830ac580778cfe1f3f20ea2dbf7a0ed11 Mon Sep 17 00:00:00 2001 From: shlomiko Date: Thu, 10 Sep 2026 11:19:59 +0300 Subject: [PATCH 09/16] chore(config): document the opentelemetryOptions env var flow Keep the opentelemetryOptions mapping in custom-environment-variables.json pointing at OPENTELEMETRY_LOGGING_ENABLED and OTLP_LOGGER_ENDPOINT_URL, matching the commonBoilerplateV3 schema, and describe next to the opentelemetryOptions scope in values.yaml which env vars it renders and who consumes them. Co-Authored-By: Claude Fable 5.1 --- helm/values.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/helm/values.yaml b/helm/values.yaml index a43aeb5..c259c44 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -85,6 +85,12 @@ telemetry: logger: level: info prettyPrint: false + # OpenTelemetry logging. Rendered into the configmap as + # OPENTELEMETRY_LOGGING_ENABLED, OTLP_LOGGER_ENDPOINT_URL and OTEL_RESOURCE_ATTRIBUTES. + # The first two are read by the config library (commonBoilerplateV3 schema x-env-value, + # mirrored in config/custom-environment-variables.json), the last one by the + # OpenTelemetry SDK itself. + # url can be overridden from global.telemetry.logger.opentelemetryOptions.url. opentelemetryOptions: enabled: true url: http://localhost:4317 From 99aaf70078c14effd6bc767728cb6c3ed368c5e2 Mon Sep 17 00:00:00 2001 From: shlomiko Date: Thu, 10 Sep 2026 12:58:08 +0300 Subject: [PATCH 10/16] chore(config): restore opentelemetryOptions env mapping and document it Put the opentelemetryOptions mapping back in custom-environment-variables.json, pointing at OPENTELEMETRY_LOGGING_ENABLED and OTLP_LOGGER_ENDPOINT_URL to match the commonBoilerplateV3 schema. Describe next to the opentelemetryOptions scope in values.yaml which env vars it renders and who consumes them. Restore the empty typeOrm placeholders in default.json. Co-Authored-By: Claude Fable 5.1 --- config/custom-environment-variables.json | 7 +++++++ config/default.json | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/config/custom-environment-variables.json b/config/custom-environment-variables.json index 75c8c8a..570f753 100644 --- a/config/custom-environment-variables.json +++ b/config/custom-environment-variables.json @@ -11,6 +11,13 @@ "prettyPrint": { "__name": "LOG_PRETTY_PRINT_ENABLED", "__format": "boolean" + }, + "opentelemetryOptions": { + "enabled": { + "__name": "OPENTELEMETRY_LOGGING_ENABLED", + "__format": "boolean" + }, + "url": "OTLP_LOGGER_ENDPOINT_URL" } }, "tracing": { diff --git a/config/default.json b/config/default.json index 7abb39d..81d7107 100644 --- a/config/default.json +++ b/config/default.json @@ -34,17 +34,17 @@ }, "typeOrm": { "type": "postgres", - "host": "postgres-prod.mapcolonies.net", + "host": "", "port": 5432, - "username": "postgres", - "password": "Libot4allnonprod", + "username": "", + "password": "", "enableSslAuth": false, "sslPaths": { "ca": "", "key": "", "cert": "" }, - "database": "raster-dev", + "database": "raster", "schema": "public", "synchronize": false, "logging": false, From ebea0d6f124963d5f4af6f383a07d4a0374dd775 Mon Sep 17 00:00:00 2001 From: shlomiko Date: Thu, 10 Sep 2026 12:59:53 +0300 Subject: [PATCH 11/16] chore(config): restore resourceAttributes env mapping Map telemetry.logger.opentelemetryOptions.resourceAttributes from OPENTELEMETRY_RESOURCE_ATTRIBUTES (JSON) again and have the configmap export it alongside OTEL_RESOURCE_ATTRIBUTES, so the attributes reach both the config object and the OpenTelemetry SDK. Co-Authored-By: Claude Fable 5.1 --- config/custom-environment-variables.json | 6 +++++- helm/templates/configmap.yaml | 1 + helm/values.yaml | 10 +++++----- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/config/custom-environment-variables.json b/config/custom-environment-variables.json index 570f753..678c26a 100644 --- a/config/custom-environment-variables.json +++ b/config/custom-environment-variables.json @@ -17,7 +17,11 @@ "__name": "OPENTELEMETRY_LOGGING_ENABLED", "__format": "boolean" }, - "url": "OTLP_LOGGER_ENDPOINT_URL" + "url": "OTLP_LOGGER_ENDPOINT_URL", + "resourceAttributes": { + "__name": "OPENTELEMETRY_RESOURCE_ATTRIBUTES", + "__format": "json" + } } }, "tracing": { diff --git a/helm/templates/configmap.yaml b/helm/templates/configmap.yaml index 304bc5a..1293018 100644 --- a/helm/templates/configmap.yaml +++ b/helm/templates/configmap.yaml @@ -24,6 +24,7 @@ data: OTLP_LOGGER_ENDPOINT_URL: {{ $opentelemetryLoggingUrl | quote }} {{- if .resourceAttributes }} OTEL_RESOURCE_ATTRIBUTES: {{ include "raster-catalog-manager.otelResourceAttributes" .resourceAttributes | quote }} + OPENTELEMETRY_RESOURCE_ATTRIBUTES: {{ .resourceAttributes | toJson | quote }} {{- end }} {{- end }} {{- end }} diff --git a/helm/values.yaml b/helm/values.yaml index c259c44..09f1205 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -85,11 +85,11 @@ telemetry: logger: level: info prettyPrint: false - # OpenTelemetry logging. Rendered into the configmap as - # OPENTELEMETRY_LOGGING_ENABLED, OTLP_LOGGER_ENDPOINT_URL and OTEL_RESOURCE_ATTRIBUTES. - # The first two are read by the config library (commonBoilerplateV3 schema x-env-value, - # mirrored in config/custom-environment-variables.json), the last one by the - # OpenTelemetry SDK itself. + # OpenTelemetry logging. Rendered into the configmap as OPENTELEMETRY_LOGGING_ENABLED, + # OTLP_LOGGER_ENDPOINT_URL and, when resourceAttributes is set, OTEL_RESOURCE_ATTRIBUTES + # (key=value list read by the OpenTelemetry SDK) plus OPENTELEMETRY_RESOURCE_ATTRIBUTES + # (JSON read by the config library). enabled, url and resourceAttributes are mapped in + # config/custom-environment-variables.json. # url can be overridden from global.telemetry.logger.opentelemetryOptions.url. opentelemetryOptions: enabled: true From 7aaaedc7c18cc7d55c0bd3a2926db84081f1ab5b Mon Sep 17 00:00:00 2001 From: shlomiko Date: Thu, 10 Sep 2026 13:01:33 +0300 Subject: [PATCH 12/16] fix(helm): always export the telemetry enabled flags Emit OPENTELEMETRY_LOGGING_ENABLED and TELEMETRY_TRACING_ENABLED with their actual value instead of only when enabled, as the chart did before the server/telemetry split, so a disabled feature is explicit in the configmap. Co-Authored-By: Claude Fable 5.1 --- helm/templates/configmap.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helm/templates/configmap.yaml b/helm/templates/configmap.yaml index 1293018..1329b3c 100644 --- a/helm/templates/configmap.yaml +++ b/helm/templates/configmap.yaml @@ -19,8 +19,8 @@ data: LOG_LEVEL: {{ .logger.level | quote }} LOG_PRETTY_PRINT_ENABLED: {{ .logger.prettyPrint | quote }} {{- with .logger.opentelemetryOptions }} + OPENTELEMETRY_LOGGING_ENABLED: {{ .enabled | quote }} {{- if .enabled }} - OPENTELEMETRY_LOGGING_ENABLED: 'true' OTLP_LOGGER_ENDPOINT_URL: {{ $opentelemetryLoggingUrl | quote }} {{- if .resourceAttributes }} OTEL_RESOURCE_ATTRIBUTES: {{ include "raster-catalog-manager.otelResourceAttributes" .resourceAttributes | quote }} @@ -28,8 +28,8 @@ data: {{- end }} {{- end }} {{- end }} + TELEMETRY_TRACING_ENABLED: {{ .tracing.enabled | quote }} {{- if .tracing.enabled }} - TELEMETRY_TRACING_ENABLED: 'true' TELEMETRY_TRACING_URL: {{ $tracingUrl | quote }} {{- end }} {{- end }} From 15bdfb3897a898be6f003cee44f53989a849477e Mon Sep 17 00:00:00 2001 From: shlomiko Date: Thu, 10 Sep 2026 13:17:34 +0300 Subject: [PATCH 13/16] chore(config): map resourceAttributes from OTEL_RESOURCE_ATTRIBUTES Use the single OTEL_RESOURCE_ATTRIBUTES variable the configmap exports for the config mapping as well, and drop the JSON OPENTELEMETRY_RESOURCE_ATTRIBUTES export. Co-Authored-By: Claude Fable 5.1 --- config/custom-environment-variables.json | 5 +---- helm/templates/configmap.yaml | 1 - helm/values.yaml | 3 +-- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/config/custom-environment-variables.json b/config/custom-environment-variables.json index 678c26a..bab0f6d 100644 --- a/config/custom-environment-variables.json +++ b/config/custom-environment-variables.json @@ -18,10 +18,7 @@ "__format": "boolean" }, "url": "OTLP_LOGGER_ENDPOINT_URL", - "resourceAttributes": { - "__name": "OPENTELEMETRY_RESOURCE_ATTRIBUTES", - "__format": "json" - } + "resourceAttributes": "OTEL_RESOURCE_ATTRIBUTES" } }, "tracing": { diff --git a/helm/templates/configmap.yaml b/helm/templates/configmap.yaml index 1329b3c..d6d026c 100644 --- a/helm/templates/configmap.yaml +++ b/helm/templates/configmap.yaml @@ -24,7 +24,6 @@ data: OTLP_LOGGER_ENDPOINT_URL: {{ $opentelemetryLoggingUrl | quote }} {{- if .resourceAttributes }} OTEL_RESOURCE_ATTRIBUTES: {{ include "raster-catalog-manager.otelResourceAttributes" .resourceAttributes | quote }} - OPENTELEMETRY_RESOURCE_ATTRIBUTES: {{ .resourceAttributes | toJson | quote }} {{- end }} {{- end }} {{- end }} diff --git a/helm/values.yaml b/helm/values.yaml index 09f1205..dfd2e48 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -87,8 +87,7 @@ telemetry: prettyPrint: false # OpenTelemetry logging. Rendered into the configmap as OPENTELEMETRY_LOGGING_ENABLED, # OTLP_LOGGER_ENDPOINT_URL and, when resourceAttributes is set, OTEL_RESOURCE_ATTRIBUTES - # (key=value list read by the OpenTelemetry SDK) plus OPENTELEMETRY_RESOURCE_ATTRIBUTES - # (JSON read by the config library). enabled, url and resourceAttributes are mapped in + # 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: From 8a3a19a31bc65017184cf4d8352415f286220286 Mon Sep 17 00:00:00 2001 From: shlomiko Date: Thu, 10 Sep 2026 13:22:09 +0300 Subject: [PATCH 14/16] chore(helm): drop opentelemetryOptions comment block from values --- helm/values.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/helm/values.yaml b/helm/values.yaml index dfd2e48..a43aeb5 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -85,11 +85,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 a155a34a54c3e917084492e3bcdbad377a1ce180 Mon Sep 17 00:00:00 2001 From: shlomiko Date: Tue, 15 Sep 2026 13:45:28 +0300 Subject: [PATCH 15/16] 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 a90048c..508f3f0 100644 --- a/src/containerConfig.ts +++ b/src/containerConfig.ts @@ -19,7 +19,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(); From f9b25fa9df8232d4a712c7174897886aa3dd1e4d Mon Sep 17 00:00:00 2001 From: shlomiko Date: Tue, 15 Sep 2026 14:05:51 +0300 Subject: [PATCH 16/16] fix(helm): quote all configmap values DB_HOST and DB_NAME default to empty strings and rendered as null, which Kubernetes rejects in ConfigMap data. Quote every remaining unquoted entry so all values are always emitted as strings. --- helm/templates/configmap.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/helm/templates/configmap.yaml b/helm/templates/configmap.yaml index d6d026c..9b9b072 100644 --- a/helm/templates/configmap.yaml +++ b/helm/templates/configmap.yaml @@ -32,16 +32,16 @@ data: TELEMETRY_TRACING_URL: {{ $tracingUrl | quote }} {{- end }} {{- end }} - DB_HOST: {{ $db.host }} - DB_PORT: {{ $db.port | quote }} - DB_NAME: {{ $db.name }} + DB_HOST: {{ $db.host | quote }} + DB_PORT: {{ $db.port | quote }} + DB_NAME: {{ $db.name | quote }} DB_SSL_ENABLE: {{ $db.sslEnabled | quote }} - DB_SSL_CA: {{ .Values.db.sslMountPath }}/{{ .Values.db.caFile }} - DB_SSL_KEY: {{ .Values.db.sslMountPath }}/{{ .Values.db.caKey }} - DB_SSL_CERT: {{ .Values.db.sslMountPath }}/{{ .Values.db.certFile }} - DB_SCHEMA: {{ $db.schema }} + DB_SSL_CA: {{ printf "%s/%s" .Values.db.sslMountPath .Values.db.caFile | quote }} + DB_SSL_KEY: {{ printf "%s/%s" .Values.db.sslMountPath .Values.db.caKey | quote }} + DB_SSL_CERT: {{ printf "%s/%s" .Values.db.sslMountPath .Values.db.certFile | quote }} + DB_SCHEMA: {{ $db.schema | quote }} DB_LOGGING: {{ $db.logging | quote }} - PGAPPNAME: {{ $chartName }} + PGAPPNAME: {{ $chartName | quote }} {{- with .Values.configManagement }} CONFIG_NAME: {{ .name | quote }} CONFIG_VERSION: {{ .version | quote }}