Skip to content

MCO-1744: Add a flag to allow irreconcilable configs #2244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
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
1 change: 1 addition & 0 deletions features.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
| MinimumKubeletVersion| | | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> |
| MixedCPUsAllocation| | | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> |
| NodeSwap| | | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> |
| NonReconcilableMC| | | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> |
| NutanixMultiSubnets| | | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> |
| OVNObservability| | | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> |
| PinnedImages| | | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> | <span style="background-color: #519450">Enabled</span> |
Expand Down
34 changes: 21 additions & 13 deletions features/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -483,13 +483,13 @@ var (
mustRegister()

FeatureGateExternalOIDCWithAdditionalClaimMappings = newFeatureGate("ExternalOIDCWithUIDAndExtraClaimMappings").
reportProblemsToJiraComponent("authentication").
contactPerson("bpalmer").
productScope(ocpSpecific).
enhancementPR("https://github.com/openshift/enhancements/pull/1777").
enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade).
enableForClusterProfile(Hypershift, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade).
mustRegister()
reportProblemsToJiraComponent("authentication").
contactPerson("bpalmer").
productScope(ocpSpecific).
enhancementPR("https://github.com/openshift/enhancements/pull/1777").
enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade).
enableForClusterProfile(Hypershift, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade).
mustRegister()

FeatureGateExample = newFeatureGate("Example").
reportProblemsToJiraComponent("cluster-config").
Expand Down Expand Up @@ -540,12 +540,12 @@ var (
mustRegister()

FeatureGateNewOLMOwnSingleNamespace = newFeatureGate("NewOLMOwnSingleNamespace").
reportProblemsToJiraComponent("olm").
contactPerson("nschieder").
productScope(ocpSpecific).
enhancementPR("https://github.com/openshift/enhancements/pull/1774").
enableForClusterProfile(SelfManaged, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade).
mustRegister()
reportProblemsToJiraComponent("olm").
contactPerson("nschieder").
productScope(ocpSpecific).
enhancementPR("https://github.com/openshift/enhancements/pull/1774").
enableForClusterProfile(SelfManaged, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade).
mustRegister()

FeatureGateInsightsOnDemandDataGather = newFeatureGate("InsightsOnDemandDataGather").
reportProblemsToJiraComponent("insights").
Expand Down Expand Up @@ -835,4 +835,12 @@ var (
enhancementPR("https://github.com/openshift/enhancements/pull/1748").
enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade).
mustRegister()

FeatureGateNonReconcilableMC = newFeatureGate("NonReconcilableMC").
reportProblemsToJiraComponent("MachineConfigOperator").
contactPerson("pablintino").
productScope(ocpSpecific).
enhancementPR("https://github.com/openshift/enhancements/pull/1785").
enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade).
mustRegister()
)
7 changes: 7 additions & 0 deletions openapi/generated_openapi/zz_generated.openapi.go

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

4 changes: 4 additions & 0 deletions openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -30550,6 +30550,10 @@
"description": "logLevel is an intent based logging for an overall component. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for their operands.\n\nValid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\".",
"type": "string"
},
"machineConfigurationValidationPolicy": {
"description": "machineConfigurationValidationPolicy tells the operator how new machine configurations should be validated. Allowed values are Strict, Relaxed, and omitted. DefaultValidationPolicy represents a configuration validation mode chosen by the system. Currently, the default is StrictValidationPolicy. StrictValidationPolicy represents a configuration validation mode that enforces that changes to the rendered MCs are not altering fields outside the supported ones. More info about supported fields: https://docs.redhat.com/en/documentation/openshift_container_platform/latest/html/machine_configuration/machine-config-index#what-can-you-change-with-machine-configs RelaxedValidationPolicy represents a configuration validation mode that does not perform any validation over the fields that cannot be changed. Usage of this mode is discouraged.",
"type": "string"
},
"managedBootImages": {
"description": "managedBootImages allows configuration for the management of boot images for machine resources within the cluster. This configuration allows users to select resources that should be updated to the latest boot images during cluster upgrades, ensuring that new machines always boot with the current cluster version's boot image. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The default for each machine manager mode is All for GCP and AWS platforms, and None for all other platforms.",
"default": {},
Expand Down
34 changes: 34 additions & 0 deletions operator/v1/types_machineconfiguration.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,42 @@ type MachineConfigurationSpec struct {
// +openshift:enable:FeatureGate=NodeDisruptionPolicy
// +optional
NodeDisruptionPolicy NodeDisruptionPolicyConfig `json:"nodeDisruptionPolicy"`

// machineConfigurationValidationPolicy tells the operator how new machine configurations should be validated.
// Allowed values are Strict, Relaxed, and omitted.
// DefaultValidationPolicy represents a configuration validation mode chosen by the system. Currently, the default
// is StrictValidationPolicy.
// StrictValidationPolicy represents a configuration validation mode that enforces that changes to the rendered
// MCs are not altering fields outside the supported ones.
// More info about supported fields: https://docs.redhat.com/en/documentation/openshift_container_platform/latest/html/machine_configuration/machine-config-index#what-can-you-change-with-machine-configs
// RelaxedValidationPolicy represents a configuration validation mode that does not perform any validation over
// the fields that cannot be changed. Usage of this mode is discouraged.
// +optional
// +openshift:enable:FeatureGate=NonReconcilableMC
MachineConfigurationValidationPolicy MachineConfigurationValidationPolicy `json:"machineConfigurationValidationPolicy,omitempty"`
}

// MachineConfigurationValidationPolicy is the type of validation the MCO applies to incoming MachineConfiguration
// changes. Allowed values are Strict, Relaxed, and omitted.
//
// +kubebuilder:validation:Enum="";Strict;Relaxed
type MachineConfigurationValidationPolicy string

const (
// DefaultValidationPolicy represents a configuration validation mode chosen by the system. Currently, the default
// is StrictValidationPolicy.
DefaultValidationPolicy MachineConfigurationValidationPolicy = ""

// StrictValidationPolicy represents a configuration validation mode that enforces that changes to the rendered
// MCs are not altering fields outside the supported ones.
// More info about supported fields: https://docs.redhat.com/en/documentation/openshift_container_platform/latest/html/machine_configuration/machine-config-index#what-can-you-change-with-machine-configs
StrictValidationPolicy MachineConfigurationValidationPolicy = "Strict"

// RelaxedValidationPolicy represents a configuration validation mode that does not perform any validation over
// the fields that cannot be changed. Usage of this mode is discouraged.
RelaxedValidationPolicy MachineConfigurationValidationPolicy = "Relaxed"
)

type MachineConfigurationStatus struct {
// observedGeneration is the last generation change you've dealt with
// +optional
Expand Down
Loading