2021-09-30 14:37:30 +02:00
|
|
|
{{- if .Values.ingress.enabled -}}
|
|
|
|
apiVersion: {{ template "common.capabilities.ingress.apiVersion" . }}
|
|
|
|
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 }}
|
|
|
|
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:
|
|
|
|
- path: {{ .Values.ingress.path }}
|
|
|
|
{{- 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
|
|
|
|
- path: {{ .Values.ingress.path }}api/v1
|
|
|
|
{{- 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 }}
|
2021-09-30 14:37:30 +02:00
|
|
|
{{- end }}
|
|
|
|
{{- range .Values.ingress.extraHosts }}
|
|
|
|
- host: {{ .name }}
|
|
|
|
http:
|
|
|
|
paths:
|
|
|
|
- path: {{ default "/" .path }}
|
|
|
|
{{- if eq "true" (include "common.ingress.supportsPathType" $) }}
|
|
|
|
pathType: {{ default "ImplementationSpecific" .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
|
|
|
- path: {{ default "/" .path }}api/v1
|
|
|
|
{{- if eq "true" (include "common.ingress.supportsPathType" $) }}
|
|
|
|
pathType: {{ default "ImplementationSpecific" .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 }}
|
2021-09-30 14:37:30 +02:00
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|