-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Let session proxy handle timeouts
The default timeout for nginx is 60 seconds and for haproxy it's 30 seconds. Our session proxy should terminate requests after 60 seconds with a custom error page, but the Ingress nginx / HAProxy were faster. This sets the timeout to 70s, independently from nginx / HAProxy. Since we want to have custom annotations for sessions and the rest of the application, this commit splits the ingress into two.
- Loading branch information
1 parent
82c81a1
commit 5667b26
Showing
2 changed files
with
36 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# SPDX-FileCopyrightText: Copyright DB InfraGO AG and contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: {{ .Release.Name }}-nginx-sessions | ||
labels: | ||
id: {{ .Release.Name }}-nginx-sessions | ||
annotations: | ||
nginx.ingress.kubernetes.io/proxy-body-size: "0" | ||
nginx.ingress.kubernetes.io/proxy-buffering: "off" | ||
nginx.ingress.kubernetes.io/proxy-read-timeout: '70' | ||
nginx.ingress.kubernetes.io/proxy-connect-timeout: '70' | ||
nginx.ingress.kubernetes.io/proxy-send-timeout: '70' | ||
nginx.ingress.kubernetes.io/proxy-request-buffering: "off" | ||
{{- if eq .Values.cluster.kind "OpenShift" }} | ||
route.openshift.io/insecureEdgeTerminationPolicy: Redirect | ||
route.openshift.io/termination: edge | ||
haproxy.router.openshift.io/timeout: 70s | ||
{{ end }} | ||
spec: | ||
ingressClassName: {{ .Values.cluster.ingressClassName }} | ||
rules: | ||
- http: | ||
paths: | ||
- path: /session | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: {{ .Release.Name }}-session-nginx | ||
port: | ||
name: http | ||
{{ if not .Values.general.wildcardHost }} | ||
host: {{ .Values.general.host }} | ||
{{ end }} |