mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-11-25 17:31:00 +00:00
41 lines
1.1 KiB
YAML
41 lines
1.1 KiB
YAML
|
{{- if .Values.ingress.enabled -}}
|
||
|
apiVersion: networking.k8s.io/v1
|
||
|
kind: Ingress
|
||
|
metadata:
|
||
|
name: {{ include "libretranslate.fullname" . }}
|
||
|
labels:
|
||
|
{{- include "libretranslate.labels" . | nindent 4 }}
|
||
|
annotations:
|
||
|
{{- toYaml .Values.ingress.annotations | nindent 4 }}
|
||
|
spec:
|
||
|
{{- if .Values.ingress.className }}
|
||
|
ingressClassName: {{ .Values.ingress.className }}
|
||
|
{{- end }}
|
||
|
{{- if .Values.ingress.tls }}
|
||
|
tls:
|
||
|
{{- range .Values.ingress.tls }}
|
||
|
- hosts:
|
||
|
{{- range .hosts }}
|
||
|
- {{ . | quote }}
|
||
|
{{- end }}
|
||
|
secretName: {{ .secretName }}
|
||
|
{{- end }}
|
||
|
{{- end }}
|
||
|
rules:
|
||
|
{{- range .Values.ingress.hosts }}
|
||
|
- host: {{ .host | quote }}
|
||
|
http:
|
||
|
paths:
|
||
|
{{- $fullName := include "libretranslate.fullname" $ }}
|
||
|
{{- range .paths }}
|
||
|
- path: {{ .path }}
|
||
|
pathType: {{ .pathType }}
|
||
|
backend:
|
||
|
service:
|
||
|
name: {{ include "libretranslate.fullname" $ }}
|
||
|
port:
|
||
|
number: {{ $.Values.service.port }}
|
||
|
{{- end }}
|
||
|
{{- end }}
|
||
|
{{- end }}
|