mirror of
https://github.com/rustfs/rustfs.git
synced 2026-09-04 19:25:40 +00:00
fix: traefik gateway api support with sticky session (#1660)
Co-authored-by: houseme <housemecn@gmail.com>
This commit is contained in:
@@ -18,6 +18,6 @@ spec:
|
|||||||
tls:
|
tls:
|
||||||
mode: Terminate
|
mode: Terminate
|
||||||
certificateRefs:
|
certificateRefs:
|
||||||
- name: {{ .Values.gatewayApi.secretName }}
|
- name: {{ .Values.ingress.tls.secretName }}
|
||||||
kind: Secret
|
kind: Secret
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{{- if .Values.gatewayApi.enabled -}}
|
{{- if and .Values.gatewayApi.enabled (eq .Values.gatewayApi.gatewayClass "traefik") }}
|
||||||
apiVersion: gateway.networking.k8s.io/v1
|
apiVersion: gateway.networking.k8s.io/v1
|
||||||
kind: HTTPRoute
|
kind: HTTPRoute
|
||||||
metadata:
|
metadata:
|
||||||
@@ -21,6 +21,8 @@ spec:
|
|||||||
type: PathPrefix
|
type: PathPrefix
|
||||||
value: /
|
value: /
|
||||||
backendRefs:
|
backendRefs:
|
||||||
- name: rustfs-svc
|
- name: {{ include "rustfs.fullname" . }}-sticky-svc
|
||||||
port: 9001
|
port: {{ .Values.service.console.port }}
|
||||||
{{- end }}
|
kind: TraefikService
|
||||||
|
group: traefik.io
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
{{- if eq .Values.gatewayApi.gatewayClass "traefik" }}
|
||||||
|
apiVersion: traefik.io/v1alpha1
|
||||||
|
kind: TraefikService
|
||||||
|
metadata:
|
||||||
|
name: {{ include "rustfs.fullname" . }}-sticky-svc
|
||||||
|
spec:
|
||||||
|
weighted:
|
||||||
|
services:
|
||||||
|
- name: {{ include "rustfs.fullname" . }}-svc
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
port: {{ .Values.service.console.port }}
|
||||||
|
weight: 1
|
||||||
|
sticky:
|
||||||
|
cookie:
|
||||||
|
name: rustfs
|
||||||
|
httpOnly: true
|
||||||
|
secure: true
|
||||||
|
sameSite: none
|
||||||
|
{{- end }}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
{{- if and (or .Values.gatewayApi.enabled .Values.ingress.tls.enabled) (not (or .Values.ingress.tls.certManager.enabled .Values.gatewayApi.existingGateway.name)) }}
|
{{- if .Values.ingress.tls.enabled -}}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Secret
|
kind: Secret
|
||||||
metadata:
|
metadata:
|
||||||
|
|||||||
@@ -141,7 +141,6 @@ gatewayApi:
|
|||||||
enabled: false
|
enabled: false
|
||||||
gatewayClass: traefik
|
gatewayClass: traefik
|
||||||
hostname: example.rustfs.com
|
hostname: example.rustfs.com
|
||||||
secretName: secret-tls
|
|
||||||
existingGateway:
|
existingGateway:
|
||||||
name: ""
|
name: ""
|
||||||
namespace: ""
|
namespace: ""
|
||||||
|
|||||||
Reference in New Issue
Block a user