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 <salim.salaues@scality.com>
This commit is contained in:
Salim Salaues
2019-11-04 16:06:38 -08:00
committed by Kubernetes Prow Robot
parent 22ea8f331e
commit 80d02acba8
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -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
@@ -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: