Create media network policy

This commit is contained in:
SeanOMik 2023-04-04 02:01:25 -04:00
parent 508b65bcb2
commit 73664f4e17
Signed by: SeanOMik
GPG Key ID: 568F326C7EB33ACB
2 changed files with 19 additions and 1 deletions

View File

@ -3,4 +3,5 @@ kind: Kustomization
resources: resources:
- ./namespace.yaml - ./namespace.yaml
- ./sonarr - ./sonarr
- ./radarr - ./radarr
- ./network_policy.yaml

View File

@ -0,0 +1,17 @@
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: deny-most-allow-some
namespace: media
spec:
# Apply to all pods in this namespace
podSelector: {}
ingress:
- from:
# Allow all pods in this namespace
- podSelector: {}
# Allow all pods with this label
- podSelector:
matchLabels:
needsMedia: true