policy-generator/cmd/policygen/templates/netpol/ingress.yaml
2025-01-02 11:37:20 +01:00

14 lines
268 B
YAML

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