Skip to content

Commit ad08ada

Browse files
corneliusludmannroboquat
authored andcommitted
[werft] Disable telemetry job for preview environments
1 parent 51568c7 commit ad08ada

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.werft/post-process.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ MATCHES="$(grep -c -- --- k8s.yaml)"
3333
# get the read number of K8s manifest docs
3434
# K8s object names and kinds are duplicated in a config map to faciliate deletion
3535
# subtract one (the config map) and then divide by 2 to get the actual # of docs we'll loop through
36-
DOCS="$(((MATCHES - 1) / 2))"
36+
DOCS="$((((MATCHES - 1) / 2) + 1))"
3737

3838
echo "Use node pool index $NODE_POOL_INDEX"
3939

@@ -278,6 +278,13 @@ while [ "$i" -le "$DOCS" ]; do
278278
yq m -x -i k8s.yaml -d "$i" /tmp/"$NAME"-"$KIND"-overrides.yaml
279279
fi
280280

281+
# suspend telemetry cron job
282+
if [[ "gitpod-telemetry" == "$NAME" ]] && [[ "$KIND" == "CronJob" ]]; then
283+
WORK="suspend $NAME $KIND"
284+
echo "$WORK"
285+
yq w -i k8s.yaml -d "$i" spec.suspend "true"
286+
fi
287+
281288
# Uncomment to change or remove resources from the configmap which can be used to uninstall Gitpod
282289
# There are a couple use cases where you may want to do this:
283290
# 1. We don't want to uninstall a shared resource that is needed by other preview env namespaces

0 commit comments

Comments
 (0)