diff --git a/bitnami/postgresql/CHANGELOG.md b/bitnami/postgresql/CHANGELOG.md
index 808d1c1295..ed5ce19084 100644
--- a/bitnami/postgresql/CHANGELOG.md
+++ b/bitnami/postgresql/CHANGELOG.md
@@ -1,8 +1,12 @@
# Changelog
-## 16.4.16 (2025-03-03)
+## 16.5.0 (2025-03-10)
-* [bitnami/postgresql] Release 16.4.16 ([#32250](https://github.com/bitnami/charts/pull/32250))
+* [bitnami/postgresql] Add secretAnnotation value ([#31984](https://github.com/bitnami/charts/pull/31984))
+
+## 16.4.16 (2025-03-03)
+
+* [bitnami/postgresql] Release 16.4.16 (#32250) ([353c702](https://github.com/bitnami/charts/commit/353c702d65c42071ba93ae2d01286528fc8a0c9f)), closes [#32250](https://github.com/bitnami/charts/issues/32250)
## 16.4.15 (2025-03-03)
diff --git a/bitnami/postgresql/Chart.yaml b/bitnami/postgresql/Chart.yaml
index 8da632e067..4dbaae852b 100644
--- a/bitnami/postgresql/Chart.yaml
+++ b/bitnami/postgresql/Chart.yaml
@@ -35,4 +35,4 @@ maintainers:
name: postgresql
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/postgresql
-version: 16.4.16
+version: 16.5.0
diff --git a/bitnami/postgresql/README.md b/bitnami/postgresql/README.md
index c29f88f0c2..bd6b8d6b93 100644
--- a/bitnami/postgresql/README.md
+++ b/bitnami/postgresql/README.md
@@ -372,6 +372,7 @@ If you already have data in it, you will fail to sync to standby nodes for all c
| `extraDeploy` | Array of extra objects to deploy with the release (evaluated as a template) | `[]` |
| `commonLabels` | Add labels to all the deployed resources | `{}` |
| `commonAnnotations` | Add annotations to all the deployed resources | `{}` |
+| `secretAnnotations` | Add annotations to the secrets | `{}` |
| `diagnosticMode.enabled` | Enable diagnostic mode (all probes will be disabled and the command will be overridden) | `false` |
| `diagnosticMode.command` | Command to override all containers in the statefulset | `["sleep"]` |
| `diagnosticMode.args` | Args to override all containers in the statefulset | `["infinity"]` |
diff --git a/bitnami/postgresql/templates/secrets.yaml b/bitnami/postgresql/templates/secrets.yaml
index 075f9f55a2..a41a73ab91 100644
--- a/bitnami/postgresql/templates/secrets.yaml
+++ b/bitnami/postgresql/templates/secrets.yaml
@@ -33,8 +33,14 @@ metadata:
name: {{ include "common.names.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
- {{- if .Values.commonAnnotations }}
- annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- if or .Values.secretAnnotations .Values.commonAnnotations }}
+ annotations:
+ {{- if .Values.secretAnnotations }}
+ {{- include "common.tplvalues.render" ( dict "value" .Values.secretAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+ {{- if .Values.commonAnnotations }}
+ {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
{{- end }}
type: Opaque
data:
@@ -61,8 +67,14 @@ metadata:
name: {{ include "common.names.fullname" . }}-svcbind-postgres
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
- {{- if .Values.commonAnnotations }}
- annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- if or .Values.secretAnnotations .Values.commonAnnotations }}
+ annotations:
+ {{- if .Values.secretAnnotations }}
+ {{- include "common.tplvalues.render" ( dict "value" .Values.secretAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+ {{- if .Values.commonAnnotations }}
+ {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
{{- end }}
type: servicebinding.io/postgresql
data:
@@ -83,8 +95,14 @@ metadata:
name: {{ include "common.names.fullname" . }}-svcbind-custom-user
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
- {{- if .Values.commonAnnotations }}
- annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- if or .Values.secretAnnotations .Values.commonAnnotations }}
+ annotations:
+ {{- if .Values.secretAnnotations }}
+ {{- include "common.tplvalues.render" ( dict "value" .Values.secretAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
+ {{- if .Values.commonAnnotations }}
+ {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
+ {{- end }}
{{- end }}
type: servicebinding.io/postgresql
data:
diff --git a/bitnami/postgresql/values.yaml b/bitnami/postgresql/values.yaml
index d1ac0ba724..78cd0690dd 100644
--- a/bitnami/postgresql/values.yaml
+++ b/bitnami/postgresql/values.yaml
@@ -85,6 +85,9 @@ commonLabels: {}
## @param commonAnnotations Add annotations to all the deployed resources
##
commonAnnotations: {}
+## @param secretAnnotations Add annotations to the secrets
+##
+secretAnnotations: {}
## Enable diagnostic mode in the statefulset
##
diagnosticMode: