60 lines
1.3 KiB
YAML
60 lines
1.3 KiB
YAML
apiVersion: networking.k8s.io/v1
|
|||
|
|
kind: NetworkPolicy
|
||
|
|
metadata:
|
||
|
|
name: default-deny-ingress
|
||
|
|
namespace: voice-platform
|
||
|
|
spec:
|
||
|
|
podSelector: {}
|
||
|
|
policyTypes:
|
||
|
|
- Ingress
|
||
|
|
---
|
||
|
|
apiVersion: networking.k8s.io/v1
|
||
|
|
kind: NetworkPolicy
|
||
|
|
metadata:
|
||
|
|
name: allow-ingress-controller
|
||
|
|
namespace: voice-platform
|
||
|
|
spec:
|
||
|
|
podSelector:
|
||
|
|
matchExpressions:
|
||
|
|
- key: app.kubernetes.io/component
|
||
|
|
operator: In
|
||
|
|
values: [api, callbacks, web]
|
||
|
|
policyTypes:
|
||
|
|
- Ingress
|
||
|
|
ingress:
|
||
|
|
- from:
|
||
|
|
- namespaceSelector:
|
||
|
|
matchLabels:
|
||
|
|
kubernetes.io/metadata.name: ingress-nginx
|
||
|
|
ports:
|
||
|
|
- protocol: TCP
|
||
|
|
port: 8080
|
||
|
|
- protocol: TCP
|
||
|
|
port: 8081
|
||
|
|
---
|
||
|
|
apiVersion: networking.k8s.io/v1
|
||
|
|
kind: NetworkPolicy
|
||
|
|
metadata:
|
||
|
|
name: allow-monitoring
|
||
|
|
namespace: voice-platform
|
||
|
|
spec:
|
||
|
|
podSelector:
|
||
|
|
matchExpressions:
|
||
|
|
- key: app.kubernetes.io/component
|
||
|
|
operator: In
|
||
|
|
values: [api, callbacks, worker]
|
||
|
|
policyTypes:
|
||
|
|
- Ingress
|
||
|
|
ingress:
|
||
|
|
- from:
|
||
|
|
- namespaceSelector:
|
||
|
|
matchLabels:
|
||
|
|
kubernetes.io/metadata.name: monitoring
|
||
|
|
ports:
|
||
|
|
- protocol: TCP
|
||
|
|
port: 8080
|
||
|
|
- protocol: TCP
|
||
|
|
port: 8081
|
||
|
|
- protocol: TCP
|
||
|
|
port: 8082
|