Skip to content

Commit

Permalink
add boot images update opt-in & mcp degrade type
Browse files Browse the repository at this point in the history
  • Loading branch information
djoshy committed Nov 22, 2023
1 parent 693f5c5 commit 6efc17d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
3 changes: 3 additions & 0 deletions machineconfiguration/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,9 @@ const (
// MachineConfigPoolRenderDegraded means the rendered configuration for the pool cannot be generated because of an error
MachineConfigPoolRenderDegraded MachineConfigPoolConditionType = "RenderDegraded"

// MachineConfigPoolMachineSetDegraded means the machineset reconciliation for the pool could not be completed because of an error
MachineConfigPoolMachineSetDegraded MachineConfigPoolConditionType = "MachineSetDegraded"

// MachineConfigPoolDegraded is the overall status of the pool based, today, on whether we fail with NodeDegraded or RenderDegraded
MachineConfigPoolDegraded MachineConfigPoolConditionType = "Degraded"

Expand Down
21 changes: 21 additions & 0 deletions operator/v1/types_machineconfiguration.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ type MachineConfigurationSpec struct {
StaticPodOperatorSpec `json:",inline"`

// TODO(jkyros): This is where we put our knobs and dials

// managedBootImageConfigData contains configuration data for the bootimages management feature
// +optional
ManagedBootImageConfig ManagedBootImageConfig `json:"managedBootImageConfig,omitempty"`
}

type MachineConfigurationStatus struct {
Expand All @@ -56,3 +60,20 @@ type MachineConfigurationList struct {
// Items contains the items
Items []MachineConfiguration `json:"items"`
}

// ManagedBootImageConfig contains configuration data for the bootimages management feature

type ManagedBootImageConfig struct {
// Mode has three settings:
// enabled - MCO will manage all machinesets, and ignore machinesets that match with the labelselector
// selected - MCO will manage machinesets that match with the labelselector
// disabled - MCO will not manage any machinesets
// If unset, mode will default to disabled
// +kubebuilder:validation:Enum:="enabled";"selected";"disabled"
// +optional
Mode string `json:"mode,omitempty"`

// machineSetSelector specifies a label selector for MachinesSets that will be managed by this mechanism
// +optional
MachineSetSelector *metav1.LabelSelector `json:"machineSetSelector,omitempty"`
}

0 comments on commit 6efc17d

Please sign in to comment.