Documentation ¶
Index ¶
- type IBMCloudInstanceProvider
- func (p *IBMCloudInstanceProvider) Create(ctx context.Context, nodeClaim *v1.NodeClaim) (*corev1.Node, error)
- func (p *IBMCloudInstanceProvider) Delete(ctx context.Context, node *corev1.Node) error
- func (p *IBMCloudInstanceProvider) GetInstance(ctx context.Context, node *corev1.Node) (*Instance, error)
- type Instance
- type InstanceOptions
- type InstanceStatus
- type Provider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IBMCloudInstanceProvider ¶
type IBMCloudInstanceProvider struct {
// contains filtered or unexported fields
}
func NewProvider ¶
func NewProvider() (*IBMCloudInstanceProvider, error)
func (*IBMCloudInstanceProvider) GetInstance ¶
type Instance ¶
type Instance struct { // ID is the instance ID ID string // Name is the instance name Name string // Type is the instance type Type string // Region is the region where the instance is located Region string // Zone is the availability zone where the instance is located Zone string // Status is the current status of the instance Status InstanceStatus // State represents the current state of the instance State string // ImageID is the ID of the image used to create the instance ImageID string // CreationTime is when the instance was created CreationTime time.Time // LaunchTime is when the instance was created (string format) LaunchTime string // CapacityType represents the type of capacity (on-demand, spot, etc) CapacityType string // Tags are key/value pairs attached to the instance Tags map[string]string }
Instance represents an IBM Cloud instance
type InstanceOptions ¶
type InstanceOptions struct { // Type is the instance type to create Type string // Zone is the availability zone to create the instance in Zone string // Labels are the Kubernetes labels to apply to the instance Labels map[string]string // Taints are the Kubernetes taints to apply to the instance Taints []string }
InstanceOptions contains configuration for instance creation
type InstanceStatus ¶
type InstanceStatus string
InstanceStatus represents the current status of an instance
const ( // InstanceStatusPending indicates the instance is being created InstanceStatusPending InstanceStatus = "pending" // InstanceStatusRunning indicates the instance is running InstanceStatusRunning InstanceStatus = "running" // InstanceStatusStopping indicates the instance is being stopped InstanceStatusStopping InstanceStatus = "stopping" // InstanceStatusStopped indicates the instance has been stopped InstanceStatusStopped InstanceStatus = "stopped" )
type Provider ¶
type Provider interface { // Create launches a new instance in IBM Cloud Create(ctx context.Context, nodeClaim *karpv1.NodeClaim) (*v1.Node, error) // Delete terminates the specified instance Delete(ctx context.Context, node *v1.Node) error // GetInstance retrieves instance information for the specified node GetInstance(ctx context.Context, node *v1.Node) (*Instance, error) }
Provider defines the interface for managing IBM Cloud instances
Click to show internal directories.
Click to hide internal directories.