Skip to content

Commit 9eb36d0

Browse files
committed
chore(redis): allow networkpolicy egress
1 parent aee8880 commit 9eb36d0

2 files changed

Lines changed: 2 additions & 33 deletions

File tree

addons/redis-cluster/7.0/chart/redis-cluster/templates/networkpolicy.yaml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,7 @@ spec:
2020
- Ingress
2121
- Egress
2222
egress:
23-
# Allow dns resolution
24-
- ports:
25-
- port: 53
26-
protocol: UDP
27-
# Allow outbound connections to other cluster pods
28-
- ports:
29-
- port: {{ .Values.redis.containerPorts.redis }}
30-
- port: {{ .Values.redis.containerPorts.bus }}
31-
- port: {{ .Values.proxy.containerPorts.proxy }}
32-
to:
33-
- podSelector:
34-
matchLabels: {{- include "common.labels.matchLabels" . | nindent 14 }}
23+
- {}
3524
ingress:
3625
{{- if eq .Values.service.type "LoadBalancer" }}
3726
- {}

addons/redis/7.0/chart/redis/templates/networkpolicy.yaml

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,7 @@ spec:
1919
{{- if or (eq .Values.architecture "replication") .Values.networkPolicy.extraEgress }}
2020
- Egress
2121
egress:
22-
{{- if eq .Values.architecture "replication" }}
23-
# Allow dns resolution
24-
- ports:
25-
- port: 53
26-
protocol: UDP
27-
# Allow outbound connections to other cluster pods
28-
- ports:
29-
- port: {{ .Values.master.containerPorts.redis }}
30-
{{- if .Values.sentinel.enabled }}
31-
- port: {{ .Values.sentinel.containerPorts.sentinel }}
32-
{{- end }}
33-
{{- if .Values.proxy.enabled }}
34-
- port: {{ .Values.proxy.containerPorts.proxy }}
35-
{{- end }}
36-
to:
37-
- podSelector:
38-
matchLabels: {{- include "common.labels.matchLabels" . | nindent 14 }}
39-
{{- end }}
40-
{{- if .Values.networkPolicy.extraEgress }}
41-
{{- include "common.tplvalues.render" ( dict "value" .Values.networkPolicy.extraEgress "context" $ ) | nindent 4 }}
42-
{{- end }}
22+
- {}
4323
{{- end }}
4424
ingress:
4525
{{- if or (eq .Values.sentinel.service.type "LoadBalancer") (eq .Values.master.service.type "LoadBalancer") (eq .Values.replica.service.type "LoadBalancer") }}

0 commit comments

Comments
 (0)