fix(dbaas): relax MySQL anti-affinity from required to preferred
Avoids pods getting stuck Pending during node outages while still preferring to spread across nodes.
This commit is contained in:
parent
ee66560661
commit
65551e4602
1 changed files with 8 additions and 9 deletions
|
|
@ -265,17 +265,16 @@ resource "helm_release" "mysql_cluster" {
|
|||
}
|
||||
}
|
||||
podAntiAffinity = {
|
||||
# Required anti-affinity: MySQL pods MUST be on different nodes.
|
||||
# During node loss, one pod will be Pending — this is acceptable because
|
||||
# InnoDB Cluster operates with 2/3 members (OK_NO_TOLERANCE).
|
||||
# The descheduler (every 5 min) handles violations if any occur.
|
||||
requiredDuringSchedulingIgnoredDuringExecution = [{
|
||||
labelSelector = {
|
||||
matchLabels = {
|
||||
"component" = "mysqld"
|
||||
preferredDuringSchedulingIgnoredDuringExecution = [{
|
||||
weight = 100
|
||||
podAffinityTerm = {
|
||||
labelSelector = {
|
||||
matchLabels = {
|
||||
"component" = "mysqld"
|
||||
}
|
||||
}
|
||||
topologyKey = "kubernetes.io/hostname"
|
||||
}
|
||||
topologyKey = "kubernetes.io/hostname"
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue