Add ability to hide Kubernetes menu option in groups

Problem to solve

With the addition of group-level Kubernetes clusters, there is a Kubernetes menu item on the group page for maintainers and owners. Some customers don't use CI/CD and would like the Kubernetes menu item hidden in this case. These options are hidden on the project level when builds are turned off. There is not a group or instance level setting to hide the Kubernetes menu item.

Customer ticket: https://gitlab.zendesk.com/agent/tickets/110840

Target audience

From the customer:

this will bring confusion to our developers and, more importantly, customers that have groups in our instance.

Further details

From the customer:

we've just updated our test instance from 11.3-stable-ee to 
11-6-stable-ee and noticed there's now a Kubernetes menuitem on 
grouplevel. We don't use autodevops, docker, kubernetes etc. so we need 
to get rid of the button before we roll this out to production.
...
As we're not using docker, Kubernetes, etc. this will bring confusion 
to our developers and, more importantly, customers that have groups in 
our instance. We need to have this removed on group level as well.

Proposal

  • disabling Kubernetes integrations at the instance/group level should disable it at the levels below as well
  • when the feature is disabled, hide the menu "Kubernetes" in groups and "Infrastructure/Kubernetes clusters" in projects
  • if the integration is disabled, we should show a text about it at the settings' place
    • if disabled at the instance level, show the text under the group and project settings
    • if disabled at the group level, show the test under subgroup and project settings
  • disabling the integration should disable the related APIs too
    • when disabled at a group, it should not be possible to
      • register an agent in any of the projects within that group
      • share an agent with any of the projects or groups within that group
      • the previously registered agents should stop working
      • the previously shared agent connections should stop working

Instead of Agent for Kubernetes. I recommend to call it "Kubernetes integrations". The header would be "Kubernetes integrations", the checkbox could read "Enable agent for Kubernetes"

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

Customers will have the ability to hide the Kubernetes menu item for groups.

Links / references

@danielgruesso

Edited by Viktor Nagy (GitLab)