kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
  name: allow-ownpods-to-logstash
spec:
  podSelector:
    matchLabels:
      deploymentconfig: logstash-git
  ingress:
    - ports:
        - protocol: TCP
          port: 8001
        - protocol: TCP
          port: 8002
      from:
        - podSelector: {}
  policyTypes:
    - Ingress
