mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
Add support for pod antiAffinity (#5459)
* Add affinity support (defaults to hard antiAffinity between components) * Bump to next minor version
This commit is contained in:
committed by
k8s-ci-robot
parent
21a5ed3890
commit
47644a7935
@@ -5,7 +5,7 @@ keywords:
|
||||
- redis
|
||||
- keyvalue
|
||||
- database
|
||||
version: 2.1.3
|
||||
version: 2.2.0
|
||||
appVersion: 4.0.8-r0
|
||||
description: Highly available Redis cluster with multiple sentinels and standbys.
|
||||
icon: https://upload.wikimedia.org/wikipedia/en/thumb/6/6b/Redis_Logo.svg/1200px-Redis_Logo.svg.png
|
||||
|
||||
@@ -67,6 +67,8 @@ The following table lists the configurable parameters of the Redis chart and the
|
||||
| `replicas.sentinels` | Number of sentinel pods | 3 |
|
||||
| `nodeSelector` | Node labels for pod assignment | {} |
|
||||
| `tolerations` | Toleration labels for pod assignment | [] |
|
||||
| `sentinelAffinity` | Affinity for pod assignment of sentinels | hard antiaffinity between sentinels |
|
||||
| `serverAffinity` | Affinity for pod assignment of servers | hard antiaffinity between servers |
|
||||
| `servers.serviceType` | Set to "LoadBalancer" to enable access from the VPC | ClusterIP |
|
||||
| `servers.annotations` | See Appliance mode | `` |
|
||||
| `rbac.create` | whether RBAC resources should be created | true |
|
||||
|
||||
@@ -23,6 +23,8 @@ spec:
|
||||
tolerations:
|
||||
{{ toYaml .Values.tolerations | indent 8 }}
|
||||
{{- end }}
|
||||
affinity:
|
||||
{{ tpl .Values.sentinelAffinity . | indent 8 }}
|
||||
containers:
|
||||
- name: sentinel
|
||||
image: {{ .Values.redis_image }}
|
||||
|
||||
@@ -27,6 +27,8 @@ spec:
|
||||
tolerations:
|
||||
{{ toYaml .Values.tolerations | indent 8 }}
|
||||
{{- end }}
|
||||
affinity:
|
||||
{{ tpl .Values.serverAffinity . | indent 8 }}
|
||||
containers:
|
||||
- name: redis
|
||||
image: {{ .Values.redis_image }}
|
||||
|
||||
@@ -15,11 +15,30 @@ resources:
|
||||
limits:
|
||||
memory: 200Mi
|
||||
|
||||
## Node labels and tolerations for pod assignment
|
||||
## Node labels, tolerations, and affinities for pod assignment
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
nodeSelector: {}
|
||||
tolerations: []
|
||||
sentinelAffinity: |
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- labelSelector:
|
||||
matchLabels:
|
||||
app: {{ template "redis-ha.name" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
component: sentinel
|
||||
topologyKey: kubernetes.io/hostname
|
||||
serverAffinity: |
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- labelSelector:
|
||||
matchLabels:
|
||||
app: {{ template "redis-ha.name" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
component: server
|
||||
topologyKey: kubernetes.io/hostname
|
||||
|
||||
## Redis image version
|
||||
redis_image: quay.io/smile/redis:4.0.8r0
|
||||
|
||||
Reference in New Issue
Block a user