c12s-kubespray/roles/network_plugin/multus/templates/multus-daemonset.yml.j2
2022-06-21 10:56:26 -07:00

71 lines
1.8 KiB
Django/Jinja

---
kind: DaemonSet
apiVersion: apps/v1
metadata:
name: kube-multus-ds-{{ image_arch }}
namespace: kube-system
labels:
tier: node
app: multus
spec:
selector:
matchLabels:
tier: node
app: multus
template:
metadata:
labels:
tier: node
app: multus
spec:
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
nodeSelector:
kubernetes.io/arch: {{ image_arch }}
tolerations:
- operator: Exists
serviceAccountName: multus
containers:
- name: kube-multus
image: {{ multus_image_repo }}:{{ multus_image_tag }}
command: ["/entrypoint.sh"]
args:
- "--cni-conf-dir={{ multus_cni_conf_dir }}"
- "--cni-bin-dir={{ multus_cni_bin_dir }}"
- "--multus-conf-file={{ multus_conf_file }}"
- "--multus-kubeconfig-file-host={{ multus_kubeconfig_file_host }}"
- "--cni-version={{ multus_cni_version }}"
resources:
requests:
cpu: "100m"
memory: "90Mi"
limits:
cpu: "100m"
memory: "90Mi"
securityContext:
privileged: true
{% if container_manager == 'crio' %}
capabilities:
add: ["SYS_ADMIN"]
{% endif %}
volumeMounts:
{% if container_manager == 'crio' %}
- name: run
mountPath: {{ multus_cni_run_dir }}
{% endif %}
- name: cni
mountPath: {{ multus_cni_conf_dir }}
- name: cnibin
mountPath: {{ multus_cni_bin_dir }}
volumes:
{% if container_manager == 'crio' %}
- name: run
hostPath:
path: {{ multus_cni_run_dir_host }}
{% endif %}
- name: cni
hostPath:
path: {{ multus_cni_conf_dir_host }}
- name: cnibin
hostPath:
path: {{ multus_cni_bin_dir_host }}