mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-09 22:13:18 +09:00
## What this PR does When an NFS-backed RWX volume is published to multiple VMs, the `CiliumNetworkPolicy` `endpointSelector.matchLabels` only included the first VM. Subsequent `ControllerPublishVolume` calls added `ownerReferences` but never broadened the selector, causing Cilium to block NFS egress — mounts hang on all nodes except the first. This PR switches from `matchLabels` to `matchExpressions` (`operator: In`) so the selector can list multiple VM names, and rebuilds it whenever ownerReferences are added or removed. ### Release note ```release-note [kubernetes] Fixed CiliumNetworkPolicy endpointSelector not being updated when NFS-backed RWX volumes are published to multiple VMs, which caused NFS mounts to hang on all nodes except the first. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * KubeVirt CSI driver now supports selecting and targeting multiple virtual machines for volume publishing. * **Improvements** * Network policy targets are rebuilt automatically when VM ownership references change, improving correctness and lifecycle handling in multi-VM scenarios. <!-- end of auto-generated comment: release notes by coderabbit.ai -->