25 lines
854 B
YAML
25 lines
854 B
YAML
apiVersion: networking.k8s.io/v1
|
|
kind: NetworkPolicy
|
|
metadata:
|
|
name: checker-control-plane
|
|
namespace: proxy-pool
|
|
spec:
|
|
podSelector:
|
|
matchLabels: {app.kubernetes.io/name: proxy-checker}
|
|
policyTypes: [Ingress, Egress]
|
|
ingress:
|
|
- from:
|
|
- namespaceSelector: {matchLabels: {kubernetes.io/metadata.name: monitoring}}
|
|
ports: [{port: 9090, protocol: TCP}]
|
|
egress:
|
|
- to:
|
|
- namespaceSelector: {matchLabels: {kubernetes.io/metadata.name: kube-system}}
|
|
ports: [{port: 53, protocol: UDP}, {port: 53, protocol: TCP}]
|
|
- to:
|
|
- podSelector: {matchLabels: {app.kubernetes.io/name: proxy-controller}}
|
|
ports: [{port: 8443, protocol: TCP}]
|
|
- to:
|
|
- ipBlock:
|
|
cidr: 0.0.0.0/0
|
|
except: [10.0.0.0/8, 100.64.0.0/10, 127.0.0.0/8, 169.254.0.0/16, 172.16.0.0/12, 192.168.0.0/16]
|