Files
mark_word_fastapi/kubernetes/fastapi-chart/templates/ingress.yaml
2025-07-07 11:45:32 +08:00

25 lines
920 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# kubernetes/fastapi-chart/templates/ingress.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "mark-word-fastapi.fullname" . }}
labels:
{{- include "mark-word-fastapi.labels" . | nindent 4 }}
annotations:
# 可以添加 Traefik 特定的 annotation例如强制重定向到 HTTPS
# traefik.ingress.kubernetes.io/router.entrypoints: web, websecure
# traefik.ingress.kubernetes.io/router.tls: "true"
# traefik.ingress.kubernetes.io/router.middlewares: default-redirect-https@kubernetescrd
spec:
ingressClassName: {{ .Values.ingress.className }}
rules:
- host: {{ .Values.ingress.host | quote }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ include "mark-word-fastapi.fullname" . }}
port:
number: {{ .Values.service.port }}