...
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 podSelector: {}
28 policyTypes:
29 - Ingress
30---
31apiVersion: networking.k8s.io/v1
32kind: NetworkPolicy
33metadata:
34 name: allow-webhooks
35spec:
36 ingress:
37 - from:
38 - namespaceSelector: {}
39 podSelector:
40 matchLabels:
41 app: notification-controller
42 policyTypes:
43 - Ingress
View as plain text