Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[preview] run the telemetry job right after gitpod is ready #11077

Merged
merged 1 commit into from
Jul 5, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions install/preview/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,18 @@ yq eval-all -i 'del(.spec.template.spec.initContainers[0])' /var/lib/rancher/k3s
for f in /var/lib/rancher/k3s/server/manifests/gitpod/*.yaml; do (cat "$f"; echo) >> /var/lib/rancher/k3s/server/manifests/gitpod.yaml; done
rm -rf /var/lib/rancher/k3s/server/manifests/gitpod

# waits for gitpod pods to be ready, and manually runs the `gitpod-telemetry` cronjob
run_telemetry(){
# wait for the k3s cluster to be ready and Gitpod workloads are added
sleep 100
corneliusludmann marked this conversation as resolved.
Show resolved Hide resolved
# indefinitely wait for Gitpod pods to be ready
kubectl wait --timeout=-1s --for=condition=ready pod -l app=gitpod,component!=migrations
# manually tun the cronjob
kubectl create job gitpod-telemetry-init --from=cronjob/gitpod-telemetry
}

run_telemetry 2>&1 &

/bin/k3s server --disable traefik \
--node-label gitpod.io/workload_meta=true \
--node-label gitpod.io/workload_ide=true \
Expand Down