mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
Introduce hard antiAffinity and simplify config using matchLabels instead of matchExpressions (#1629)
This commit is contained in:
committed by
Adnan Abdulhussein
parent
e002378c13
commit
4f1e2ea355
@@ -1,5 +1,5 @@
|
||||
name: memcached
|
||||
version: 1.1.0
|
||||
version: 1.2.0
|
||||
description: Free & open source, high-performance, distributed memory object caching system.
|
||||
keywords:
|
||||
- memcached
|
||||
|
||||
@@ -20,16 +20,23 @@ spec:
|
||||
spec:
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
{{- if eq .Values.AntiAffinity "hard" }}
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- topologyKey: "kubernetes.io/hostname"
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
app: {{ template "fullname" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
{{- else if eq .Values.AntiAffinity "soft" }}
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- weight: 5
|
||||
podAffinityTerm:
|
||||
- topologyKey: "kubernetes.io/hostname"
|
||||
labelSelector:
|
||||
matchExpressions:
|
||||
- key: app
|
||||
operator: In
|
||||
values:
|
||||
- "{{ template "fullname" . }}"
|
||||
topologyKey: "kubernetes.io/hostname"
|
||||
matchLabels:
|
||||
app: {{ template "fullname" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ template "fullname" . }}
|
||||
image: {{ .Values.image }}
|
||||
|
||||
@@ -12,6 +12,9 @@ image: memcached:1.4.36-alpine
|
||||
|
||||
##Replica count
|
||||
replicaCount: 3
|
||||
|
||||
## Select AnitAffinity as either hard or soft, default is hard
|
||||
AntiAffinity: "hard"
|
||||
|
||||
memcached:
|
||||
## Various values that get set as command-line flags.
|
||||
|
||||
Reference in New Issue
Block a user