Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
b5f16dd
fix(helm): set configManagement.offlineMode default to true
CL-SHLOMIKONCHA Sep 9, 2026
d4e5c68
fix(helm): default logLevel to info and requestPayloadLimit to 5mb
CL-SHLOMIKONCHA Sep 9, 2026
e6650e6
fix(helm): enable tracing by default with empty url
CL-SHLOMIKONCHA Sep 9, 2026
55f51a8
fix(helm): quote tracing url in configmap so an empty default renders…
CL-SHLOMIKONCHA Sep 9, 2026
8886a68
fix(helm): enable openTelemetry logging by default with empty quoted url
CL-SHLOMIKONCHA Sep 9, 2026
7bf86a9
fix(helm): split env values into server and telemetry scopes
CL-SHLOMIKONCHA Sep 10, 2026
becd672
fix(config): map otlp logger url from OTLP_LOGGER_ENDPOINT_URL
CL-SHLOMIKONCHA Sep 10, 2026
3eff4c0
chore(config): drop redundant opentelemetryOptions env mapping
CL-SHLOMIKONCHA Sep 10, 2026
ebb7c05
chore(config): document the opentelemetryOptions env var flow
CL-SHLOMIKONCHA Sep 10, 2026
0302c70
Merge branch 'fix/helm-default-values' of https://github.com/MapColon…
CL-SHLOMIKONCHA Sep 10, 2026
99aaf70
chore(config): restore opentelemetryOptions env mapping and document it
CL-SHLOMIKONCHA Sep 10, 2026
ebea0d6
chore(config): restore resourceAttributes env mapping
CL-SHLOMIKONCHA Sep 10, 2026
7aaaedc
fix(helm): always export the telemetry enabled flags
CL-SHLOMIKONCHA Sep 10, 2026
15bdfb3
chore(config): map resourceAttributes from OTEL_RESOURCE_ATTRIBUTES
CL-SHLOMIKONCHA Sep 10, 2026
8a3a19a
chore(helm): drop opentelemetryOptions comment block from values
CL-SHLOMIKONCHA Sep 10, 2026
a155a34
refactor: remove redundant prettyPrint option from logger configuration
CL-SHLOMIKONCHA Sep 15, 2026
f9b25fa
fix(helm): quote all configmap values
CL-SHLOMIKONCHA Sep 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions config/custom-environment-variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
35 changes: 23 additions & 12 deletions helm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
4 changes: 0 additions & 4 deletions helm/templates/_tplValues.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
59 changes: 33 additions & 26 deletions helm/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,42 +1,49 @@
{{- $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
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 }}
TELEMETRY_TRACING_URL: {{ $tracingUrl }}
{{ end }}
OPENTELEMETRY_LOGGING_ENABLED: {{ $openTelemetryOptions.enabled | quote }}
{{ if $openTelemetryOptions.enabled }}
OPENTELEMETRY_LOGGING_URL: {{ $openTelemetryOptions.url }}
{{ if $openTelemetryOptions.resourceAttributes }}
OPENTELEMETRY_RESOURCE_ATTRIBUTES: {{ $openTelemetryOptions.resourceAttributes | toJson | quote }}
{{ end }}
{{ end }}
DB_HOST: {{ $db.host }}
DB_PORT: {{ $db.port | quote }}
DB_NAME: {{ $db.name }}
{{- 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 "raster-catalog-manager.otelResourceAttributes" .resourceAttributes | quote }}
{{- end }}
{{- end }}
{{- end }}
TELEMETRY_TRACING_ENABLED: {{ .tracing.enabled | quote }}
{{- if .tracing.enabled }}
TELEMETRY_TRACING_URL: {{ $tracingUrl | quote }}
{{- end }}
{{- end }}
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_NAME: {{ .name | quote }}
CONFIG_VERSION: {{ .version | quote }}
CONFIG_OFFLINE_MODE: {{ .offlineMode | quote }}
CONFIG_SERVER_URL: {{ .serverUrl | quote }}
Expand Down
9 changes: 5 additions & 4 deletions helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}

Expand Down Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion helm/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ spec:
service:
name: {{ $serviceName }}
port:
number: {{ .Values.env.port }}
number: {{ .Values.server.port }}
host: {{ $ingressHost}}
{{- end -}}
7 changes: 4 additions & 3 deletions helm/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand Down
32 changes: 20 additions & 12 deletions helm/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
global:
cloudProvider: {}
tracing: {}
openTelemetryOptions: {}
telemetry:
tracing: {}
logger:
opentelemetryOptions: {}
environment: ""
db:
host: ""
Expand Down Expand Up @@ -67,26 +69,32 @@ image:
podAnnotations: {}

configManagement:
offlineMode: false
offlineMode: true
name: 'raster-catalog-manager'
version: 'latest'
serverUrl: 'http://localhost:8080/api'

env:
server:
port: 80
targetPort: 8080
protocol: TCP
logLevel: warn
logPrettyPrintEnabled: false
responseCompressionEnabled: true
requestPayloadLimit: 1mb
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: false
enabled: true
url: http://localhost:55681/v1/traces
openTelemetryOptions:
enabled: false
url: ''
resourceAttributes: {}

resources:
enabled: false
Expand Down
2 changes: 1 addition & 1 deletion src/containerConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Loading