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
Original file line number Diff line number Diff line change
Expand Up @@ -1732,6 +1732,7 @@ tests:
platform: AWS
platformStatus:
aws:
ipFamily: IPv4
region: us-east-1
resourceTags:
- key: key with space
Expand Down Expand Up @@ -1778,6 +1779,7 @@ tests:
platform: AWS
platformStatus:
aws:
ipFamily: IPv4
region: us-east-1
resourceTags:
- key: key:_./=+-@
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: "Infrastructure"
crdName: infrastructures.config.openshift.io
featureGates:
- AWSDualStackInstall
- -AWSClusterHostedDNSInstall
tests:
onCreate:
- name: Should be able to create a minimal Infrastructure
Expand Down Expand Up @@ -60,8 +61,6 @@ tests:
platform: AWS
platformStatus:
aws:
cloudLoadBalancerConfig:
dnsType: PlatformDefault
ipFamily: IPv4
region: us-east-1
type: AWS
Expand Down Expand Up @@ -103,8 +102,6 @@ tests:
platform: AWS
platformStatus:
aws:
cloudLoadBalancerConfig:
dnsType: PlatformDefault
ipFamily: DualStackIPv6Primary
region: us-east-1
type: AWS
Expand Down Expand Up @@ -146,8 +143,6 @@ tests:
platform: AWS
platformStatus:
aws:
cloudLoadBalancerConfig:
dnsType: PlatformDefault
ipFamily: DualStackIPv4Primary
region: us-east-1
type: AWS
Expand Down Expand Up @@ -257,8 +252,6 @@ tests:
platform: AWS
platformStatus:
aws:
cloudLoadBalancerConfig:
dnsType: PlatformDefault
ipFamily: DualStackIPv6Primary
region: us-east-1
type: AWS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1185,6 +1185,21 @@ spec:
description: aws contains settings specific to the Amazon Web
Services infrastructure provider.
properties:
ipFamily:
default: IPv4
description: |-
ipFamily specifies the IP protocol family that should be used for AWS
network resources. This controls whether AWS resources are created with
IPv4-only, or dual-stack networking with IPv4 or IPv6 as the primary
protocol family.
enum:
- IPv4
- DualStackIPv6Primary
- DualStackIPv4Primary
type: string
x-kubernetes-validations:
- message: ipFamily is immutable once set
rule: oldSelf == '' || self == oldSelf
Comment on lines +1188 to +1202
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

1. ipfamily docs omit constraints 📘 Rule violation ⚙ Maintainability

The new ipFamily schema includes a default, an enum, and an immutability
x-kubernetes-validations rule, but its description does not document the default/allowed values
or the immutability constraint. This violates the requirement that validation marker semantics be
documented in field comments/user-facing docs.
Agent Prompt
## Issue description
The `ipFamily` field’s schema adds `default`, `enum`, and an immutability `XValidation`, but the user-facing field documentation does not describe:
- what happens when the field is omitted (defaulting)
- the allowed enum values (and what each means)
- that the value is immutable once set

## Issue Context
This is surfaced in generated CRD/OpenAPI documentation, so missing details violate the requirement that validation marker semantics be documented.

## Fix Focus Areas
- config/v1/types_infrastructure.go[567-577]
- config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-Default.crd.yaml[1188-1202]
- config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-OKD.crd.yaml[1188-1202]
- machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-Default.crd.yaml[1480-1494]
- machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-OKD.crd.yaml[1480-1494]

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This sounds like a legitimate issue to me

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Right. I think this is just saying the comment should contain something like:

// Valid values are "IPv4", "DualStackIPv4Primary", and "DualStackIPv6Primary". When omitted, the default value is "IPv4".

It's also outside the scope of this PR, so I would consider it more of a nice to have

