Skip to content

Add gitlab-metrics-exporter build definitions

Matthias Käppler requested to merge mk-add-gitlab-metrics-exporter into master

What does this MR do?

Add gitlab-metrics-exporter build definitions

This system is not yet in productive use but needs to be embedded with the webservice images so Rails apps can access it. There is a draft MR open demonstrating how Rails will access this: gitlab-org/gitlab!84567 (merged)

I based this on gitlab-elasticsearch-indexer build defs since it is similar in structure and use.

Related issues

Image size analysis

[10:57:33] work/charts-gitlab::master ✔ docker image inspect registry.gitlab.com/gitlab-org/build/cng/gitlab-rails-ee:mk-add-gitlab-metrics-exporter | jq '.[0].Size'
1365114139
[10:57:42] work/charts-gitlab::master ✔ docker image inspect registry.gitlab.com/gitlab-org/build/cng/gitlab-rails-ee | jq '.[0].Size'                               
1293959188

Size increase: 71MB.

Test plan

Note that we cannot test the actual integration with GME yet, because that is still in MR: gitlab-org/gitlab!85815 (merged)

However, we can ensure that the application is installed into both webservice and sidekiq containers and is executable:

  1. Install the gitlab chart to a test cluster with the following override: --set global.gitlabVersion=mk-add-gitlab-metrics-exporter
  2. Shell into a webservice container and run:
    git@gitlab-webservice-default-b8b47f566-mxckd:/$ /usr/bin/gitlab-metrics-exporter
    2022/05/02 08:17:07 Serving /metrics on :8082 [ pid:  79 ]
  3. Shell into a sidekiq container and run:
    git@gitlab-sidekiq-all-in-1-v2-7489675cb7-klwc7:/$ /usr/bin/gitlab-metrics-exporter 
    2022/05/02 08:20:47 Serving /metrics on :8082 [ pid:  599 ]

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion

Required

  • Merge Request Title, and Description are up to date, accurate, and descriptive
  • MR targeting the appropriate branch
  • MR has a green pipeline on GitLab.com

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • [-] Documentation created/updated: Nothing to document at this point.
  • Integration tests added to GitLab QA: This is happening in gitlab-org/gitlab!85815 (merged), but it does not use these images here
  • The impact any change in container size has should be evaluated
Edited by Matthias Käppler

Merge request reports