mirror of
https://github.com/coder/coder.git
synced 2026-10-29 17:44:33 +08:00
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:
@@ -137,9 +137,7 @@ func (r *RootCmd) provisionerDaemonStart() *clibase.Cmd {
|
|||||||
cliui.Errorf(inv.Stderr, "Unexpected error, shutting down server: %s\n", exitErr)
|
cliui.Errorf(inv.Stderr, "Unexpected error, shutting down server: %s\n", exitErr)
|
||||||
}
|
}
|
||||||
|
|
||||||
shutdown, shutdownCancel := context.WithTimeout(ctx, time.Minute)
|
err = srv.Shutdown(ctx)
|
||||||
defer shutdownCancel()
|
|
||||||
err = srv.Shutdown(shutdown)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return xerrors.Errorf("shutdown: %w", err)
|
return xerrors.Errorf("shutdown: %w", err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ Deployment to merge into the libcoder template
|
|||||||
spec:
|
spec:
|
||||||
template:
|
template:
|
||||||
spec:
|
spec:
|
||||||
|
terminationGracePeriodSeconds: {{ .Values.provisionerDaemon.terminationGracePeriodSeconds }}
|
||||||
containers:
|
containers:
|
||||||
-
|
-
|
||||||
{{ include "libcoder.containerspec" (list . "coder.containerspec") | indent 8}}
|
{{ include "libcoder.containerspec" (list . "coder.containerspec") | indent 8}}
|
||||||
|
|||||||
+1
-1
@@ -131,5 +131,5 @@ spec:
|
|||||||
volumeMounts: []
|
volumeMounts: []
|
||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
serviceAccountName: coder-provisioner
|
serviceAccountName: coder-provisioner
|
||||||
terminationGracePeriodSeconds: 60
|
terminationGracePeriodSeconds: 600
|
||||||
volumes: []
|
volumes: []
|
||||||
|
|||||||
+1
-1
@@ -131,5 +131,5 @@ spec:
|
|||||||
volumeMounts: []
|
volumeMounts: []
|
||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
serviceAccountName: coder-provisioner
|
serviceAccountName: coder-provisioner
|
||||||
terminationGracePeriodSeconds: 60
|
terminationGracePeriodSeconds: 600
|
||||||
volumes: []
|
volumes: []
|
||||||
|
|||||||
+1
-1
@@ -131,5 +131,5 @@ spec:
|
|||||||
volumeMounts: []
|
volumeMounts: []
|
||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
serviceAccountName: coder-provisioner
|
serviceAccountName: coder-provisioner
|
||||||
terminationGracePeriodSeconds: 60
|
terminationGracePeriodSeconds: 600
|
||||||
volumes: []
|
volumes: []
|
||||||
|
|||||||
@@ -139,5 +139,5 @@ spec:
|
|||||||
volumeMounts: []
|
volumeMounts: []
|
||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
serviceAccountName: coder-provisioner
|
serviceAccountName: coder-provisioner
|
||||||
terminationGracePeriodSeconds: 60
|
terminationGracePeriodSeconds: 600
|
||||||
volumes: []
|
volumes: []
|
||||||
|
|||||||
+1
-1
@@ -133,5 +133,5 @@ spec:
|
|||||||
volumeMounts: []
|
volumeMounts: []
|
||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
serviceAccountName: coder-provisioner
|
serviceAccountName: coder-provisioner
|
||||||
terminationGracePeriodSeconds: 60
|
terminationGracePeriodSeconds: 600
|
||||||
volumes: []
|
volumes: []
|
||||||
|
|||||||
+1
-1
@@ -132,5 +132,5 @@ spec:
|
|||||||
volumeMounts: []
|
volumeMounts: []
|
||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
serviceAccountName: coder-service-account
|
serviceAccountName: coder-service-account
|
||||||
terminationGracePeriodSeconds: 60
|
terminationGracePeriodSeconds: 600
|
||||||
volumes: []
|
volumes: []
|
||||||
|
|||||||
@@ -202,3 +202,8 @@ provisionerDaemon:
|
|||||||
{}
|
{}
|
||||||
# location: usa
|
# location: usa
|
||||||
# provider: kubernetes
|
# 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
|
||||||
|
|||||||
Reference in New Issue
Block a user