update ingress.yaml
This commit is contained in:
@@ -1,19 +1,25 @@
|
|||||||
|
# kubernetes/fastapi-chart/templates/ingress.yaml
|
||||||
apiVersion: networking.k8s.io/v1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: mark-word-fastapi-ingress
|
name: {{ include "mark-word-fastapi.fullname" . }}
|
||||||
namespace: default
|
labels:
|
||||||
|
{{- include "mark-word-fastapi.labels" . | nindent 4 }}
|
||||||
annotations:
|
annotations:
|
||||||
traefik.ingress.kubernetes.io/router.entrypoints: web
|
# 可以添加 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:
|
spec:
|
||||||
ingressClassName: traefik
|
ingressClassName: {{ .Values.ingress.className }}
|
||||||
rules:
|
rules:
|
||||||
- http:
|
- host: {{ .Values.ingress.host | quote }}
|
||||||
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: /
|
- path: /
|
||||||
pathType: Prefix
|
pathType: Prefix
|
||||||
backend:
|
backend:
|
||||||
service:
|
service:
|
||||||
name: mark-word-fastapi
|
name: {{ include "mark-word-fastapi.fullname" . }}
|
||||||
port:
|
port:
|
||||||
number: 8000
|
number: {{ .Values.service.port }}
|
||||||
Reference in New Issue
Block a user