Skip to main content
Version: 3.10

Platform Cleanup Guide

Throughout your project's lifecycle, various resources are created within the KubeRocketCI platform. Over time, some of these resources may become deprecated. It is crucial to clean up any associated artifacts to ensure the platform functions correctly, especially if you intend to re-add a component with the same name.

This page provides comprehensive guidelines for completely deleting resources in KubeRocketCI, from applications to third-party resources.

Prerequisites​

To follow the guidelines below, ensure you have:

  • Admin access to the KubeRocketCI portal
  • Admin access to third-party tools (Nexus, SonarQube, container registry, Git, etc.)

Platform Resource Cleanup​

This section covers platform resource removal, such as components, deployment flows, and pipeline runs.

Delete Deployment Flows​

Platform cleanup starts with deleting deployment flows, a core resource that allows the platform to build an automated workflow. Deleting a deployment flow will delete applications from its associated cluster.

We recommend cleaning environments before deleting deployment flows to ensure graceful resource deletion and avoid potential issues.

There are two strategies for cleaning environments:

  • Using the delete option: This strategy involves using the Delete button to remove an environment. It’s suitable for environments that don’t rely on specific workload setups to deploy.
  • Using a clean pipeline: This strategy involves creating a clean pipeline to handle the deletion of third-party dependencies, such as cloud resources and databases, that share the same lifecycle as your environment. We recommend this strategy for applications with complex third-party interactions.

To delete an environment using the Delete button, read the Manage Environments page.

note

A deployment flow must include at least one environment.

Once the environments are deleted, proceed with deleting a deployment flow. To delete a deployment flow, follow these steps:

  1. Navigate to KubeRocketCI portal -> Deployment flows:

Deployment flows list

  1. Choose a deployment flow to delete. Click the actions button and select Delete:

Delete deployment flow

  1. Enter the deployment flow name and click Delete:

Confirm deployment flow deletion

Delete Codebases​

After deleting deployment flows, you can delete the associated resources they operate with. These resources, collectively referred to as codebases, include applications, libraries, autotests, and infrastructures.

In this example, we will demonstrate how to delete an application. The same procedure applies to other types of codebases:

  1. Navigate to KubeRocketCI portal -> Components:

Components list

  1. Choose an application to delete. Click the actions button and select Delete:

Delete component

  1. Enter the application name and click Delete:

Confirm codebase deletion

Delete Pipeline Runs​

The last platform resource remaining is pipeline runs. A pipeline run refers to an execution instance of a pipeline. Each time you trigger a build, review, deploy, or clean pipeline, a new pipeline run emerges. To delete pipeline runs, follow these steps:

  1. Navigate to KubeRocketCI portal -> Pipelines:

Pipelines list

  1. Choose pipeline runs and click Delete:

Inspect application

  1. On the confirmation window, enter confirm and click Delete:

Inspect application

Third-Party Resource Cleanup​

KubeRocketCI supports integrations with a wide range of third-party tools, many of which are involved in the codebase management process. Therefore, it is crucial to clean up resources associated with these integrations.

Version Control Systems​

If you want to re-add a component with the same name, cleaning up artifacts is mandatory for correct platform operation. When using a create or clone strategy, codebase operator provisions a repository in the Version Control System (VCS) each time you create a new codebase.

note

When re-adding a repository instead of deleting it, clear repository tags to prevent versioning conflicts. For re-adding a Helm chart, clean the deploy-templates folder.

Below are links to the official documentation for deleting code repositories:

To delete a GitHub repository, read the Deleting a repository page.

Delete Nexus Artifacts​

KubeRocketCI uses Nexus Repository Manager as an artifact registry for storing application binaries.

If the Nexus instance is installed using add-ons, a predefined cleanup policy is deployed along with it. This policy automatically deletes unused images after 30 days. Ensure that the policy is activated to enable successful automatic cleanup.

Repository Types in Nexus​

A Nexus repository is a collection of components such as JAR files, Docker images, and other artifacts. KubeRocketCI uses the following repository types:

  • Container Repository: Stores container images and Helm charts.
  • Maven Repository: Handles Maven artifacts like JARs and POMs.
  • Dotnet Repository: Manages NuGet packages.
  • NPM Repository: Stores NPM packages.
  • Python Repository: Hosts Pip packages.
  • Yum Repository: Stores RPM packages.

Repository Structure​

Repositories are categorized into the following types:

  • Hosted: Stores locally uploaded artifacts (e.g., krci-npm-hosted).
  • Group: Aggregates multiple repositories for unified access (e.g., krci-maven-group).
  • Proxy: Mirrors artifacts from remote repositories (e.g., krci-maven-proxy).

Manual Deletion Procedure​

To clean up unnecessary application binaries manually, follow these steps:

  1. Navigate to Nexus main menu and select the Browse tab:

Nexus main menu

  1. On the Browse tab, select the folder with the name that represents the application type:

For example, to delete a .NET application, navigate to krci-dotnet-releases or krci-dotnet-snapshots folder. Understanding the difference between the release and snapshot folders is essential:

  • Releases: This repository type stores applications built in release branches. These applications are usually tagged as release candidates (RC).
  • Snapshots: This type of repository stores other applications and their versions, usually tagged as snapshots.

Browse Nexus repository snapshots

  1. In the Nexus repository, select the package folder and click Delete folder:

Delete Nexus folder

  1. (Optional) Repeat steps 1-3 for all the packages that need to be cleaned up.

Delete Container Images​

KubeRocketCI uses container images to deploy the applications to deployment flows. To clean up a container registry, follow the corresponding guidelines:

To delete container images from the AWS Elastic Container Registry, read the Deleting an image in Amazon ECR page.

Delete SonarQube Projects​

KubeRocketCI generates a SonarQube project for every new codebase. To clean up application projects, follow the guidelines described in the official documentation. Deleting a codebase without removing the corresponding SonarQube project may lead to issues in review pipelines.

Observability Tools​

KubeRocketCI supports various observability tools, including DefectDojo, Dependency-Track, Datadog, and more. While these tools don't directly impact the platform's core functionality, they can generate significant data during operation.

Some tools, such as Dependency-Track and SonarQube, offer deep integration with KubeRocketCI through dedicated widgets. These widgets allow users to view code quality metrics and dependency scan results directly in the codebase details menu:

SonarQube and Dependency-Track widgets

DefectDojo​

There are two methods to delete observability data from DefectDojo:

  • By deleting a product: This method lets you delete observability data for the entire KubeRocketCI platform simultaneously.
  • By deleting engagements: This method lets you selectively delete data for specific codebases.

Deleting a DefectDojo product is preferable if you no longer need your product's security scans. Typically, the product name matches the Kubernetes namespace. A product is deleted on the product's details page:

Delete DefectDojo product

Deleting engagements will clean up security scan runs for specific codebases. This method is preferable when retaining certain parts of the product's data. To find the security scans for specific codebases, use search filters:

DefectDojo filters

To delete an engagement, click the three dots icon and select Delete:

Delete DefectDojo engagement

Dependency-Track​

At the moment, Dependency-Track has fewer options for selectively deleting data. Therefore, it is often preferable to delete an entire Dependency-Track project.

To delete a Dependency-Track project, follow these steps:

  1. Log into your Dependency-Track instance.
  2. Open the Projects list and find the project you want to delete.
  3. Enter the project details by clicking its name:

Search project

  1. In the project's details page, click the View Details button:

View project details

  1. On the project details menu, click Delete:

Delete project