mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-28 16:28:45 -03:30
feat: support cilium 1.13.1 (#9914)
Cilium 1.13.1 changed how the cilium-cni binary gets placed in /opt/cni/bin, so that it takes place in an init container rather than in the main agent.
This commit is contained in:
@@ -149,8 +149,10 @@ spec:
|
|||||||
mountPropagation: Bidirectional
|
mountPropagation: Bidirectional
|
||||||
- name: cilium-run
|
- name: cilium-run
|
||||||
mountPath: /var/run/cilium
|
mountPath: /var/run/cilium
|
||||||
|
{% if cilium_version | regex_replace('v') is version('1.13.1', '<') %}
|
||||||
- name: cni-path
|
- name: cni-path
|
||||||
mountPath: /host/opt/cni/bin
|
mountPath: /host/opt/cni/bin
|
||||||
|
{% endif %}
|
||||||
- name: etc-cni-netd
|
- name: etc-cni-netd
|
||||||
mountPath: /host/etc/cni/net.d
|
mountPath: /host/etc/cni/net.d
|
||||||
{% if cilium_identity_allocation_mode == "kvstore" %}
|
{% if cilium_identity_allocation_mode == "kvstore" %}
|
||||||
@@ -304,6 +306,24 @@ spec:
|
|||||||
requests:
|
requests:
|
||||||
cpu: 100m
|
cpu: 100m
|
||||||
memory: 100Mi
|
memory: 100Mi
|
||||||
|
{% if cilium_version | regex_replace('v') is version('1.13.1', '>=') %}
|
||||||
|
# Install the CNI binaries in an InitContainer so we don't have a writable host mount in the agent
|
||||||
|
- name: install-cni-binaries
|
||||||
|
image: "{{cilium_image_repo}}:{{cilium_image_tag}}"
|
||||||
|
imagePullPolicy: {{ k8s_image_pull_policy }}
|
||||||
|
command:
|
||||||
|
- "/install-plugin.sh"
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 10Mi
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
|
terminationMessagePolicy: FallbackToLogsOnError
|
||||||
|
volumeMounts:
|
||||||
|
- name: cni-path
|
||||||
|
mountPath: /host/opt/cni/bin
|
||||||
|
{% endif %}
|
||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
priorityClassName: system-node-critical
|
priorityClassName: system-node-critical
|
||||||
serviceAccount: cilium
|
serviceAccount: cilium
|
||||||
|
|||||||
Reference in New Issue
Block a user