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

This file was deleted.

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: "Infrastructure"
crdName: infrastructures.config.openshift.io
featureGates:
- HighlyAvailableArbiter
tests:
onCreate:
- name: Should be able to create a minimal Infrastructure
Expand Down
6 changes: 2 additions & 4 deletions config/v1/types_infrastructure.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,8 @@ type InfrastructureStatus struct {
// The 'External' mode indicates that the control plane is hosted externally to the cluster and that
// its components are not visible within the cluster.
// +kubebuilder:default=HighlyAvailable
// +openshift:validation:FeatureGateAwareEnum:featureGate="",enum=HighlyAvailable;SingleReplica;External
// +openshift:validation:FeatureGateAwareEnum:featureGate=HighlyAvailableArbiter,enum=HighlyAvailable;HighlyAvailableArbiter;SingleReplica;External
// +openshift:validation:FeatureGateAwareEnum:featureGate=DualReplica,enum=HighlyAvailable;SingleReplica;DualReplica;External
// +openshift:validation:FeatureGateAwareEnum:requiredFeatureGate=HighlyAvailableArbiter;DualReplica,enum=HighlyAvailable;HighlyAvailableArbiter;SingleReplica;DualReplica;External
// +openshift:validation:FeatureGateAwareEnum:featureGate="",enum=HighlyAvailable;HighlyAvailableArbiter;SingleReplica;External
// +openshift:validation:FeatureGateAwareEnum:featureGate=DualReplica,enum=HighlyAvailable;HighlyAvailableArbiter;SingleReplica;DualReplica;External
Comment on lines +106 to +107

Choose a reason for hiding this comment

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

Action required

1. controlplanetopology enum undocumented 📘 Rule violation ✓ Correctness

The controlPlaneTopology field comment does not document the HighlyAvailableArbiter and
DualReplica enum values that are now allowed by validation markers. This leaves API consumers
without an explanation of the behavior/meaning of these permitted values.
Agent Prompt
## Issue description
The `controlPlaneTopology` field's validation markers allow additional enum values (`HighlyAvailableArbiter` and `DualReplica`), but the field comment does not explain those values.

## Issue Context
Compliance requires that enum constraints implied by validation markers be documented in the field comment so users understand the API contract.

## Fix Focus Areas
- config/v1/types_infrastructure.go[99-109]

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

// +optional
ControlPlaneTopology TopologyMode `json:"controlPlaneTopology"`

Expand Down
2 changes: 0 additions & 2 deletions config/v1/zz_generated.featuregated-crd-manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,6 @@ infrastructures.config.openshift.io:
- DualReplica
- DyanmicServiceEndpointIBMCloud
- GCPClusterHostedDNSInstall
- HighlyAvailableArbiter
- HighlyAvailableArbiter+DualReplica
- NutanixMultiSubnets
- OnPremDNSRecords
- VSphereHostVMGroupZonal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1040,6 +1040,7 @@ spec:
its components are not visible within the cluster.
enum:
- HighlyAvailable
- HighlyAvailableArbiter
- SingleReplica
- External
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1038,6 +1038,7 @@ spec:
its components are not visible within the cluster.
enum:
- HighlyAvailable
- HighlyAvailableArbiter
- SingleReplica
- DualReplica
- External
Expand Down
Loading