Skip to content
This repository has been archived by the owner on Sep 1, 2024. It is now read-only.

Commit

Permalink
Ensure addon-resizer 1.8.11 only effective at arch amd64. (kubernetes…
Browse files Browse the repository at this point in the history
…-sigs#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
  • Loading branch information
zhengtianbao authored Nov 1, 2021
1 parent b353e06 commit 9d4cdb7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions roles/kubernetes-apps/metrics_server/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
6 changes: 6 additions & 0 deletions roles/kubernetes-apps/metrics_server/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 9d4cdb7

Please sign in to comment.