-
Notifications
You must be signed in to change notification settings - Fork 14
/
default.yaml
80 lines (77 loc) · 1.53 KB
/
default.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# apiVersion: v1
# kind: Namespace
# metadata:
# name: default
---
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
name: default-ingress
namespace: default
spec:
podSelector: {}
ingress:
- from:
# Only allow ingress from nginx
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: nginx
- from:
# Allow local and operator ingress to PostgreSQL
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: default
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: postgres
ports:
- protocol: TCP
port: 5432
endPort: 5432
- protocol: TCP
port: 8008 #Patroni
endPort: 8008
- from:
# Allow local ingress to Redis
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: default
ports:
- protocol: TCP
port: 6379
endPort: 6379
- from:
# Allow from any IP
- ipBlock:
cidr: "0.0.0.0/0"
# Allow access to Lora multiplyer
ports:
- protocol: UDP
port: 1700
endPort: 1700
- from:
# Allow from any IP
- ipBlock:
cidr: "0.0.0.0/0"
# Allow access to Daiking
ports:
- protocol: UDP
port: 30000
endPort: 30000
policyTypes:
- Ingress
---
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
name: default-egress
namespace: default
spec:
podSelector: {}
egress:
- to:
# Allow all egress
- ipBlock:
cidr: "0.0.0.0/0"
policyTypes:
- Egress