diff --git a/helm/templates/_helpers.tpl b/helm/templates/_helpers.tpl index 79e0dcf0..e9837f58 100644 --- a/helm/templates/_helpers.tpl +++ b/helm/templates/_helpers.tpl @@ -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 }} + {{- .Values.global.telemetry.tracing.url -}} {{- else -}} - {{- .Values.env.metrics.url -}} + {{- .Values.telemetry.tracing.url -}} {{- end -}} {{- end -}} diff --git a/helm/templates/configmap.yaml b/helm/templates/configmap.yaml index 5eac948a..5c44286f 100644 --- a/helm/templates/configmap.yaml +++ b/helm/templates/configmap.yaml @@ -1,7 +1,6 @@ {{- $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 @@ -9,14 +8,10 @@ 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 "") }} diff --git a/helm/templates/deployment.yaml b/helm/templates/deployment.yaml index 2bc70bd4..1f66e92a 100644 --- a/helm/templates/deployment.yaml +++ b/helm/templates/deployment.yaml @@ -158,7 +158,7 @@ spec: {{- toYaml .Values.resources.value | nindent 12 }} {{- end }} ################################################## uwsgi exporter deployment############################################## - {{- if .Values.env.metrics.enabled }} + {{- if .Values.uwsgiExporter.enabled }} {{- template "pycsw-chart.uwsgi-exporter-container" (merge (dict "releaseName" .releaseName "chartName" .chartName "cloudProviderDockerRegistryUrl" $cloudProviderDockerRegistryUrl "resources" .Values.uwsgiExporter.resources) .) }} {{- end }} volumes: diff --git a/helm/values.yaml b/helm/values.yaml index 11728751..2079907b 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -3,8 +3,8 @@ global: dockerRegistryUrl: "" imagePullSecretName: "" flavor: openshift - tracing: {} - metrics: {} + telemetry: + tracing: {} environment: "" opalaEnabled: false ca: @@ -50,7 +50,7 @@ environment: development replicaCount: 1 resetOnConfigChange: true splunkIndex: "" -imagePullPolicy: Always +imagePullPolicy: IfNotPresent cloudProvider: dockerRegistryUrl: "" @@ -109,12 +109,11 @@ env: # database schema holding the records table, e.g. 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 resources: enabled: true @@ -247,6 +246,7 @@ nginx: useExternal: "" uwsgiExporter: + enabled: true image: repository: "common/timonwong/uwsgi-exporter" tag: "v1.3.0"