mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-22 12:43:32 +09:00
Helm's `lookup` propagates the discovery error when the requested API group is not served, so the vm-instance chart could not render at all on clusters without the Kube-OVN CRDs. Gate the IP lookup behind `.Capabilities.APIVersions.Has "kubeovn.io/v1/IP"`. The regression suite mocks the IP object through kubernetesProvider and pins both sides: with the API advertised the annotations carry the mocked MAC and IP, without it they are absent even though the object exists. helm-unittest's fake lookup never errors on an unserved kind, so only the second case distinguishes the guard; it fails on main and passes here. Assisted-By: GPT-5 <noreply@openai.com> Signed-off-by: Loïc Fontaine <lfinmauritius@users.noreply.github.com>
How to test packages local
cd packages/core/installer
make image-cozystack REGISTRY=YOUR_CUSTOM_REGISTRY
make apply
kubectl delete po -l app=source-controller -n cozy-fluxcd