From 7ef876ceb4e94d8d48d8b1f756608b05a8f14f80 Mon Sep 17 00:00:00 2001 From: Denis Forveille Date: Fri, 16 Feb 2024 04:31:20 -0500 Subject: [PATCH] [bitnami/postgresql] Do not create a NetworkPolicy for "read" instance when "standalone" (#23392) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Do not create a NetworkPolicy for "read" instance when "standalone" In "standalone" mode, no component is created except an extra "NetworkPolicy" object This PR disables the creation of the NetworkPolicy for the "read" instances Signed-off-by: Denis Forveille * Bump chart version +0.0.1 Signed-off-by: Denis Forveille * Update Chart.yaml Signed-off-by: Denis Forveille --------- Signed-off-by: Denis Forveille Signed-off-by: Ibone González Mauraza Co-authored-by: Ibone González Mauraza --- bitnami/postgresql/Chart.yaml | 2 +- bitnami/postgresql/templates/read/networkpolicy.yaml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bitnami/postgresql/Chart.yaml b/bitnami/postgresql/Chart.yaml index 49ca338730..eb6a99de55 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: 14.1.0 +version: 14.1.1 diff --git a/bitnami/postgresql/templates/read/networkpolicy.yaml b/bitnami/postgresql/templates/read/networkpolicy.yaml index 8df6232750..b59777195f 100644 --- a/bitnami/postgresql/templates/read/networkpolicy.yaml +++ b/bitnami/postgresql/templates/read/networkpolicy.yaml @@ -3,6 +3,7 @@ Copyright VMware, Inc. SPDX-License-Identifier: APACHE-2.0 */}} +{{- if eq .Values.architecture "replication" }} {{- if .Values.readReplicas.networkPolicy.enabled }} kind: NetworkPolicy apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }} @@ -76,3 +77,4 @@ spec: {{- include "common.tplvalues.render" ( dict "value" .Values.readReplicas.networkPolicy.extraIngress "context" $ ) | nindent 4 }} {{- end }} {{- end }} +{{- end }}