Skip to content
Snippets Groups Projects
Commit 307c4ebb authored by Mart van Santen's avatar Mart van Santen
Browse files

Added web and kratos redirect

parent 24bdcd14
No related branches found
No related tags found
1 merge request!23Resolve "Add web and kratos paths in nginx configuration"
Pipeline #12618 failed with stages
in 2 minutes and 56 seconds
......@@ -19,6 +19,7 @@ metadata:
kubernetes.io/tls-acme: "true"
{{- end }}
{{- end }}
nginx.ingress.kubernetes.io/rewrite-target: /$1
spec:
{{- if or .Values.ingress.tls .Values.ingress.extraTls }}
tls:
......@@ -36,28 +37,43 @@ spec:
- host: {{ .Values.ingress.hostname }}
http:
paths:
- path: {{ .Values.ingress.path }}
- path: ({{ .Values.ingress.path }}.*)
{{- if eq "true" (include "common.ingress.supportsPathType" .) }}
pathType: {{ .Values.ingress.pathType }}
{{- end }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "dashboard.serviceName" .) "servicePort" "dashboard-http" "context" $) | nindent 14 }}
# Forward API calls to the back-end container
- path: {{ .Values.ingress.path }}api/v1
- path: ({{ .Values.ingress.path }}api/v1.*)
{{- if eq "true" (include "common.ingress.supportsPathType" .) }}
pathType: {{ .Values.ingress.pathType }}
{{- end }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "backend.serviceName" .) "servicePort" "backend-http" "context" $) | nindent 14 }}
- path: ({{ .Values.ingress.path }}web.*)
{{- if eq "true" (include "common.ingress.supportsPathType" .) }}
pathType: {{ .Values.ingress.pathType }}
{{- end }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "backend.serviceName" .) "servicePort" "backend-http" "context" $) | nindent 14 }}
- path: {{ .Values.ingress.path }}kratos/(.*)
{{- if eq "true" (include "common.ingress.supportsPathType" .) }}
pathType: {{ .Values.ingress.pathType }}
{{- end }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "single-sign-on.fullname" .)-kratos-public "servicePort" "80" "context" $) | nindent 14 }}
{{- end }}
{{- range .Values.ingress.extraHosts }}
- host: {{ .name }}
http:
paths:
- path: {{ default "/" .path }}
- path: ({{ default "/" .path }}.*)
{{- if eq "true" (include "common.ingress.supportsPathType" $) }}
pathType: {{ default "ImplementationSpecific" .pathType }}
{{- end }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "dashboard.serviceName" $) "servicePort" "dashboard-http" "context" $) | nindent 14 }}
- path: {{ default "/" .path }}api/v1
- path: ({{ default "/" .path }}api/v1.*)
{{- if eq "true" (include "common.ingress.supportsPathType" $) }}
pathType: {{ default "ImplementationSpecific" .pathType }}
{{- end }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "backend.serviceName" .) "servicePort" "backend-http" "context" $) | nindent 14 }}
- path: ({{ default "/" .path }}web.*)
{{- if eq "true" (include "common.ingress.supportsPathType" $) }}
pathType: {{ default "ImplementationSpecific" .pathType }}
{{- end }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment