2021-09-30 14:37:30 +02:00
|
|
|
{{- if .Values.ingress.enabled -}}
|
2022-04-01 08:31:03 +02:00
|
|
|
apiVersion: {{ template "common.capabilities.ingress.apiVersion" . }}
|
2021-09-30 14:37:30 +02:00
|
|
|
kind: Ingress
|
|
|
|
metadata:
|
|
|
|
name: {{ template "common.names.fullname" . }}
|
|
|
|
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
|
|
|
{{- if .Values.commonLabels }}
|
|
|
|
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if or .Values.ingress.annotations .Values.ingress.certManager .Values.commonAnnotations }}
|
|
|
|
annotations:
|
|
|
|
{{- if .Values.commonAnnotations }}
|
|
|
|
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.ingress.annotations }}
|
|
|
|
{{- toYaml .Values.ingress.annotations | nindent 4 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.ingress.certManager }}
|
|
|
|
kubernetes.io/tls-acme: "true"
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
2022-03-22 10:51:37 +01:00
|
|
|
nginx.ingress.kubernetes.io/rewrite-target: /$1
|
2021-09-30 14:37:30 +02:00
|
|
|
spec:
|
|
|
|
{{- if or .Values.ingress.tls .Values.ingress.extraTls }}
|
|
|
|
tls:
|
|
|
|
{{- if .Values.ingress.tls }}
|
|
|
|
- hosts:
|
|
|
|
- {{ .Values.ingress.hostname }}
|
|
|
|
secretName: {{ printf "%s-tls" .Values.ingress.hostname }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.ingress.extraTls }}
|
|
|
|
{{- toYaml .Values.ingress.extraTls | nindent 4 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
rules:
|
|
|
|
{{- if .Values.ingress.hostname }}
|
|
|
|
- host: {{ .Values.ingress.hostname }}
|
|
|
|
http:
|
|
|
|
paths:
|
2022-03-31 10:18:12 +02:00
|
|
|
- path: {{ .Values.ingress.path }}(.*)
|
2021-09-30 14:37:30 +02:00
|
|
|
{{- if eq "true" (include "common.ingress.supportsPathType" .) }}
|
|
|
|
pathType: {{ .Values.ingress.pathType }}
|
|
|
|
{{- end }}
|
2021-11-22 15:43:51 +01:00
|
|
|
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "dashboard.serviceName" .) "servicePort" "dashboard-http" "context" $) | nindent 14 }}
|
2021-10-05 16:13:59 +02:00
|
|
|
# Forward API calls to the back-end container
|
2022-03-31 10:18:12 +02:00
|
|
|
- path: {{ .Values.ingress.path }}(api/v1.*)
|
2021-10-05 16:13:59 +02:00
|
|
|
{{- if eq "true" (include "common.ingress.supportsPathType" .) }}
|
|
|
|
pathType: {{ .Values.ingress.pathType }}
|
|
|
|
{{- end }}
|
2021-10-05 16:39:47 +02:00
|
|
|
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "backend.serviceName" .) "servicePort" "backend-http" "context" $) | nindent 14 }}
|
2022-03-31 10:18:12 +02:00
|
|
|
- path: {{ .Values.ingress.path }}(web.*)
|
2022-03-22 10:51:37 +01:00
|
|
|
{{- 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/(.*)
|
|
|
|
pathType: {{ .Values.ingress.pathType }}
|
2022-03-31 10:18:12 +02:00
|
|
|
backend:
|
|
|
|
service:
|
2022-04-06 16:51:38 +02:00
|
|
|
name: kratos-public
|
2022-03-31 10:18:12 +02:00
|
|
|
port:
|
|
|
|
number: 80
|
2021-09-30 14:37:30 +02:00
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|