[bitnami/zookeeper] Fix NetworkPolicy (#7398)

Signed-off-by: juan131 <juanariza@vmware.com>
This commit is contained in:
Juan Ariza Toledano
2021-09-03 15:55:43 +02:00
committed by GitHub
parent 55aa59e7a9
commit 74a039ce33
2 changed files with 10 additions and 12 deletions
+1 -1
View File
@@ -21,4 +21,4 @@ name: zookeeper
sources:
- https://github.com/bitnami/bitnami-docker-zookeeper
- https://zookeeper.apache.org/
version: 7.4.2
version: 7.4.3
+9 -11
View File
@@ -14,30 +14,28 @@ metadata:
spec:
podSelector:
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
policyTypes:
- Ingress
ingress:
# Allow inbound connections to zookeeper
- ports:
- port: {{ .Values.service.port }}
from:
- port: {{ .Values.containerPort }}
{{- if .Values.metrics.enabled }}
- port: {{ .Values.metrics.containerPort }}
{{- end }}
{{- if not .Values.networkPolicy.allowExternal }}
from:
- podSelector:
matchLabels:
{{ include "common.names.fullname" . }}-client: "true"
- podSelector:
matchLabels: {{- include "common.labels.matchLabels" . | nindent 14 }}
{{- else }}
- podSelector:
matchLabels: {}
{{- end }}
# Internal ports
- ports: &intranodes_ports
# Allow internal communications between nodes
- ports:
- port: {{ .Values.service.followerPort }}
- port: {{ .Values.service.electionPort }}
from:
- podSelector:
matchLabels: {{- include "common.labels.matchLabels" . | nindent 14 }}
egress:
- ports: *intranodes_ports
# Allow outbound connections from zookeeper nodes
{{- end }}