Skip to content

Commit

Permalink
fix(multus): Actually install CNI plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
bjw-s committed Jan 14, 2025
1 parent d879295 commit 4baa2fa
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 69 deletions.
53 changes: 12 additions & 41 deletions kubernetes/apps/network/multus/app/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,44 +18,18 @@ spec:

values:
controllers:
uninstall:
type: job

annotations:
# This is what defines this resource as a hook. Without this line, the
# job is considered part of the release.
helm.sh/hook: pre-delete, pre-upgrade
helm.sh/hook-weight: "-5"
helm.sh/hook-delete-policy: hook-succeeded

pod:
hostNetwork: true

containers:
uninstall:
image:
repository: docker.io/library/alpine
tag: "3.21"

command:
- /bin/sh
- -c

args:
- |
set -x
rm -rf /host/etc/cni/net.d/*multus*
rm -rf /host/opt/cni/bin/*multus*
multus:
type: daemonset

annotations:
reloader.stakater.com/auto: "true"

pod:
hostNetwork: true

initContainers:
cni-plugins:
image:
repository: ghcr.io/buroa/cni-plugins
tag: 1.6.2

containers:
multus:
image:
Expand All @@ -65,8 +39,8 @@ spec:
- /thin_entrypoint
args:
- --multus-conf-file=/config/00-multus.conf
- --cni-bin-dir=/opt/cni/bin
- --cni-conf-dir=/etc/cni/net.d
- --cni-bin-dir=/host/opt/cni/bin
- --cni-conf-dir=/host/etc/cni/net.d
resources:
requests:
cpu: "10m"
Expand All @@ -76,19 +50,16 @@ spec:
privileged: true

persistence:
config:
type: configMap
name: multus-configmap
globalMounts:
- path: /config/00-multus.conf
subPath: 00-multus.conf
readOnly: true
etc-cni-net-d:
type: hostPath
hostPath: /etc/cni/net.d
globalMounts:
- path: /host/etc/cni/net.d
opt-cni-bin:
type: hostPath
hostPath: /opt/cni/bin
globalMounts:
- path: /host/opt/cni/bin

serviceAccount:
create: true
Expand Down
6 changes: 0 additions & 6 deletions kubernetes/apps/network/multus/app/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,3 @@ resources:
- https://raw.githubusercontent.com/k8snetworkplumbingwg/network-attachment-definition-client/refs/tags/v1.7.5/artifacts/networks-crd.yaml
- ./helmrelease.yaml
- ./rbac.yaml
configMapGenerator:
- name: multus-configmap
files:
- ./resources/00-multus.conf
generatorOptions:
disableNameSuffixHash: true
15 changes: 0 additions & 15 deletions kubernetes/apps/network/multus/app/resources/00-multus.conf

This file was deleted.

7 changes: 0 additions & 7 deletions kubernetes/apps/network/multus/networks/iot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,12 @@ spec:
"type": "macvlan",
"master": "bond0.303",
"mode": "bridge",
"capabilities": {
"ips": true
},
"ipam": {
"type": "static",
"routes": [
{ "dst": "10.1.2.0/24", "gw": "10.1.3.1" }
]
}
},
{
"capabilities": { "mac": true },
"type": "tuning"
}
]
}

0 comments on commit 4baa2fa

Please sign in to comment.