You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
VM network policy bug for non-isolated tenants #1601
Describe the bug
When creating a VM in a tenant without network isolation, the accompanying CiliumNetworkPolicy prevents the VM from accessing in-cluster resources, such as DNS.
To Reproduce
Create a tenant with isolated: false
Create a VM with external: true
Try to resolve DNS from inside the VM.
Expected behaviour
The VM should not be restricted from accessing cluster resources, just as all other pods in a non-isolated tenant.
Actual behaviour
The network policies only allow access to the internet.
In a non-isolated tenant there are initially no network policies, so nothing prevents applications from intra-cluster communications. When a VM is created, the accompanying policy has an egress rule targeting this VM. Once the VM is targeted by at least one egress rule, its network communication is now policed. An isolated tenant would also have other network policies that explicitly allow communication with the DNS server, but a non-isolated tenant starts with no network policies, so the VM is only allowed to talk to external endpoints.
Update VM CiliumNetworkPolicy egress in packages/apps/virtual-machine/templates/service.yaml and packages/apps/vm-instance/templates/service.yaml (line 55): add "cluster" to toEntities alongside "world" so non-isolated VMs keep external access and regain in-cluster access (DNS, dashboard, keycloak, etc.).
Add "cluster" to the egress toEntities list in both packages/apps/virtual-machine/templates/service.yaml and packages/apps/vm-instance/templates/service.yaml so services can egress to the cluster in addition to world.
Activity
coderabbitai commentedon Nov 5, 2025
A summary of the changes CodeRabbit can apply:
[vm] Remove egress restrictions on non-isolated vm
[vm] Remove egress restrictions on non-isolated vm
[vm] Remove egress restrictions on non-isolated vm
[vm] Remove egress restrictions on non-isolated vm
[vm] Remove egress restrictions on non-isolated vm
[virtual-machine] Revert per-vm network policies (#1611)
[virtual-machine] Revert per-vm network policies (#1611)
[virtual-machine] Revert per-vm network policies (#1611)
[virtual-machine] Exclude external VM services from Cilium BPF LB (#2357