Skip to content

Commit

Permalink
Add multi architeture support to flannel (kubernetes-sigs#6166)
Browse files Browse the repository at this point in the history
Signed-off-by: Victor Morales <v.morales@samsung.com>
  • Loading branch information
electrocucaracha authored and LuckySB committed Jan 16, 2021
1 parent 54a6a92 commit d9cfa2f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions roles/network_plugin/flannel/templates/cni-flannel.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,16 @@ data:
{% endif %}
}
}
{% for arch in ['amd64', 'arm64', 'arm', 'ppc64le', 's390x'] %}
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
{% if arch == 'amd64' %}
name: kube-flannel
{% else %}
name: kube-flannel-ds-{{ arch }}
{% endif %}
namespace: kube-system
labels:
tier: node
Expand All @@ -61,7 +66,7 @@ spec:
serviceAccountName: flannel
containers:
- name: kube-flannel
image: {{ flannel_image_repo }}:{{ flannel_image_tag }}
image: {{ flannel_image_repo }}:{{ flannel_image_tag }}-{{ arch }}
imagePullPolicy: {{ k8s_image_pull_policy }}
resources:
limits:
Expand Down Expand Up @@ -101,10 +106,10 @@ spec:
- key: kubernetes.io/arch
operator: In
values:
- amd64
- {{ arch }}
initContainers:
- name: install-cni
image: {{ flannel_image_repo }}:{{ flannel_image_tag }}
image: {{ flannel_image_repo }}:{{ flannel_image_tag }}-{{ arch }}
command:
- cp
args:
Expand Down Expand Up @@ -137,3 +142,4 @@ spec:
rollingUpdate:
maxUnavailable: {{ serial | default('20%') }}
type: RollingUpdate
{% endfor %}

0 comments on commit d9cfa2f

Please sign in to comment.