diff --git a/charts/haproxy/templates/bin/_anchor.tpl b/charts/haproxy/templates/bin/_anchor.tpl index d84ca166..a910c467 100644 --- a/charts/haproxy/templates/bin/_anchor.tpl +++ b/charts/haproxy/templates/bin/_anchor.tpl @@ -124,7 +124,9 @@ cleanup() { while true; do if [ -e /tmp/stop ]; then echo Stopping + {%- if .Values.conf.anchor.enable_cleanup %} cleanup + {%- end %} break fi diff --git a/charts/haproxy/values.yaml b/charts/haproxy/values.yaml index fc6182e6..98400cef 100644 --- a/charts/haproxy/values.yaml +++ b/charts/haproxy/values.yaml @@ -41,6 +41,7 @@ conf: - mode tcp - option tcp-check - option redispatch + enable_cleanup: true haproxy: container_config_dir: /usr/local/etc/haproxy