Use the agent name as a namespace name
What does this MR do and why?
In order to use a different namespace for each agent, we are adding the agent name into the namespace with the prefix gitlab-agent
. As the limit for the agent name is 63 characters and the limit for the namespace name is 63 characters as well, using the prefix we are limited to 50 characters remaining for the agent name. In case of exceeding the limit, we truncate the agent name used in the namespace name.
Screenshots or screen recordings
Before | After | After (truncated) |
---|---|---|
How to set up and validate locally
- Visit Project -> Infrastructure -> Kubernetes clusters
- Select Connect cluster
- Create an agent from the modal
- Verify the agent installation instructions
To validate using GitPod you'll need to enable KAS:
-
Go to the
gitlab-development-kit
folder -
Change the
gdk.yml
file to add the following lines:gitlab_k8s_agent: enabled: true
-
Install Bazel using Bazelisk
npm install -g @bazel/bazelisk
-
Run
gdk reconfigure
andgdk restart
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Review progress:
Related to #366544 (closed)