addes support for matchExpressions

This commit is contained in:
2025-01-03 17:59:11 +01:00
parent 8c229f7a93
commit 852833764c
4 changed files with 24 additions and 9 deletions
@@ -5,9 +5,11 @@ apiVersion: cilium.io/v2
metadata:
name: {{.app.Name}}-apiserver
namespace: {{.app.Namespace.Name}}
labels: {{ .labels | toYaml | nindent 4 }}
labels: {{ .labels | toJson }}
spec:
endpointSelector: {{ .app.MatchLabels | toYaml | nindent 4 }}
endpointSelector:
matchLabels: {{ .app.MatchLabels | toJson }}
matchExpressions: {{ .app.MatchExpressions | toJson }}
{{- if .ingress }}
ingress:
- fromEntities:
+3 -1
View File
@@ -12,6 +12,7 @@
# {{ .Application.Namespace.Name }}/{{ .Application.Name }}
- podSelector:
matchLabels: {{ .Application.MatchLabels | toJson }}
matchExpressions: {{ .Application.MatchExpressions | toJson }}
namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: {{ .Application.Namespace.Name }}
@@ -45,11 +46,12 @@ apiVersion: networking.k8s.io/v1
metadata:
name: "{{.app.Name}}"
namespace: "{{.app.Namespace.Name }}"
labels: {{ .labels | toYaml | nindent 4 }}
labels: {{ .labels | toJson }}
spec:
# {{ .app.Namespace.Name }}/{{ .app.Name }}
podSelector:
matchLabels: {{ .app.MatchLabels | toJson }}
matchExpressions: {{ .app.MatchExpressions | toJson }}
policyTypes:
{{- if or .ingress.Applications .ingress.Networks }}
- Ingress