Skip to content

Provide GitLab KAS data via API

Problem to solve

Mostly, we want a way to provide gitlab-kas data like VERSION , ADDRESS and whether it's ENABLED. through the API.


As an Application Operator, I need to know the gitlab-kas address in order to register a new agent with it.

As a Software Developer, I want to develop applications that can programmatically identify which gitlab-kas version is supporting my infrastructure, so I can handle how my application behaves depending on this version.

As a DevOps Engineer, I want to be able to detect the gitlab-kas version, so I can configure templates for agent configuration and manifest files that respect the correct gitlab-kas version.

As a System Administrator, I want to identify the gitlab-kas version, so I can create monitoring systems that inform the user about which version is running, as well as creating/configuring infrastructure that is compatible with the deployed version.

As a Software Engineer in Test, I want to be able to detect the gitlab-kas version I'm testing against, so I know what's the correct API/configuration to talk to it.

As a Platform Engineer, I want to detect gitlab-kas version to provision the correct cloud environment for my developers applications.

Intended users

User experience goal

The user should be able to use the GitLab API to query which gitlab-kas version is currently running.

Proposal

We should extend our API to provide an endpoint to fetch the gitlab-kas version. The GITLAB_KAS_VERSION from GitLab-org/GitLab contains the version. So an easy way to load it could be like:

module GitLab
  module Kas
    VERSION = File.read(Rails.root.join("GITLAB_KAS_VERSION")).strip.freeze
  end
end

The ADDRESS should ideally be loaded by Gitlab.config

Permissions and Security

I'm thinking developer access might be a good measure? 🤔

Documentation

Availability & Testing

We should add regular API tests to it.

Once this is live our end-to-end test for the agent will be able to take advantage of this endpoint to determine the service version and test agains the proper agent version.

What does success look like, and how can we measure that?

We can easily check the amount of request an API endpoint gets on Kibana, but I'm not sure if we're tracking API endpoint counts for success metrics.

What is the type of buyer?

Is this a cross-stage feature?

Links / references

Edited by João Alexandre Cunha