rules appear to be working.

This commit is contained in:
2025-01-04 00:16:25 +01:00
parent 144a624985
commit 93a743765d
6 changed files with 40 additions and 14 deletions
+16 -10
View File
@@ -1,10 +1,10 @@
{{- define "ports" }}
{{- range $port := . }}
- port: {{ $port.Port }}
{{- if $port.Protocol }}
protocol: {{ $port.Protocol }}
{{- end }}
{{- end }}
{{- range $port := . }}
- port: {{ $port.Port }}
{{- if $port.Protocol }}
protocol: {{ $port.Protocol }}
{{- end }}
{{- end }}
{{- end }}
{{- define "peers" }}
{{- range .Applications }}
@@ -24,6 +24,7 @@
{{- end }}
{{- define "networks" }}
{{- range .Networks }}
{{- if .Network.CIDR }}
- {{.Rule}}:
# {{ .Network.Name }}
- ipBlock:
@@ -31,11 +32,16 @@
except:
{{- range $except := .Network.Except }}
- {{ $except }}
{{- end }}
{{- if .Ports }}
{{- end }}
{{- end }}
{{- if .Ports }}
{{- if .Network.CIDR }}
ports:
{{- template "ports" .Ports }}
{{- end }}
{{- else }}
- ports:
{{- end }}
{{- template "ports" .Ports }}
{{- end }}
{{- end }}
{{- end }}