Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
17 changes: 3 additions & 14 deletions helm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -115,21 +115,10 @@ Returns the cloud provider image pull secret name from global if exists or from
Returns the tracing url from global if exists or from the chart's values
*/}}
{{- define "pycsw.tracingUrl" -}}
{{- if .Values.global.tracing.url }}
{{- .Values.global.tracing.url -}}
{{- else if .Values.cloudProvider -}}
{{- .Values.env.tracing.url -}}
{{- end -}}
{{- end -}}

{{/*
Returns the tracing url from global if exists or from the chart's values
*/}}
{{- define "pycsw.metricsUrl" -}}
{{- if .Values.global.metrics.url }}
{{- .Values.global.metrics.url -}}
{{- if .Values.global.telemetry.tracing.url }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: global.telemetry.tracing.url now overrides unconditionally (old else if .Values.cloudProvider branch dropped). Fine since the url only renders when telemetry.tracing.enabled — no change needed, just noting.

{{- .Values.global.telemetry.tracing.url -}}
{{- else -}}
{{- .Values.env.metrics.url -}}
{{- .Values.telemetry.tracing.url -}}
{{- end -}}
{{- end -}}

Expand Down
13 changes: 4 additions & 9 deletions helm/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
{{- $chartName := include "pycsw.name" . -}}
{{- $configmapName := include "pycsw.configmap.fullname" . }}
{{- $tracingUrl := include "pycsw.tracingUrl" . -}}
{{- $metricsUrl := include "pycsw.metricsUrl" . -}}
{{- $db := (include "common.db.merged" .) | fromYaml }}
{{- if .Values.enabled -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ $configmapName }}
data:
{{ if .Values.env.tracing.enabled }}
TELEMETRY_TRACING_ENABLED: 'true'
TELEMETRY_TRACING_URL: {{ $tracingUrl }}
{{ end }}
{{ if .Values.env.metrics.enabled }}
TELEMETRY_METRICS_ENABLED: 'true'
TELEMETRY_METRICS_URL: {{ $metricsUrl }}
{{ end }}
TELEMETRY_TRACING_ENABLED: {{ .Values.telemetry.tracing.enabled | quote }}
{{- if .Values.telemetry.tracing.enabled }}
TELEMETRY_TRACING_URL: {{ $tracingUrl | quote }}
{{- end }}
uwsgi.ini: {{ tpl (.Files.Get "config/pycswWsgi.ini") . | quote }}
CORS_ENABLED: {{ .Values.env.cors.enabled | quote }}
CORS_ALLOWED_HEADERS: {{ include "pycsw.cors.allowedHeaders" . | default (quote "") }}
Expand Down
2 changes: 1 addition & 1 deletion helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ spec:
{{- toYaml .Values.resources.value | nindent 12 }}
{{- end }}
################################################## uwsgi exporter deployment##############################################
{{- if .Values.env.metrics.enabled }}
{{- if .Values.uwsgiExporter.enabled }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exporter only works when env.uwsgi.statsServer.enabled is true (stats-http in config/pycswWsgi.ini). With statsServer.enabled: false and uwsgiExporter.enabled: true, the sidecar scrapes nothing and its probes fail. Gate on both, or fail on the mismatch.

{{- template "pycsw-chart.uwsgi-exporter-container" (merge (dict "releaseName" .releaseName "chartName" .chartName "cloudProviderDockerRegistryUrl" $cloudProviderDockerRegistryUrl "resources" .Values.uwsgiExporter.resources) .) }}
{{- end }}
volumes:
Expand Down
14 changes: 7 additions & 7 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ global:
dockerRegistryUrl: ""
imagePullSecretName: ""
flavor: openshift
tracing: {}
metrics: {}
telemetry:
tracing: {}
environment: ""
opalaEnabled: false
ca:
Expand Down Expand Up @@ -50,7 +50,7 @@ environment: development
replicaCount: 1
resetOnConfigChange: true
splunkIndex: ""
imagePullPolicy: Always
imagePullPolicy: IfNotPresent

cloudProvider:
dockerRegistryUrl: ""
Expand Down Expand Up @@ -109,12 +109,11 @@ env:
# database schema holding the records table, e.g. <Domain>CatalogManager
schema: ""
requirePassword: true

telemetry:
tracing:
enabled: false
url: http://localhost:55681/v1/trace
metrics:
enabled: true
url: http://localhost:55681/v1/metrics
url: http://localhost:55681/v1/traces

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tracing is now on by default, so this is what renders: localhost (nothing listens in the pod) on 55681, the legacy OTLP/HTTP port (current is 4318). nginx.opentelemetry in this file already targets infra-otel.infra-services:4317. Use a real default or keep enabled: false.


resources:
enabled: true
Expand Down Expand Up @@ -247,6 +246,7 @@ nginx:
useExternal: ""

uwsgiExporter:
enabled: true
image:
repository: "common/timonwong/uwsgi-exporter"
tag: "v1.3.0"
Expand Down
Loading