[stable/redis] Allow slave pods to connect to master when networkPolicy is enabled (#15082)

* Adding network policy label for slave pods

Signed-off-by: YITAEK HWANG <yitaek@gmail.com>

* [stable/redis] fixing ordering of if statements in networkpolicy

Signed-off-by: YITAEK HWANG <yitaek@gmail.com>
This commit is contained in:
Yitaek Hwang
2019-06-27 21:29:19 -07:00
committed by Kubernetes Prow Robot
parent 7d766f4134
commit bd46cc489e
2 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
apiVersion: v1
name: redis
version: 8.0.12
version: 8.0.13
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:
@@ -32,6 +32,13 @@ spec:
role: metrics
app: {{ template "redis.name" . }}
{{- end }}
{{- if ge .Values.cluster.slaveCount 1.0 }}
- podSelector:
matchLabels:
release: "{{ .Release.Name }}"
role: slave
app: {{ template "redis.name" . }}
{{- end }}
{{- end }}
{{- if .Values.metrics.enabled }}
# Allow prometheus scrapes for metrics