Skip to content

Commit 2f0657f

Browse files
committed
[virtual-machine] Revert per-vm network policies
Signed-off-by: Andrei Kvapil <[email protected]>
1 parent 369384f commit 2f0657f

5 files changed

Lines changed: 1 addition & 55 deletions

File tree

‎packages/apps/tenant/templates/networkpolicy.yaml‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,7 @@ metadata:
2020
name: allow-external-communication
2121
namespace: {{ include "tenant.name" . }}
2222
spec:
23-
endpointSelector:
24-
matchExpressions:
25-
- key: policy.cozystack.io/allow-external-communication
26-
operator: NotIn
27-
values: ["false"]
23+
endpointSelector: {}
2824
ingress:
2925
- fromEntities:
3026
- world

‎packages/apps/virtual-machine/templates/service.yaml‎

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,3 @@ spec:
2828
{{- end }}
2929
{{- end }}
3030
{{- end }}
31-
---
32-
apiVersion: cilium.io/v2
33-
kind: CiliumNetworkPolicy
34-
metadata:
35-
name: {{ include "virtual-machine.fullname" . }}
36-
spec:
37-
endpointSelector:
38-
matchLabels:
39-
{{- include "virtual-machine.selectorLabels" . | nindent 6 }}
40-
ingress:
41-
- fromEntities:
42-
- cluster
43-
- fromEntities:
44-
- world
45-
{{- if eq .Values.externalMethod "PortList" }}
46-
toPorts:
47-
- ports:
48-
{{- range .Values.externalPorts }}
49-
- port: {{ quote . }}
50-
{{- end }}
51-
{{- end }}
52-
egress:
53-
- toEntities:
54-
- world

‎packages/apps/virtual-machine/templates/vm.yaml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ spec:
6262
template:
6363
metadata:
6464
annotations:
65-
policy.cozystack.io/allow-external-communication: "false"
6665
kubevirt.io/allow-pod-bridge-network-live-migration: "true"
6766
labels:
6867
{{- include "virtual-machine.labels" . | nindent 8 }}

‎packages/apps/vm-instance/templates/service.yaml‎

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,3 @@ spec:
2828
{{- end }}
2929
{{- end }}
3030
{{- end }}
31-
---
32-
apiVersion: cilium.io/v2
33-
kind: CiliumNetworkPolicy
34-
metadata:
35-
name: {{ include "virtual-machine.fullname" . }}
36-
spec:
37-
endpointSelector:
38-
matchLabels:
39-
{{- include "virtual-machine.selectorLabels" . | nindent 6 }}
40-
ingress:
41-
- fromEntities:
42-
- cluster
43-
- fromEntities:
44-
- world
45-
{{- if eq .Values.externalMethod "PortList" }}
46-
toPorts:
47-
- ports:
48-
{{- range .Values.externalPorts }}
49-
- port: {{ quote . }}
50-
{{- end }}
51-
{{- end }}
52-
egress:
53-
- toEntities:
54-
- world

‎packages/apps/vm-instance/templates/vm.yaml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ spec:
2626
template:
2727
metadata:
2828
annotations:
29-
policy.cozystack.io/allow-external-communication: "false"
3029
kubevirt.io/allow-pod-bridge-network-live-migration: "true"
3130
labels:
3231
{{- include "virtual-machine.labels" . | nindent 8 }}

0 commit comments

Comments
 (0)