mirror of https://github.com/coder/coder.git
feat: add terminationGracePeriodSeconds to provisioner chart (#9048)
* feat: add terminationGracePeriodSeconds to provisioner chart Signed-off-by: Spike Curtis <spike@coder.com> * Remove hardcoded 1 minute graceful timeout Signed-off-by: Spike Curtis <spike@coder.com> --------- Signed-off-by: Spike Curtis <spike@coder.com>
This commit is contained in:
parent
e893ab232c
commit
41433cd1ec
|
@ -137,9 +137,7 @@ func (r *RootCmd) provisionerDaemonStart() *clibase.Cmd {
|
|||
cliui.Errorf(inv.Stderr, "Unexpected error, shutting down server: %s\n", exitErr)
|
||||
}
|
||||
|
||||
shutdown, shutdownCancel := context.WithTimeout(ctx, time.Minute)
|
||||
defer shutdownCancel()
|
||||
err = srv.Shutdown(shutdown)
|
||||
err = srv.Shutdown(ctx)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("shutdown: %w", err)
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ Deployment to merge into the libcoder template
|
|||
spec:
|
||||
template:
|
||||
spec:
|
||||
terminationGracePeriodSeconds: {{ .Values.provisionerDaemon.terminationGracePeriodSeconds }}
|
||||
containers:
|
||||
-
|
||||
{{ include "libcoder.containerspec" (list . "coder.containerspec") | indent 8}}
|
||||
|
|
|
@ -131,5 +131,5 @@ spec:
|
|||
volumeMounts: []
|
||||
restartPolicy: Always
|
||||
serviceAccountName: coder-provisioner
|
||||
terminationGracePeriodSeconds: 60
|
||||
terminationGracePeriodSeconds: 600
|
||||
volumes: []
|
||||
|
|
|
@ -131,5 +131,5 @@ spec:
|
|||
volumeMounts: []
|
||||
restartPolicy: Always
|
||||
serviceAccountName: coder-provisioner
|
||||
terminationGracePeriodSeconds: 60
|
||||
terminationGracePeriodSeconds: 600
|
||||
volumes: []
|
||||
|
|
|
@ -131,5 +131,5 @@ spec:
|
|||
volumeMounts: []
|
||||
restartPolicy: Always
|
||||
serviceAccountName: coder-provisioner
|
||||
terminationGracePeriodSeconds: 60
|
||||
terminationGracePeriodSeconds: 600
|
||||
volumes: []
|
||||
|
|
|
@ -139,5 +139,5 @@ spec:
|
|||
volumeMounts: []
|
||||
restartPolicy: Always
|
||||
serviceAccountName: coder-provisioner
|
||||
terminationGracePeriodSeconds: 60
|
||||
terminationGracePeriodSeconds: 600
|
||||
volumes: []
|
||||
|
|
|
@ -133,5 +133,5 @@ spec:
|
|||
volumeMounts: []
|
||||
restartPolicy: Always
|
||||
serviceAccountName: coder-provisioner
|
||||
terminationGracePeriodSeconds: 60
|
||||
terminationGracePeriodSeconds: 600
|
||||
volumes: []
|
||||
|
|
|
@ -132,5 +132,5 @@ spec:
|
|||
volumeMounts: []
|
||||
restartPolicy: Always
|
||||
serviceAccountName: coder-service-account
|
||||
terminationGracePeriodSeconds: 60
|
||||
terminationGracePeriodSeconds: 600
|
||||
volumes: []
|
||||
|
|
|
@ -202,3 +202,8 @@ provisionerDaemon:
|
|||
{}
|
||||
# location: usa
|
||||
# provider: kubernetes
|
||||
|
||||
# provisionerDaemon.terminationGracePeriodSeconds -- Time in seconds that Kubernetes should wait before forcibly
|
||||
# terminating the provisioner daemon. You should set this to be longer than your longest expected build time so that
|
||||
# redeployments do not interrupt builds in progress.
|
||||
terminationGracePeriodSeconds: 600
|
||||
|
|
Loading…
Reference in New Issue