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
4 changes: 0 additions & 4 deletions features.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,7 @@
| InsightsOnDemandDataGather| <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> | <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> |
| KMSv1| <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> | <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> |
| MachineConfigNodes| <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> | <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> |
| ManagedBootImages| <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> | <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> |
| ManagedBootImagesAWS| <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> | <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> |
| ManagedBootImagesAzure| <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> | <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> |
| ManagedBootImagesCPMS| <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> | <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> |
| ManagedBootImagesvSphere| <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> | <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> |
| MetricsCollectionProfiles| <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> | <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> |
| MutableCSINodeAllocatableCount| <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> | <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> |
| OpenShiftPodSecurityAdmission| <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> | <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
32 changes: 0 additions & 32 deletions features/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,38 +312,6 @@ var (
enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()).
mustRegister()

FeatureGateManagedBootImages = newFeatureGate("ManagedBootImages").
reportProblemsToJiraComponent("MachineConfigOperator").
contactPerson("djoshy").
productScope(ocpSpecific).
enhancementPR(legacyFeatureGateWithoutEnhancement).
enable(inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()).
mustRegister()

FeatureGateManagedBootImagesAWS = newFeatureGate("ManagedBootImagesAWS").
reportProblemsToJiraComponent("MachineConfigOperator").
contactPerson("djoshy").
productScope(ocpSpecific).
enhancementPR(legacyFeatureGateWithoutEnhancement).
enable(inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()).
mustRegister()

FeatureGateManagedBootImagesvSphere = newFeatureGate("ManagedBootImagesvSphere").
reportProblemsToJiraComponent("MachineConfigOperator").
contactPerson("rsaini").
productScope(ocpSpecific).
enhancementPR("https://github.com/openshift/enhancements/pull/1496").
enable(inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()).
mustRegister()

FeatureGateManagedBootImagesAzure = newFeatureGate("ManagedBootImagesAzure").
reportProblemsToJiraComponent("MachineConfigOperator").
contactPerson("djoshy").
productScope(ocpSpecific).
enhancementPR("https://github.com/openshift/enhancements/pull/1761").
enable(inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()).
mustRegister()

FeatureGateManagedBootImagesCPMS = newFeatureGate("ManagedBootImagesCPMS").
reportProblemsToJiraComponent("MachineConfigOperator").
contactPerson("djoshy").
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
name: "MachineConfiguration"
crdName: machineconfigurations.operator.openshift.io
featureGates:
- ManagedBootImages
tests:
onCreate:
- name: Should be able to create a minimal MachineConfiguration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if w
name: "MachineConfiguration"
crdName: machineconfigurations.operator.openshift.io
featureGates:
- ManagedBootImages
- ManagedBootImagesCPMS
tests:
onCreate:
Expand Down
8 changes: 3 additions & 5 deletions operator/v1/types_machineconfiguration.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ type MachineConfigurationSpec struct {
// 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.
// +openshift:enable:FeatureGate=ManagedBootImages
// +optional
ManagedBootImages ManagedBootImages `json:"managedBootImages"`

Expand Down Expand Up @@ -288,7 +287,6 @@ type MachineConfigurationStatus struct {

// managedBootImagesStatus reflects what the latest cluster-validated boot image configuration is
// and will be used by Machine Config Controller while performing boot image updates.
// +openshift:enable:FeatureGate=ManagedBootImages
// +optional
ManagedBootImagesStatus ManagedBootImages `json:"managedBootImagesStatus"`

Expand Down Expand Up @@ -367,7 +365,7 @@ type ManagedBootImages struct {

// MachineManager describes a target machine resource that is registered for boot image updates. It stores identifying information
// such as the resource type and the API Group of the resource. It also provides granular control via the selection field.
// +openshift:validation:FeatureGateAwareXValidation:requiredFeatureGate=ManagedBootImages;ManagedBootImagesCPMS,rule="self.resource != 'controlplanemachinesets' || self.selection.mode == 'All' || self.selection.mode == 'None'", message="Only All or None selection mode is permitted for ControlPlaneMachineSets"
// +openshift:validation:FeatureGateAwareXValidation:requiredFeatureGate=ManagedBootImagesCPMS,rule="self.resource != 'controlplanemachinesets' || self.selection.mode == 'All' || self.selection.mode == 'None'", message="Only All or None selection mode is permitted for ControlPlaneMachineSets"
type MachineManager struct {
// resource is the machine management resource's type.
// Valid values are machinesets and controlplanemachinesets.
Expand Down Expand Up @@ -431,8 +429,8 @@ const (

// MachineManagerManagedResourceType is a string enum used in the MachineManager type to describe the resource
// type to be registered.
// +openshift:validation:FeatureGateAwareEnum:requiredFeatureGate=ManagedBootImages,enum=machinesets
// +openshift:validation:FeatureGateAwareEnum:requiredFeatureGate=ManagedBootImages;ManagedBootImagesCPMS,enum=machinesets;controlplanemachinesets
// +kubebuilder:validation:Enum:="machinesets"
// +openshift:validation:FeatureGateAwareEnum:requiredFeatureGate=ManagedBootImagesCPMS,enum=machinesets;controlplanemachinesets
type MachineManagerMachineSetsResourceType string
Comment on lines 430 to 434

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

2. resource enum contradicts docs 📘 Rule violation ✓ Correctness

The resource field documentation says controlplanemachinesets is valid, but the ungated enum
only allows machinesets. This creates a documentation/validation mismatch for API consumers.
Agent Prompt
## Issue description
The `resource` field claims `controlplanemachinesets` is a valid value, but the ungated validation enum only permits `machinesets`, creating a contract mismatch.

## Issue Context
This PR introduces `+kubebuilder:validation:Enum:="machinesets"` while retaining documentation (and generated CRD description) that lists both `machinesets` and `controlplanemachinesets`. If `controlplanemachinesets` is intended to be feature-gated by `ManagedBootImagesCPMS`, the documentation needs to explicitly state that; otherwise, the validation needs to allow it.

## Fix Focus Areas
- operator/v1/types_machineconfiguration.go[369-386]
- operator/v1/types_machineconfiguration.go[430-441]
- operator/v1/zz_generated.featuregated-crd-manifests/machineconfigurations.operator.openshift.io/AAA_ungated.yaml[736-744]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


const (
Expand Down
3 changes: 1 addition & 2 deletions operator/v1/zz_generated.featuregated-crd-manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,7 @@ machineconfigurations.operator.openshift.io:
FeatureGates:
- BootImageSkewEnforcement
- IrreconcilableMachineConfig
- ManagedBootImages
- ManagedBootImages+ManagedBootImagesCPMS
- ManagedBootImagesCPMS
FilenameOperatorName: machine-config
FilenameOperatorOrdering: "01"
FilenameRunLevel: "0000_80"
Expand Down
Loading