Skip to content

Commit 47fde1b

Browse files
authored
feat(ingress): remove app-root redirect (#69)
1 parent 9c99bd7 commit 47fde1b

File tree

2 files changed

+3
-20
lines changed

2 files changed

+3
-20
lines changed

templates/_helpers.tpl

+2-3
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ Prints ingress configuration annotations
167167
*/}}
168168
{{- define "horizon.ingressConfigurationAnnotations" }}
169169
{{- if eq .context.Values.ingress.type "nginx" }}
170-
nginx.ingress.kubernetes.io/app-root: /ui#/ra
171170
nginx.ingress.kubernetes.io/server-snippet: |
172171
large_client_header_buffers 4 64k;
173172
{{- if .context.Values.ingress.clientCertificateAuth }}
@@ -179,7 +178,7 @@ nginx.ingress.kubernetes.io/configuration-snippet: |
179178
{{- end }}
180179
{{- else if eq .context.Values.ingress.type "traefik" }}
181180
traefik.ingress.kubernetes.io/router.tls: "true"
182-
{{ $middlewares := list "app-root" "https-redirect" }}
181+
{{ $middlewares := list "https-redirect" }}
183182
{{- if .context.Values.ingress.clientCertificateAuth }}
184183
{{- $middlewares = append $middlewares "client-auth" }}
185184
traefik.ingress.kubernetes.io/router.tls.options: {{ printf "%s-%s-%s@kubernetescrd" .context.Release.Namespace (include "common.names.fullname" .context) "client-auth" }}
@@ -222,4 +221,4 @@ Prints true if an upgrade job should run, false if not.
222221
{{- print "false" }}
223222
{{- end }}
224223
{{- end }}
225-
{{- end }}
224+
{{- end }}

templates/ingress-traefik.yml

+1-17
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,4 @@
11
{{- if and .Values.ingress.type (eq .Values.ingress.type "traefik") (.Capabilities.APIVersions.Has "traefik.containo.us/v1alpha1") }}
2-
apiVersion: traefik.containo.us/v1alpha1
3-
kind: Middleware
4-
metadata:
5-
name: {{ include "common.names.fullname" . }}-app-root
6-
labels: {{- include "horizon.labels.standard" . | nindent 4 }}
7-
{{- if .Values.commonLabels }}
8-
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
9-
{{- end }}
10-
{{- if .Values.commonAnnotations }}
11-
annotations:
12-
{{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
13-
{{- end }}
14-
spec:
15-
redirectRegex:
16-
regex: ^https:\/\/([^\/]+)\/?$
17-
replacement: https://${1}/ui#/ra/
182
---
193
apiVersion: traefik.containo.us/v1alpha1
204
kind: Middleware
@@ -64,4 +48,4 @@ spec:
6448
{{- include "common.tplvalues.render" ( dict "value" .Values.ingress.clientCertificateCASecrets "context" $ ) | nindent 6 }}
6549
{{- end }}
6650
{{- end }}
67-
{{- end }}
51+
{{- end }}

0 commit comments

Comments
 (0)