Cloud profiler for Zoekt services
You can see in https://www.youtube.com/watch?v=MxGQ7WZ2N74 there is a lot of good tooling we can use for profiling Go applications which I believe is derived from adding labkit as a dependency and configuring stuff. This gets sent to the cloud profiler. We should look into adding this (or something similar) to our Zoekt go binaries. Since the zoekt-webserver
is built in the main Zoekt repository this may be trickier but they may already have something. When we rewrite our own indexserver in #402984 (closed) we can add GitLab specific stuff (like labkit) to it.
Steps
-
Create IAM service accounts with cloud profiler role -
Link K8s Service accounts to IAM service accounts -
Allow configuring env var for profiler for webserver -
Version bump gitlab-zoekt
chart -
Update gitlab-zoekt
version in gitlab chart -
Wait for gitlab
chart to be bumped ink8s-workloads
- https://gitlab.com/gitlab-com/gl-infra/k8s-workloads/gitlab-com/-/blob/master/vendor/charts/gitlab/gprd/requirements.yaml?ref_type=heads#L39
- https://gitlab.com/gitlab-com/gl-infra/k8s-workloads/gitlab-com/-/merge_requests?scope=all&state=opened&author_username=project_12547113_bot_5b9e449057a536e8c15a26f61574bd95
-
Enable webserver.googleCloudProfiler.enabled: true
ink8s-workloads
-
Add cloud profiler to gitlab-zoekt-indexer
enabled by the same env var as webserver -
Bump the gitlab-zoekt-indexer
version in CNG -
Bump the CNG image in the gitlab-zoekt
chart -
Version bump gitlab-zoekt
chart -
Update gitlab-zoekt
version in gitlab chart -
Wait for gitlab
chart to be bumped ink8s-workloads
- https://gitlab.com/gitlab-com/gl-infra/k8s-workloads/gitlab-com/-/blob/master/vendor/charts/gitlab/gprd/requirements.yaml?ref_type=heads#L39
- https://gitlab.com/gitlab-com/gl-infra/k8s-workloads/gitlab-com/-/merge_requests?scope=all&state=opened&author_username=project_12547113_bot_5b9e449057a536e8c15a26f61574bd95
- gitlab-com/gl-infra/k8s-workloads/gitlab-com!3183 (merged)
-
Enable indexer.googleCloudProfiler.enabled: true
ink8s-workloads
Edited by Dylan Griffith