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

[local-preview] honour DO_NOT_TRACK env variable #11430

Merged
merged 1 commit into from
Jul 20, 2022
Merged
Show file tree
Hide file tree
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
11 changes: 9 additions & 2 deletions install/preview/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,15 @@ run_telemetry(){
sleep 100
# 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
echo "Gitpod pods are ready"
# honour DO_NOT_TRACK if set
if [ -n "${DO_NOT_TRACK}" ] && [ "${DO_NOT_TRACK}" -eq 1 ]; then
# suspend the cronjob
kubectl patch cronjobs gitpod-telemetry -p '{"spec" : {"suspend" : true }}'
else
# manually run the cronjob
kubectl create job gitpod-telemetry-init --from=cronjob/gitpod-telemetry
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

had to move this inside as run_telemetry also is useful for readyiness and showing that Gitpod is ready.

fi
}

run_telemetry 2>&1 &
Expand Down
2 changes: 1 addition & 1 deletion install/preview/prettylog/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var msgs = []struct {
{Msg: "preparing system", Success: "extracting images to download ahead"},
{Msg: "downloading images", Success: "--output-split-files"},
{Msg: "preparing Gitpod preview installation", Success: "rm -rf /var/lib/rancher/k3s/server/manifests/gitpod"},
{Msg: "starting Gitpod", Success: "gitpod-telemetry-init"},
{Msg: "starting Gitpod", Success: "Gitpod pods are ready"},
{Msg: fmt.Sprintf("Gitpod is running. Visit https://%s to access the dashboard", os.Getenv("DOMAIN"))},
}

Expand Down