machineops

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: May 15, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OperationConditionCompleted = "Completed"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterInfo

type ClusterInfo struct {
	APIServer      string
	CACertBase64   string
	ClusterDNS     string
	KubeVersion    string
	ProviderLabels map[string]string
}

ClusterInfo holds the cluster-level data needed to build host replacement cloud-init.

func ResolveClusterInfo

func ResolveClusterInfo(ctx context.Context, apiServerEndpoint string, k kubernetes.Interface) (*ClusterInfo, error)

ResolveClusterInfo resolves cluster bootstrap details for HostReplace.

type MachineOperationReconciler

type MachineOperationReconciler struct {
	client.Client
	Providers               []Provider
	MaxConcurrentReconciles int
	Now                     func() metav1.Time
	ClusterInfo             *ClusterInfo
	KubeClient              kubernetes.Interface
	APIServerEndpoint       string
}

MachineOperationReconciler reconciles MachineOperation objects that target externally controlled machines.

func (*MachineOperationReconciler) Reconcile

func (*MachineOperationReconciler) SetupWithManager

func (r *MachineOperationReconciler) SetupWithManager(mgr ctrl.Manager) error

type OperationRequest

type OperationRequest struct {
	Machine         *unboundedv1alpha3.Machine
	OperationName   string
	OperationUID    types.UID
	ProviderID      string
	Operation       unboundedv1alpha3.OperationKind
	Parameters      map[string]string
	ReplaceUserData string
}

OperationRequest is the generic provider-facing view of a MachineOperation.

type OperationResult added in v0.1.6

type OperationResult struct {
	ProviderID        string
	CleanupProviderID string
}

OperationResult describes provider-side changes that must be reflected after execution, such as replacement of an underlying cloud resource identity.

type Provider

type Provider interface {
	Name() string
	Supports(operation unboundedv1alpha3.OperationKind) bool
	Execute(ctx context.Context, request OperationRequest) (OperationResult, error)
	Cleanup(ctx context.Context, request OperationRequest, result OperationResult) error
}

Provider executes MachineOperation requests for a specific external provider.

Directories

Path Synopsis
providers

Jump to

Keyboard shortcuts

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