fix: 去除path路由
This commit is contained in:
parent
db6c521068
commit
54ef2cba47
|
@ -61,6 +61,13 @@ Create the name of the service account to use
|
|||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the full host of demo
|
||||
*/}}
|
||||
{{- define "demo-chart.host" -}}
|
||||
{{ .Release.Name }}.{{ .Values.host }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the url path of service
|
||||
*/}}
|
||||
|
|
|
@ -36,13 +36,9 @@ spec:
|
|||
containerPort: {{ .Values.service.port }}
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
{{- toYaml .Values.livenessProbe | nindent 12 }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
{{- toYaml .Values.readinessProbe | nindent 12 }}
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
|
|
|
@ -3,10 +3,7 @@ apiVersion: http.keda.sh/v1alpha1
|
|||
metadata:
|
||||
name: {{ include "demo-chart.fullname" . }}
|
||||
spec:
|
||||
host: {{ .Values.host }}
|
||||
path: {{ include "demo-chart.path" . }}
|
||||
pathType: {{ .Values.pathType }}
|
||||
rewrite: {{ .Values.rewritePath }}
|
||||
host: {{ include "demo-chart.host" . }}
|
||||
targetPendingRequests: {{ .Values.targetPendingRequests }}
|
||||
scaleTargetRef:
|
||||
deployment: {{ include "demo-chart.fullname" . }}
|
||||
|
|
|
@ -7,10 +7,10 @@ metadata:
|
|||
kubernetes.io/ingress.class: nginx
|
||||
spec:
|
||||
rules:
|
||||
- host: {{ .Values.host }}
|
||||
- host: {{ include "demo-chart.host" . }}
|
||||
http:
|
||||
paths:
|
||||
- path: {{ include "demo-chart.path" . }}/
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
|
|
27
values.yaml
27
values.yaml
|
@ -5,7 +5,7 @@
|
|||
replicaCount: 1
|
||||
targetPendingRequests: 200
|
||||
|
||||
host: ailab-demo.xf-yun.com
|
||||
host: ailab.xf-yun.com
|
||||
pathType: prefix
|
||||
pathPrefix: /demo
|
||||
rewritePath: true
|
||||
|
@ -87,3 +87,28 @@ tolerations: []
|
|||
|
||||
# Temporarily unconfigurable
|
||||
# affinity: {}
|
||||
|
||||
# Liveness and readiness probes
|
||||
# These are disabled by default, as they are not required for the demo
|
||||
# application to function. If you want to enable them, you can uncomment
|
||||
# the following lines and adjust them as necessary.
|
||||
livenessProbe:
|
||||
{}
|
||||
# failureThreshold: 3
|
||||
# httpGet:
|
||||
# path: /
|
||||
# port: http
|
||||
# scheme: HTTP
|
||||
# periodSeconds: 10
|
||||
# successThreshold: 1
|
||||
# timeoutSeconds: 1
|
||||
readinessProbe:
|
||||
{}
|
||||
# failureThreshold: 3
|
||||
# httpGet:
|
||||
# path: /
|
||||
# port: http
|
||||
# scheme: HTTP
|
||||
# periodSeconds: 10
|
||||
# successThreshold: 1
|
||||
# timeoutSeconds: 1
|
Loading…
Reference in New Issue