cleanup

command
v2.0.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2026 License: Apache-2.0 Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

This script cleans up orphaned GKE clusters and Konnect runtime groups that were created by the e2e tests (caued by e.g. unexpected crash that didn't allow a test's teardown to be completed correctly). It's meant to be installed as a cronjob and run repeatedly throughout the day to catch any orphaned resources: however tests should be trying to delete the resources they create themselves.

A cluster is considered orphaned when all conditions are satisfied: 1. Its name begins with a predefined prefix (`gke-e2e-`). 2. It was created more than 1h ago.

A control plane is considered orphaned when all conditions are satisfied: 1. It has a label `created_in_tests` with value `true`. 2. It was created more than 1h ago.

Usage: `go run ./hack/cleanup [mode]` Where `mode` is one of: - `all` (default): clean up both GKE clusters and Konnect control planes - `gke`: clean up only GKE clusters - `konnect`: clean up only Konnect control planes

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL