diff --git a/bitnami/kafka/Chart.yaml b/bitnami/kafka/Chart.yaml index b5995108b69b19..e74f084fe34cbe 100644 --- a/bitnami/kafka/Chart.yaml +++ b/bitnami/kafka/Chart.yaml @@ -40,4 +40,4 @@ maintainers: name: kafka sources: - https://github.com/bitnami/charts/tree/main/bitnami/kafka -version: 30.0.1 +version: 30.0.2 diff --git a/bitnami/kafka/templates/networkpolicy.yaml b/bitnami/kafka/templates/networkpolicy.yaml index 9407c6252b0840..79f3811b1158dc 100644 --- a/bitnami/kafka/templates/networkpolicy.yaml +++ b/bitnami/kafka/templates/networkpolicy.yaml @@ -67,11 +67,15 @@ spec: {{ include "common.names.fullname" . }}-client: "true" - podSelector: matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 14 }} - {{- if .Values.networkPolicy.ingressNSMatchLabels }} + {{- if or .Values.networkPolicy.ingressNSMatchLabels .Values.networkPolicy.ingressNSPodMatchLabels }} - namespaceSelector: matchLabels: - {{- range $key, $value := .Values.networkPolicy.ingressNSMatchLabels }} - {{ $key | quote }}: {{ $value | quote }} + {{- if .Values.networkPolicy.ingressNSMatchLabels }} + {{- range $key, $value := .Values.networkPolicy.ingressNSMatchLabels }} + {{ $key | quote }}: {{ $value | quote }} + {{- end }} + {{ else }} + {} {{- end }} {{- if .Values.networkPolicy.ingressNSPodMatchLabels }} podSelector: