mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-05 21:07:43 +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:
|
||||
mode: Terminate
|
||||
certificateRefs:
|
||||
- name: {{ .Values.gatewayApi.secretName }}
|
||||
- name: {{ .Values.ingress.tls.secretName }}
|
||||
kind: Secret
|
||||
{{- 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
|
||||
kind: HTTPRoute
|
||||
metadata:
|
||||
@@ -21,6 +21,8 @@ spec:
|
||||
type: PathPrefix
|
||||
value: /
|
||||
backendRefs:
|
||||
- name: rustfs-svc
|
||||
port: 9001
|
||||
{{- end }}
|
||||
- name: {{ include "rustfs.fullname" . }}-sticky-svc
|
||||
port: {{ .Values.service.console.port }}
|
||||
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
|
||||
kind: Secret
|
||||
metadata:
|
||||
|
||||
@@ -141,7 +141,6 @@ gatewayApi:
|
||||
enabled: false
|
||||
gatewayClass: traefik
|
||||
hostname: example.rustfs.com
|
||||
secretName: secret-tls
|
||||
existingGateway:
|
||||
name: ""
|
||||
namespace: ""
|
||||
|
||||
Reference in New Issue
Block a user