48 lines
1.4 KiB
YAML
48 lines
1.4 KiB
YAML
{{- if .Values.ingress.enabled }}
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: {{ include "reuse.fullname" . }}
|
|
labels: {{- include "reuse.labels" . | nindent 4 }}
|
|
annotations:
|
|
{{- toYaml .Values.ingress.annotations | nindent 4 }}
|
|
spec:
|
|
ingressClassName: {{ .Values.ingress.className }}
|
|
{{- if .Values.ingress.tls }}
|
|
tls:
|
|
- hosts:
|
|
- {{ .Values.ingress.host }}
|
|
secretName: {{ include "reuse.fullname" . }}-tls
|
|
{{- end }}
|
|
rules:
|
|
- host: {{ .Values.ingress.host }}
|
|
http:
|
|
paths:
|
|
{{- if .Values.landing.enabled }}
|
|
{{- range .Values.ingress.apiPaths }}
|
|
- path: {{ .path }}
|
|
pathType: {{ .pathType }}
|
|
backend:
|
|
service:
|
|
name: {{ include "reuse.fullname" $ }}
|
|
port:
|
|
number: {{ $.Values.service.port }}
|
|
{{- end }}
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: {{ include "reuse.landingFullname" . }}
|
|
port:
|
|
number: {{ .Values.landing.service.port }}
|
|
{{- else }}
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: {{ include "reuse.fullname" . }}
|
|
port:
|
|
number: {{ .Values.service.port }}
|
|
{{- end }}
|
|
{{- end }}
|