File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -251,16 +251,23 @@ spec:
251
251
echo "Gitpod: Escape any Golang template values"
252
252
sed -i -r 's/(.*\{\{.*)/{{`\1`}}/' "${GITPOD_OBJECTS}/templates/gitpod.yaml"
253
253
254
+ # If certificate secret already exists, set the timeout to 5m
255
+ CERT_SECRET=$(kubectl get secrets -n {{repl Namespace }} https-certificates -o jsonpath='{.metadata.name}' || echo '')
256
+ HELM_TIMEOUT="5m"
257
+ if [ "${CERT_SECRET}" = "" ]; then
258
+ HELM_TIMEOUT="1h"
259
+ fi
260
+
254
261
# The long timeout is to ensure the TLS cert is created (if required)
255
- echo "Gitpod: Apply the Kubernetes objects"
262
+ echo "Gitpod: Apply the Kubernetes objects with timeout of ${HELM_TIMEOUT} "
256
263
helm upgrade \
257
264
--atomic \
258
265
--cleanup-on-fail \
259
266
--create-namespace \
260
267
--install \
261
268
--namespace="{{repl Namespace }}" \
262
269
--reset-values \
263
- --timeout 1h \
270
+ --timeout "${HELM_TIMEOUT}" \
264
271
--wait \
265
272
gitpod \
266
273
"${GITPOD_OBJECTS}"
You can’t perform that action at this time.
0 commit comments