KubeZero/charts/kubezero-network/templates/multus/daemonset.yaml

78 lines
2.1 KiB
YAML
Raw Permalink Normal View History

2021-12-01 12:35:18 +00:00
{{- if .Values.multus.enabled }}
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: kube-multus-ds
namespace: kube-system
labels:
{{- include "kubezero-lib.labels" . | nindent 4 }}
2021-12-01 12:35:18 +00:00
spec:
selector:
matchLabels:
{{- include "kubezero-lib.selectorLabels" . | nindent 6 }}
2021-12-01 12:35:18 +00:00
updateStrategy:
type: RollingUpdate
template:
metadata:
labels:
{{- include "kubezero-lib.labels" . | nindent 8 }}
2021-12-01 12:35:18 +00:00
spec:
hostNetwork: true
tolerations:
- operator: Exists
effect: NoSchedule
2022-01-28 16:22:39 +00:00
- operator: Exists
effect: NoExecute
2021-12-01 12:35:18 +00:00
serviceAccountName: multus
2022-10-27 12:27:42 +00:00
priorityClassName: system-node-critical
2021-12-01 12:35:18 +00:00
containers:
- name: kube-multus
image: {{ .Values.multus.image.repository }}:{{ .Values.multus.image.tag }}
# Always used cached images
2024-10-16 11:20:20 +00:00
imagePullPolicy: {{ .Values.multus.image.pullPolicy }}
2021-12-01 12:35:18 +00:00
command: ["/entrypoint.sh"]
args:
- "--multus-conf-file=/tmp/multus-conf/00-multus.conf"
- "--rename-conf-file=false"
- "--cni-bin-dir=/host/usr/libexec/cni"
2021-12-01 12:35:18 +00:00
- "--cni-version=0.3.1"
resources:
requests:
2023-12-01 17:24:39 +00:00
cpu: "10m"
# memory: "64Mi"
# limits:
# cpu: "100m"
# memory: "256Mi"
2021-12-01 12:35:18 +00:00
securityContext:
privileged: true
2021-12-21 15:05:08 +00:00
capabilities:
add: ["SYS_ADMIN"]
terminationMessagePolicy: FallbackToLogsOnError
2021-12-01 12:35:18 +00:00
volumeMounts:
2021-12-21 15:05:08 +00:00
- name: run
mountPath: /run
2021-12-01 12:35:18 +00:00
- name: cni
mountPath: /host/etc/cni/net.d
- name: cnibin
mountPath: /host/usr/libexec/cni
2021-12-01 12:35:18 +00:00
- name: multus-cfg
mountPath: /tmp/multus-conf
terminationGracePeriodSeconds: 10
volumes:
2021-12-21 15:05:08 +00:00
- name: run
hostPath:
path: /run
2021-12-01 12:35:18 +00:00
- name: cni
hostPath:
path: /etc/cni/net.d
- name: cnibin
hostPath:
path: /usr/libexec/cni
2021-12-01 12:35:18 +00:00
- name: multus-cfg
configMap:
name: multus-cni-config
items:
- key: cni-conf.json
path: 00-multus.conf
2021-12-01 12:35:18 +00:00
{{- end }}