File tree 4 files changed +27
-2
lines changed
4 files changed +27
-2
lines changed Original file line number Diff line number Diff line change 156
156
HELM_TIMEOUT=" 1h"
157
157
fi
158
158
159
+ echo " Gitpod: shut down any running workspaces/image-builders"
160
+
161
+ # gpctl doesn't have a namespace flag
162
+ kubectl config set-context --current --namespace=" ${NAMESPACE} "
163
+
164
+ # Get list of workspace instances from gpctl
165
+ for instance in $( gpctl workspaces list -o json | jq -r ' select(. != null) | .[] | .Instance' ) ; do
166
+ echo " Gitpod: shutting down workspace ${instance} "
167
+ gpctl workspaces stop " ${instance} "
168
+ done
169
+
159
170
# The long timeout is to ensure the TLS cert is created (if required)
160
171
echo " Gitpod: Apply the Kubernetes objects with timeout of ${HELM_TIMEOUT} "
161
172
helm upgrade \
Original file line number Diff line number Diff line change 30
30
containers :
31
31
- name : installation-status
32
32
# This will normally be the release tag
33
- image : " eu.gcr.io/gitpod-core-dev/build/installer:tar -installer-env-refactor.2 "
33
+ image : " eu.gcr.io/gitpod-core-dev/build/installer:sje -installer-kill-workspaces.5 "
34
34
envFrom :
35
35
- configMapRef :
36
36
name : gitpod-kots-config
Original file line number Diff line number Diff line change 39
39
containers :
40
40
- name : installer
41
41
# This will normally be the release tag
42
- image : " eu.gcr.io/gitpod-core-dev/build/installer:tar -installer-env-refactor.2 "
42
+ image : " eu.gcr.io/gitpod-core-dev/build/installer:sje -installer-kill-workspaces.5 "
43
43
volumeMounts :
44
44
- mountPath : /mnt/node0
45
45
name : node-fs0
Original file line number Diff line number Diff line change 13
13
namespace : ' {{repl Namespace }}'
14
14
podSpec :
15
15
containers : []
16
+ - clusterResources :
17
+ namespaces :
18
+ - ' {{repl Namespace }}'
16
19
- run :
17
20
collectorName : database
18
21
image : eu.gcr.io/gitpod-core-dev/build/kots-config-check/database:sje-kots-config-check.9
@@ -429,3 +432,14 @@ spec:
429
432
message : Registry is accessible
430
433
- fail :
431
434
message : Registry is inaccessible. Please check your network and firewall settings
435
+ - textAnalyze :
436
+ checkName : Check running workspaces
437
+ fileName : cluster-resources/pods/{{repl Namespace }}.json
438
+ regex : ' "component": "workspace"'
439
+ outcomes :
440
+ - pass :
441
+ when : " false"
442
+ message : No running workspaces. Any workspaces started during the deployment process will be stopped.
443
+ - fail :
444
+ when : " true"
445
+ message : There are running workspaces. These will be stopped during the deployment process.
You can’t perform that action at this time.
0 commit comments