Skip to content

Commit 4f2e65c

Browse files
neonvm: use 3.9.3 multus for arm
Signed-off-by: Misha Sakhnov <[email protected]>
1 parent 7f404d8 commit 4f2e65c

File tree

2 files changed

+91
-120
lines changed

2 files changed

+91
-120
lines changed
+84-109
Original file line numberDiff line numberDiff line change
@@ -1,137 +1,112 @@
1+
---
2+
# Source: multus-cni/templates/daemonset.yaml
13
apiVersion: apps/v1
24
kind: DaemonSet
35
metadata:
6+
name: kube-multus-ds
7+
namespace: kube-system
48
labels:
9+
tier: node
510
app: multus
611
name: multus
7-
tier: node
8-
name: kube-multus-ds
9-
namespace: kube-system
1012
spec:
1113
selector:
1214
matchLabels:
13-
name: multus
15+
app: multus
16+
updateStrategy:
17+
type: RollingUpdate
1418
template:
1519
metadata:
16-
labels:
17-
app: multus
18-
name: multus
19-
tier: node
20+
annotations:
2021
spec:
22+
23+
hostNetwork: true
24+
serviceAccountName: multus
25+
securityContext:
26+
fsGroup: 0
2127
affinity:
28+
podAffinity:
29+
2230
nodeAffinity:
2331
requiredDuringSchedulingIgnoredDuringExecution:
2432
nodeSelectorTerms:
2533
- matchExpressions:
26-
- key: kubernetes.io/arch
27-
operator: In
28-
values:
29-
- arm64
3034
- key: kubernetes.io/os
3135
operator: In
3236
values:
33-
- linux
34-
containers:
35-
- command:
36-
- /usr/src/multus-cni/bin/multus-daemon
37-
image: ghcr.io/k8snetworkplumbingwg/multus-cni:v4.1.3-thick
38-
name: kube-multus
39-
resources:
40-
limits:
41-
cpu: 100m
42-
memory: 50Mi
43-
requests:
44-
cpu: 100m
45-
memory: 50Mi
46-
securityContext:
47-
privileged: true
48-
volumeMounts:
49-
- name: cni
50-
mountPath: /host/etc/cni/net.d
51-
# multus-daemon expects that cnibin path must be identical between pod and container host.
52-
# e.g. if the cni bin is in '/opt/cni/bin' on the container host side, then it should be mount to '/opt/cni/bin' in multus-daemon,
53-
# not to any other directory, like '/opt/bin' or '/usr/bin'.
54-
- name: cnibin
55-
mountPath: /opt/cni/bin
56-
- name: host-run
57-
mountPath: /host/run
58-
- name: host-var-lib-cni-multus
59-
mountPath: /var/lib/cni/multus
60-
- name: host-var-lib-kubelet
61-
mountPath: /var/lib/kubelet
62-
mountPropagation: HostToContainer
63-
- name: host-run-k8s-cni-cncf-io
64-
mountPath: /run/k8s.cni.cncf.io
65-
- name: host-run-netns
66-
mountPath: /run/netns
67-
mountPropagation: HostToContainer
68-
- name: multus-daemon-config
69-
mountPath: /etc/cni/net.d/multus.d
70-
readOnly: true
71-
- name: hostroot
72-
mountPath: /hostroot
73-
mountPropagation: HostToContainer
74-
env:
75-
- name: MULTUS_NODE_NAME
76-
valueFrom:
77-
fieldRef:
78-
fieldPath: spec.nodeName
79-
hostNetwork: true
80-
hostPID: true
37+
- linux
38+
priorityClassName: ""
8139
initContainers:
8240
- name: install-multus-binary
83-
image: ghcr.io/k8snetworkplumbingwg/multus-cni:v4.1.3-thick
41+
image: docker.io/bitnami/multus-cni:3.9.3
8442
command:
85-
- "cp"
86-
- "/usr/src/multus-cni/bin/multus-shim"
87-
- "/host/opt/cni/bin/multus-shim"
88-
resources:
89-
requests:
90-
cpu: "10m"
91-
memory: "15Mi"
43+
- cp
44+
- "/usr/src/multus-cni/bin/multus"
45+
- "/bitnami/multus-cni/host/opt/cni/bin"
9246
securityContext:
9347
privileged: true
94-
terminationMessagePolicy: FallbackToLogsOnError
48+
runAsNonRoot: false
49+
runAsUser: 0
9550
volumeMounts:
96-
- name: cnibin
97-
mountPath: /host/opt/cni/bin
51+
- name: cni-bin-dir
52+
mountPath: /bitnami/multus-cni/host/opt/cni/bin
9853
mountPropagation: Bidirectional
99-
serviceAccountName: multus
100-
terminationGracePeriodSeconds: 10
101-
tolerations:
102-
- effect: NoSchedule
103-
operator: Exists
54+
- name: generate-kubeconfig
55+
image: docker.io/bitnami/multus-cni:3.9.3
56+
command:
57+
- generate-kubeconfig
58+
args:
59+
- "-k8s-service-host=$(KUBERNETES_SERVICE_HOST)"
60+
- "-k8s-service-port=$(KUBERNETES_SERVICE_PORT)"
61+
- "-cni-config-dir=/bitnami/multus-cni/host/etc/cni/net.d"
62+
securityContext:
63+
privileged: true
64+
runAsNonRoot: false
65+
runAsUser: 0
66+
volumeMounts:
67+
- name: cni-net-dir
68+
mountPath: /bitnami/multus-cni/host/etc/cni/net.d
69+
mountPropagation: Bidirectional
70+
containers:
71+
- name: kube-multus
72+
image: docker.io/bitnami/multus-cni:3.9.3
73+
imagePullPolicy: "IfNotPresent"
74+
command:
75+
- multus-daemon
76+
args:
77+
- "-cni-version=0.3.0"
78+
- "-cni-config-dir=/bitnami/multus-cni/host/etc/cni/net.d"
79+
- "-multus-autoconfig-dir=/bitnami/multus-cni/host/etc/cni/net.d"
80+
- "-multus-log-to-stderr=true"
81+
- "-multus-log-level=verbose"
82+
securityContext:
83+
privileged: true
84+
runAsNonRoot: false
85+
runAsUser: 0
86+
env:
87+
- name: BITNAMI_DEBUG
88+
value: "false"
89+
envFrom:
90+
livenessProbe:
91+
exec:
92+
command:
93+
- pgrep
94+
- multus-daemon
95+
initialDelaySeconds: 10
96+
periodSeconds: 10
97+
timeoutSeconds: 5
98+
successThreshold: 1
99+
failureThreshold: 5
100+
resources:
101+
limits: {}
102+
requests: {}
103+
volumeMounts:
104+
- name: cni-net-dir
105+
mountPath: /bitnami/multus-cni/host/etc/cni/net.d
104106
volumes:
105-
- hostPath:
106-
path: /etc/cni/net.d
107-
name: cni
108-
- hostPath:
109-
path: /opt/cni/bin
110-
name: cnibin
111-
- name: hostroot
112-
hostPath:
113-
path: /
114-
- name: multus-daemon-config
115-
configMap:
116-
name: multus-daemon-config
117-
items:
118-
- key: daemon-config.json
119-
path: daemon-config.json
120-
- name: host-run
121-
hostPath:
122-
path: /run
123-
- name: host-var-lib-cni-multus
124-
hostPath:
125-
path: /var/lib/cni/multus
126-
- name: host-var-lib-kubelet
127-
hostPath:
128-
path: /var/lib/kubelet
129-
- name: host-run-k8s-cni-cncf-io
130-
hostPath:
131-
path: /run/k8s.cni.cncf.io
132-
- name: host-run-netns
133-
hostPath:
134-
path: /run/netns/
135-
136-
updateStrategy:
137-
type: RollingUpdate
107+
- name: cni-bin-dir
108+
hostPath:
109+
path: /opt/cni/bin
110+
- name: cni-net-dir
111+
hostPath:
112+
path: /etc/cni/net.d

neonvm/config/multus-arm64/kustomization.yaml

+7-11
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,17 @@ images:
88
- name: kube-multus
99
newName: ghcr.io/k8snetworkplumbingwg/multus-cni
1010
newTag: v4.1.3-thick
11-
12-
resources:
13-
- config_map.yaml
11+
12+
1413
patchesStrategicMerge:
1514
- cluster_role.yaml
1615
- daemonset_patch.yaml
1716

1817
patches:
19-
- target:
20-
kind: DaemonSet
21-
name: kube-multus-ds
18+
- target:
19+
kind: ServiceAccount
20+
name: multus
2221
patch: |-
2322
- op: replace
24-
path: /spec/template/spec/containers/0/command
25-
value: ["/usr/src/multus-cni/bin/multus-daemon"]
26-
- op: replace
27-
path: /spec/template/spec/containers/0/args
28-
value: []
23+
path: /automountServiceAccountToken
24+
value: true

0 commit comments

Comments
 (0)