Skip to content

Commit

Permalink
Updated all ingress templates with the if statement to check if a ing…
Browse files Browse the repository at this point in the history
…ressClassName was provided
  • Loading branch information
bradsoper committed Feb 15, 2024
1 parent ea8f6ae commit 5874599
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 5 deletions.
2 changes: 2 additions & 0 deletions pkg/app/controlplane/tmpl/webapp/ingress.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ metadata:
name: {{ .Spec.ControlPlane.WebApp.SvcName }}
namespace: {{ .Namespace }}
spec:
{{- if ne .Spec.Networking.Ingress.IngressClassName "" }}
ingressClassName: {{ .Spec.Networking.Ingress.IngressClassName }}
{{- end }}
{{- if and ( isTrue .Spec.Networking.HTTPS.Enabled ) (ne .Spec.Networking.HTTPS.CertSecret "") }}
tls:
- hosts:
Expand Down
1 change: 0 additions & 1 deletion pkg/app/dbs/tmpl/es/elastalert/ingress.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ spec:
{{- if ne .Spec.Networking.Ingress.IngressClassName "" }}
ingressClassName: {{ .Spec.Networking.Ingress.IngressClassName }}
{{- end }}
ingressClassName: {{ .Spec.Networking.Ingress.IngressClassName }}
{{- if and ( isTrue .Spec.Networking.HTTPS.Enabled ) (ne .Spec.Networking.HTTPS.CertSecret "") }}
tls:
- hosts:
Expand Down
2 changes: 2 additions & 0 deletions pkg/app/dbs/tmpl/es/elastic/ingress.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ metadata:
{{$k}}: "{{$v}}"
{{- end }}
spec:
{{- if ne .Spec.Networking.Ingress.IngressClassName "" }}
ingressClassName: {{ .Spec.Networking.Ingress.IngressClassName }}
{{- end }}
{{- if and ( isTrue .Spec.Networking.HTTPS.Enabled ) (ne .Spec.Networking.HTTPS.CertSecret "") }}
tls:
- hosts:
Expand Down
2 changes: 2 additions & 0 deletions pkg/app/dbs/tmpl/es/kibana/ingress.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ metadata:
{{$k}}: "{{$v}}"
{{- end }}
spec:
{{- if ne .Spec.Networking.Ingress.IngressClassName "" }}
ingressClassName: {{ .Spec.Networking.Ingress.IngressClassName }}
{{- end }}
{{- if and ( isTrue .Spec.Networking.HTTPS.Enabled ) (ne .Spec.Networking.HTTPS.CertSecret "") }}
tls:
- hosts:
Expand Down
2 changes: 2 additions & 0 deletions pkg/app/dbs/tmpl/prom/grafana/ingress.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ metadata:
{{$k}}: "{{$v}}"
{{- end }}
spec:
{{- if ne .Spec.Networking.Ingress.IngressClassName "" }}
ingressClassName: {{ .Spec.Networking.Ingress.IngressClassName }}
{{- end }}
{{- if and ( isTrue .Spec.Networking.HTTPS.Enabled ) (ne .Spec.Networking.HTTPS.CertSecret "") }}
tls:
- hosts:
Expand Down
2 changes: 2 additions & 0 deletions pkg/app/dbs/tmpl/prom/prometheus/ingress.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ metadata:
{{$k}}: "{{$v}}"
{{- end }}
spec:
{{- if ne .Spec.Networking.Ingress.IngressClassName "" }}
ingressClassName: {{ .Spec.Networking.Ingress.IngressClassName }}
{{- end }}
{{- if and ( isTrue .Spec.Networking.HTTPS.Enabled ) (ne .Spec.Networking.HTTPS.CertSecret "") }}
tls:
- hosts:
Expand Down
6 changes: 4 additions & 2 deletions pkg/app/sso/tmpl/central/ingress.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ metadata:
name: {{.Spec.SSO.Central.SvcName}}
namespace: {{.Namespace }}
spec:
ingressClassName: nginx
{{- if ne .Spec.Networking.Ingress.IngressClassName "" }}
ingressClassName: {{ .Spec.Networking.Ingress.IngressClassName }}
{{- end }}
{{- if and ( isTrue .Spec.Networking.HTTPS.Enabled ) (ne .Spec.Networking.HTTPS.CertSecret "") }}
tls:
- hosts:
Expand All @@ -35,4 +37,4 @@ spec:
service:
name: {{.Spec.SSO.Central.SvcName}}
port:
number: 8080
number: 8080
6 changes: 4 additions & 2 deletions pkg/app/sso/tmpl/jwks/ingress.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ metadata:
name: {{ .Spec.SSO.Jwks.SvcName }}
namespace: {{.Namespace }}
spec:
ingressClassName: nginx
{{- if ne .Spec.Networking.Ingress.IngressClassName "" }}
ingressClassName: {{ .Spec.Networking.Ingress.IngressClassName }}
{{- end }}
{{- if and ( isTrue .Spec.Networking.HTTPS.Enabled ) (ne .Spec.Networking.HTTPS.CertSecret "") }}
tls:
- hosts:
Expand All @@ -35,4 +37,4 @@ spec:
service:
name: "{{.Spec.SSO.Jwks.SvcName}}"
port:
number: 8080
number: 8080

0 comments on commit 5874599

Please sign in to comment.