kind: NetworkPolicy apiVersion: networking.k8s.io/v1 metadata: name: "{{.name}}" namespace: "{{.namespace}}" spec: policyTypes: - Egress podSelector: {{.selector}} egress: {{- range $from := .from }} - {{ $from | nindent 4 }} {{- end }}