Documentation
¶
Index ¶
- Constants
- type CloudProvider
- func (c *CloudProvider) Create(ctx context.Context, nodeClaim *karpv1.NodeClaim) (*karpv1.NodeClaim, error)
- func (c *CloudProvider) Delete(ctx context.Context, nodeClaim *karpv1.NodeClaim) error
- func (c *CloudProvider) Get(ctx context.Context, providerID string) (*karpv1.NodeClaim, error)
- func (c *CloudProvider) GetInstanceTypes(ctx context.Context, nodePool *karpv1.NodePool) ([]*cloudprovider.InstanceType, error)
- func (c *CloudProvider) GetSupportedNodeClasses() []status.Object
- func (c *CloudProvider) IsDrifted(ctx context.Context, nodeClaim *karpv1.NodeClaim) (cloudprovider.DriftReason, error)
- func (c *CloudProvider) List(ctx context.Context) ([]*karpv1.NodeClaim, error)
- func (c *CloudProvider) Name() string
- func (c *CloudProvider) RepairPolicies() []cloudprovider.RepairPolicy
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 ¶
Delete is called by Karpenter to deprovision capacity for a NodeClaim.
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) RepairPolicies ¶
func (c *CloudProvider) RepairPolicies() []cloudprovider.RepairPolicy
RepairPolicies returns the node repair policies supported by this provider.
Click to show internal directories.
Click to hide internal directories.