more fixes for the netpolicy schema.

This commit is contained in:
Erik Brakkee 2025-01-03 00:31:03 +01:00
parent b8dfaa55a4
commit e576e00456

View File

@ -15,11 +15,11 @@
namespaceSelector: namespaceSelector:
matchLabels: matchLabels:
kubernetes.io/metadata.name: {{ .Application.Namespace.Name }} kubernetes.io/metadata.name: {{ .Application.Namespace.Name }}
{{- if .Ports }} {{- if .Ports }}
ports: ports:
{{- template "ports" .Ports }} {{- template "ports" .Ports }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- define "networks" }} {{- define "networks" }}
{{- range .Networks }} {{- range .Networks }}
@ -31,11 +31,11 @@
{{- range $except := .Network.Except }} {{- range $except := .Network.Except }}
- {{ $except }} - {{ $except }}
{{- end }} {{- end }}
{{- if .Ports }} {{- if .Ports }}
ports: ports:
{{- template "ports" .Ports }} {{- template "ports" .Ports }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- if not .app.Namespace.Open }} {{- if not .app.Namespace.Open }}