Skip to content

Update Postgres Helm Chart to include instrumentation #299

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 2, 2025
Merged
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
20 changes: 20 additions & 0 deletions helm/postgres/templates/postgres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
17 changes: 17 additions & 0 deletions helm/postgres/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 #
###################
Expand Down Expand Up @@ -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 #
#######################
Expand Down