Files
cozystack/packages/system/multus/tests/multus_test.yaml
T
Aleksei Sviridkin c50b73fd9c chore(packages/system/multus): bump multus-cni to v4.3.0
Re-vendors the multus-cni thick-mode daemonset from upstream v4.2.3 to v4.3.0
and rebuilds the cozystack image (multi-arch, golang:1.26 builder; v4.3.0's
go.mod and the published security fixes warrant the stdlib bump from 1.24). The
fix-del-without-cache and customize-deployment patches both re-apply cleanly to
v4.3.0. The rebuilt image is pinned by digest in the daemonset.

Folds the previously hand-edited `multusMasterCNI: "05-cilium.conflist"`
CNI-ordering fix into customize-deployment.patch so it survives every make
update (it was a raw daemonset edit that the re-vendor would otherwise wipe,
re-introducing the kube-ovn-before-cilium startup race).

Adds helm-unittest coverage (the package shipped none): asserts the daemonset
runs the cozystack-built image and that the daemon-config pins multusMasterCNI
to the cilium conflist.

Adaptations:
- images/multus-cni/Dockerfile: builder golang:1.24 -> 1.26, ARG VERSION v4.2.3 -> v4.3.0
- templates/multus-daemonset-thick.yml: re-vendored v4.3.0 + customize patch; pin rebuilt multi-arch image
- patches/customize-deployment.patch: carry the multusMasterCNI CNI-ordering fix
- Makefile: add test target
- tests/multus_test.yaml: new helm-unittest coverage

Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-06-23 14:39:14 +03:00

32 lines
1.2 KiB
YAML

suite: cozy-multus daemonset invariants
release:
name: multus
namespace: cozy-multus
tests:
# The daemonset image tag tracks the cozystack release version and is
# re-pinned by release-prep, so pin the repository (cozystack-built, not the
# upstream k8snetworkplumbingwg image) rather than the volatile tag.
- it: runs the cozystack-built multus image
template: templates/multus-daemonset-thick.yml
documentSelector:
path: kind
value: DaemonSet
asserts:
- matchRegex:
path: spec.template.spec.containers[0].image
pattern: '^ghcr\.io/cozystack/cozystack/multus-cni:'
# Guards the cozystack CNI-ordering fix (multusMasterCNI pinned to the cilium
# conflist) so multus does not auto-detect kube-ovn ahead of cilium at node
# startup and bypass the cilium CNI chain. This is a hand-edit that lives in
# patches/customize-deployment.patch so it survives every make update.
- it: pins the master CNI to the cilium conflist
template: templates/multus-daemonset-thick.yml
documentSelector:
path: kind
value: ConfigMap
asserts:
- matchRegex:
path: data["daemon-config.json"]
pattern: '"multusMasterCNI": "05-cilium\.conflist"'