Skip to content

Commit 44419d6

Browse files
committed
Making /var/log/calico/cni vol mount writable
Signed-off-by: Mark Rossett <[email protected]>
1 parent 21d54b5 commit 44419d6

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

templates/addons/calico.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6212,6 +6212,9 @@ spec:
62126212
securityContext:
62136213
privileged: true
62146214
volumeMounts:
6215+
- mountPath: /var/log/calico/cni
6216+
name: cni-log-dir
6217+
readOnly: false
62156218
- mountPath: /host/etc/cni/net.d
62166219
name: cni-net-dir
62176220
readOnly: false
@@ -6231,9 +6234,6 @@ spec:
62316234
name: policysync
62326235
- mountPath: /sys/fs/bpf
62336236
name: bpffs
6234-
- mountPath: /var/log/calico/cni
6235-
name: cni-log-dir
6236-
readOnly: true
62376237
hostNetwork: true
62386238
initContainers:
62396239
- command:
@@ -6333,6 +6333,10 @@ spec:
63336333
- effect: NoExecute
63346334
operator: Exists
63356335
volumes:
6336+
- hostPath:
6337+
path: /var/log/calico/cni
6338+
type: DirectoryOrCreate
6339+
name: cni-log-dir
63366340
- hostPath:
63376341
path: /lib/modules
63386342
name: lib-modules
@@ -6366,9 +6370,6 @@ spec:
63666370
- hostPath:
63676371
path: /etc/cni/net.d
63686372
name: cni-net-dir
6369-
- hostPath:
6370-
path: /var/log/calico/cni
6371-
name: cni-log-dir
63726373
- hostPath:
63736374
path: /var/lib/cni/networks
63746375
name: host-local-net-dir

templates/addons/calico/patches/calico-node.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,15 @@ spec:
1414
value: "ChecksumOffloadBroken=true"
1515
- name: CALICO_IPV4POOL_VXLAN
1616
value: "Always"
17+
volumeMounts:
18+
# Fix CNI logging - make cni-log-dir writable
19+
- mountPath: /var/log/calico/cni
20+
name: cni-log-dir
21+
readOnly: false
22+
volumes:
23+
# Ensure CNI log directory gets created
24+
- hostPath:
25+
path: /var/log/calico/cni
26+
type: DirectoryOrCreate
27+
name: cni-log-dir
1728

0 commit comments

Comments
 (0)