Change the dashboard and heapster images in k8s to arm64 when running on arm platform 83/60883/1
authorJingzhao Ni <jingzhao.ni@arm.com>
Mon, 13 Aug 2018 01:18:20 +0000 (09:18 +0800)
committerJingzhao Ni <jingzhao.ni@arm.com>
Mon, 13 Aug 2018 01:18:20 +0000 (09:18 +0800)
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 <jingzhao.ni@arm.com>
deploy/adapters/ansible/kubernetes/roles/kargo/files/extra-vars-aarch64.yml
deploy/adapters/ansible/kubernetes/roles/post-k8s/tasks/main.yml

index 2e31cbd..ae3dce7 100644 (file)
@@ -14,6 +14,7 @@ dnsmasq_nanny_image_repo: "gcr.io/google_containers/k8s-dns-dnsmasq-nanny-arm64"
 dnsmasq_sidecar_image_repo: "gcr.io/google_containers/k8s-dns-sidecar-arm64"
 kubednsautoscaler_image_repo: "gcr.io/google_containers/\
 cluster-proportional-autoscaler-arm64"
+dashboard_image_repo: "gcr.io/google_containers/kubernetes-dashboard-arm64"
 
 # inventory/group_vars/k8s-cluster.yml
 kube_network_plugin: flannel
index 1c691b8..d382a5e 100644 (file)
     - 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/";