kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
  name: postgres-{{.Replica}}
spec:
  podSelector:
    matchLabels:
      name: postgres-{{.Replica}}
  ingress:
  - ports:
    - port: 5432
      protocol: TCP
  - from:
    - podSelector:
        matchLabels:
          name: perfapp-{{.Replica}}
