cluster

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2025 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrResourceLookup = goerrors.New("could not find the requested resource")
)

Functions

This section is empty.

Types

type Client

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

Client wraps up cluster related management handling.

func NewClient

func NewClient(client client.Client, namespace string, options *Options, identity identityclient.APIClientGetter, region region.ClientGetterFunc) *Client

NewClient returns a new client with required parameters.

func (*Client) Create

func (c *Client) Create(ctx context.Context, organizationID, projectID string, request *openapi.ComputeClusterWrite) (*openapi.ComputeClusterRead, error)

Create creates the implicit cluster indentified by the JTW claims.

func (*Client) CreateConsoleSession added in v1.8.0

func (c *Client) CreateConsoleSession(ctx context.Context, organizationID, projectID, clusterID, machineID string) (*regionapi.ConsoleSessionResponse, error)

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, organizationID, projectID, clusterID string) error

Delete deletes the implicit cluster indentified by the JTW claims.

func (*Client) Evict added in v1.6.0

func (c *Client) Evict(ctx context.Context, organizationID, projectID, clusterID string, request *openapi.EvictionWrite) error

Evict is pretty complicated, we need to delete the requested servers from the region service, and update the cluster's pools to remove those instances so they don't just get recreated instantly. What we do is scale down the cluster, but annotate it with a the list of server IDs we'd like to delete.

func (*Client) Get added in v1.6.0

func (c *Client) Get(ctx context.Context, organizationID, projectID, clusterID string) (*openapi.ComputeClusterRead, error)

func (*Client) GetConsoleOutput added in v1.8.0

func (*Client) HardRebootMachine added in v1.7.0

func (c *Client) HardRebootMachine(ctx context.Context, organizationID, projectID, clusterID, machineID string) error

func (*Client) List

List returns all clusters owned by the implicit control plane.

func (*Client) SoftRebootMachine added in v1.7.0

func (c *Client) SoftRebootMachine(ctx context.Context, organizationID, projectID, clusterID, machineID string) error

func (*Client) StartMachine added in v1.7.0

func (c *Client) StartMachine(ctx context.Context, organizationID, projectID, clusterID, machineID string) error

func (*Client) StopMachine added in v1.7.0

func (c *Client) StopMachine(ctx context.Context, organizationID, projectID, clusterID, machineID string) error

func (*Client) Update

func (c *Client) Update(ctx context.Context, organizationID, projectID, clusterID string, request *openapi.ComputeClusterWrite) error

Update implements read/modify/write for the cluster.

type Options

type Options struct {
	NodeNetwork    net.IPNet
	DNSNameservers []net.IP
}

func (*Options) AddFlags

func (o *Options) AddFlags(f *pflag.FlagSet)

Jump to

Keyboard shortcuts

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