apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: {{ .Release.Name }}-allow-coturn
  namespace: webrtc-be
spec:
  podSelector:
    matchLabels:
      app: webrtc-be
  policyTypes:
  - Ingress
  - Egress
  ingress:
  - from:
    - namespaceSelector:
        matchLabels:
          kubernetes.io/metadata.name: coturn
      podSelector:
        matchLabels:
          app: coturn
  egress:
  - to:
    - namespaceSelector:
        matchLabels:
          kubernetes.io/metadata.name: coturn
      podSelector:
        matchLabels:
          app: coturn
