63 lines
1.5 KiB
YAML
63 lines
1.5 KiB
YAML
apiVersion: networking.k8s.io/v1
|
|
kind: NetworkPolicy
|
|
metadata:
|
|
name: holyarrs
|
|
namespace: holyarrs
|
|
spec:
|
|
# Metadata and indexers are on the internet; in the cluster it only talks
|
|
# to Jellyfin and qBittorrent
|
|
egress:
|
|
- ports:
|
|
- port: 53
|
|
protocol: UDP
|
|
- port: 53
|
|
protocol: TCP
|
|
to:
|
|
- namespaceSelector:
|
|
matchLabels:
|
|
kubernetes.io/metadata.name: kube-system
|
|
podSelector:
|
|
matchLabels:
|
|
k8s-app: kube-dns
|
|
- ports:
|
|
- port: 8096
|
|
protocol: TCP
|
|
to:
|
|
- namespaceSelector:
|
|
matchLabels:
|
|
kubernetes.io/metadata.name: jellyfin
|
|
podSelector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: jellyfin
|
|
- ports:
|
|
- port: 8080
|
|
protocol: TCP
|
|
to:
|
|
- namespaceSelector:
|
|
matchLabels:
|
|
kubernetes.io/metadata.name: qbit
|
|
podSelector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: qbittorrent
|
|
- to:
|
|
- ipBlock:
|
|
cidr: 0.0.0.0/0
|
|
except:
|
|
- 10.0.0.0/8
|
|
- 172.16.0.0/12
|
|
- 192.168.0.0/16
|
|
ingress:
|
|
- from:
|
|
- namespaceSelector:
|
|
matchLabels:
|
|
kubernetes.io/metadata.name: traefik
|
|
ports:
|
|
- port: 6262
|
|
protocol: TCP
|
|
podSelector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: holyarrs
|
|
policyTypes:
|
|
- Ingress
|
|
- Egress
|