Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterAPI ¶
type ClusterAPI interface { ListClusters(project string) ([]*container.Cluster, error) RemoveCluster(project, zone, name string) error }
ClusterAPI abstracts access to Cluster Container API in GCP
type ClusterAPIWrapper ¶
type ClusterAPIWrapper struct { Context context.Context Service *container.ProjectsLocationsClustersService }
ClusterAPIWrapper abstracts GCP ProjectsLocationsClustersService API
func (*ClusterAPIWrapper) ListClusters ¶
func (caw *ClusterAPIWrapper) ListClusters(project string) ([]*container.Cluster, error)
ListClusters delegates to ProjectsLocationsClustersService.List(parent) function
func (*ClusterAPIWrapper) RemoveCluster ¶
func (caw *ClusterAPIWrapper) RemoveCluster(project, zone, name string) error
RemoveCluster delegates to ProjectsLocationsClustersService.Delete(name) function
type ClusterRemovalPredicate ¶
ClusterRemovalPredicate returns true when the cluster should be deleted (matches removal criteria)
func TimeBasedClusterRemovalPredicate ¶
func TimeBasedClusterRemovalPredicate(excludedClusters map[string]struct{}) ClusterRemovalPredicate
TimeBasedClusterRemovalPredicate returns an instance of ClusterRemovalPredicate that filters clusters based on label "volatile", "created-at", "ttl" and status
type ClustersGarbageCollector ¶
type ClustersGarbageCollector struct {
// contains filtered or unexported fields
}
ClustersGarbageCollector can find and delete clusters provisioned by gke-integration prow jobs and not cleaned up properly.
func NewClustersGarbageCollector ¶
func NewClustersGarbageCollector(clusterAPI ClusterAPI, shouldRemove ClusterRemovalPredicate) *ClustersGarbageCollector
NewClustersGarbageCollector returns a new instance of ClustersksGarbageCollector