cloudprovider

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SubnetDrift    cloudprovider.DriftReason = "SubnetDrift"
	NodeClassDrift cloudprovider.DriftReason = "NodeClassDrift"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudProvider

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

CloudProvider implements Karpenter's CloudProvider interface for Huawei Cloud.

func New

func New(kubeClient client.Client, recorder events.Recorder, instanceTypeProvider instancetype.Provider, instanceProvider instance.Provider) *CloudProvider

New creates a Huawei CloudProvider implementation.

func (*CloudProvider) Create

func (c *CloudProvider) Create(ctx context.Context, nodeClaim *karpv1.NodeClaim) (*karpv1.NodeClaim, error)

Create is called by Karpenter to provision capacity for a NodeClaim.

func (*CloudProvider) Delete

func (c *CloudProvider) Delete(ctx context.Context, nodeClaim *karpv1.NodeClaim) error

Delete is called by Karpenter to deprovision capacity for a NodeClaim.

func (*CloudProvider) Get

func (c *CloudProvider) Get(ctx context.Context, providerID string) (*karpv1.NodeClaim, error)

Get returns the NodeClaim by provider ID.

func (*CloudProvider) GetInstanceTypes

func (c *CloudProvider) GetInstanceTypes(ctx context.Context, nodePool *karpv1.NodePool) ([]*cloudprovider.InstanceType, error)

GetInstanceTypes returns the instance types available for a given NodePool.

func (*CloudProvider) GetSupportedNodeClasses

func (c *CloudProvider) GetSupportedNodeClasses() []status.Object

GetSupportedNodeClasses returns the NodeClass types supported by this provider.

func (*CloudProvider) IsDrifted

func (c *CloudProvider) IsDrifted(ctx context.Context, nodeClaim *karpv1.NodeClaim) (cloudprovider.DriftReason, error)

IsDrifted indicates whether the NodeClaim is drifted from desired state.

func (*CloudProvider) List

func (c *CloudProvider) List(ctx context.Context) ([]*karpv1.NodeClaim, error)

List returns all NodeClaims managed by this provider.

func (*CloudProvider) Name

func (c *CloudProvider) Name() string

Name returns the provider name.

func (*CloudProvider) RepairPolicies

func (c *CloudProvider) RepairPolicies() []cloudprovider.RepairPolicy

RepairPolicies returns the node repair policies supported by this provider.

Jump to

Keyboard shortcuts

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