mirror of https://git.rancher.io/rke2-charts
88 lines
2.8 KiB
Diff
88 lines
2.8 KiB
Diff
--- charts-original/templates/daemonSet.yaml
|
|
+++ charts/templates/daemonSet.yaml
|
|
@@ -16,14 +16,14 @@
|
|
apiVersion: apps/v1
|
|
kind: DaemonSet
|
|
metadata:
|
|
- name: {{ .Release.Name }}-{{ .Chart.Name }}-ds
|
|
- namespace: kube-system
|
|
+ name: {{ .Release.Name }}-ds
|
|
+ namespace: {{ .Release.Namespace }}
|
|
labels:
|
|
{{- include "multus.labels" . | indent 4 }}
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
- app: multus
|
|
+ app: {{ .Chart.Name }}
|
|
updateStrategy:
|
|
type: RollingUpdate
|
|
rollingUpdate:
|
|
@@ -45,24 +45,33 @@
|
|
tolerations:
|
|
- operator: Exists
|
|
effect: NoSchedule
|
|
+ - operator: Exists
|
|
+ effect: NoExecute
|
|
serviceAccountName: {{ .Values.serviceAccount.name }}
|
|
+ initContainers:
|
|
+ - name: cni-plugins
|
|
+ image: {{ template "system_default_registry" . }}{{ .Values.cniplugins.image.repository }}:{{ .Values.cniplugins.image.tag }}
|
|
+ securityContext:
|
|
+ privileged: true
|
|
+ volumeMounts:
|
|
+ - name: cnibin
|
|
+ mountPath: /host/opt/cni/bin
|
|
+ env:
|
|
+ - name: SKIP_CNI_BINARIES
|
|
+ value: {{ .Values.cniplugins.skipcnis }}
|
|
containers:
|
|
- name: kube-{{ .Chart.Name }}
|
|
- image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
|
|
+ image: {{ template "system_default_registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag }}
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
env:
|
|
- name: KUBERNETES_NODE_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: spec.nodeName
|
|
- command:
|
|
- - /bin/bash
|
|
- - -cex
|
|
- - |
|
|
- #!/bin/bash
|
|
- sed "s|__KUBERNETES_NODE_NAME__|${KUBERNETES_NODE_NAME}|g" /tmp/multus-conf/00-multus.conf.template > /tmp/multus-conf/00-multus.conf
|
|
- /entrypoint.sh \
|
|
- --multus-conf-file=/tmp/multus-conf/00-multus.conf
|
|
+ command: ["/entrypoint.sh"]
|
|
+ args:
|
|
+ - "--multus-conf-file=auto"
|
|
+ - "--cni-version=0.3.1"
|
|
{{- if .Values.pod.resources.multus }}
|
|
resources: {{- toYaml .Values.pod.resources.multus | nindent 10 }}
|
|
{{- end }}
|
|
@@ -73,9 +82,11 @@
|
|
mountPath: /host/etc/cni/net.d
|
|
- name: cnibin
|
|
mountPath: /host/opt/cni/bin
|
|
+{{- if .Values.manifests.configMap }}
|
|
- name: multus-cfg
|
|
mountPath: /tmp/multus-conf/00-multus.conf.template
|
|
subPath: "cni-conf.json"
|
|
+{{- end }}
|
|
volumes:
|
|
- name: cni
|
|
hostPath:
|
|
@@ -83,8 +94,10 @@
|
|
- name: cnibin
|
|
hostPath:
|
|
path: /opt/cni/bin
|
|
+{{- if .Values.manifests.configMap }}
|
|
- name: multus-cfg
|
|
configMap:
|
|
- name: {{ .Release.Name }}-{{ .Chart.Name }}-{{ .Chart.Version }}-config
|
|
+ name: {{ .Release.Name }}-{{ .Chart.Version }}-config
|
|
+{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|