region:
description: region holds the default AWS region for new AWS
resources created by the cluster.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1185,6 +1185,21 @@ spec:
description: aws contains settings specific to the Amazon Web
Services infrastructure provider.
properties:
ipFamily:
default: IPv4
description: |-
ipFamily specifies the IP protocol family that should be used for AWS
network resources. This controls whether AWS resources are created with
IPv4-only, or dual-stack networking with IPv4 or IPv6 as the primary
protocol family.
enum:
- IPv4
- DualStackIPv6Primary
- DualStackIPv4Primary
type: string
x-kubernetes-validations:
- message: ipFamily is immutable once set
rule: oldSelf == '' || self == oldSelf
region:
description: region holds the default AWS region for new AWS
resources created by the cluster.
Expand Down
2 changes: 1 addition & 1 deletion features.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
| AWSClusterHostedDNS| | | <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> |
| AWSClusterHostedDNSInstall| | | <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> |
| AWSDedicatedHosts| | | <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> |
| AWSDualStackInstall| | | <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> |
| AWSEuropeanSovereignCloudInstall| | | <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> |
| AdditionalStorageConfig| | | <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> |
| AutomatedEtcdBackup| | | <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 Expand Up @@ -91,6 +90,7 @@
| VSphereMixedNodeEnv| | | <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> |
| VolumeGroupSnapshot| | | <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> |
| AWSServiceLBNetworkSecurityGroup| | <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> |
| AWSDualStackInstall| <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> |
| AzureClusterHostedDNSInstall| <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> |
| AzureWorkloadIdentity| <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> |
| BootImageSkewEnforcement| <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
16 changes: 8 additions & 8 deletions features/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ var (
contactPerson("sadasu").
productScope(ocpSpecific).
enhancementPR("https://github.com/openshift/enhancements/pull/1806").
enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()).
enable(inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()).
mustRegister()

FeatureGateAzureDualStackInstall = newFeatureGate("AzureDualStackInstall").
Expand Down Expand Up @@ -1005,11 +1005,11 @@ var (
enable(inDevPreviewNoUpgrade(), inTechPreviewNoUpgrade()).
mustRegister()

FeatureGateConfidentialCluster = newFeatureGate("ConfidentialCluster").
reportProblemsToJiraComponent("ConfidentialClusters").
contactPerson("fjin").
productScope(ocpSpecific).
enhancementPR("https://github.com/openshift/enhancements/pull/1962").
enable(inDevPreviewNoUpgrade()).
mustRegister()
FeatureGateConfidentialCluster = newFeatureGate("ConfidentialCluster").
reportProblemsToJiraComponent("ConfidentialClusters").
contactPerson("fjin").
productScope(ocpSpecific).
enhancementPR("https://github.com/openshift/enhancements/pull/1962").
enable(inDevPreviewNoUpgrade()).
mustRegister()
)
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: "AWSDualStackInstall ControllerConfig"
crdName: controllerconfigs.machineconfiguration.openshift.io
featureGates:
- AWSDualStackInstall
- -AWSClusterHostedDNSInstall
tests:
onCreate:
- name: Should be able to create a minimal ControllerConfig
Expand Down Expand Up @@ -93,8 +94,6 @@ tests:
aws:
region: us-east-1
ipFamily: IPv4
cloudLoadBalancerConfig:
dnsType: PlatformDefault
ipFamilies: IPv4
kubeAPIServerServingCAData: Y2VydGlmaWNhdGUK
network: null
Expand Down Expand Up @@ -219,8 +218,6 @@ tests:
aws:
region: us-east-1
ipFamily: DualStackIPv6Primary
cloudLoadBalancerConfig:
dnsType: PlatformDefault
ipFamilies: IPv4
kubeAPIServerServingCAData: Y2VydGlmaWNhdGUK
network: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1477,6 +1477,21 @@ spec:
description: aws contains settings specific to the Amazon
Web Services infrastructure provider.
properties:
ipFamily:
default: IPv4
description: |-
ipFamily specifies the IP protocol family that should be used for AWS
network resources. This controls whether AWS resources are created with
IPv4-only, or dual-stack networking with IPv4 or IPv6 as the primary
protocol family.
enum:
- IPv4
- DualStackIPv6Primary
- DualStackIPv4Primary
type: string
x-kubernetes-validations:
- message: ipFamily is immutable once set
rule: oldSelf == '' || self == oldSelf
region:
description: region holds the default AWS region for
new AWS resources created by the cluster.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1477,6 +1477,21 @@ spec:
description: aws contains settings specific to the Amazon
Web Services infrastructure provider.
properties:
ipFamily:
default: IPv4
description: |-
ipFamily specifies the IP protocol family that should be used for AWS
network resources. This controls whether AWS resources are created with
IPv4-only, or dual-stack networking with IPv4 or IPv6 as the primary
protocol family.
enum:
- IPv4
- DualStackIPv6Primary
- DualStackIPv4Primary
type: string
x-kubernetes-validations:
- message: ipFamily is immutable once set
rule: oldSelf == '' || self == oldSelf
region:
description: region holds the default AWS region for
new AWS resources created by the cluster.
Expand Down
Loading