UI lists only 100 agents in the select dropdown
Opening this issue to report a problem encountered registering KAS Agents in a single project for potential investigation. There appears to be a limit of Agents that can be registered to a single project of 99. This was the report received:
we have 100+ clusters, where we are pushing base pkgs (helm charts) from CD pipelines. with kas integration i am in progress of doing that with one pipeline. from global(group based) kas-repo all agents are integrated with group permission. when number reached 99. gitlab project stop showing available (but not yet configured ) gke clusters.
Using a bug template just in case that is needed. The customer has offered to join a Zoom call to discuss and potentially show the problem in action if that has value. Mikhail shared that this is very likely a UI limitation.
cc: @anna_vovchenko @nagyv-gitlab @ash2k
Summary
Steps to reproduce
Example Project
What is the current bug behavior?
What is the expected correct behavior?
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true
)
(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)
(we will only investigate if the tests are passing)
Possible fixes
Show a warning in the agent registration modal that the UI can manage only 100 agents. For more agents we recommend using Terraform. Link to https://registry.terraform.io/providers/gitlabhq/gitlab/latest/docs/resources/cluster_agent_token
Follow-up:
- Write a dedicated docs page that describes how to use Terraform with GitLab to manage agents.
Alternatively:
Show the warning with an alternative text at a much lower number where automation already makes a lot of sense, like 10 agents.
To manage more agents, use Terraform.
For 100+ agents:
We only support 100 agents on the UI. To manage more agents, use Terraform.
Implementation guide
- In the
app/assets/javascripts/clusters_list/components/install_agent_modal.vue
check the number of agent configurations returned by theagentConfigurations
query. - Add a
GlAlert
of typewarning
that is not dismissible above the agents dropdown (before the<form>
element) - Use the copy from the Possible fixes section
- Update
spec/frontend/clusters_list/components/install_agent_modal_spec.js
with the corresponding specs.