...
1apiVersion: networking.k8s.io/v1
2kind: NetworkPolicy
3metadata:
4 name: allow-egress
5spec:
6 egress:
7 - {}
8 ingress:
9 - from:
10 - podSelector: {}
11 podSelector: {}
12 policyTypes:
13 - Ingress
14 - Egress
15---
16apiVersion: networking.k8s.io/v1
17kind: NetworkPolicy
18metadata:
19 name: allow-scraping
20spec:
21 ingress:
22 - from:
23 - namespaceSelector: {}
24 ports:
25 - port: 8080
26 protocol: TCP
27 - port: 4191
28 protocol: TCP
29 podSelector: {}
30 policyTypes:
31 - Ingress
32---
33apiVersion: networking.k8s.io/v1
34kind: NetworkPolicy
35metadata:
36 name: allow-webhooks
37spec:
38 ingress:
39 - from:
40 - namespaceSelector: {}
41 podSelector:
42 matchLabels:
43 app: notification-controller
44 policyTypes:
45 - Ingress
View as plain text