From 5bbec9a87350b0bd27d2afdb4059233ffd4e3ef4 Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Hernandez Date: Wed, 4 Sep 2019 13:59:43 +0000 Subject: [PATCH] Use different affinity for master and slave in mysql --- bitnami/mysql/README.md | 3 ++- bitnami/mysql/values-production.yaml | 13 +++++++++---- bitnami/mysql/values.yaml | 13 +++++++++---- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/bitnami/mysql/README.md b/bitnami/mysql/README.md index 4acdb72ae..ad190b362 100644 --- a/bitnami/mysql/README.md +++ b/bitnami/mysql/README.md @@ -104,6 +104,7 @@ The following tables lists the configurable parameters of the MySQL chart and th | `master.readinessProbe.timeoutSeconds` | When the probe times out (master) | `1` | | `master.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | | `master.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | +| `master.affinity` | Map of master node/pod affinities | `{}` | | `slave.replicas` | Desired number of slave replicas | `1` | | `slave.antiAffinity` | Slave pod anti-affinity policy | `soft` | | `slave.updateStrategy.type` | Slave statefulset update strategy policy | `RollingUpdate` | @@ -127,7 +128,7 @@ The following tables lists the configurable parameters of the MySQL chart and th | `slave.readinessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | | `slave.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | | `slave.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | -| `affinity` | Map of node/pod affinities | `{}` | +| `slave.affinity` | Map of slave node/pod affinities | `{}` | | `metrics.enabled` | Start a side-car prometheus exporter | `false` | | `metrics.image` | Exporter image name | `bitnami/mysqld-exporter` | | `metrics.imageTag` | Exporter image tag | `{TAG_NAME}` | diff --git a/bitnami/mysql/values-production.yaml b/bitnami/mysql/values-production.yaml index 8f180e18d..4ae40d95f 100644 --- a/bitnami/mysql/values-production.yaml +++ b/bitnami/mysql/values-production.yaml @@ -210,6 +210,11 @@ master: successThreshold: 1 failureThreshold: 3 + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + slave: replicas: 2 antiAffinity: soft @@ -288,10 +293,10 @@ slave: successThreshold: 1 failureThreshold: 3 -## Affinity for pod assignment -## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity -## -affinity: {} + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} metrics: enabled: true diff --git a/bitnami/mysql/values.yaml b/bitnami/mysql/values.yaml index 7d05a4a9e..5bdbd386b 100644 --- a/bitnami/mysql/values.yaml +++ b/bitnami/mysql/values.yaml @@ -210,6 +210,11 @@ master: successThreshold: 1 failureThreshold: 3 + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + slave: replicas: 1 antiAffinity: soft @@ -288,10 +293,10 @@ slave: successThreshold: 1 failureThreshold: 3 -## Affinity for pod assignment -## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity -## -affinity: {} + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} metrics: enabled: false