From 6d2e2e08f3f77474660c0eb8950ddc244a50dffe Mon Sep 17 00:00:00 2001 From: Stanislav Vitkovskiy Date: Tue, 4 Dec 2018 16:48:42 +1100 Subject: [PATCH] [stable/redis] allowing redis-exporter to talk to redis when NetworkPolicy is enabled (#9687) * [stable/redis] allowing redis-exporter to talk to redis when NetworkPolicy is enabled Signed-off-by: Stan Vitkovskiy * [stable/redis] extending NetworkPolicy so that redis-explorer can talk to redis endpoints Signed-off-by: Stan Vitkovskiy --- stable/redis/Chart.yaml | 2 +- stable/redis/templates/networkpolicy.yaml | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/stable/redis/Chart.yaml b/stable/redis/Chart.yaml index 9a493d88b8..c8013b43b9 100644 --- a/stable/redis/Chart.yaml +++ b/stable/redis/Chart.yaml @@ -1,5 +1,5 @@ name: redis -version: 4.3.0 +version: 4.3.1 appVersion: 4.0.11 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 85718fb046..1bc97c229e 100644 --- a/stable/redis/templates/networkpolicy.yaml +++ b/stable/redis/templates/networkpolicy.yaml @@ -22,6 +22,13 @@ spec: - podSelector: matchLabels: {{ template "redis.fullname" . }}-client: "true" + {{- if .Values.metrics.enabled }} + - podSelector: + matchLabels: + release: "{{ .Release.Name }}" + role: metrics + app: {{ template "redis.name" . }} + {{- end }} {{- end }} {{- if .Values.metrics.enabled }} # Allow prometheus scrapes for metrics