Rename base Cilium egress policies by namespace
This commit is contained in:
parent
69db3bd424
commit
cab45b8b79
4 changed files with 19 additions and 4 deletions
|
|
@ -1,13 +1,18 @@
|
||||||
apiVersion: cilium.io/v2
|
apiVersion: cilium.io/v2
|
||||||
kind: CiliumNetworkPolicy
|
kind: CiliumNetworkPolicy
|
||||||
metadata:
|
metadata:
|
||||||
name: apps-base-egress
|
name: forgejo-base-egress
|
||||||
namespace: forgejo
|
namespace: forgejo
|
||||||
|
|
||||||
spec:
|
spec:
|
||||||
endpointSelector: {}
|
endpointSelector: {}
|
||||||
|
|
||||||
egress:
|
egress:
|
||||||
|
# Allow access to the Kubernetes API
|
||||||
- toEntities:
|
- toEntities:
|
||||||
- kube-apiserver
|
- kube-apiserver
|
||||||
|
|
||||||
|
# Allow DNS lookups
|
||||||
- toEndpoints:
|
- toEndpoints:
|
||||||
- matchLabels:
|
- matchLabels:
|
||||||
k8s:io.kubernetes.pod.namespace: kube-system
|
k8s:io.kubernetes.pod.namespace: kube-system
|
||||||
|
|
@ -18,3 +23,13 @@ spec:
|
||||||
protocol: UDP
|
protocol: UDP
|
||||||
- port: "53"
|
- port: "53"
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
|
|
||||||
|
# Allow Forgejo to talk to PostgreSQL
|
||||||
|
- toEndpoints:
|
||||||
|
- matchLabels:
|
||||||
|
k8s:io.kubernetes.pod.namespace: platform-services
|
||||||
|
app: platform-postgres
|
||||||
|
toPorts:
|
||||||
|
- ports:
|
||||||
|
- port: "5432"
|
||||||
|
protocol: TCP
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
apiVersion: cilium.io/v2
|
apiVersion: cilium.io/v2
|
||||||
kind: CiliumNetworkPolicy
|
kind: CiliumNetworkPolicy
|
||||||
metadata:
|
metadata:
|
||||||
name: apps-base-egress
|
name: openproject-base-egress
|
||||||
namespace: openproject
|
namespace: openproject
|
||||||
spec:
|
spec:
|
||||||
endpointSelector: {}
|
endpointSelector: {}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
apiVersion: cilium.io/v2
|
apiVersion: cilium.io/v2
|
||||||
kind: CiliumNetworkPolicy
|
kind: CiliumNetworkPolicy
|
||||||
metadata:
|
metadata:
|
||||||
name: apps-base-egress
|
name: pgadmin-base-egress
|
||||||
namespace: pgadmin
|
namespace: pgadmin
|
||||||
spec:
|
spec:
|
||||||
endpointSelector: {}
|
endpointSelector: {}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
apiVersion: cilium.io/v2
|
apiVersion: cilium.io/v2
|
||||||
kind: CiliumNetworkPolicy
|
kind: CiliumNetworkPolicy
|
||||||
metadata:
|
metadata:
|
||||||
name: apps-base-egress
|
name: platform-services-base-egress
|
||||||
namespace: platform-services
|
namespace: platform-services
|
||||||
spec:
|
spec:
|
||||||
endpointSelector: {}
|
endpointSelector: {}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue