Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InstanceRemovalPredicate ¶
InstanceRemovalPredicate returns true when the VM instance should be deleted (matches removal criteria)
func DefaultInstanceRemovalPredicate ¶
func DefaultInstanceRemovalPredicate(instanceNameRegexp *regexp.Regexp, jobLabelRegexp *regexp.Regexp, ageInHours uint) InstanceRemovalPredicate
DefaultInstanceRemovalPredicate returns an instance of InstanceRemovalPredicate that filters instances based on instanceNameRegexp, jobLabelRegexp, ageInHours and Status
type InstancesAPI ¶
type InstancesAPI interface { ListInstances(project string) ([]*compute.Instance, error) RemoveInstance(project, zone, name string) error }
InstancesAPI abstracts access to Instances Compute API in GCP
type InstancesAPIWrapper ¶
type InstancesAPIWrapper struct { Context context.Context Service *compute.InstancesService }
InstancesAPIWrapper abstracts GCP InstancesService API
func (*InstancesAPIWrapper) ListInstances ¶
func (iaw *InstancesAPIWrapper) ListInstances(project string) ([]*compute.Instance, error)
ListInstances delegates to InstancesService.ListInstances(project) function
func (*InstancesAPIWrapper) RemoveInstance ¶
func (iaw *InstancesAPIWrapper) RemoveInstance(project, zone, name string) error
RemoveInstance delegates to InstancesService.Delete(project, zone, name) function
type InstancesGarbageCollector ¶
type InstancesGarbageCollector struct {
// contains filtered or unexported fields
}
InstancesGarbageCollector can find and delete VM instances provisioned by kyma-integration prow jobs and not cleaned up properly.
func NewInstancesGarbageCollector ¶
func NewInstancesGarbageCollector(instancesAPI InstancesAPI, shouldRemove InstanceRemovalPredicate) *InstancesGarbageCollector
NewInstancesGarbageCollector returns a new object of InstancesGarbageCollector type