Skip to content
Snippets Groups Projects
Verified Commit ac8b328e authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

[Chart] Allow configuring timeouts

parent 614d8529
No related branches found
No related tags found
No related merge requests found
Pipeline #46876 passed
......@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [2.2.0] - 2021-12-23
### Added
- \[Chart\] Allow configuring timeouts per linkup and per port mapping
## [2.1.3] - 2021-12-21
### Changed
......@@ -58,6 +64,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Initial release
[2.2.0]: https://edugit.org/AlekSIS/libs/k8s-linkup/-/tags/2.2.0
[2.1.3]: https://edugit.org/AlekSIS/libs/k8s-linkup/-/tags/2.1.3
[2.1.2]: https://edugit.org/AlekSIS/libs/k8s-linkup/-/tags/2.1.2
[2.1.1]: https://edugit.org/AlekSIS/libs/k8s-linkup/-/tags/2.1.1
......
{{- range .Values.linkups }}
{{- $timeouts := .timeouts | default dict }}
apiVersion: v1
kind: ConfigMap
metadata:
......@@ -11,9 +12,9 @@ data:
log stdout format raw local0 notice
defaults
timeout connect 10s
timeout client 30s
timeout server 30s
timeout connect {{ $timeouts.connect | default $.Values.timeouts.connect }}
timeout client {{ $timeouts.client | default $.Values.timeouts.client }}
timeout server {{ $timeouts.server | default $.Values.timeouts.server | default $timeouts.client | default $.Values.timeouts.client }}
log global
mode tcp
......@@ -27,22 +28,26 @@ data:
monitor-uri /health
{{- range .portMappings }}
{{- if ( .monitored | default true ) }}
acl {{ .name }}_down nbsrv({{ .name}}_back) lt 1
acl {{ .name }}_down nbsrv({{ .name}}) lt 1
monitor fail if {{ .name }}_down
{{- end }}
{{- end }}
{{- range .portMappings }}
{{- $local := .local | default dict }}
frontend {{ .name }}
{{- $timeoutshere := .timeouts | default dict }}
listen {{ .name }}
bind *:{{ $local.port | default .remote.port }}
maxconn {{ .maxconn | default 20 }}
default_backend {{ .name }}_back
{{- end }}
{{- range .portMappings }}
backend {{ .name }}_back
balance roundrobin
{{- if $timeoutshere.connect }}
timeout connect {{ $timeoutshere.connect }}
{{- end }}
{{- if $timeoutshere.client }}
timeout client {{ $timeoutshere.client }}
{{- end }}
{{- if or $timeoutshere.server $timeoutshere.client }}
timeout server {{ $timeoutshere.server | default $timeoutshere.client }}
{{- end }}
server {{ .remote.host | replace "." "_" }}_{{ .remote.port }} {{ .remote.host }}:{{ .remote.port }} {{- if ( .monitored | default true ) }} check{{- end}}
{{- end }}
---
......
......@@ -10,6 +10,11 @@ image:
# Overrides the image tag whose default is the chart appVersion.
tag: ""
timeouts:
connect: 4s
client: 31s
# server: 31s
linkups: []
# - name: linkup1
# connection: openvpn
......@@ -21,6 +26,8 @@ linkups: []
# secret:
# name: openvpn-secret
# healthCheckPort: 9000
# timeouts:
# connect: 7s
# portMappings:
# - name: ldap
# local:
......@@ -30,6 +37,8 @@ linkups: []
# port: 389
# maxconn: 20
# type: TCP
# timeouts:
# data: 601s
# monitored: true
imagePullSecrets: []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment