Skip to content
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
3 changes: 3 additions & 0 deletions chart/templates/pgbouncer/pgbouncer-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ spec:
annotations:
checksum/pgbouncer-config-secret: {{ include (print $.Template.BasePath "/secrets/pgbouncer-config-secret.yaml") . | sha256sum }}
checksum/pgbouncer-certificates-secret: {{ include (print $.Template.BasePath "/secrets/pgbouncer-certificates-secret.yaml") . | sha256sum }}
{{- if .Values.pgbouncer.podAnnotations }}
{{- toYaml .Values.pgbouncer.podAnnotations | nindent 8 }}
{{- end }}
spec:
{{- if .Values.pgbouncer.priorityClassName }}
priorityClassName: {{ .Values.pgbouncer.priorityClassName }}
Expand Down
8 changes: 8 additions & 0 deletions chart/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4385,6 +4385,14 @@
],
"default": null
},
"podAnnotations": {
"description": "Add annotations for the PgBouncer Pod.",
"type": "object",
"default": {},
"additionalProperties": {
"type": "string"
}
},
"podDisruptionBudget": {
"description": "PgBouncer PodDisruptionBudget.",
"type": "object",
Expand Down
2 changes: 2 additions & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1542,6 +1542,8 @@ pgbouncer:
# annotations to be added to the PgBouncer deployment
annotations: {}

podAnnotations: {}

# Create ServiceAccount
serviceAccount:
# Specifies whether a ServiceAccount should be created
Expand Down
14 changes: 14 additions & 0 deletions tests/charts/test_annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,20 @@ def test_annotations_are_added(self, values, show_only, expected_annotations):
"example": "statsd",
},
),
(
{
"pgbouncer": {
"enabled": True,
"podAnnotations": {
"example": "pgbouncer",
},
},
},
"templates/pgbouncer/pgbouncer-deployment.yaml",
{
"example": "pgbouncer",
},
),
],
)
class TestPerComponentPodAnnotations:
Expand Down