Skip to content

GitLab Next

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 39,511
    • Issues 39,511
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 1,223
    • Merge requests 1,223
  • Requirements
    • Requirements
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
    • Value stream
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.org
  • GitLabGitLab
  • Issues
  • #26815

Closed
Open
Created Feb 19, 2019 by Thong Kuah@tkuahMaintainer

Advanced setting to delete all GitLab k8s resources on cluster removal

Problem to solve

Currently, removing a cluster from a GitLab project/group/instance does not clear out any of the resources created by GitLab (namespaces, roles, bindings, etc). If user wants to re-use the cluster, they will receive errors related to attempting to create resources that already exist.

Grooming (21:20s): https://drive.google.com/file/d/1aBwuqOekkmBon-oUp8a8d7Gne4lLQnZo/view?usp=sharing

Target audience

  • Sasha, Software Developer, https://design.gitlab.com/research/personas#persona-sasha

  • Devon, DevOps Engineer, https://design.gitlab.com/research/personas#persona-devon

Further details

  1. When developers are experimenting/learning how the GitLab Kubernetes integration works, they may re-use the same cluster in different projects to run experiments.

  2. I want to remove resources installed by GitLab but I want to keep using my cluster for other purposes (and not have to delete the cluster)

Use case:

  • As a DevOps engineer, I might have added my existing cluster with other deployments / data in the cluster.
  • I then added my existing cluster to GitLab as a trial
  • I then want to keep my existing cluster but remove GitLab installed resources
  • Maybe I can then re-use the cluster in another GitLab project / group.

See also gl-retrospectives/configure#6 (comment 139636658)

Proposal

Add a split button in the Advanced section of the cluster page that includes an option to remove the integration and all resources or simply remove the integration. Removing the integration and resources is the default option.

Screen_Shot_2019-08-22_at_9.22.28_AM

Removing resources removes:

  • all installed applications (from GitLab DB and on the cluster itself)
  • remove gitlab-managed-apps namespace
  • remove project namespace(s)
  • remove clusterroles created by GitLab
  • remove clusterrolebindings created by GitLab
  • if Knative present, remove all Knative-related resources

Clicking this option brings up a confirmation modal:

Screen_Shot_2019-08-22_at_9.21.43_AM

To remove the integration and resources, a user must enter the name of the cluster in the input.

Because removing the resources can take a while, we will redirect the user to the cluster overview page and show a loading indicator with a tooltip. The cluster detail view is no longer available (see follow up issue gitlab-foss#66728 (moved))

Screen_Shot_2019-08-28_at_12.24.18_PM

Once the cluster has been removed/resources deleted, we show a toast notifying the user:

Screen_Shot_2019-08-26_at_12.44.52_PM

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

Links / references

Edited Oct 18, 2019 by Daniel Gruesso
Assignee
Assign to
Time tracking