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. ...@@ -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/), 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). 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 ## [2.1.3] - 2021-12-21
### Changed ### Changed
...@@ -58,6 +64,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -58,6 +64,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added ### Added
- Initial release - 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.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.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 [2.1.1]: https://edugit.org/AlekSIS/libs/k8s-linkup/-/tags/2.1.1
......
{{- range .Values.linkups }} {{- range .Values.linkups }}
{{- $timeouts := .timeouts | default dict }}
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
...@@ -11,9 +12,9 @@ data: ...@@ -11,9 +12,9 @@ data:
log stdout format raw local0 notice log stdout format raw local0 notice
defaults defaults
timeout connect 10s timeout connect {{ $timeouts.connect | default $.Values.timeouts.connect }}
timeout client 30s timeout client {{ $timeouts.client | default $.Values.timeouts.client }}
timeout server 30s timeout server {{ $timeouts.server | default $.Values.timeouts.server | default $timeouts.client | default $.Values.timeouts.client }}
log global log global
mode tcp mode tcp
...@@ -27,22 +28,26 @@ data: ...@@ -27,22 +28,26 @@ data:
monitor-uri /health monitor-uri /health
{{- range .portMappings }} {{- range .portMappings }}
{{- if ( .monitored | default true ) }} {{- if ( .monitored | default true ) }}
acl {{ .name }}_down nbsrv({{ .name}}_back) lt 1 acl {{ .name }}_down nbsrv({{ .name}}) lt 1
monitor fail if {{ .name }}_down monitor fail if {{ .name }}_down
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- range .portMappings }} {{- range .portMappings }}
{{- $local := .local | default dict }} {{- $local := .local | default dict }}
frontend {{ .name }} {{- $timeoutshere := .timeouts | default dict }}
listen {{ .name }}
bind *:{{ $local.port | default .remote.port }} bind *:{{ $local.port | default .remote.port }}
maxconn {{ .maxconn | default 20 }} maxconn {{ .maxconn | default 20 }}
default_backend {{ .name }}_back {{- if $timeoutshere.connect }}
{{- end }} timeout connect {{ $timeoutshere.connect }}
{{- end }}
{{- range .portMappings }} {{- if $timeoutshere.client }}
backend {{ .name }}_back timeout client {{ $timeoutshere.client }}
balance roundrobin {{- 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}} server {{ .remote.host | replace "." "_" }}_{{ .remote.port }} {{ .remote.host }}:{{ .remote.port }} {{- if ( .monitored | default true ) }} check{{- end}}
{{- end }} {{- end }}
--- ---
......
...@@ -10,6 +10,11 @@ image: ...@@ -10,6 +10,11 @@ image:
# Overrides the image tag whose default is the chart appVersion. # Overrides the image tag whose default is the chart appVersion.
tag: "" tag: ""
timeouts:
connect: 4s
client: 31s
# server: 31s
linkups: [] linkups: []
# - name: linkup1 # - name: linkup1
# connection: openvpn # connection: openvpn
...@@ -21,6 +26,8 @@ linkups: [] ...@@ -21,6 +26,8 @@ linkups: []
# secret: # secret:
# name: openvpn-secret # name: openvpn-secret
# healthCheckPort: 9000 # healthCheckPort: 9000
# timeouts:
# connect: 7s
# portMappings: # portMappings:
# - name: ldap # - name: ldap
# local: # local:
...@@ -30,6 +37,8 @@ linkups: [] ...@@ -30,6 +37,8 @@ linkups: []
# port: 389 # port: 389
# maxconn: 20 # maxconn: 20
# type: TCP # type: TCP
# timeouts:
# data: 601s
# monitored: true # monitored: true
imagePullSecrets: [] 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