Kokoro-FastAPI/charts/kokoro-fastapi/templates/ingress.yaml

44 lines
1.1 KiB
YAML
Raw Normal View History

2025-02-11 19:10:01 +01:00
{{- if .Values.ingress.enabled -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "kokoro-fastapi.fullname" . }}
2025-02-11 19:10:01 +01:00
labels:
{{- include "kokoro-fastapi.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
2025-02-11 19:10:01 +01:00
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
2025-02-11 19:10:01 +01:00
spec:
{{- with .Values.ingress.className }}
ingressClassName: {{ . }}
{{- end }}
{{- if .Values.ingress.tls }}
2025-02-11 19:10:01 +01:00
tls:
{{- range .Values.ingress.tls }}
2025-02-11 19:10:01 +01:00
- hosts:
{{- range .hosts }}
2025-02-11 19:10:01 +01:00
- {{ . | quote }}
{{- end }}
2025-02-11 19:10:01 +01:00
secretName: {{ .secretName }}
{{- end }}
2025-02-11 19:10:01 +01:00
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
2025-02-11 19:10:01 +01:00
http:
paths:
{{- range .paths }}
- path: {{ .path }}
{{- with .pathType }}
pathType: {{ . }}
2025-02-11 19:10:01 +01:00
{{- end }}
backend:
service:
name: {{ include "kokoro-fastapi.fullname" $ }}-kokoro-tts-service
port:
number: {{ $.Values.kokoroTTS.port }}
2025-02-11 19:10:01 +01:00
{{- end }}
{{- end }}
2025-02-11 19:10:01 +01:00
{{- end }}