mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-06 20:13:43 +09:00
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>
28 lines
1.2 KiB
Makefile
28 lines
1.2 KiB
Makefile
export NAME=multus
|
|
export NAMESPACE=cozy-$(NAME)
|
|
|
|
include ../../../hack/common-envs.mk
|
|
include ../../../hack/package.mk
|
|
|
|
test:
|
|
helm unittest .
|
|
|
|
update:
|
|
rm -rf templates
|
|
mkdir templates
|
|
$(eval RELEASE := $(shell curl -s https://api.github.com/repos/k8snetworkplumbingwg/multus-cni/releases/latest?per_page=1 | jq -r '.name'))
|
|
wget -q https://raw.githubusercontent.com/k8snetworkplumbingwg/multus-cni/refs/tags/$(RELEASE)/deployments/multus-daemonset-thick.yml -O templates/multus-daemonset-thick.yml
|
|
sed -i '/multus-cni/s/snapshot-thick/$(RELEASE)-thick/' templates/multus-daemonset-thick.yml && \
|
|
patch --no-backup-if-mismatch -p4 < patches/customize-deployment.patch
|
|
$(SED_INPLACE) "/ARG VERSION/ s|=.*|=$(RELEASE)|g" images/multus-cni/Dockerfile
|
|
|
|
image:
|
|
docker buildx build images/multus-cni \
|
|
$(call image-tags,multus-cni,v$(COZYSTACK_VERSION)) \
|
|
$(call cache-args,multus-cni) \
|
|
--metadata-file images/multus-cni.json \
|
|
$(BUILDX_ARGS)
|
|
DIGEST=$$(yq e '."containerimage.digest"' images/multus-cni.json -o json -r) && \
|
|
sed -i "s|image: .*multus-cni.*|image: $(REGISTRY)/multus-cni:$(IMAGE_TAG)@$${DIGEST}|g" templates/multus-daemonset-thick.yml
|
|
rm -f images/multus-cni.json
|