mirror of
https://github.com/cozystack/cozystack.git
synced 2026-12-05 14:42:05 +09:00
fix(kubernetes): keep cluster-autoscaler on the v1beta1 Cluster API
The tenant cluster-autoscaler reads the newest Cluster API version the management cluster serves unless CAPI_VERSION names one. With Cluster API v1.13 that is v1beta2, and the 1.32 build shipped here predates the autoscaler fixes for reading v1beta2: scale from zero (kubernetes/autoscaler#8410, in 1.34) and infrastructure reference lookup (kubernetes/autoscaler#9458, in 1.36). The pools here carry capacity annotations for scale from zero, so that path is in use. Pinning v1beta1 keeps the autoscaler on the API it was built against. Cluster API serves v1beta1 until v1.16, which leaves time to move the image to a release with both fixes and drop the pin. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la>
This commit is contained in:
2 files changed
+20
No files matched your search
@@ -46,6 +46,15 @@ spec:
|
||||
requests:
|
||||
cpu: 125m
|
||||
memory: 128Mi
|
||||
{{- /* Without CAPI_VERSION the autoscaler reads the newest Cluster API
|
||||
version the management cluster serves, which is v1beta2 from
|
||||
Cluster API v1.11. The 1.32 build lacks the fixes for reading
|
||||
v1beta2 (kubernetes/autoscaler#8410 for scale from zero, #9458
|
||||
for infrastructure references), so it stays on v1beta1, served
|
||||
until Cluster API v1.16, until the image moves past them. */}}
|
||||
env:
|
||||
- name: CAPI_VERSION
|
||||
value: v1beta1
|
||||
command:
|
||||
- /cluster-autoscaler
|
||||
args:
|
||||
|
||||
@@ -36,3 +36,14 @@ tests:
|
||||
- notContains:
|
||||
path: spec.template.spec.containers[0].args
|
||||
content: --force-delete-unregistered-nodes=true
|
||||
|
||||
- it: pins the Cluster API version the autoscaler reads to v1beta1
|
||||
documentSelector:
|
||||
path: kind
|
||||
value: Deployment
|
||||
asserts:
|
||||
- contains:
|
||||
path: spec.template.spec.containers[0].env
|
||||
content:
|
||||
name: CAPI_VERSION
|
||||
value: v1beta1
|
||||
Reference in new issue
Block a user