diff --git a/helm/postgres/templates/postgres.yaml b/helm/postgres/templates/postgres.yaml index 53261360..f4a861a4 100644 --- a/helm/postgres/templates/postgres.yaml +++ b/helm/postgres/templates/postgres.yaml @@ -185,6 +185,26 @@ spec: {{ toYaml .Values.monitoringConfig | indent 8 }} {{- end }} {{- end }} + {{- if .Values.instrumentation }} + instrumentation: + config: + {{- if .Values.instrumentationConfig }} +{{ toYaml .Values.instrumentationConfig | indent 6 }} + {{- end }} + image: {{ default "" .Values.instrumentationImage | quote }} + logs: + {{- if .Values.instrumentationLogs }} +{{ toYaml .Values.instrumentationLogs | indent 6 }} + {{- end }} + metrics: + {{- if .Values.instrumentationMetrics }} +{{ toYaml .Values.instrumentationMetrics | indent 6 }} + {{- end }} + resources: + {{- if .Values.instrumentationResources }} +{{ toYaml .Values.instrumentationResources | indent 6 }} + {{- end }} + {{- end }} {{- if .Values.shutdown }} shutdown: true {{- end }} diff --git a/helm/postgres/values.yaml b/helm/postgres/values.yaml index f5a096f1..957eda00 100644 --- a/helm/postgres/values.yaml +++ b/helm/postgres/values.yaml @@ -39,6 +39,13 @@ postgresVersion: 17 # below. # monitoring: false +# instrumentation enables the ability to monitor the Postgres cluster through an +# OpenTelemetry collector. This defaults to the value below. +# This feature is currently behind the feature gates OpenTelemetryLogs and +# OpenTelemetryMetrics; at least one of these feature gates must be turned +# on for `instrumentation` to be turned on. +# instrumentation: false + ################### # Image Overrides # ################### @@ -278,6 +285,16 @@ postgresVersion: 17 # "monitoring" setting. # monitoringConfig: {} +# The following "instrumentation_" fields will set the specified parts of the instrumentation +# spec. To enable instrumentation, you need to set the "instrumentation" setting to "true". +# This feature is currently behind the feature gates OpenTelemetryMetrics and OpenTelemetryLogs. + +# instrumentationConfig: {} +# instrumentationImage: "" +# instrumentationLogs: {} +# instrumentationMetrics: {} +# instrumentationResources: {} + ####################### # Kubernetes Settings # #######################