diff --git a/stable/redis/Chart.yaml b/stable/redis/Chart.yaml index 1a07d76070..4c6ea1009c 100644 --- a/stable/redis/Chart.yaml +++ b/stable/redis/Chart.yaml @@ -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: diff --git a/stable/redis/templates/networkpolicy.yaml b/stable/redis/templates/networkpolicy.yaml index 560c21a57d..00995c96dd 100644 --- a/stable/redis/templates/networkpolicy.yaml +++ b/stable/redis/templates/networkpolicy.yaml @@ -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: