k3s-cluster/cluster/apps/media/network_policy.yaml

17 lines
361 B
YAML
Raw Normal View History

2023-04-04 06:01:25 +00:00
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: deny-most-allow-some
namespace: media
spec:
# Apply to all pods in this namespace
2023-04-04 06:03:23 +00:00
podSelector: {}
2023-04-04 06:01:25 +00:00
ingress:
- from:
# Allow all pods in this namespace
- podSelector: {}
# Allow all pods with this label
- podSelector:
2023-04-04 06:05:00 +00:00
matchLabels:
needsMedia: true