rules appear to be working.
This commit is contained in:
@@ -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 }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user