mirror of
https://github.com/nold360/hive-apps
synced 2024-12-22 13:01:21 +00:00
add(netpol): allow cnpg2kubeapi
This commit is contained in:
parent
ba5fc52966
commit
e84294b2c2
4 changed files with 32 additions and 27 deletions
16
projects/gitea/manifests/netpol.yaml
Normal file
16
projects/gitea/manifests/netpol.yaml
Normal file
|
@ -0,0 +1,16 @@
|
|||
apiVersion: "cilium.io/v2"
|
||||
kind: CiliumNetworkPolicy
|
||||
metadata:
|
||||
name: allow-cnpg-kubeapi
|
||||
namespace: gitea
|
||||
spec:
|
||||
endpointSelector:
|
||||
matchLabels:
|
||||
cnpg.io/podRole: instance
|
||||
egress:
|
||||
- toEntities:
|
||||
- kube-apiserver
|
||||
- toPorts:
|
||||
- ports:
|
||||
- port: "6443"
|
||||
protocol: TCP
|
16
projects/nextcloud/manifests/netpol.yaml
Normal file
16
projects/nextcloud/manifests/netpol.yaml
Normal file
|
@ -0,0 +1,16 @@
|
|||
apiVersion: "cilium.io/v2"
|
||||
kind: CiliumNetworkPolicy
|
||||
metadata:
|
||||
name: allow-cnpg-kubeapi
|
||||
namespace: nextcloud
|
||||
spec:
|
||||
endpointSelector:
|
||||
matchLabels:
|
||||
cnpg.io/podRole: instance
|
||||
egress:
|
||||
- toEntities:
|
||||
- kube-apiserver
|
||||
- toPorts:
|
||||
- ports:
|
||||
- port: "6443"
|
||||
protocol: TCP
|
|
@ -5,7 +5,6 @@ config:
|
|||
- internet
|
||||
rules:
|
||||
- allow-minio
|
||||
- allow-cnpg-nextcloud
|
||||
|
||||
labels:
|
||||
environment: external
|
||||
|
|
|
@ -31,32 +31,6 @@ networkPolicy:
|
|||
to:
|
||||
- namespaceSelector: {}
|
||||
|
||||
allow-kubeapi:
|
||||
podSelector: {}
|
||||
policyTypes:
|
||||
- Egress
|
||||
egress:
|
||||
- ports:
|
||||
- port: 443
|
||||
protocol: TCP
|
||||
to:
|
||||
- namespaceSelector:
|
||||
matchLabels:
|
||||
name: kube-system
|
||||
|
||||
# Cloudnative PG
|
||||
allow-cnpg-nextcloud:
|
||||
podSelector: {}
|
||||
policyTypes:
|
||||
- Egress
|
||||
egress:
|
||||
- ports:
|
||||
- port: 443
|
||||
protocol: TCP
|
||||
to:
|
||||
- ipBlock:
|
||||
cidr: 10.43.0.1/32
|
||||
|
||||
# Allow access to internet proxy
|
||||
allow-proxy:
|
||||
podSelector: {}
|
||||
|
|
Loading…
Reference in a new issue