Ensure addon-resizer 1.8.11 only effective at arch amd64. (#8144)

* Ensure addon-resizer 1.8.11 only effective at arch amd64.

k8s.gcr.io/addon-resizer:1.8.11 returns the amd64 image which is not executable at arm64.

Disable addon-resizer when the platform is not amd64.

When metrics-server upgrade and use addon-resizer:2.3, then revert this
commit and `image_arch` will determine the `addon_resizer_image_tag`.

* Add metrics_server_resizer architectures check
pull/8147/head
zhengtianbao 2021-11-01 23:21:19 +08:00 committed by GitHub
parent b353e062c7
commit 9d4cdb7b02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -1,4 +1,5 @@
---
# metrics_server_resizer only effective in arch amd64
metrics_server_resizer: false
metrics_server_kubelet_insecure_tls: true
metrics_server_kubelet_preferred_address_types: "InternalIP"

View File

@ -4,6 +4,12 @@
set_fact:
masters_are_not_tainted: "{{ groups['kube_node'] | intersect(groups['kube_control_plane']) == groups['kube_control_plane'] }}"
- name: check host_architecture is amd64 for metrics_server_resizer
assert:
that: host_architecture == "amd64"
msg: "metrics_server_resizer is not available on other architectures than amd64"
when: metrics_server_resizer
- name: Metrics Server | Delete addon dir
file:
path: "{{ kube_config_dir }}/addons/metrics_server"