From 0e6ffa22f729d755db3c4903fa9e6eb1e872854e Mon Sep 17 00:00:00 2001 From: Jingzhao Ni Date: Mon, 13 Aug 2018 09:18:20 +0800 Subject: Change the dashboard and heapster images in k8s to arm64 when running on arm platform Change the dashboard image in k8s from amd64 to arm64 on arm platform. In extra-vars-aarch64.yml, add the dashboard image tag for supporting the arm64 arch. For heapster images, add a "sed" command in main.yml for replacing the cpu architecture from amd64 to arm64. And it will be invoked only when deploying the arm platform. Change-Id: I584485f0356dcb925814f63cbc45ecbd459715bb Signed-off-by: Jingzhao Ni --- deploy/adapters/ansible/kubernetes/roles/post-k8s/tasks/main.yml | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'deploy/adapters/ansible/kubernetes/roles/post-k8s/tasks/main.yml') diff --git a/deploy/adapters/ansible/kubernetes/roles/post-k8s/tasks/main.yml b/deploy/adapters/ansible/kubernetes/roles/post-k8s/tasks/main.yml index 1c691b8e..d382a5e1 100644 --- a/deploy/adapters/ansible/kubernetes/roles/post-k8s/tasks/main.yml +++ b/deploy/adapters/ansible/kubernetes/roles/post-k8s/tasks/main.yml @@ -46,6 +46,15 @@ - heapster.enabled - inventory_hostname == groups['kube_master'][0] +- name: replace the cpu architecture for aarch64 + shell: | + cd "{{ local_release_dir }}/heapster/heapster-{{ heapster.version }}/deploy/"; + find ./kube-config -name "*.yaml" -exec sed -i "s/amd64/arm64/g" {} \; + when: + - heapster.enabled + - inventory_hostname == groups['kube_master'][0] + - ansible_architecture == "aarch64" + - name: install the heapster shell: | cd "{{ local_release_dir }}/heapster/heapster-{{ heapster.version }}/deploy/"; -- cgit 1.2.3-korg