apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: np-{{ include "mail-relay.fullname" . }} labels: {{- include "mail-relay.labels" . | nindent 4 }} spec: podSelector: matchLabels: app.kubernetes.io/name: {{ include "mail-relay.name" . }} policyTypes: - Ingress ingress: - ports: - port: 587