Egress network policy for redis cluster (#16833)

Signed-off-by: Jakub Stachowski <jakub@augnet.co.uk>
This commit is contained in:
qbast
2019-09-05 04:01:10 -07:00
committed by Kubernetes Prow Robot
parent 4adec84729
commit 501faea6f3
2 changed files with 18 additions and 1 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
apiVersion: v1
name: redis
version: 9.1.5
version: 9.1.6
appVersion: 5.0.5
description: Open source, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.
keywords:
+17
View File
@@ -13,6 +13,23 @@ spec:
matchLabels:
app: {{ template "redis.name" . }}
release: "{{ .Release.Name }}"
{{- if ge .Values.cluster.slaveCount 1.0 }}
policyTypes:
- Ingress
- Egress
egress:
# Allow outbound connections to other cluster pods
- ports:
- port: {{ .Values.redisPort }}
{{- if .Values.sentinel.enabled }}
- port: {{ .Values.sentinel.port }}
{{- end }}
to:
- podSelector:
matchLabels:
release: "{{ .Release.Name }}"
app: {{ template "redis.name" . }}
{{- end }}
ingress:
# Allow inbound connections
- ports: