Documentation
¶
Index ¶
- type CreateNodePoolOptions
- func (o *CreateNodePoolOptions) CreateNodePool(ctx context.Context, platformOpts PlatformOptions) error
- func (o *CreateNodePoolOptions) CreateRunFunc(platformOpts PlatformOptions) func(cmd *cobra.Command, args []string) error
- func (o *CreateNodePoolOptions) Validate(ctx context.Context, c crclient.Client) error
- type NodePoolPlatformCompleter
- type NodePoolPlatformValidator
- type PlatformOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateNodePoolOptions ¶
type CreateNodePoolOptions struct {
Name string
Namespace string
ClusterName string
Replicas int32
ReleaseImage string
Render bool
NodeUpgradeType hyperv1.UpgradeType
Arch string
AutoRepair bool
}
func (*CreateNodePoolOptions) CreateNodePool ¶
func (o *CreateNodePoolOptions) CreateNodePool(ctx context.Context, platformOpts PlatformOptions) error
func (*CreateNodePoolOptions) CreateRunFunc ¶
func (o *CreateNodePoolOptions) CreateRunFunc(platformOpts PlatformOptions) func(cmd *cobra.Command, args []string) error
type NodePoolPlatformCompleter ¶ added in v0.1.74
type NodePoolPlatformCompleter interface {
// Complete allows the platform-specific logic to default values and finalize configuration.
// Returns a PlatformOptions implementation on success, or an error if completion fails.
Complete(context.Context, *CreateNodePoolOptions) (PlatformOptions, error)
}
NodePoolPlatformCompleter knows how to complete platform-specific nodepool configuration. All nodepool platform implementations SHOULD use this exact signature for their Complete() method to enable interface-based programming and easier maintenance across providers. Note: This interface is optional for simple platforms that don't need validation/completion phases.
type NodePoolPlatformValidator ¶ added in v0.1.74
type NodePoolPlatformValidator interface {
// Validate allows the platform-specific logic to validate nodepool inputs.
// Returns a NodePoolPlatformCompleter on success, or an error if validation fails.
Validate(context.Context, *CreateNodePoolOptions) (NodePoolPlatformCompleter, error)
}
NodePoolPlatformValidator knows how to validate platform-specific nodepool options. All nodepool platform implementations SHOULD use this exact signature for their Validate() method to enable interface-based programming and easier maintenance across providers. Note: This interface is optional for simple platforms that don't need validation/completion phases.
type PlatformOptions ¶
type PlatformOptions interface {
// UpdateNodePool is used to update the platform specific values in the NodePool
UpdateNodePool(ctx context.Context, nodePool *hyperv1.NodePool, hcluster *hyperv1.HostedCluster, client crclient.Client) error
// Type returns the platform type
Type() hyperv1.PlatformType
}