Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions api/core/v1beta2/machinepool_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,59 @@ const (
).
*/

// MachinePoolTemplateSpec describes the data needed to create
// the machines in a MachinePool.
type MachinePoolTemplateSpec struct {
// metadata is the standard object's metadata.
// Labels and annotations here are propagated to the pool's machines.
// +optional
ObjectMeta `json:"metadata,omitempty"`

// infrastructureRef is a required reference to a custom resource
// offered by an infrastructure provider.
// The custom resource is applied to all machines in the pool.
// +required
InfrastructureRef corev1.ObjectReference `json:"infrastructureRef,omitempty"`

// bootstrap is a reference to a local struct which encapsulates
// fields to configure the Machine’s bootstrapping mechanism.
// The configuration applies to all machines in the pool.
// +required
Bootstrap *Bootstrap `json:"bootstrap,omitempty"`

// version defines the desired Kubernetes version.
// This field is meant to be optionally used by bootstrap providers.
// The version is applied to all machines in the pool.
// +optional
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=256
Version string `json:"version,omitempty"`

// readinessGates specifies additional conditions to include when evaluating Machine Ready condition
// for all machines in the pool.
//
// This field can be used e.g. by Cluster API control plane providers to extend the semantic of the
// Ready condition for the Machine they control, like the kubeadm control provider adding ReadinessGates
// for the APIServerPodHealthy, SchedulerPodHealthy conditions, etc.
//
// Another example are external controllers, e.g. responsible to install special software/hardware on the Machines;
// they can include the status of those components with a new condition and add this condition to ReadinessGates.
//
// NOTE: This field is considered only for computing v1beta2 conditions.
// NOTE: MachinePool is only responsible for worker nodes.
// ReadinessGates for control plane components are not supported.
// +optional
// +listType=map
// +listMapKey=conditionType
// +kubebuilder:validation:MaxItems=32
ReadinessGates []MachineReadinessGate `json:"readinessGates,omitempty"`

// deletion contains configuration options for Machine deletion.
// Configuration is applied to all machines in the pool.
// +optional
Deletion MachineDeletionSpec `json:"deletion,omitzero,omitempty"`
}

// MachinePoolSpec defines the desired state of MachinePool.
type MachinePoolSpec struct {
// clusterName is the name of the Cluster this object belongs to.
Expand Down
28 changes: 28 additions & 0 deletions api/core/v1beta2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

73 changes: 73 additions & 0 deletions api/core/v1beta2/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading