From 80d02acba802ee9bf97dd4d88f4c13f491f48492 Mon Sep 17 00:00:00 2001 From: Salim Salaues Date: Mon, 4 Nov 2019 16:06:38 -0800 Subject: [PATCH] bugfix: fix affinity conflict with the helm test pod (#18535) This commit fixes an issue when redis-ha is install on cluster that have a node count equal to the replica count which prevents scheduling of the helm test pod due to the matching labels. Signed-off-by: Salim --- stable/redis-ha/Chart.yaml | 2 +- stable/redis-ha/templates/redis-ha-statefulset.yaml | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/stable/redis-ha/Chart.yaml b/stable/redis-ha/Chart.yaml index 77e5f0566d..7941d88eb8 100644 --- a/stable/redis-ha/Chart.yaml +++ b/stable/redis-ha/Chart.yaml @@ -6,7 +6,7 @@ keywords: - redis - keyvalue - database -version: 3.9.3 +version: 3.9.4 appVersion: 5.0.5 description: Highly available Kubernetes implementation of Redis icon: https://upload.wikimedia.org/wikipedia/en/thumb/6/6b/Redis_Logo.svg/1200px-Redis_Logo.svg.png diff --git a/stable/redis-ha/templates/redis-ha-statefulset.yaml b/stable/redis-ha/templates/redis-ha-statefulset.yaml index 438d1dbb65..f7e3ea7c35 100644 --- a/stable/redis-ha/templates/redis-ha-statefulset.yaml +++ b/stable/redis-ha/templates/redis-ha-statefulset.yaml @@ -3,6 +3,7 @@ kind: StatefulSet metadata: name: {{ template "redis-ha.fullname" . }}-server labels: + {{ template "redis-ha.fullname" . }}: replica {{ include "labels.standard" . | indent 4 }} spec: selector: @@ -29,6 +30,7 @@ spec: labels: release: {{ .Release.Name }} app: {{ template "redis-ha.name" . }} + {{ template "redis-ha.fullname" . }}: replica {{- range $key, $value := .Values.labels }} {{ $key }}: {{ $value }} {{- end }} @@ -60,6 +62,7 @@ spec: matchLabels: app: {{ template "redis-ha.name" . }} release: {{ .Release.Name }} + {{ template "redis-ha.fullname" . }}: replica topologyKey: kubernetes.io/hostname {{- else }} preferredDuringSchedulingIgnoredDuringExecution: @@ -67,6 +70,7 @@ spec: matchLabels: app: {{ template "redis-ha.name" . }} release: {{ .Release.Name }} + {{ template "redis-ha.fullname" . }}: replica topologyKey: kubernetes.io/hostname {{- end }} preferredDuringSchedulingIgnoredDuringExecution: @@ -76,6 +80,7 @@ spec: matchLabels: app: {{ template "redis-ha.name" . }} release: {{ .Release.Name }} + {{ template "redis-ha.fullname" . }}: replica topologyKey: failure-domain.beta.kubernetes.io/zone {{- end }} securityContext: