[kubernetes] Fix CiliumNetworkPolicy endpointSelector for multi-node RWX volumes by mattia-eleuteri · Pull Request #2227 · cozystack/cozystack
labels
Mar 16, 2026
mattia-eleuteri
changed the title
fix(kubernetes): update CNP endpointSelector for multi-node RWX volumes
[kubernetes] Fix CiliumNetworkPolicy endpointSelector for multi-node RWX volumes
…RWX volumes When an NFS-backed RWX volume is published to multiple VMs, the CiliumNetworkPolicy egress rule only allowed traffic from the first VM. The endpointSelector.matchLabels was set once on creation and never broadened, causing NFS mounts to hang on all nodes except the first. Switch from matchLabels to matchExpressions (operator: In) so the selector can list multiple VM names. Rebuild the selector whenever ownerReferences are added or removed. Signed-off-by: mattia-eleuteri <mattia@hidora.io>
This was referenced
Mar 16, 2026kvaps added a commit that referenced this pull request
Mar 17, 2026kvaps added a commit that referenced this pull request
Mar 17, 2026This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters