[bitnami/postgresql] allow custom service labels for primary and read (#32368)

* [bitnami/postgresql] allow custom service labels for primary and read

Signed-off-by: Ivan Korolev <ivaanko@gmail.com>

* fix typo

Signed-off-by: Ivan Korolev <ivaanko@gmail.com>

* bump chart version

Signed-off-by: Ivan Korolev <ivaanko@gmail.com>

* Update CHANGELOG.md

Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>

---------

Signed-off-by: Ivan Korolev <ivaanko@gmail.com>
Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>
Co-authored-by: Bitnami Bot <bitnami.bot@broadcom.com>
This commit is contained in:
Ivan Korolev
2025-03-20 18:19:44 +01:00
committed by GitHub
parent c276082de2
commit 6703679964
6 changed files with 25 additions and 5 deletions

View File

@@ -1,8 +1,12 @@
# Changelog
## 16.5.4 (2025-03-20)
## 16.5.5 (2025-03-20)
* [bitnami/postgresql] Release 16.5.4 ([#32527](https://github.com/bitnami/charts/pull/32527))
* [bitnami/postgresql] allow custom service labels for primary and read ([#32368](https://github.com/bitnami/charts/pull/32368))
## <small>16.5.4 (2025-03-20)</small>
* [bitnami/postgresql] Release 16.5.4 (#32527) ([423422d](https://github.com/bitnami/charts/commit/423422dab9ddcb40b1e8e9bb007ade8e82da7892)), closes [#32527](https://github.com/bitnami/charts/issues/32527)
## <small>16.5.3 (2025-03-19)</small>

View File

@@ -36,4 +36,4 @@ maintainers:
name: postgresql
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/postgresql
version: 16.5.4
version: 16.5.5

View File

@@ -546,6 +546,7 @@ If you already have data in it, you will fail to sync to standby nodes for all c
| `primary.service.ports.postgresql` | PostgreSQL service port | `5432` |
| `primary.service.nodePorts.postgresql` | Node port for PostgreSQL | `""` |
| `primary.service.clusterIP` | Static clusterIP or None for headless services | `""` |
| `primary.service.labels` | Map of labels to add to the primary service | `{}` |
| `primary.service.annotations` | Annotations for PostgreSQL primary service | `{}` |
| `primary.service.loadBalancerClass` | Load balancer class if service type is `LoadBalancer` | `""` |
| `primary.service.loadBalancerIP` | Load balancer IP if service type is `LoadBalancer` | `""` |
@@ -663,6 +664,7 @@ If you already have data in it, you will fail to sync to standby nodes for all c
| `readReplicas.service.ports.postgresql` | PostgreSQL service port | `5432` |
| `readReplicas.service.nodePorts.postgresql` | Node port for PostgreSQL | `""` |
| `readReplicas.service.clusterIP` | Static clusterIP or None for headless services | `""` |
| `readReplicas.service.labels` | Map of labels to add to the read service | `{}` |
| `readReplicas.service.annotations` | Annotations for PostgreSQL read only service | `{}` |
| `readReplicas.service.loadBalancerClass` | Load balancer class if service type is `LoadBalancer` | `""` |
| `readReplicas.service.loadBalancerIP` | Load balancer IP if service type is `LoadBalancer` | `""` |

View File

@@ -8,7 +8,11 @@ kind: Service
metadata:
name: {{ include "postgresql.v1.primary.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- $labels := .Values.commonLabels }}
{{- if .Values.primary.service.labels }}
{{- $labels = include "common.tplvalues.merge" ( dict "values" ( list .Values.primary.service.labels $labels ) "context" . ) }}
{{- end }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: primary
{{- if or .Values.commonAnnotations .Values.primary.service.annotations }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.primary.service.annotations .Values.commonAnnotations ) "context" . ) }}

View File

@@ -9,7 +9,11 @@ kind: Service
metadata:
name: {{ include "postgresql.v1.readReplica.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- $labels := .Values.commonLabels }}
{{- if .Values.readReplicas.service.labels }}
{{- $labels = include "common.tplvalues.merge" ( dict "values" ( list .Values.readReplicas.service.labels $labels ) "context" . ) }}
{{- end }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: read
{{- if or .Values.commonAnnotations .Values.readReplicas.service.annotations }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.readReplicas.service.annotations .Values.commonAnnotations ) "context" . ) }}

View File

@@ -731,6 +731,9 @@ primary:
## clusterIP: None
##
clusterIP: ""
## @param primary.service.labels Map of labels to add to the primary service
##
labels: {}
## @param primary.service.annotations Annotations for PostgreSQL primary service
##
annotations: {}
@@ -1185,6 +1188,9 @@ readReplicas:
## clusterIP: None
##
clusterIP: ""
## @param readReplicas.service.labels Map of labels to add to the read service
##
labels: {}
## @param readReplicas.service.annotations Annotations for PostgreSQL read only service
##
annotations: {}