Use different affinity for master and slave in mysql

This commit is contained in:
Carlos Rodriguez Hernandez
2019-09-04 13:59:43 +00:00
parent 10f173888c
commit 5bbec9a873
3 changed files with 20 additions and 9 deletions

View File

@@ -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}` |

View File

@@ -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

View File

@@ -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