17 lines
No EOL
361 B
YAML
17 lines
No EOL
361 B
YAML
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 |