From 46e39bb0210b1bf4dd52ccab900d32fcd94fce2d Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Sun, 19 Apr 2020 18:04:11 +0200 Subject: [PATCH] Feat: autohttps readinessProbe for quicker shutdowns When the autohttps deployment is updating, it keeps existing connections open for a while before it shuts down, but it closes itself for new connections. After it has closed itself for new connections, it is still considered ready by the service that delegates traffic, so that makes the pod continue to receive traffic that will crash. With this change, it will stop receiving traffic, which is preferred as it isn't actually doing its job to receive it as it should any more at this stage. --- jupyterhub/templates/proxy/autohttps/deployment.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/jupyterhub/templates/proxy/autohttps/deployment.yaml b/jupyterhub/templates/proxy/autohttps/deployment.yaml index e1d81a9aba..01f8f72af8 100644 --- a/jupyterhub/templates/proxy/autohttps/deployment.yaml +++ b/jupyterhub/templates/proxy/autohttps/deployment.yaml @@ -68,6 +68,12 @@ spec: mountPath: /etc/traefik - name: certificates mountPath: /etc/acme + readinessProbe: + tcpSocket: + port: http + initialDelaySeconds: 1 + periodSeconds: 1 + failureThreshold: 3 - name: secret-sync image: "{{ .Values.proxy.secretSync.image.name }}:{{ .Values.proxy.secretSync.image.tag }}" {{- with .Values.proxy.secretSync.image.pullPolicy }}