Ports specified at communications now override the default ports of
the application. Also added some comments to the generated output.
This commit is contained in:
@@ -8,11 +8,12 @@
|
||||
{{- end }}
|
||||
{{- define "peers" }}
|
||||
{{- range .Applications }}
|
||||
# {{ .Application.Namespace.Name }}/{{ .Application.Name }}
|
||||
- podSelector:
|
||||
matchLabels: {{ .MatchLabels | toYaml | nindent 12 }}
|
||||
matchLabels: {{ .Application.MatchLabels | toYaml | nindent 12 }}
|
||||
namespaceSelector:
|
||||
matchLabels:
|
||||
kubernetes.io/metadata.name: {{ .Namespace.Name }}
|
||||
kubernetes.io/metadata.name: {{ .Application.Namespace.Name }}
|
||||
{{- if .Ports }}
|
||||
ports:
|
||||
{{- template "ports" .Ports }}
|
||||
@@ -21,10 +22,11 @@
|
||||
{{- end }}
|
||||
{{- define "networks" }}
|
||||
{{- range .Networks }}
|
||||
# {{ .Network.Name }}
|
||||
- ipBlock:
|
||||
cidr: {{ .CIDR}}
|
||||
cidr: {{ .Network.CIDR}}
|
||||
except:
|
||||
{{- range $except := .Except }}
|
||||
{{- range $except := .Network.Except }}
|
||||
- {{ $except }}
|
||||
{{- end }}
|
||||
{{- if .Ports }}
|
||||
@@ -43,6 +45,7 @@ metadata:
|
||||
namespace: "{{.app.Namespace.Name }}"
|
||||
labels: {{ .labels | toYaml | nindent 4 }}
|
||||
spec:
|
||||
# {{ .app.Namespace.Name }}/{{ .app.Name }}
|
||||
podSelector: {{ .app.MatchLabels | toYaml | nindent 4 }}
|
||||
policyTypes:
|
||||
{{- if or .ingress.Applications .ingress.Networks }}
|
||||
|
||||
Reference in New Issue
Block a user