Skip to content

Commit

Permalink
initcontainer for cni binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
camrynl committed Apr 28, 2023
1 parent 3624139 commit 7be39a2
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions test/integration/manifests/cilium/cilium-agent/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,8 @@ spec:
fieldPath: metadata.namespace
- name: CILIUM_CLUSTERMESH_CONFIG
value: /var/lib/cilium/clustermesh/
- name: CILIUM_CUSTOM_CNI_CONF
value: "true"
image: mcr.microsoft.com/oss/cilium/cilium:1.12.8
imagePullPolicy: IfNotPresent
lifecycle:
postStart:
exec:
command:
- /cni-install.sh
preStop:
exec:
command:
- /cni-uninstall.sh
livenessProbe:
failureThreshold: 10
httpGet:
Expand Down Expand Up @@ -157,8 +146,6 @@ spec:
name: bpf-maps
- mountPath: /var/run/cilium
name: cilium-run
- mountPath: /host/opt/cni/bin
name: cni-path
- mountPath: /host/etc/cni/net.d
name: etc-cni-netd
- mountPath: /var/lib/cilium/clustermesh
Expand All @@ -175,6 +162,25 @@ spec:
dnsPolicy: ClusterFirst
hostNetwork: true
initContainers:
- name: install-cni-binaries
image: mcr.microsoft.com/oss/cilium/cilium:1.12.8
imagePullPolicy: IfNotPresent
command:
- "/install-plugin.sh"
securityContext:
seLinuxOptions:
level: 's0'
# Running with spc_t since we have removed the privileged mode.
# Users can change it to a different type as long as they have the
# type available on the system.
type: 'spc_t'
capabilities:
drop:
- ALL
volumeMounts:
- name: cni-path
mountPath: /host/opt/cni/bin
restartPolicy: Always
- command:
- sh
- -ec
Expand Down

0 comments on commit 7be39a2

Please sign in to comment.