gcp

package
v1.4.17 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: Apache-2.0 Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Constraints

func Constraints(client *Client, config *types.InstallConfig, controlPlanes []machineapi.Machine, computes []machineapi.MachineSet) []quota.Constraint

Constraints returns a list of quota constraints based on the InstallConfig. These constraints can be used to check if there is enough quota for creating a cluster for the isntall config.

Types

type Client

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

Client is GCP client for calculating quota constraint.

func NewClient

func NewClient(ctx context.Context, sess *gcpconfig.Session, projectID string) (*Client, error)

NewClient returns Client using the context and session.

func (*Client) GetMachineType

func (c *Client) GetMachineType(zone string, machineType string) (*computev1.MachineType, error)

GetMachineType returns the machine type info for a type in a zone using the client.

type MachineTypeGetter

type MachineTypeGetter interface {
	GetMachineType(zone string, machineType string) (*computev1.MachineType, error)
}

MachineTypeGetter returns the machine type info for a type in a zone using GCP API.

Jump to

Keyboard shortcuts

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