Skip to content

Commit

Permalink
Allow podAnnotations via helm values for Postgres operator
Browse files Browse the repository at this point in the history
This allows users to set annotations on the pods for example
for Prometheus.
  • Loading branch information
RobKenis committed Aug 30, 2024
1 parent 4e9dcbf commit 5222318
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/pg-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: pg-operator
description: 'A Helm chart to deploy the Percona Operator for PostgreSQL'
type: application
version: 2.4.1
version: 2.4.2
appVersion: 2.4.1
home: https://docs.percona.com/percona-operator-for-postgresql/2.0/
maintainers:
Expand Down
1 change: 1 addition & 0 deletions charts/pg-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Chart.
| `logStructured` | Force PG operator to print JSON-wrapped log messages | `false` |
| `logLevel` | PG Operator logging level | `INFO` |
| `disableTelemetry` | Disable sending PG Operator telemetry data to Percona | `false` |
| `podAnnotations` | Add annotations to the Operator Pod | `{}` |
| `watchNamespace` | Set this variable if the target cluster namespace differs from operators namespace | `` |
| `watchAllNamespaces` | K8S Cluster-wide operation | `false` |

Expand Down
4 changes: 4 additions & 0 deletions charts/pg-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ spec:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/part-of: {{ include "postgres-operator.name" . }}
pgv2.percona.com/control-plane: postgres-operator
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ include "postgres-operator.fullname" . }}
{{- with .Values.imagePullSecrets }}
Expand Down
2 changes: 2 additions & 0 deletions charts/pg-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ tolerations: []

affinity: {}

podAnnotations: {}

# disableTelemetry: according to
# https://docs.percona.com/percona-operator-for-postgresql/2.0/telemetry.html
# this is how you can disable telemetry collection
Expand Down

0 comments on commit 5222318

Please sign in to comment.