Skip to content

Commit

Permalink
[stable/mysql] add basic affinity support (helm#12054) (helm#21858)
Browse files Browse the repository at this point in the history
Signed-off-by: Niels Nuyttens <niels.nuyttens@gmail.com>
Signed-off-by: Miguel Mingorance <miguel.mingorance@deliveryhero.com>
  • Loading branch information
nielsn authored and Miguel Mingorance committed Aug 28, 2020
1 parent e6d9ffd commit 186d0c1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stable/mysql/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: mysql
version: 1.6.2
version: 1.6.3
appVersion: 5.7.28
description: Fast, reliable, scalable, and easy to use open-source relational database
system.
Expand Down
1 change: 1 addition & 0 deletions stable/mysql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ The following table lists the configurable parameters of the MySQL chart and the
| `persistence.subPath` | Subdirectory of the volume to mount | `nil` |
| `persistence.annotations` | Persistent Volume annotations | {} |
| `nodeSelector` | Node labels for pod assignment | {} |
| `affinity` | Affinity rules for pod assignment | {} |
| `tolerations` | Pod taint tolerations for deployment | {} |
| `metrics.enabled` | Start a side-car prometheus exporter | `false` |
| `metrics.image` | Exporter image | `prom/mysqld-exporter` |
Expand Down
4 changes: 4 additions & 0 deletions stable/mysql/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ spec:
{{- if .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
{{- end }}
{{- if .Values.affinity }}
affinity:
{{ toYaml .Values.affinity | indent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
Expand Down
4 changes: 4 additions & 0 deletions stable/mysql/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ extraInitContainers: |
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
nodeSelector: {}

## Affinity
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
affinity: {}

## Tolerations for pod assignment
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
##
Expand Down

0 comments on commit 186d0c1

Please sign in to comment.