client

package
v2.16.3 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a client for the Azure Cloud.

func NewFromDefault

func NewFromDefault(configPath string) (*Client, error)

NewFromDefault creates a client with initialized clients.

func (*Client) AutoscalingCloudProvider

func (c *Client) AutoscalingCloudProvider() string

AutoscalingCloudProvider returns the cloud-provider name as used by k8s cluster-autoscaler.

func (*Client) CreateNode

func (c *Client) CreateNode(ctx context.Context, scalingGroupID string) (nodeName, providerID string, err error)

CreateNode creates a node in the specified scaling group.

func (*Client) DeleteNode

func (c *Client) DeleteNode(ctx context.Context, providerID string) error

DeleteNode deletes a node specified by its provider ID.

func (*Client) GetAutoscalingGroupName

func (c *Client) GetAutoscalingGroupName(scalingGroupID string) (string, error)

GetAutoscalingGroupName retrieves the name of a scaling group as needed by the cluster-autoscaler.

func (*Client) GetNodeImage

func (c *Client) GetNodeImage(ctx context.Context, providerID string) (string, error)

GetNodeImage returns the image name of the node.

func (*Client) GetNodeState

func (c *Client) GetNodeState(ctx context.Context, providerID string) (updatev1alpha1.CSPNodeState, error)

GetNodeState returns the state of the node.

func (*Client) GetScalingGroupID

func (c *Client) GetScalingGroupID(_ context.Context, providerID string) (string, error)

GetScalingGroupID returns the scaling group ID of the node.

func (*Client) GetScalingGroupImage

func (c *Client) GetScalingGroupImage(ctx context.Context, scalingGroupID string) (string, error)

GetScalingGroupImage returns the image URI of the scaling group.

func (*Client) GetScalingGroupName

func (c *Client) GetScalingGroupName(scalingGroupID string) (string, error)

GetScalingGroupName retrieves the name of a scaling group, as expected by Kubernetes. This keeps the casing of the original name, but Kubernetes requires the name to be lowercase, so use strings.ToLower() on the result if using the name in a Kubernetes context.

func (*Client) ListScalingGroups

func (c *Client) ListScalingGroups(ctx context.Context, uid string) ([]cspapi.ScalingGroup, error)

ListScalingGroups retrieves a list of scaling groups for the cluster.

func (*Client) SetScalingGroupImage

func (c *Client) SetScalingGroupImage(ctx context.Context, scalingGroupID, imageURI string) error

SetScalingGroupImage sets the image URI of the scaling group.

Jump to

Keyboard shortcuts

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