change maxUnavailable to integer (#535)
change maxUnavailable from `null` to `integer` to enable upgrade from 0.11.0 to 0.12.0 when using the specific variable. * Also allow null value Co-authored-by: Theron Voran <tvoran@users.noreply.github.com> * add test for server.ha.disruptionBudget.maxUnavailable Co-authored-by: Theron Voran <tvoran@users.noreply.github.com>
This commit is contained in:
parent
828b31287b
commit
458876007a
2 changed files with 16 additions and 1 deletions
|
@ -85,3 +85,15 @@ load _helpers
|
||||||
yq '.spec.maxUnavailable' | tee /dev/stderr)
|
yq '.spec.maxUnavailable' | tee /dev/stderr)
|
||||||
[ "${actual}" = "2" ]
|
[ "${actual}" = "2" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "server/DisruptionBudget: correct maxUnavailable with custom value" {
|
||||||
|
cd `chart_dir`
|
||||||
|
local actual=$(helm template \
|
||||||
|
--show-only templates/server-disruptionbudget.yaml \
|
||||||
|
--set 'server.ha.enabled=true' \
|
||||||
|
--set 'server.ha.replicas=3' \
|
||||||
|
--set 'server.ha.disruptionBudget.maxUnavailable=2' \
|
||||||
|
. | tee /dev/stderr |
|
||||||
|
yq '.spec.maxUnavailable' | tee /dev/stderr)
|
||||||
|
[ "${actual}" = "2" ]
|
||||||
|
}
|
|
@ -484,7 +484,10 @@
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"maxUnavailable": {
|
"maxUnavailable": {
|
||||||
"type": "null"
|
"type": [
|
||||||
|
"null",
|
||||||
|
"integer"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue