gcp

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudProvider

type CloudProvider struct {
	// contains filtered or unexported fields
}

func NewCloudProvider

func NewCloudProvider(ctx context.Context) (*CloudProvider, error)

NewCloudProvider creates a new GCP cloud provider

func (*CloudProvider) DeleteInstance

func (gcp *CloudProvider) DeleteInstance(ctx context.Context, node *corev1.Node) error

DeleteInstance retrieves the underlying compute instance of the Kubernetes Node, drains any connections from GCP load balancers and then deletes it from its managed instance group

func (*CloudProvider) IsSpotInstance

func (gcp *CloudProvider) IsSpotInstance(ctx context.Context, node *corev1.Node) (bool, error)

IsSpotInstance determines whether the underlying compute instance is a spot VM. We consider preemptible VMs to be spot VMs to align with the cluster autoscaler: https://github.com/kubernetes/autoscaler/blob/10fafe758c118adeb55b28718dc826511cc5ba40/cluster-autoscaler/cloudprovider/gce/gce_price_model.go#L220-L230

Jump to

Keyboard shortcuts

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