Skip to content

Conversation

@jaypoulz
Copy link

@jaypoulz jaypoulz commented Jan 19, 2026

User description

Update controller-tools to openshift/kubernetes-sigs-controller-tools which
includes a fix for deterministic XValidation rule ordering. This ensures CRD
generation produces consistent output.

Changes included:

  • tools/go.mod: Point replace directive to openshift fork with stable sort fix
  • tools/Makefile: Fix openapi-gen path (moved from code-generator to
    kube-openapi upstream)
  • tools/codegen/pkg/schemacheck/generator.go: Disable NoDataTypeChange
    comparator for allOf→enum schema simplification

The new controller-tools generates simpler enum schemas without allOf
wrappers when both type and field have enum markers. This is functionally
equivalent but structurally different, requiring the schemacheck adjustment
to avoid false positive violations.

Upstream fix: kubernetes-sigs/controller-tools#1299
OpenShift carry: openshift/kubernetes-sigs-controller-tools#35
Created with support from Claude Opus 4 (Anthropic)


PR Type

Enhancement, Bug fix


Description

  • Upgraded controller-tools to include deterministic XValidation rule ordering, ensuring consistent CRD generation output regardless of map iteration order

  • Implemented sorting of XValidations by rule field using slices.SortFunc with cmp.Compare for deterministic output

  • Refactored schema generation with schemaFetcher function type for improved schema resolution and lazy loading with caching

  • Added alphabetical sorting of Required fields in struct schema generation

  • Updated enum marker formats in type definitions (RetentionType, ConsoleSampleSourceType) to use quoted values and added +enum annotations

  • Disabled NoDataTypeChange comparator in schema checks to accommodate simplified allOf enum structures from updated controller-tools

  • Regenerated all CRD manifests with deterministic validation rule ordering across multiple API groups (config, operator, machine, monitoring, route, insights)

  • Enhanced OpenAPI schema documentation with enum value descriptions


Diagram Walkthrough

flowchart LR
  A["controller-tools upgrade<br/>with XValidation sorting"] --> B["Deterministic rule<br/>ordering implementation"]
  B --> C["Schema generation<br/>refactoring"]
  C --> D["CRD manifest<br/>regeneration"]
  A --> E["Enum marker format<br/>updates"]
  E --> D
  A --> F["Schema comparator<br/>adjustments"]
  F --> D
  D --> G["Consistent CRD<br/>output across builds"]
Loading

File Walkthrough

Relevant files
Enhancement
53 files
schema.go
Schema generation refactoring with deterministic field ordering

tools/vendor/sigs.k8s.io/controller-tools/pkg/crd/schema.go

  • Added schemaFetcher function type for fetching schemas by type
    identifier
  • Introduced schemaFetcher field to schemaContext struct for schema
    resolution
  • Modified localNamedToSchema to use schemaFetcher instead of inline
    schema creation logic
  • Added conditional checks to only set Description field when non-empty
  • Added alphabetical sorting of Required fields in struct schema
    generation
+26/-23 
types_backup.go
Enum marker format update for retention policy types         

config/v1alpha1/types_backup.go

  • Updated RetentionType enum marker format from
    +kubebuilder:validation:Enum:="RetentionNumber";"RetentionSize" to
    +kubebuilder:validation:Enum:="";"RetentionNumber";"RetentionSize"
  • Added +enum marker annotation
  • Fixed documentation comment punctuation
+2/-3     
validation.go
Deterministic XValidation rule ordering implementation     

tools/vendor/sigs.k8s.io/controller-tools/pkg/crd/markers/validation.go

  • Added imports for cmp and slices packages
  • Implemented deterministic sorting of XValidations by rule field
  • Uses slices.SortFunc with cmp.Compare to ensure consistent output
    order
+7/-0     
parser.go
Schema fetcher integration in parser initialization           

tools/vendor/sigs.k8s.io/controller-tools/pkg/crd/parser.go

  • Modified newSchemaContext call to pass a schemaFetcher function
  • Implemented inline fetcher that calls NeedSchemaFor and returns cached
    schema
  • Enables lazy schema resolution with proper caching mechanism
+6/-1     
zz_generated.openapi.go
OpenAPI schema enhancement with enum documentation             

openapi/generated_openapi/zz_generated.openapi.go

  • Enhanced ConsoleSampleSource type field description with enum values
    documentation
  • Added Enum field with sorted enum values ["ContainerImport",
    "GitImport"]
  • Improved OpenAPI schema documentation for enum types
+2/-1     
types_console_sample.go
Console sample source type enum marker format update         

console/v1/types_console_sample.go

  • Updated ConsoleSampleSourceType enum marker format to use quoted
    values
  • Changed from +kubebuilder:validation:Enum:=GitImport;ContainerImport
    to +kubebuilder:validation:Enum:="GitImport";"ContainerImport"
  • Added +enum marker annotation
+2/-2     
0000_80_machine-config_01_machineconfigurations-DevPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in MachineConfiguration CRD

operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-DevPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules to achieve deterministic
    ordering
  • Moved Reboot action validation rule after None action validation rule
    in multiple locations
  • Reordered top-level validation rules for boot image skew enforcement
    to ensure consistent output
+34/-34 
0000_80_machine-config_01_machineconfigurations-CustomNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in MachineConfiguration CRD

operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-CustomNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for deterministic output
  • Moved Reboot action validation after None action validation
    consistently
  • Reordered boot image skew enforcement validation rules
+34/-34 
0000_80_machine-config_01_machineconfigurations-TechPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in MachineConfiguration CRD

operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-TechPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for consistent CRD generation
  • Moved Reboot action validation rule after None action validation
  • Reordered top-level boot image skew enforcement validation rules
+34/-34 
BootImageSkewEnforcement.yaml
Deterministic XValidation rule ordering in BootImageSkewEnforcement
CRD

operator/v1/zz_generated.featuregated-crd-manifests/machineconfigurations.operator.openshift.io/BootImageSkewEnforcement.yaml

  • Reordered x-kubernetes-validations rules for deterministic output
  • Moved Reboot action validation after None action validation in
    multiple sections
  • Reordered boot image skew enforcement validation rules at the spec
    level
+34/-34 
0000_80_machine-config_01_machineconfigurations-DevPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in MachineConfiguration CRD

payload-manifests/crds/0000_80_machine-config_01_machineconfigurations-DevPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for consistent CRD generation
  • Moved Reboot action validation after None action validation
  • Reordered boot image skew enforcement validation rules
+34/-34 
0000_80_machine-config_01_machineconfigurations-CustomNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in MachineConfiguration CRD

payload-manifests/crds/0000_80_machine-config_01_machineconfigurations-CustomNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for deterministic output
  • Moved Reboot action validation after None action validation
    consistently
  • Reordered boot image skew enforcement validation rules
+34/-34 
0000_80_machine-config_01_machineconfigurations-TechPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in MachineConfiguration CRD

payload-manifests/crds/0000_80_machine-config_01_machineconfigurations-TechPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for consistent CRD generation
  • Moved Reboot action validation after None action validation
  • Reordered boot image skew enforcement validation rules
+34/-34 
SigstoreImageVerificationPKI.yaml
Deterministic XValidation rule ordering in
SigstoreImageVerificationPKI CRD

config/v1alpha1/zz_generated.featuregated-crd-manifests/imagepolicies.config.openshift.io/SigstoreImageVerificationPKI.yaml

  • Reordered x-kubernetes-validations rules for certificate data
    validation
  • Moved startsWith validation rule after other certificate format checks
  • Reordered policy type validation rules for consistent ordering
+18/-18 
0000_10_config-operator_01_authentications-DevPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in Authentication CRD

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-DevPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for key domain validation
  • Moved reserved domain checks to appear before format validation rules
  • Reordered discovery URL validation rules for consistent output
+24/-24 
0000_10_config-operator_01_authentications-CustomNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in Authentication CRD

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-CustomNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for key domain validation
  • Moved reserved domain checks before format validation rules
  • Reordered discovery URL validation rules
+24/-24 
0000_10_config-operator_01_authentications-TechPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in Authentication CRD

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-TechPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for key domain validation
  • Moved reserved domain checks before format validation rules
  • Reordered discovery URL validation rules for consistent output
+24/-24 
ManagedBootImages+ManagedBootImagesCPMS.yaml
Deterministic XValidation rule ordering in ManagedBootImages CRD

operator/v1/zz_generated.featuregated-crd-manifests/machineconfigurations.operator.openshift.io/ManagedBootImages+ManagedBootImagesCPMS.yaml

  • Reordered x-kubernetes-validations rules for action validation
  • Moved Reboot action validation after None action validation
+24/-24 
0000_80_machine-config_01_machineconfigurations-OKD.crd.yaml
Deterministic XValidation rule ordering in MachineConfiguration CRD

operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-OKD.crd.yaml

  • Reordered x-kubernetes-validations rules for action validation
  • Moved Reboot action validation after None action validation
    consistently
+24/-24 
0000_80_machine-config_01_machineconfigurations-Default.crd.yaml
Deterministic XValidation rule ordering in MachineConfiguration CRD

operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-Default.crd.yaml

  • Reordered x-kubernetes-validations rules for action validation
  • Moved Reboot action validation after None action validation
+24/-24 
IrreconcilableMachineConfig.yaml
Deterministic XValidation rule ordering in IrreconcilableMachineConfig
CRD

operator/v1/zz_generated.featuregated-crd-manifests/machineconfigurations.operator.openshift.io/IrreconcilableMachineConfig.yaml

  • Reordered x-kubernetes-validations rules for action validation
  • Moved Reboot action validation after None action validation
    consistently
+24/-24 
ManagedBootImages.yaml
Deterministic XValidation rule ordering in ManagedBootImages CRD

operator/v1/zz_generated.featuregated-crd-manifests/machineconfigurations.operator.openshift.io/ManagedBootImages.yaml

  • Reordered x-kubernetes-validations rules for action validation
  • Moved Reboot action validation after None action validation
+24/-24 
AAA_ungated.yaml
Deterministic XValidation rule ordering in MachineConfiguration CRD

operator/v1/zz_generated.featuregated-crd-manifests/machineconfigurations.operator.openshift.io/AAA_ungated.yaml

  • Reordered x-kubernetes-validations rules for action validation
  • Moved Reboot action validation after None action validation
    consistently
+24/-24 
0000_80_machine-config_01_machineconfigurations-OKD.crd.yaml
Deterministic XValidation rule ordering in MachineConfiguration CRD

payload-manifests/crds/0000_80_machine-config_01_machineconfigurations-OKD.crd.yaml

  • Reordered x-kubernetes-validations rules for action validation
  • Moved Reboot action validation after None action validation
+24/-24 
0000_80_machine-config_01_machineconfigurations-Default.crd.yaml
Deterministic XValidation rule ordering in MachineConfiguration CRD

payload-manifests/crds/0000_80_machine-config_01_machineconfigurations-Default.crd.yaml

  • Reordered x-kubernetes-validations rules for action validation
  • Moved Reboot action validation after None action validation
    consistently
+24/-24 
SigstoreImageVerification.yaml
Deterministic XValidation rule ordering in SigstoreImageVerification
CRD

config/v1alpha1/zz_generated.featuregated-crd-manifests/clusterimagepolicies.config.openshift.io/SigstoreImageVerification.yaml

  • Reordered x-kubernetes-validations rules for policy type validation
  • Moved publicKey validation after fulcioCAWithRekor validation
  • Reordered image scope validation rules for consistent output
+12/-12 
0000_10_config-operator_01_authentications-DevPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in authentication CRDs

payload-manifests/crds/0000_10_config-operator_01_authentications-DevPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for authentication key
    validation to ensure deterministic ordering
  • Moved domain-specific validation rules (k8s.io, kubernetes.io,
    openshift.io subdomains) before format validation rules
  • Reordered discoveryURL validation rules for consistent CEL rule
    ordering
  • Reordered URL validation rules for issuerURL field
+24/-24 
0000_10_config-operator_01_authentications-CustomNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in authentication CRDs

payload-manifests/crds/0000_10_config-operator_01_authentications-CustomNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for authentication key
    validation to ensure deterministic ordering
  • Moved domain-specific validation rules (k8s.io, kubernetes.io,
    openshift.io subdomains) before format validation rules
  • Reordered discoveryURL validation rules for consistent CEL rule
    ordering
  • Reordered URL validation rules for issuerURL field
+24/-24 
0000_10_config-operator_01_authentications-TechPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in authentication CRDs

payload-manifests/crds/0000_10_config-operator_01_authentications-TechPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for authentication key
    validation to ensure deterministic ordering
  • Moved domain-specific validation rules (k8s.io, kubernetes.io,
    openshift.io subdomains) before format validation rules
  • Reordered discoveryURL validation rules for consistent CEL rule
    ordering
  • Reordered URL validation rules for issuerURL field
+24/-24 
ExternalOIDCWithUIDAndExtraClaimMappings.yaml
Deterministic XValidation rule ordering in authentication CRDs

config/v1/zz_generated.featuregated-crd-manifests/authentications.config.openshift.io/ExternalOIDCWithUIDAndExtraClaimMappings.yaml

  • Reordered x-kubernetes-validations rules for authentication key
    validation to ensure deterministic ordering
  • Moved domain-specific validation rules before format validation rules
  • Reordered URL validation rules for issuerURL field
+18/-18 
0000_10_config-operator_01_authentications-OKD.crd.yaml
Deterministic XValidation rule ordering in authentication CRDs

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-OKD.crd.yaml

  • Reordered x-kubernetes-validations rules for authentication key
    validation to ensure deterministic ordering
  • Moved domain-specific validation rules before format validation rules
  • Reordered URL validation rules for issuerURL field
+18/-18 
0000_10_config-operator_01_authentications-Default.crd.yaml
Deterministic XValidation rule ordering in authentication CRDs

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-Default.crd.yaml

  • Reordered x-kubernetes-validations rules for authentication key
    validation to ensure deterministic ordering
  • Moved domain-specific validation rules before format validation rules
  • Reordered URL validation rules for issuerURL field
+18/-18 
DyanmicServiceEndpointIBMCloud.yaml
Deterministic XValidation rule ordering in infrastructure CRDs

config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/DyanmicServiceEndpointIBMCloud.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+16/-16 
0000_10_config-operator_01_infrastructures-DevPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in infrastructure CRDs

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-DevPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+17/-17 
0000_10_config-operator_01_infrastructures-CustomNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in infrastructure CRDs

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-CustomNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+17/-17 
0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in infrastructure CRDs

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+17/-17 
SigstoreImageVerification.yaml
Deterministic XValidation rule ordering in image policy CRDs

config/v1alpha1/zz_generated.featuregated-crd-manifests/imagepolicies.config.openshift.io/SigstoreImageVerification.yaml

  • Reordered x-kubernetes-validations rules for policy type validation
    (PublicKey, FulcioCAWithRekor)
  • Reordered image scope validation rules to ensure deterministic CEL
    rule ordering
+12/-12 
0000_10_config-operator_01_authentications-OKD.crd.yaml
Deterministic XValidation rule ordering in authentication CRDs

payload-manifests/crds/0000_10_config-operator_01_authentications-OKD.crd.yaml

  • Reordered x-kubernetes-validations rules for authentication key
    validation to ensure deterministic ordering
  • Moved domain-specific validation rules before format validation rules
  • Reordered URL validation rules for issuerURL field
+18/-18 
0000_10_config-operator_01_authentications-Default.crd.yaml
Deterministic XValidation rule ordering in authentication CRDs

payload-manifests/crds/0000_10_config-operator_01_authentications-Default.crd.yaml

  • Reordered x-kubernetes-validations rules for authentication key
    validation to ensure deterministic ordering
  • Moved domain-specific validation rules before format validation rules
  • Reordered URL validation rules for issuerURL field
+18/-18 
0000_10_config-operator_01_infrastructures-DevPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in infrastructure CRDs

payload-manifests/crds/0000_10_config-operator_01_infrastructures-DevPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+17/-17 
0000_10_config-operator_01_infrastructures-CustomNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in infrastructure CRDs

payload-manifests/crds/0000_10_config-operator_01_infrastructures-CustomNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+17/-17 
0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in infrastructure CRDs

payload-manifests/crds/0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+17/-17 
0000_80_machine-config_01_controllerconfigs-DevPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in machine config CRDs

machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-DevPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+18/-18 
0000_80_machine-config_01_controllerconfigs-CustomNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in machine config CRDs

machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-CustomNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+18/-18 
0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in machine config CRDs

machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+18/-18 
0000_80_machine-config_01_controllerconfigs-DevPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in machine config CRDs

payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-DevPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+18/-18 
0000_80_machine-config_01_controllerconfigs-CustomNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in machine config CRDs

payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-CustomNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+18/-18 
0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in machine config CRDs

payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+18/-18 
AAA_ungated.yaml
Deterministic XValidation rule ordering in alert relabel CRDs

monitoring/v1/zz_generated.featuregated-crd-manifests/alertrelabelconfigs.monitoring.openshift.io/AAA_ungated.yaml

  • Reordered x-kubernetes-validations rules for alert relabel
    configuration validation
  • Reorganized rules for modulus, replacement, separator, sourceLabels,
    and targetLabel validation
  • Ensured deterministic ordering of CEL validation rules
+21/-21 
0000_50_monitoring_02_alertrelabelconfigs.crd.yaml
Deterministic XValidation rule ordering in alert relabel CRDs

monitoring/v1/zz_generated.crd-manifests/0000_50_monitoring_02_alertrelabelconfigs.crd.yaml

  • Reordered x-kubernetes-validations rules for alert relabel
    configuration validation
  • Reorganized rules for modulus, replacement, separator, sourceLabels,
    and targetLabel validation
  • Ensured deterministic ordering of CEL validation rules
+21/-21 
VSphereHostVMGroupZonal.yaml
Deterministic XValidation rule ordering in vSphere infrastructure CRDs

config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/VSphereHostVMGroupZonal.yaml

  • Reordered x-kubernetes-validations rules for failure domain identifier
    type validation (UUID, Name)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+13/-13 
DyanmicServiceEndpointIBMCloud.yaml
Deterministic XValidation rule ordering in machine config CRDs

machineconfiguration/v1/zz_generated.featuregated-crd-manifests/controllerconfigs.machineconfiguration.openshift.io/DyanmicServiceEndpointIBMCloud.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
+16/-16 
0000_10_control-plane-machine-set_01_controlplanemachinesets-DevPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in control plane machine set
CRDs

machine/v1/zz_generated.crd-manifests/0000_10_control-plane-machine-set_01_controlplanemachinesets-DevPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for AWS instance identifier
    type validation (ID, ARN, Filters)
  • Reordered platform configuration validation rules (Nutanix moved after
    GCP, before OpenStack)
  • Added new validation rule for required
    machine.openshift.io/cluster-api-cluster label
+12/-12 
Bug fix
1 files
generator.go
Disable schema comparator for enum structure simplification

tools/codegen/pkg/schemacheck/generator.go

  • Added NoDataTypeChange to the list of disabled comparators
  • Added explanatory comment about controller-tools simplifying allOf
    enum structures
  • Justifies disabling the comparator due to type field changes in
    simplified enums
+4/-1     
Miscellaneous
13 files
SigstoreImageVerificationPKI.yaml
Deterministic validation rule ordering in CRD manifests   

config/v1/zz_generated.featuregated-crd-manifests/clusterimagepolicies.config.openshift.io/SigstoreImageVerificationPKI.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for certificate data fields now sorted
    deterministically
  • Affects fulcioCAData, rekorKeyData, caIntermediatesData, caRootsData,
    and policy type validations
+30/-30 
SigstoreImageVerificationPKI.yaml
Deterministic validation rule ordering in CRD manifests   

config/v1/zz_generated.featuregated-crd-manifests/imagepolicies.config.openshift.io/SigstoreImageVerificationPKI.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for certificate data fields now sorted
    deterministically
  • Affects fulcioCAData, rekorKeyData, caIntermediatesData, caRootsData,
    and policy type validations
+30/-30 
0000_10_config-operator_01_clusterimagepolicies.crd.yaml
Deterministic validation rule ordering in CRD manifests   

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_clusterimagepolicies.crd.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for certificate data fields now sorted
    deterministically
  • Affects fulcioCAData, rekorKeyData, caIntermediatesData, caRootsData,
    and policy type validations
+30/-30 
0000_10_config-operator_01_imagepolicies.crd.yaml
Deterministic validation rule ordering in CRD manifests   

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_imagepolicies.crd.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for certificate data fields now sorted
    deterministically
  • Affects fulcioCAData, rekorKeyData, caIntermediatesData, caRootsData,
    and policy type validations
+30/-30 
0000_10_config-operator_01_clusterimagepolicies.crd.yaml
Deterministic validation rule ordering in CRD manifests   

payload-manifests/crds/0000_10_config-operator_01_clusterimagepolicies.crd.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for certificate data fields now sorted
    deterministically
  • Affects fulcioCAData, rekorKeyData, caIntermediatesData, caRootsData,
    and policy type validations
+30/-30 
0000_10_config-operator_01_imagepolicies.crd.yaml
Deterministic validation rule ordering in CRD manifests   

payload-manifests/crds/0000_10_config-operator_01_imagepolicies.crd.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for certificate data fields now sorted
    deterministically
  • Affects fulcioCAData, rekorKeyData, caIntermediatesData, caRootsData,
    and policy type validations
+30/-30 
SigstoreImageVerification.yaml
Deterministic validation rule ordering in CRD manifests   

config/v1/zz_generated.featuregated-crd-manifests/clusterimagepolicies.config.openshift.io/SigstoreImageVerification.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for keyData, rekorKeyData, and policy type
    validations now sorted deterministically
  • Image scope validation rules reordered alphabetically
+24/-24 
SigstoreImageVerification.yaml
Deterministic validation rule ordering in CRD manifests   

config/v1/zz_generated.featuregated-crd-manifests/imagepolicies.config.openshift.io/SigstoreImageVerification.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for keyData, rekorKeyData, and policy type
    validations now sorted deterministically
  • Image scope validation rules reordered alphabetically
+24/-24 
SigstoreImageVerificationPKI.yaml
Deterministic validation rule ordering in CRD manifests   

config/v1alpha1/zz_generated.featuregated-crd-manifests/clusterimagepolicies.config.openshift.io/SigstoreImageVerificationPKI.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for certificate data fields now sorted
    deterministically
  • Affects caIntermediatesData, caRootsData, and policy type validations
+18/-18 
0000_10_config-operator_01_clusterimagepolicies.crd.yaml
Deterministic validation rule ordering in CRD manifests   

config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clusterimagepolicies.crd.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for certificate data fields now sorted
    deterministically
  • Affects caIntermediatesData, caRootsData, and policy type validations
+18/-18 
0000_10_config-operator_01_imagepolicies.crd.yaml
Deterministic validation rule ordering in CRD manifests   

config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_imagepolicies.crd.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for certificate data fields now sorted
    deterministically
  • Affects caIntermediatesData, caRootsData, and policy type validations
+18/-18 
AAA_ungated.yaml
Deterministic validation rule ordering in ingress controller CRD

operator/v1/zz_generated.featuregated-crd-manifests/ingresscontrollers.operator.openshift.io/AAA_ungated.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for eipAllocations, subnet counts, and HTTP header
    restrictions now sorted deterministically
  • httpKeepAliveTimeout validation rules reordered alphabetically
+36/-36 
0000_50_ingress_00_ingresscontrollers.crd.yaml
Deterministic validation rule ordering in ingress controller CRD

operator/v1/zz_generated.crd-manifests/0000_50_ingress_00_ingresscontrollers.crd.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for eipAllocations, subnet counts, and HTTP header
    restrictions now sorted deterministically
  • httpKeepAliveTimeout validation rules reordered alphabetically
+36/-36 
Dependencies
1 files
go.sum
Add jaypoulz controller-tools fork dependency                       

tools/go.sum

  • Added dependency entry for github.com/jaypoulz/controller-tools
    v0.0.0-20260116180353-88e61f2c62d0
  • Includes both hash and module sum entries for the new controller-tools
    fork
+2/-2     
Additional files
101 files
ExternalOIDC.yaml +4/-4     
DyanmicServiceEndpointIBMCloud.yaml +2/-2     
0000_10_config-operator_01_featuregates.crd.yaml +3/-3     
0000_10_config-operator_01_infrastructures-Default.crd.yaml +8/-8     
0000_10_config-operator_01_infrastructures-OKD.crd.yaml +8/-8     
ExternalOIDC.yaml +2/-2     
ExternalOIDCWithUpstreamParity.yaml +8/-8     
AAA_ungated.yaml +3/-3     
AAA_ungated.yaml +8/-8     
AWSClusterHostedDNSInstall.yaml +8/-8     
AWSDualStackInstall.yaml +8/-8     
AzureClusterHostedDNSInstall.yaml +8/-8     
AzureDualStackInstall.yaml +8/-8     
DualReplica.yaml +8/-8     
GCPClusterHostedDNSInstall.yaml +8/-8     
HighlyAvailableArbiter+DualReplica.yaml +8/-8     
HighlyAvailableArbiter.yaml +8/-8     
NutanixMultiSubnets.yaml +8/-8     
OnPremDNSRecords.yaml +8/-8     
VSphereMultiNetworks.yaml +8/-8     
0000_10_config-operator_01_backups-CustomNoUpgrade.crd.yaml +4/-8     
0000_10_config-operator_01_backups-DevPreviewNoUpgrade.crd.yaml +4/-8     
0000_10_config-operator_01_backups-TechPreviewNoUpgrade.crd.yaml +4/-8     
0000_10_config-operator_01_clustermonitorings-CustomNoUpgrade.crd.yaml +4/-4     
0000_10_config-operator_01_clustermonitorings-DevPreviewNoUpgrade.crd.yaml +4/-4     
0000_10_config-operator_01_clustermonitorings-TechPreviewNoUpgrade.crd.yaml +4/-4     
AutomatedEtcdBackup.yaml +4/-8     
ClusterMonitoringConfig.yaml +4/-4     
00_consolesamples.crd.yaml +6/-10   
90_consoleplugins.crd.yaml +2/-2     
ConsolePluginContentSecurityPolicy.yaml +2/-2     
AAA_ungated.yaml +6/-10   
0000_50_my-operator_01_stableconfigtypes-CustomNoUpgrade.crd.yaml +3/-3     
0000_50_my-operator_01_stableconfigtypes-Default.crd.yaml +3/-3     
0000_50_my-operator_01_stableconfigtypes-DevPreviewNoUpgrade.crd.yaml +3/-3     
0000_50_my-operator_01_stableconfigtypes-OKD.crd.yaml +3/-3     
0000_50_my-operator_01_stableconfigtypes-TechPreviewNoUpgrade.crd.yaml +3/-3     
AAA_ungated.yaml +3/-3     
Example+Example2.yaml +3/-3     
Example.yaml +3/-3     
0000_10_insights_01_datagathers-CustomNoUpgrade.crd.yaml +2/-2     
0000_10_insights_01_datagathers-DevPreviewNoUpgrade.crd.yaml +2/-2     
0000_10_insights_01_datagathers-TechPreviewNoUpgrade.crd.yaml +2/-2     
InsightsOnDemandDataGather.yaml +2/-2     
0000_10_insights_01_datagathers-CustomNoUpgrade.crd.yaml +8/-8     
0000_10_insights_01_datagathers-DevPreviewNoUpgrade.crd.yaml +8/-8     
0000_10_insights_01_datagathers-TechPreviewNoUpgrade.crd.yaml +8/-8     
InsightsOnDemandDataGather.yaml +8/-8     
0000_10_insights_01_datagathers-CustomNoUpgrade.crd.yaml +2/-2     
0000_10_insights_01_datagathers-DevPreviewNoUpgrade.crd.yaml +2/-2     
0000_10_insights_01_datagathers-TechPreviewNoUpgrade.crd.yaml +2/-2     
InsightsOnDemandDataGather.yaml +2/-2     
0000_10_control-plane-machine-set_01_controlplanemachinesets-Default.crd.yaml +12/-12 
0000_10_control-plane-machine-set_01_controlplanemachinesets-OKD.crd.yaml +12/-12 
0000_10_control-plane-machine-set_01_controlplanemachinesets-TechPreviewNoUpgrade.crd.yaml +12/-12 
AAA_ungated.yaml +12/-12 
CPMSMachineNamePrefix.yaml +12/-12 
MachineAPIMigration.yaml +12/-12 
0000_80_machine-config_01_controllerconfigs-Default.crd.yaml +8/-8     
0000_80_machine-config_01_controllerconfigs-OKD.crd.yaml +8/-8     
0000_80_machine-config_01_machineconfignodes-Hypershift-CustomNoUpgrade.crd.yaml +2/-2     
0000_80_machine-config_01_machineconfignodes-Hypershift-DevPreviewNoUpgrade.crd.yaml +2/-2     
0000_80_machine-config_01_machineconfignodes-Hypershift-TechPreviewNoUpgrade.crd.yaml +2/-2     
0000_80_machine-config_01_machineconfignodes-SelfManagedHA-CustomNoUpgrade.crd.yaml +2/-2     
0000_80_machine-config_01_machineconfignodes-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml +2/-2     
0000_80_machine-config_01_machineconfignodes-SelfManagedHA-TechPreviewNoUpgrade.crd.yaml +2/-2     
0000_80_machine-config_01_machineconfigpools-CustomNoUpgrade.crd.yaml +7/-7     
0000_80_machine-config_01_machineconfigpools-Default.crd.yaml +7/-7     
0000_80_machine-config_01_machineconfigpools-DevPreviewNoUpgrade.crd.yaml +7/-7     
0000_80_machine-config_01_machineconfigpools-OKD.crd.yaml +7/-7     
0000_80_machine-config_01_machineconfigpools-TechPreviewNoUpgrade.crd.yaml +7/-7     
AAA_ungated.yaml +8/-8     
AWSClusterHostedDNSInstall.yaml +8/-8     
AWSDualStackInstall.yaml +8/-8     
AzureClusterHostedDNSInstall.yaml +8/-8     
AzureDualStackInstall.yaml +8/-8     
DualReplica.yaml +8/-8     
GCPClusterHostedDNSInstall.yaml +8/-8     
HighlyAvailableArbiter+DualReplica.yaml +8/-8     
HighlyAvailableArbiter.yaml +8/-8     
NutanixMultiSubnets.yaml +8/-8     
OnPremDNSRecords.yaml +8/-8     
VSphereHostVMGroupZonal.yaml +14/-14 
VSphereMultiNetworks.yaml +8/-8     
IrreconcilableMachineConfig.yaml +2/-2     
PinnedImages.yaml +7/-7     
openapi.json +14/-2   
0000_50_console_01_consoles.crd.yaml +5/-5     
0000_70_network_01_networks.crd.yaml +9/-9     
AAA_ungated.yaml +5/-5     
AAA_ungated.yaml +2/-2     
AdditionalRoutingCapabilities.yaml +2/-2     
NetworkLiveMigration.yaml +2/-2     
RouteAdvertisements.yaml +9/-9     
0000_10_config-operator_01_backups-CustomNoUpgrade.crd.yaml +4/-8     
0000_10_config-operator_01_backups-DevPreviewNoUpgrade.crd.yaml +4/-8     
0000_10_config-operator_01_backups-TechPreviewNoUpgrade.crd.yaml +4/-8     
0000_10_config-operator_01_clustermonitorings-CustomNoUpgrade.crd.yaml +4/-4     
0000_10_config-operator_01_clustermonitorings-DevPreviewNoUpgrade.crd.yaml +4/-4     
0000_10_config-operator_01_clustermonitorings-TechPreviewNoUpgrade.crd.yaml +4/-4     
Additional files not shown

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 19, 2026

Hello @jaypoulz! Some important instructions when contributing to openshift/api:
API design plays an important part in the user experience of OpenShift and as such API PRs are subject to a high level of scrutiny to ensure they follow our best practices. If you haven't already done so, please review the OpenShift API Conventions and ensure that your proposed changes are compliant. Following these conventions will help expedite the api review process for your PR.

@coderabbitai
Copy link

coderabbitai bot commented Jan 19, 2026

📝 Walkthrough

Walkthrough

Enum validation annotations were moved from some struct fields to their type declarations (ConsoleSampleSourceType) and the per-field enum constraint for RetentionType was removed. Backups CRD schemas consolidated allOf-based enums for retentionType into a single enum (empty-string option removed). OpenAPI artifacts were updated to include explicit enum values and extended descriptions for the ConsoleSampleSource type. The openapi-gen invocation in tools/Makefile was switched to the kube-openapi path, tools/go.mod updated a controller-tools replace directive, and NoDataTypeChange was added to the default removed comparators list.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: bumping controller-tools with an XValidation ordering fix, which is the primary objective of this PR.
Description check ✅ Passed The description is comprehensive and directly related to the changeset, covering the rationale for the upgrade, specific changes made, and references to upstream fixes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.5.0)

Error: build linters: unable to load custom analyzer "kubeapilinter": tools/_output/bin/kube-api-linter.so, plugin: not implemented
The command is terminated due to an error: build linters: unable to load custom analyzer "kubeapilinter": tools/_output/bin/kube-api-linter.so, plugin: not implemented


Comment @coderabbitai help to get the list of available commands and usage tips.

@jaypoulz jaypoulz changed the title chore(tools): bump controller-tools with XValidation ordering fix OCPEDGE-2084: chore(tools): bump controller-tools with XValidation ordering fix Jan 19, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jan 19, 2026
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 19, 2026

@jaypoulz: This pull request references OCPEDGE-2084 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Update controller-tools to jaypoulz/controller-tools fork which includes a fix for deterministic XValidation rule ordering. This ensures CRD generation produces consistent output regardless of map iteration order.

Changes included:

  • tools/go.mod: Point replace directive to jaypoulz/controller-tools
  • tools/Makefile: Fix openapi-gen path (moved from code-generator to kube-openapi upstream)
  • tools/codegen/pkg/crdify/generator.go: Ignore 'type' validation for allOf→enum schema simplification
  • tools/codegen/pkg/schemacheck/generator.go: Disable NoDataTypeChange comparator for the same schema simplification

The new controller-tools generates simpler enum schemas without allOf wrappers when both type and field have enum markers. This is functionally equivalent but structurally different, requiring the crdify and schemacheck adjustments to avoid false positive violations.

Upstream fix: kubernetes-sigs/controller-tools#1324
OpenShift carry: openshift/kubernetes-sigs-controller-tools#33

The OpenShift carry is a temporary backport until we can bump to Go 1.25, which is required by the upstream controller-tools version with this fix.

Created with support from Claude Opus 4 (Anthropic)

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jan 19, 2026
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 19, 2026

@jaypoulz: This pull request references OCPEDGE-2084 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

User description

Update controller-tools to jaypoulz/controller-tools fork which includes a fix for deterministic XValidation rule ordering. This ensures CRD generation produces consistent output regardless of map iteration order.

Changes included:

  • tools/go.mod: Point replace directive to jaypoulz/controller-tools
  • tools/Makefile: Fix openapi-gen path (moved from code-generator to kube-openapi upstream)
  • tools/codegen/pkg/crdify/generator.go: Ignore 'type' validation for allOf→enum schema simplification
  • tools/codegen/pkg/schemacheck/generator.go: Disable NoDataTypeChange comparator for the same schema simplification

The new controller-tools generates simpler enum schemas without allOf wrappers when both type and field have enum markers. This is functionally equivalent but structurally different, requiring the crdify and schemacheck adjustments to avoid false positive violations.

Upstream fix: kubernetes-sigs/controller-tools#1324
OpenShift carry: openshift/kubernetes-sigs-controller-tools#33

The OpenShift carry is a temporary backport until we can bump to Go 1.25, which is required by the upstream controller-tools version with this fix.

Created with support from Claude Opus 4 (Anthropic)


PR Type

Enhancement, Bug fix


Description

  • Upgraded controller-tools to include deterministic XValidation rule ordering, ensuring consistent CRD generation output regardless of map iteration order

  • Implemented sorting of XValidations by rule field using slices.SortFunc with cmp.Compare for deterministic output

  • Refactored schema generation with schemaFetcher function type for improved schema resolution and lazy loading with caching

  • Added alphabetical sorting of Required fields in struct schema generation

  • Updated enum marker formats in type definitions (RetentionType, ConsoleSampleSourceType) to use quoted values and added +enum annotations

  • Disabled NoDataTypeChange comparator in schema checks to accommodate simplified allOf enum structures from updated controller-tools

  • Regenerated all CRD manifests with deterministic validation rule ordering across multiple API groups (config, operator, machine, monitoring, route, insights)

  • Enhanced OpenAPI schema documentation with enum value descriptions


Diagram Walkthrough

flowchart LR
 A["controller-tools upgrade<br/>with XValidation sorting"] --> B["Deterministic rule<br/>ordering implementation"]
 B --> C["Schema generation<br/>refactoring"]
 C --> D["CRD manifest<br/>regeneration"]
 A --> E["Enum marker format<br/>updates"]
 E --> D
 A --> F["Schema comparator<br/>adjustments"]
 F --> D
 D --> G["Consistent CRD<br/>output across builds"]
Loading

File Walkthrough

Relevant files
Enhancement
53 files
schema.go
Schema generation refactoring with deterministic field ordering

tools/vendor/sigs.k8s.io/controller-tools/pkg/crd/schema.go

  • Added schemaFetcher function type for fetching schemas by type
    identifier
  • Introduced schemaFetcher field to schemaContext struct for schema
    resolution
  • Modified localNamedToSchema to use schemaFetcher instead of inline
    schema creation logic
  • Added conditional checks to only set Description field when non-empty
  • Added alphabetical sorting of Required fields in struct schema
    generation
+26/-23 
types_backup.go
Enum marker format update for retention policy types         

config/v1alpha1/types_backup.go

  • Updated RetentionType enum marker format from
    +kubebuilder:validation:Enum:="RetentionNumber";"RetentionSize" to
    +kubebuilder:validation:Enum:="";"RetentionNumber";"RetentionSize"
  • Added +enum marker annotation
  • Fixed documentation comment punctuation
+2/-3     
validation.go
Deterministic XValidation rule ordering implementation     

tools/vendor/sigs.k8s.io/controller-tools/pkg/crd/markers/validation.go

  • Added imports for cmp and slices packages
  • Implemented deterministic sorting of XValidations by rule field
  • Uses slices.SortFunc with cmp.Compare to ensure consistent output
    order
+7/-0     
parser.go
Schema fetcher integration in parser initialization           

tools/vendor/sigs.k8s.io/controller-tools/pkg/crd/parser.go

  • Modified newSchemaContext call to pass a schemaFetcher function
  • Implemented inline fetcher that calls NeedSchemaFor and returns cached
    schema
  • Enables lazy schema resolution with proper caching mechanism
+6/-1     
zz_generated.openapi.go
OpenAPI schema enhancement with enum documentation             

openapi/generated_openapi/zz_generated.openapi.go

  • Enhanced ConsoleSampleSource type field description with enum values
    documentation
  • Added Enum field with sorted enum values ["ContainerImport",
    "GitImport"]
  • Improved OpenAPI schema documentation for enum types
+2/-1     
types_console_sample.go
Console sample source type enum marker format update         

console/v1/types_console_sample.go

  • Updated ConsoleSampleSourceType enum marker format to use quoted
    values
  • Changed from +kubebuilder:validation:Enum:=GitImport;ContainerImport
    to +kubebuilder:validation:Enum:="GitImport";"ContainerImport"
  • Added +enum marker annotation
+2/-2     
0000_80_machine-config_01_machineconfigurations-DevPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in MachineConfiguration CRD

operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-DevPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules to achieve deterministic
    ordering
  • Moved Reboot action validation rule after None action validation rule
    in multiple locations
  • Reordered top-level validation rules for boot image skew enforcement
    to ensure consistent output
+34/-34 
0000_80_machine-config_01_machineconfigurations-CustomNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in MachineConfiguration CRD

operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-CustomNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for deterministic output
  • Moved Reboot action validation after None action validation
    consistently
  • Reordered boot image skew enforcement validation rules
+34/-34 
0000_80_machine-config_01_machineconfigurations-TechPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in MachineConfiguration CRD

operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-TechPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for consistent CRD generation
  • Moved Reboot action validation rule after None action validation
  • Reordered top-level boot image skew enforcement validation rules
+34/-34 
BootImageSkewEnforcement.yaml
Deterministic XValidation rule ordering in BootImageSkewEnforcement
CRD

operator/v1/zz_generated.featuregated-crd-manifests/machineconfigurations.operator.openshift.io/BootImageSkewEnforcement.yaml

  • Reordered x-kubernetes-validations rules for deterministic output
  • Moved Reboot action validation after None action validation in
    multiple sections
  • Reordered boot image skew enforcement validation rules at the spec
    level
+34/-34 
0000_80_machine-config_01_machineconfigurations-DevPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in MachineConfiguration CRD

payload-manifests/crds/0000_80_machine-config_01_machineconfigurations-DevPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for consistent CRD generation
  • Moved Reboot action validation after None action validation
  • Reordered boot image skew enforcement validation rules
+34/-34 
0000_80_machine-config_01_machineconfigurations-CustomNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in MachineConfiguration CRD

payload-manifests/crds/0000_80_machine-config_01_machineconfigurations-CustomNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for deterministic output
  • Moved Reboot action validation after None action validation
    consistently
  • Reordered boot image skew enforcement validation rules
+34/-34 
0000_80_machine-config_01_machineconfigurations-TechPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in MachineConfiguration CRD

payload-manifests/crds/0000_80_machine-config_01_machineconfigurations-TechPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for consistent CRD generation
  • Moved Reboot action validation after None action validation
  • Reordered boot image skew enforcement validation rules
+34/-34 
SigstoreImageVerificationPKI.yaml
Deterministic XValidation rule ordering in
SigstoreImageVerificationPKI CRD

config/v1alpha1/zz_generated.featuregated-crd-manifests/imagepolicies.config.openshift.io/SigstoreImageVerificationPKI.yaml

  • Reordered x-kubernetes-validations rules for certificate data
    validation
  • Moved startsWith validation rule after other certificate format checks
  • Reordered policy type validation rules for consistent ordering
+18/-18 
0000_10_config-operator_01_authentications-DevPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in Authentication CRD

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-DevPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for key domain validation
  • Moved reserved domain checks to appear before format validation rules
  • Reordered discovery URL validation rules for consistent output
+24/-24 
0000_10_config-operator_01_authentications-CustomNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in Authentication CRD

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-CustomNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for key domain validation
  • Moved reserved domain checks before format validation rules
  • Reordered discovery URL validation rules
+24/-24 
0000_10_config-operator_01_authentications-TechPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in Authentication CRD

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-TechPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for key domain validation
  • Moved reserved domain checks before format validation rules
  • Reordered discovery URL validation rules for consistent output
+24/-24 
ManagedBootImages+ManagedBootImagesCPMS.yaml
Deterministic XValidation rule ordering in ManagedBootImages CRD

operator/v1/zz_generated.featuregated-crd-manifests/machineconfigurations.operator.openshift.io/ManagedBootImages+ManagedBootImagesCPMS.yaml

  • Reordered x-kubernetes-validations rules for action validation
  • Moved Reboot action validation after None action validation
+24/-24 
0000_80_machine-config_01_machineconfigurations-OKD.crd.yaml
Deterministic XValidation rule ordering in MachineConfiguration CRD

operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-OKD.crd.yaml

  • Reordered x-kubernetes-validations rules for action validation
  • Moved Reboot action validation after None action validation
    consistently
+24/-24 
0000_80_machine-config_01_machineconfigurations-Default.crd.yaml
Deterministic XValidation rule ordering in MachineConfiguration CRD

operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-Default.crd.yaml

  • Reordered x-kubernetes-validations rules for action validation
  • Moved Reboot action validation after None action validation
+24/-24 
IrreconcilableMachineConfig.yaml
Deterministic XValidation rule ordering in IrreconcilableMachineConfig
CRD

operator/v1/zz_generated.featuregated-crd-manifests/machineconfigurations.operator.openshift.io/IrreconcilableMachineConfig.yaml

  • Reordered x-kubernetes-validations rules for action validation
  • Moved Reboot action validation after None action validation
    consistently
+24/-24 
ManagedBootImages.yaml
Deterministic XValidation rule ordering in ManagedBootImages CRD

operator/v1/zz_generated.featuregated-crd-manifests/machineconfigurations.operator.openshift.io/ManagedBootImages.yaml

  • Reordered x-kubernetes-validations rules for action validation
  • Moved Reboot action validation after None action validation
+24/-24 
AAA_ungated.yaml
Deterministic XValidation rule ordering in MachineConfiguration CRD

operator/v1/zz_generated.featuregated-crd-manifests/machineconfigurations.operator.openshift.io/AAA_ungated.yaml

  • Reordered x-kubernetes-validations rules for action validation
  • Moved Reboot action validation after None action validation
    consistently
+24/-24 
0000_80_machine-config_01_machineconfigurations-OKD.crd.yaml
Deterministic XValidation rule ordering in MachineConfiguration CRD

payload-manifests/crds/0000_80_machine-config_01_machineconfigurations-OKD.crd.yaml

  • Reordered x-kubernetes-validations rules for action validation
  • Moved Reboot action validation after None action validation
+24/-24 
0000_80_machine-config_01_machineconfigurations-Default.crd.yaml
Deterministic XValidation rule ordering in MachineConfiguration CRD

payload-manifests/crds/0000_80_machine-config_01_machineconfigurations-Default.crd.yaml

  • Reordered x-kubernetes-validations rules for action validation
  • Moved Reboot action validation after None action validation
    consistently
+24/-24 
SigstoreImageVerification.yaml
Deterministic XValidation rule ordering in SigstoreImageVerification
CRD

config/v1alpha1/zz_generated.featuregated-crd-manifests/clusterimagepolicies.config.openshift.io/SigstoreImageVerification.yaml

  • Reordered x-kubernetes-validations rules for policy type validation
  • Moved publicKey validation after fulcioCAWithRekor validation
  • Reordered image scope validation rules for consistent output
+12/-12 
0000_10_config-operator_01_authentications-DevPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in authentication CRDs

payload-manifests/crds/0000_10_config-operator_01_authentications-DevPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for authentication key
    validation to ensure deterministic ordering
  • Moved domain-specific validation rules (k8s.io, kubernetes.io,
    openshift.io subdomains) before format validation rules
  • Reordered discoveryURL validation rules for consistent CEL rule
    ordering
  • Reordered URL validation rules for issuerURL field
+24/-24 
0000_10_config-operator_01_authentications-CustomNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in authentication CRDs

payload-manifests/crds/0000_10_config-operator_01_authentications-CustomNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for authentication key
    validation to ensure deterministic ordering
  • Moved domain-specific validation rules (k8s.io, kubernetes.io,
    openshift.io subdomains) before format validation rules
  • Reordered discoveryURL validation rules for consistent CEL rule
    ordering
  • Reordered URL validation rules for issuerURL field
+24/-24 
0000_10_config-operator_01_authentications-TechPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in authentication CRDs

payload-manifests/crds/0000_10_config-operator_01_authentications-TechPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for authentication key
    validation to ensure deterministic ordering
  • Moved domain-specific validation rules (k8s.io, kubernetes.io,
    openshift.io subdomains) before format validation rules
  • Reordered discoveryURL validation rules for consistent CEL rule
    ordering
  • Reordered URL validation rules for issuerURL field
+24/-24 
ExternalOIDCWithUIDAndExtraClaimMappings.yaml
Deterministic XValidation rule ordering in authentication CRDs

config/v1/zz_generated.featuregated-crd-manifests/authentications.config.openshift.io/ExternalOIDCWithUIDAndExtraClaimMappings.yaml

  • Reordered x-kubernetes-validations rules for authentication key
    validation to ensure deterministic ordering
  • Moved domain-specific validation rules before format validation rules
  • Reordered URL validation rules for issuerURL field
+18/-18 
0000_10_config-operator_01_authentications-OKD.crd.yaml
Deterministic XValidation rule ordering in authentication CRDs

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-OKD.crd.yaml

  • Reordered x-kubernetes-validations rules for authentication key
    validation to ensure deterministic ordering
  • Moved domain-specific validation rules before format validation rules
  • Reordered URL validation rules for issuerURL field
+18/-18 
0000_10_config-operator_01_authentications-Default.crd.yaml
Deterministic XValidation rule ordering in authentication CRDs

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-Default.crd.yaml

  • Reordered x-kubernetes-validations rules for authentication key
    validation to ensure deterministic ordering
  • Moved domain-specific validation rules before format validation rules
  • Reordered URL validation rules for issuerURL field
+18/-18 
DyanmicServiceEndpointIBMCloud.yaml
Deterministic XValidation rule ordering in infrastructure CRDs

config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/DyanmicServiceEndpointIBMCloud.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+16/-16 
0000_10_config-operator_01_infrastructures-DevPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in infrastructure CRDs

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-DevPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+17/-17 
0000_10_config-operator_01_infrastructures-CustomNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in infrastructure CRDs

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-CustomNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+17/-17 
0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in infrastructure CRDs

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+17/-17 
SigstoreImageVerification.yaml
Deterministic XValidation rule ordering in image policy CRDs

config/v1alpha1/zz_generated.featuregated-crd-manifests/imagepolicies.config.openshift.io/SigstoreImageVerification.yaml

  • Reordered x-kubernetes-validations rules for policy type validation
    (PublicKey, FulcioCAWithRekor)
  • Reordered image scope validation rules to ensure deterministic CEL
    rule ordering
+12/-12 
0000_10_config-operator_01_authentications-OKD.crd.yaml
Deterministic XValidation rule ordering in authentication CRDs

payload-manifests/crds/0000_10_config-operator_01_authentications-OKD.crd.yaml

  • Reordered x-kubernetes-validations rules for authentication key
    validation to ensure deterministic ordering
  • Moved domain-specific validation rules before format validation rules
  • Reordered URL validation rules for issuerURL field
+18/-18 
0000_10_config-operator_01_authentications-Default.crd.yaml
Deterministic XValidation rule ordering in authentication CRDs

payload-manifests/crds/0000_10_config-operator_01_authentications-Default.crd.yaml

  • Reordered x-kubernetes-validations rules for authentication key
    validation to ensure deterministic ordering
  • Moved domain-specific validation rules before format validation rules
  • Reordered URL validation rules for issuerURL field
+18/-18 
0000_10_config-operator_01_infrastructures-DevPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in infrastructure CRDs

payload-manifests/crds/0000_10_config-operator_01_infrastructures-DevPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+17/-17 
0000_10_config-operator_01_infrastructures-CustomNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in infrastructure CRDs

payload-manifests/crds/0000_10_config-operator_01_infrastructures-CustomNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+17/-17 
0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in infrastructure CRDs

payload-manifests/crds/0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+17/-17 
0000_80_machine-config_01_controllerconfigs-DevPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in machine config CRDs

machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-DevPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+18/-18 
0000_80_machine-config_01_controllerconfigs-CustomNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in machine config CRDs

machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-CustomNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+18/-18 
0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in machine config CRDs

machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+18/-18 
0000_80_machine-config_01_controllerconfigs-DevPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in machine config CRDs

payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-DevPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+18/-18 
0000_80_machine-config_01_controllerconfigs-CustomNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in machine config CRDs

payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-CustomNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+18/-18 
0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in machine config CRDs

payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+18/-18 
AAA_ungated.yaml
Deterministic XValidation rule ordering in alert relabel CRDs

monitoring/v1/zz_generated.featuregated-crd-manifests/alertrelabelconfigs.monitoring.openshift.io/AAA_ungated.yaml

  • Reordered x-kubernetes-validations rules for alert relabel
    configuration validation
  • Reorganized rules for modulus, replacement, separator, sourceLabels,
    and targetLabel validation
  • Ensured deterministic ordering of CEL validation rules
+21/-21 
0000_50_monitoring_02_alertrelabelconfigs.crd.yaml
Deterministic XValidation rule ordering in alert relabel CRDs

monitoring/v1/zz_generated.crd-manifests/0000_50_monitoring_02_alertrelabelconfigs.crd.yaml

  • Reordered x-kubernetes-validations rules for alert relabel
    configuration validation
  • Reorganized rules for modulus, replacement, separator, sourceLabels,
    and targetLabel validation
  • Ensured deterministic ordering of CEL validation rules
+21/-21 
VSphereHostVMGroupZonal.yaml
Deterministic XValidation rule ordering in vSphere infrastructure CRDs

config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/VSphereHostVMGroupZonal.yaml

  • Reordered x-kubernetes-validations rules for failure domain identifier
    type validation (UUID, Name)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+13/-13 
DyanmicServiceEndpointIBMCloud.yaml
Deterministic XValidation rule ordering in machine config CRDs

machineconfiguration/v1/zz_generated.featuregated-crd-manifests/controllerconfigs.machineconfiguration.openshift.io/DyanmicServiceEndpointIBMCloud.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
+16/-16 
0000_10_control-plane-machine-set_01_controlplanemachinesets-DevPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in control plane machine set
CRDs

machine/v1/zz_generated.crd-manifests/0000_10_control-plane-machine-set_01_controlplanemachinesets-DevPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for AWS instance identifier
    type validation (ID, ARN, Filters)
  • Reordered platform configuration validation rules (Nutanix moved after
    GCP, before OpenStack)
  • Added new validation rule for required
    machine.openshift.io/cluster-api-cluster label
+12/-12 
Bug fix
1 files
generator.go
Disable schema comparator for enum structure simplification

tools/codegen/pkg/schemacheck/generator.go

  • Added NoDataTypeChange to the list of disabled comparators
  • Added explanatory comment about controller-tools simplifying allOf
    enum structures
  • Justifies disabling the comparator due to type field changes in
    simplified enums
+4/-1     
Miscellaneous
13 files
SigstoreImageVerificationPKI.yaml
Deterministic validation rule ordering in CRD manifests   

config/v1/zz_generated.featuregated-crd-manifests/clusterimagepolicies.config.openshift.io/SigstoreImageVerificationPKI.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for certificate data fields now sorted
    deterministically
  • Affects fulcioCAData, rekorKeyData, caIntermediatesData, caRootsData,
    and policy type validations
+30/-30 
SigstoreImageVerificationPKI.yaml
Deterministic validation rule ordering in CRD manifests   

config/v1/zz_generated.featuregated-crd-manifests/imagepolicies.config.openshift.io/SigstoreImageVerificationPKI.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for certificate data fields now sorted
    deterministically
  • Affects fulcioCAData, rekorKeyData, caIntermediatesData, caRootsData,
    and policy type validations
+30/-30 
0000_10_config-operator_01_clusterimagepolicies.crd.yaml
Deterministic validation rule ordering in CRD manifests   

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_clusterimagepolicies.crd.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for certificate data fields now sorted
    deterministically
  • Affects fulcioCAData, rekorKeyData, caIntermediatesData, caRootsData,
    and policy type validations
+30/-30 
0000_10_config-operator_01_imagepolicies.crd.yaml
Deterministic validation rule ordering in CRD manifests   

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_imagepolicies.crd.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for certificate data fields now sorted
    deterministically
  • Affects fulcioCAData, rekorKeyData, caIntermediatesData, caRootsData,
    and policy type validations
+30/-30 
0000_10_config-operator_01_clusterimagepolicies.crd.yaml
Deterministic validation rule ordering in CRD manifests   

payload-manifests/crds/0000_10_config-operator_01_clusterimagepolicies.crd.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for certificate data fields now sorted
    deterministically
  • Affects fulcioCAData, rekorKeyData, caIntermediatesData, caRootsData,
    and policy type validations
+30/-30 
0000_10_config-operator_01_imagepolicies.crd.yaml
Deterministic validation rule ordering in CRD manifests   

payload-manifests/crds/0000_10_config-operator_01_imagepolicies.crd.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for certificate data fields now sorted
    deterministically
  • Affects fulcioCAData, rekorKeyData, caIntermediatesData, caRootsData,
    and policy type validations
+30/-30 
SigstoreImageVerification.yaml
Deterministic validation rule ordering in CRD manifests   

config/v1/zz_generated.featuregated-crd-manifests/clusterimagepolicies.config.openshift.io/SigstoreImageVerification.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for keyData, rekorKeyData, and policy type
    validations now sorted deterministically
  • Image scope validation rules reordered alphabetically
+24/-24 
SigstoreImageVerification.yaml
Deterministic validation rule ordering in CRD manifests   

config/v1/zz_generated.featuregated-crd-manifests/imagepolicies.config.openshift.io/SigstoreImageVerification.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for keyData, rekorKeyData, and policy type
    validations now sorted deterministically
  • Image scope validation rules reordered alphabetically
+24/-24 
SigstoreImageVerificationPKI.yaml
Deterministic validation rule ordering in CRD manifests   

config/v1alpha1/zz_generated.featuregated-crd-manifests/clusterimagepolicies.config.openshift.io/SigstoreImageVerificationPKI.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for certificate data fields now sorted
    deterministically
  • Affects caIntermediatesData, caRootsData, and policy type validations
+18/-18 
0000_10_config-operator_01_clusterimagepolicies.crd.yaml
Deterministic validation rule ordering in CRD manifests   

config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clusterimagepolicies.crd.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for certificate data fields now sorted
    deterministically
  • Affects caIntermediatesData, caRootsData, and policy type validations
+18/-18 
0000_10_config-operator_01_imagepolicies.crd.yaml
Deterministic validation rule ordering in CRD manifests   

config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_imagepolicies.crd.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for certificate data fields now sorted
    deterministically
  • Affects caIntermediatesData, caRootsData, and policy type validations
+18/-18 
AAA_ungated.yaml
Deterministic validation rule ordering in ingress controller CRD

operator/v1/zz_generated.featuregated-crd-manifests/ingresscontrollers.operator.openshift.io/AAA_ungated.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for eipAllocations, subnet counts, and HTTP header
    restrictions now sorted deterministically
  • httpKeepAliveTimeout validation rules reordered alphabetically
+36/-36 
0000_50_ingress_00_ingresscontrollers.crd.yaml
Deterministic validation rule ordering in ingress controller CRD

operator/v1/zz_generated.crd-manifests/0000_50_ingress_00_ingresscontrollers.crd.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for eipAllocations, subnet counts, and HTTP header
    restrictions now sorted deterministically
  • httpKeepAliveTimeout validation rules reordered alphabetically
+36/-36 
Dependencies
1 files
go.sum
Add jaypoulz controller-tools fork dependency                       

tools/go.sum

  • Added dependency entry for github.com/jaypoulz/controller-tools
    v0.0.0-20260116180353-88e61f2c62d0
  • Includes both hash and module sum entries for the new controller-tools
    fork
+2/-2     
Additional files
101 files
ExternalOIDC.yaml +4/-4     
DyanmicServiceEndpointIBMCloud.yaml +2/-2     
0000_10_config-operator_01_featuregates.crd.yaml +3/-3     
0000_10_config-operator_01_infrastructures-Default.crd.yaml +8/-8     
0000_10_config-operator_01_infrastructures-OKD.crd.yaml +8/-8     
ExternalOIDC.yaml +2/-2     
ExternalOIDCWithUpstreamParity.yaml +8/-8     
AAA_ungated.yaml +3/-3     
AAA_ungated.yaml +8/-8     
AWSClusterHostedDNSInstall.yaml +8/-8     
AWSDualStackInstall.yaml +8/-8     
AzureClusterHostedDNSInstall.yaml +8/-8     
AzureDualStackInstall.yaml +8/-8     
DualReplica.yaml +8/-8     
GCPClusterHostedDNSInstall.yaml +8/-8     
HighlyAvailableArbiter+DualReplica.yaml +8/-8     
HighlyAvailableArbiter.yaml +8/-8     
NutanixMultiSubnets.yaml +8/-8     
OnPremDNSRecords.yaml +8/-8     
VSphereMultiNetworks.yaml +8/-8     
0000_10_config-operator_01_backups-CustomNoUpgrade.crd.yaml +4/-8     
0000_10_config-operator_01_backups-DevPreviewNoUpgrade.crd.yaml +4/-8     
0000_10_config-operator_01_backups-TechPreviewNoUpgrade.crd.yaml +4/-8     
0000_10_config-operator_01_clustermonitorings-CustomNoUpgrade.crd.yaml +4/-4     
0000_10_config-operator_01_clustermonitorings-DevPreviewNoUpgrade.crd.yaml +4/-4     
0000_10_config-operator_01_clustermonitorings-TechPreviewNoUpgrade.crd.yaml +4/-4     
AutomatedEtcdBackup.yaml +4/-8     
ClusterMonitoringConfig.yaml +4/-4     
00_consolesamples.crd.yaml +6/-10   
90_consoleplugins.crd.yaml +2/-2     
ConsolePluginContentSecurityPolicy.yaml +2/-2     
AAA_ungated.yaml +6/-10   
0000_50_my-operator_01_stableconfigtypes-CustomNoUpgrade.crd.yaml +3/-3     
0000_50_my-operator_01_stableconfigtypes-Default.crd.yaml +3/-3     
0000_50_my-operator_01_stableconfigtypes-DevPreviewNoUpgrade.crd.yaml +3/-3     
0000_50_my-operator_01_stableconfigtypes-OKD.crd.yaml +3/-3     
0000_50_my-operator_01_stableconfigtypes-TechPreviewNoUpgrade.crd.yaml +3/-3     
AAA_ungated.yaml +3/-3     
Example+Example2.yaml +3/-3     
Example.yaml +3/-3     
0000_10_insights_01_datagathers-CustomNoUpgrade.crd.yaml +2/-2     
0000_10_insights_01_datagathers-DevPreviewNoUpgrade.crd.yaml +2/-2     
0000_10_insights_01_datagathers-TechPreviewNoUpgrade.crd.yaml +2/-2     
InsightsOnDemandDataGather.yaml +2/-2     
0000_10_insights_01_datagathers-CustomNoUpgrade.crd.yaml +8/-8     
0000_10_insights_01_datagathers-DevPreviewNoUpgrade.crd.yaml +8/-8     
0000_10_insights_01_datagathers-TechPreviewNoUpgrade.crd.yaml +8/-8     
InsightsOnDemandDataGather.yaml +8/-8     
0000_10_insights_01_datagathers-CustomNoUpgrade.crd.yaml +2/-2     
0000_10_insights_01_datagathers-DevPreviewNoUpgrade.crd.yaml +2/-2     
0000_10_insights_01_datagathers-TechPreviewNoUpgrade.crd.yaml +2/-2     
InsightsOnDemandDataGather.yaml +2/-2     
0000_10_control-plane-machine-set_01_controlplanemachinesets-Default.crd.yaml +12/-12 
0000_10_control-plane-machine-set_01_controlplanemachinesets-OKD.crd.yaml +12/-12 
0000_10_control-plane-machine-set_01_controlplanemachinesets-TechPreviewNoUpgrade.crd.yaml +12/-12 
AAA_ungated.yaml +12/-12 
CPMSMachineNamePrefix.yaml +12/-12 
MachineAPIMigration.yaml +12/-12 
0000_80_machine-config_01_controllerconfigs-Default.crd.yaml +8/-8     
0000_80_machine-config_01_controllerconfigs-OKD.crd.yaml +8/-8     
0000_80_machine-config_01_machineconfignodes-Hypershift-CustomNoUpgrade.crd.yaml +2/-2     
0000_80_machine-config_01_machineconfignodes-Hypershift-DevPreviewNoUpgrade.crd.yaml +2/-2     
0000_80_machine-config_01_machineconfignodes-Hypershift-TechPreviewNoUpgrade.crd.yaml +2/-2     
0000_80_machine-config_01_machineconfignodes-SelfManagedHA-CustomNoUpgrade.crd.yaml +2/-2     
0000_80_machine-config_01_machineconfignodes-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml +2/-2     
0000_80_machine-config_01_machineconfignodes-SelfManagedHA-TechPreviewNoUpgrade.crd.yaml +2/-2     
0000_80_machine-config_01_machineconfigpools-CustomNoUpgrade.crd.yaml +7/-7     
0000_80_machine-config_01_machineconfigpools-Default.crd.yaml +7/-7     
0000_80_machine-config_01_machineconfigpools-DevPreviewNoUpgrade.crd.yaml +7/-7     
0000_80_machine-config_01_machineconfigpools-OKD.crd.yaml +7/-7     
0000_80_machine-config_01_machineconfigpools-TechPreviewNoUpgrade.crd.yaml +7/-7     
AAA_ungated.yaml +8/-8     
AWSClusterHostedDNSInstall.yaml +8/-8     
AWSDualStackInstall.yaml +8/-8     
AzureClusterHostedDNSInstall.yaml +8/-8     
AzureDualStackInstall.yaml +8/-8     
DualReplica.yaml +8/-8     
GCPClusterHostedDNSInstall.yaml +8/-8     
HighlyAvailableArbiter+DualReplica.yaml +8/-8     
HighlyAvailableArbiter.yaml +8/-8     
NutanixMultiSubnets.yaml +8/-8     
OnPremDNSRecords.yaml +8/-8     
VSphereHostVMGroupZonal.yaml +14/-14 
VSphereMultiNetworks.yaml +8/-8     
IrreconcilableMachineConfig.yaml +2/-2     
PinnedImages.yaml +7/-7     
openapi.json +14/-2   
0000_50_console_01_consoles.crd.yaml +5/-5     
0000_70_network_01_networks.crd.yaml +9/-9     
AAA_ungated.yaml +5/-5     
AAA_ungated.yaml +2/-2     
AdditionalRoutingCapabilities.yaml +2/-2     
NetworkLiveMigration.yaml +2/-2     
RouteAdvertisements.yaml +9/-9     
0000_10_config-operator_01_backups-CustomNoUpgrade.crd.yaml +4/-8     
0000_10_config-operator_01_backups-DevPreviewNoUpgrade.crd.yaml +4/-8     
0000_10_config-operator_01_backups-TechPreviewNoUpgrade.crd.yaml +4/-8     
0000_10_config-operator_01_clustermonitorings-CustomNoUpgrade.crd.yaml +4/-4     
0000_10_config-operator_01_clustermonitorings-DevPreviewNoUpgrade.crd.yaml +4/-4     
0000_10_config-operator_01_clustermonitorings-TechPreviewNoUpgrade.crd.yaml +4/-4     
Additional files not shown

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 19, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign everettraven for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@qodo-code-review
Copy link

qodo-code-review bot commented Jan 19, 2026

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
Supply chain dependency

Description: The PR introduces a dependency on a non-upstream fork
(github.com/jaypoulz/controller-tools), which is a potential supply-chain risk because it
changes the trusted source of build tooling and could introduce malicious or unreviewed
code into the generated CRDs/OpenAPI output.
go.sum [377-378]

Referred Code
github.com/jaypoulz/controller-tools v0.0.0-20260116180353-88e61f2c62d0 h1:JhWZ2nymVGkToi2gFPDMJyyqxHLbZiAEOYOkepso8ig=
github.com/jaypoulz/controller-tools v0.0.0-20260116180353-88e61f2c62d0/go.mod h1:JhdEECpLnYzT+n3xWZZnbFyLk4/XUgg6avg2lLUqRCk=
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

  • Update
Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@qodo-code-review
Copy link

qodo-code-review bot commented Jan 19, 2026

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Use RE2 hex character class

Replace the unsupported POSIX character class [[:xdigit:]] in the regex with the
RE2-compatible equivalent [0-9A-Fa-f] to fix the validation rule.

config/v1alpha1/zz_generated.featuregated-crd-manifests/clusterimagepolicies.config.openshift.io/SigstoreImageVerification.yaml [259-262]

 - message: invalid repository namespace or image specification in
     the image scope
-  rule: '!self.contains(''*'') ? self.matches(''^((((?:[A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])(?:\.(?:[A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9]))+(?::[0-9]+)?)|(localhost(?::[0-9]+)?))(?:(?:/[a-z0-9]+(?:(?:(?:[._]|__|[-]*)[a-z0-9]+)+)?)+)?)(?::([\w][\w.-]{0,127}))?(?:@([A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*[:][[:xdigit:]]{32,}))?$'')
+  rule: '!self.contains(''*'') ? self.matches(''^((((?:[A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])(?:\.(?:[A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9]))+(?::[0-9]+)?)|(localhost(?::[0-9]+)?))(?:(?:/[a-z0-9]+(?:(?:(?:[._]|__|[-]*)[a-z0-9]+)+)?)+)?)(?::([\w][\w.-]{0,127}))?(?:@([A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*[:][0-9A-Fa-f]{32,}))?$'')
     : true'
  • Apply / Chat
Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies that the POSIX character class [[:xdigit:]] is not supported by the RE2 engine used in CEL validations, which would cause the validation rule to fail. This is a critical bug fix.

High
Fix CEL rule order to prevent errors

Reorder the eipAllocations validation rules to prevent a potential runtime
error. The self.startsWith('eipalloc-') check should precede the self.split(...)
rule to avoid an index out-of-bounds error.

operator/v1/zz_generated.crd-manifests/0000_50_ingress_00_ingresscontrollers.crd.yaml [500-507]

 x-kubernetes-validations:
+- message: eipAllocations should start with
+    'eipalloc-'
+  rule: self.startsWith('eipalloc-')
 - message: eipAllocations must be 'eipalloc-'
     followed by exactly 17 hexadecimal characters
     (0-9, a-f, A-F)
   rule: self.split("-", 2)[1].matches('[0-9a-fA-F]{17}$')
-- message: eipAllocations should start with
-    'eipalloc-'
-  rule: self.startsWith('eipalloc-')

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 8

__

Why: The suggestion correctly identifies a potential CEL evaluation error introduced by reordering validation rules, which could crash the validation webhook. Fixing this is crucial for robustness.

Medium
Guard size() with has()

Add a has(self.sourceLabels) check before calling size(self.sourceLabels) in the
CEL rule to prevent potential runtime errors.

monitoring/v1/zz_generated.featuregated-crd-manifests/alertrelabelconfigs.monitoring.openshift.io/AAA_ungated.yaml [127-129]

 - message: modulus requires sourceLabels to be present
-  rule: '!has(self.modulus) || (has(self.modulus) && size(self.sourceLabels) > 0)'
+  rule: '!has(self.modulus) || (has(self.modulus) && has(self.sourceLabels) && size(self.sourceLabels) > 0)'

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 8

__

Why: The suggestion correctly points out a potential runtime error in the CEL rule by calling size() on a field that may not exist. Adding a has() check prevents this error, making the validation more robust.

Medium
Avoid returning a pointer to a local variable

In the schemaFetcher function, check if the key exists in the p.Schemata map
before returning a pointer to the value. If the key does not exist, return nil
to avoid returning a pointer to a zero-value struct.

tools/vendor/sigs.k8s.io/controller-tools/pkg/crd/parser.go [175-180]

 	schemaCtx := newSchemaContext(typ.Package, p, func(typ TypeIdent) *apiext.JSONSchemaProps {
 		p.NeedSchemaFor(typ)
 
-		props := p.Schemata[typ]
+		props, ok := p.Schemata[typ]
+		if !ok {
+			return nil
+		}
 		return &props
 	}, p.AllowDangerousTypes, p.IgnoreUnexportedFields)

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 7

__

Why: The suggestion's reasoning about stack memory is incorrect for Go, as the compiler would use escape analysis to allocate the variable on the heap. However, the proposed change correctly handles the case where the key is not found in the map p.Schemata by returning nil, which is more robust than the original code's behavior of returning a pointer to a zero-value struct.

Medium
High-level
Use an organization-owned dependency fork

The PR uses a personal fork for the controller-tools dependency. To mitigate
maintenance and ownership risks, this dependency should be moved to an official
openshift organization repository.

Examples:

tools/go.sum [377-378]

Solution Walkthrough:

Before:

// tools/go.mod
replace sigs.k8s.io/controller-tools => github.com/jaypoulz/controller-tools v0.0.0-20260116180353-88e61f2c62d0

// tools/go.sum
github.com/jaypoulz/controller-tools v0.0.0-20260116180353-88e61f2c62d0 h1:...
github.com/jaypoulz/controller-tools v0.0.0-20260116180353-88e61f2c62d0/go.mod h1:...

After:

// tools/go.mod
replace sigs.k8s.io/controller-tools => github.com/openshift/controller-tools vX.Y.Z-openshift

// tools/go.sum
github.com/openshift/controller-tools vX.Y.Z-openshift h1:...
github.com/openshift/controller-tools vX.Y.Z-openshift/go.mod h1:...
Suggestion importance[1-10]: 8

__

Why: The suggestion addresses a critical project governance and dependency management issue by recommending the use of an organization-owned fork instead of a personal one, which reduces long-term maintenance and security risks.

Medium
General
Order duration validations correctly

Reorder the httpKeepAliveTimeout validations to check the string format first,
before checking the numeric range. This prevents potential errors and simplifies
the range-check rules.

operator/v1/zz_generated.crd-manifests/0000_50_ingress_00_ingresscontrollers.crd.yaml [2267-2278]

-- message: httpKeepAliveTimeout must be less than or equal to
-    15 minutes
-  rule: '!self.matches(''^([0-9]+(\\.[0-9]+)?(ms|s|m))+$'') || duration(self) <= duration(''15m'')'
-- message: httpKeepAliveTimeout must be greater than or equal to
-    1 millisecond
-  rule: '!self.matches(''^([0-9]+(\\.[0-9]+)?(ms|s|m))+$'') || duration(self) >= duration(''1ms'')'
-- message: httpKeepAliveTimeout must be a valid duration string
-    composed of an unsigned integer value, optionally followed
-    by a decimal fraction and a unit suffix (ms, s, m)
+- message: httpKeepAliveTimeout must be a valid duration string composed of an unsigned integer value, optionally followed by a decimal fraction and a unit suffix (ms, s, m)
   rule: self.matches('^([0-9]+(\\.[0-9]+)?(ms|s|m))+$')
+- message: httpKeepAliveTimeout must be less than or equal to 15 minutes
+  rule: duration(self) <= duration('15m')
+- message: httpKeepAliveTimeout must be greater than or equal to 1 millisecond
+  rule: duration(self) >= duration('1ms')

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 8

__

Why: The suggestion correctly identifies that reordering the validation rules can prevent CEL evaluation errors and simplifies the logic by removing redundant checks, which is a significant improvement.

Medium
Consolidate header restrictions

Consolidate the multiple header-deny rules into a single CEL validation. The new
rule should check if the header is in a list of forbidden headers to reduce
duplication.

operator/v1/zz_generated.crd-manifests/0000_50_ingress_00_ingresscontrollers.crd.yaml [1085-1099]

-- message: cookie header may not be modified via header actions
-  rule: self.lowerAscii() != 'cookie'
-- message: host header may not be modified via header actions
-  rule: self.lowerAscii() != 'host'
-- message: proxy header may not be modified via header actions
-  rule: self.lowerAscii() != 'proxy'
-- message: set-cookie header may not be modified via header actions
-  rule: self.lowerAscii() != 'set-cookie'
-- message: strict-transport-security header may not be modified via header actions
-  rule: self.lowerAscii() != 'strict-transport-security'
+- message: these headers may not be modified via header actions
+  rule: !['cookie','host','proxy','set-cookie','strict-transport-security'].contains(self.lowerAscii())

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 5

__

Why: The suggestion improves code readability and maintainability by consolidating multiple validation rules into a single, more concise rule, which is a good practice.

Low
  • Update

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Fix all issues with AI agents
In
`@config/v1/tests/infrastructures.config.openshift.io/DyanmicServiceEndpointIBMCloud.yaml`:
- Line 53: The expectedError string for the test case
DyanmicServiceEndpointIBMCloud.yaml contains an extraneous closing square
bracket before the final quote; edit the expectedError value (the YAML key
expectedError) and remove the trailing ']' so the string matches the other
multi-error entries (e.g., the part ending with "url must use https scheme"
should not have a trailing bracket). Ensure the rest of the quoted string
including the multi-error messages and commas remains unchanged.

In `@console/v1/types_console_sample.go`:
- Around line 126-129: The kubebuilder enum marker above the
ConsoleSampleSourceType definition uses the wrong syntax (`Enum:=`) and should
be replaced with the standard form using an equals sign and a JSON-style list of
values; update the marker on the ConsoleSampleSourceType enum to use `Enum=` and
list the allowed values ("GitImport","ContainerImport") in braces so
controller-gen emits proper enum validation.

In
`@payload-manifests/crds/0000_10_config-operator_01_authentications-DevPreviewNoUpgrade.crd.yaml`:
- Around line 472-482: Update the x-kubernetes-validations rules in the
authentication CRD: (1) change the user-info check to reject any user@ in the
scheme+authority portion by using a regex that checks for "scheme://...@", e.g.
negate a match like '^[a-zA-Z][a-zA-Z0-9+.-]*://[^@/]+@', and (2) guard the
url(self) calls in the query and scheme rules by prepending isURL(self) && so
the rules become isURL(self) && url(self).getQuery().size() == 0 and isURL(self)
&& url(self).getScheme() == 'https' so url() is only called on valid URLs;
update the rules in the same x-kubernetes-validations list (the rules
referencing discoveryURL and url(self)) accordingly.

In `@payload-manifests/crds/0000_10_config-operator_01_imagepolicies.crd.yaml`:
- Around line 76-78: The CEL checks are comparing raw PEM headers against fields
encoded as format: byte (base64), so they never match; fix by either (A)
updating the CEL rules for fulcioCAData, rekorKeyData, caIntermediatesData,
caRootsData, keyData, and publicKey.rekorKeyData to validate the base64-encoded
form (e.g., check for base64 encoding of "-----BEGIN CERTIFICATE-----" or
appropriate header prefix) or (B) change those field schemas to remove format:
byte so the API will carry raw PEM text and then adjust/remove the CEL rules to
match raw PEM headers; pick one approach and apply it consistently for all
listed fields.
♻️ Duplicate comments (3)
config/v1/tests/authentications.config.openshift.io/ExternalOIDC.yaml (2)

745-745: Same index-ordering brittleness applies here.
Please ensure /1 is still the intended query rule after reordering.


788-788: Same index-ordering brittleness applies here.
Please ensure /1 is still the intended query rule after reordering.

openapi/openapi.json (1)

24820-24823: Same enum constraint consideration applies here.

This is the same pattern as the earlier synchronizedAPI field. If you add an enum constraint there, ensure consistency here as well.

🧹 Nitpick comments (2)
config/v1/tests/authentications.config.openshift.io/ExternalOIDC.yaml (1)

702-702: Guard against brittle index-based JSONPatch removals.

Line 702 removes the validation rule at index /1, which currently corresponds to the "must not have a query" rule. However, this index-based approach is fragile: if validation rules are reordered or new rules are added in config/v1/types_authentication.go, this path would target the wrong rule. Consider adding a preceding test operation to verify the rule content before removal, making the patch resilient to reordering.

Reference: issuerURL validations (current order)
  • Index 0: isURL(self) → "must be a valid URL"
  • Index 1: isURL(self) && url(self).getQuery() == {} → "must not have a query"
  • Index 2: isURL(self) && url(self).getScheme() == 'https' → "must use the 'https' scheme"
  • Index 3: self.find('#(.+)$') == '' → "must not have a fragment"
  • Index 4: self.find('@') == '' → "must not have user info"
openapi/openapi.json (1)

24713-24716: Consider adding enum constraint to match documented valid values.

The description states valid values are "MachineAPI" and "ClusterAPI", but the schema lacks an enum constraint to enforce this. This creates a gap where the API documentation promises stricter validation than the schema actually provides.

If the field values should be constrained, consider adding an enum:

"synchronizedAPI": {
  "description": "synchronizedAPI holds the last stable value of authoritativeAPI...",
  "type": "string",
  "enum": ["MachineAPI", "ClusterAPI"]
}

If this is intentional (e.g., to allow future extensibility or because validation happens elsewhere), please verify.

- name: VPC
url: " "
expectedError: "spec.platformSpec.ibmcloud.serviceEndpoints[0].url: Invalid value: \"string\": URL parse error during conversion from string: parse \" \": invalid URI for request evaluating rule: url must use https scheme, spec.platformSpec.ibmcloud.serviceEndpoints[0].url: Invalid value: \"string\": URL parse error during conversion from string: parse \" \": invalid URI for request evaluating rule: url path must match /v[0,9]+ or /api/v[0,9]+, spec.platformSpec.ibmcloud.serviceEndpoints[0].url: Invalid value: \"string\": url must be a valid absolute URL]"
expectedError: "spec.platformSpec.ibmcloud.serviceEndpoints[0].url: Invalid value: \"string\": url must be a valid absolute URL, spec.platformSpec.ibmcloud.serviceEndpoints[0].url: Invalid value: \"string\": URL parse error during conversion from string: parse \" \": invalid URI for request evaluating rule: url path must match /v[0,9]+ or /api/v[0,9]+, spec.platformSpec.ibmcloud.serviceEndpoints[0].url: Invalid value: \"string\": URL parse error during conversion from string: parse \" \": invalid URI for request evaluating rule: url must use https scheme]"
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Extraneous ] at the end of the expected error string.

The expectedError string ends with url must use https scheme]" but the trailing ] before the closing quote appears to be a typo. Other multi-error expectedError strings in this file (lines 40, 79, 92) do not include square brackets around the error list.

Proposed fix
-    expectedError: "spec.platformSpec.ibmcloud.serviceEndpoints[0].url: Invalid value: \"string\": url must be a valid absolute URL, spec.platformSpec.ibmcloud.serviceEndpoints[0].url: Invalid value: \"string\": URL parse error during conversion from string: parse \" \": invalid URI for request evaluating rule: url path must match /v[0,9]+ or /api/v[0,9]+, spec.platformSpec.ibmcloud.serviceEndpoints[0].url: Invalid value: \"string\": URL parse error during conversion from string: parse \" \": invalid URI for request evaluating rule: url must use https scheme]"
+    expectedError: "spec.platformSpec.ibmcloud.serviceEndpoints[0].url: Invalid value: \"string\": url must be a valid absolute URL, spec.platformSpec.ibmcloud.serviceEndpoints[0].url: Invalid value: \"string\": URL parse error during conversion from string: parse \" \": invalid URI for request evaluating rule: url path must match /v[0,9]+ or /api/v[0,9]+, spec.platformSpec.ibmcloud.serviceEndpoints[0].url: Invalid value: \"string\": URL parse error during conversion from string: parse \" \": invalid URI for request evaluating rule: url must use https scheme"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
expectedError: "spec.platformSpec.ibmcloud.serviceEndpoints[0].url: Invalid value: \"string\": url must be a valid absolute URL, spec.platformSpec.ibmcloud.serviceEndpoints[0].url: Invalid value: \"string\": URL parse error during conversion from string: parse \" \": invalid URI for request evaluating rule: url path must match /v[0,9]+ or /api/v[0,9]+, spec.platformSpec.ibmcloud.serviceEndpoints[0].url: Invalid value: \"string\": URL parse error during conversion from string: parse \" \": invalid URI for request evaluating rule: url must use https scheme]"
expectedError: "spec.platformSpec.ibmcloud.serviceEndpoints[0].url: Invalid value: \"string\": url must be a valid absolute URL, spec.platformSpec.ibmcloud.serviceEndpoints[0].url: Invalid value: \"string\": URL parse error during conversion from string: parse \" \": invalid URI for request evaluating rule: url path must match /v[0,9]+ or /api/v[0,9]+, spec.platformSpec.ibmcloud.serviceEndpoints[0].url: Invalid value: \"string\": URL parse error during conversion from string: parse \" \": invalid URI for request evaluating rule: url must use https scheme"
🤖 Prompt for AI Agents
In
`@config/v1/tests/infrastructures.config.openshift.io/DyanmicServiceEndpointIBMCloud.yaml`
at line 53, The expectedError string for the test case
DyanmicServiceEndpointIBMCloud.yaml contains an extraneous closing square
bracket before the final quote; edit the expectedError value (the YAML key
expectedError) and remove the trailing ']' so the string matches the other
multi-error entries (e.g., the part ending with "url must use https scheme"
should not have a trailing bracket). Ensure the rest of the quoted string
including the multi-error messages and commas remains unchanged.

Comment on lines 126 to +129
// ConsoleSampleSourceType is an enumeration of the supported sample types.
// Unsupported samples types will be ignored in the web console.
// +kubebuilder:validation:Enum:=GitImport;ContainerImport
// +kubebuilder:validation:Enum:="GitImport";"ContainerImport"
// +enum
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

# First, find and read the file to confirm the content
find . -path "*console/v1/types_console_sample.go" -type f

Repository: openshift/api

Length of output: 93


🌐 Web query:

controller-tools kubebuilder +enum marker validation:Enum syntax documentation

💡 Result:

Short summary — syntax for the +kubebuilder:validation:Enum marker

  • Basic form: place the marker on the field comment:
    // +kubebuilder:validation:Enum=. [1][2]

  • Value lists can be written two ways:

    • Semicolon-separated simple values (no quotes):
      // +kubebuilder:validation:Enum=Wallace;Gromit;Chicken. [1][2]
    • JSON-style/braced list (use quotes for strings or values with spaces/commas):
      // +kubebuilder:validation:Enum={"crackers, Gromit, we forgot the crackers!","not even wensleydale?"}. [1][2]
  • Notes:

    • Marker names are case-sensitive (must be +kubebuilder:validation:Enum). Check generated CRD to confirm output. [4][1]
    • Enum applies to the JSON schema generated for the field (controller-gen/controller-tools). See controller-tools markers docs for full details. [3][1]

Sources:
[1] Kubebuilder markers reference (controller-gen marker syntax & examples).
[2] Kubebuilder CRD validation docs (Enum examples).
[3] sigs.k8s.io/controller-tools/pkg/crd/markers (pkg docs).
[4] Practical pitfalls (example of misspelling/case-sensitivity).


🌐 Web query:

kubebuilder validation Enum quoted values semicolon separator controller-gen

💡 Result:

Short answer: controller-gen accepts two forms for +kubebuilder:validation:Enum.

  • Simple single-word values (no spaces/punctuation): semicolon-separated, quotes optional.
    Example: // +kubebuilder:validation:Enum=Wallace;Gromit;Chicken. [1][2]

  • Values that need quotes (spaces, punctuation, or contain semicolons): use a brace-enclosed, comma-separated quoted list (JSON-like).
    Example: // +kubebuilder:validation:Enum={"crackers, Gromit, we forgot the crackers!","not even wensleydale?"}. [1][2]

Notes:

  • controller-gen writes those exact values into the CRD enum and matches them exactly at runtime. Use the brace/quoted form when values contain spaces or characters that would be ambiguous with the semicolon syntax. [1][2]

Sources:
[1] Kubebuilder markers docs (Enum examples).
[2] Kubebuilder book v3 markers page (semicolon and quoted-list examples).


🏁 Script executed:

# Read the actual file content around lines 126-129
cat -n ./console/v1/types_console_sample.go | sed -n '120,135p'

Repository: openshift/api

Length of output: 801


🌐 Web query:

kubebuilder validation Enum marker "Enum:=" syntax colon equals

💡 Result:

Short answer: there is no special "colon‑equals" operator — the correct marker syntax uses =. What you may be seeing is the marker name including a colon (e.g. items:Enum) followed by =, which can look like ":=" when written without spacing. Example forms from the Kubebuilder docs:

  • Field enum: // +kubebuilder:validation:Enum=A;B;C. [1]
  • Array-items enum: // +kubebuilder:validation:items:Enum=A;B;C (the marker name is items:Enum, then =value). [2]

So "Enum:=" is just the marker name with a colon plus the normal "=" assignment; use +kubebuilder:validation:Enum= or +kubebuilder:validation:items:Enum= as shown in the docs. [1][2]

Sources:
[1] Kubebuilder markers reference — Marker Syntax & Enum examples. [2] Kubebuilder CRD validation reference.


🏁 Script executed:

# Search for how the +enum marker is used in the codebase
rg '\+enum' --type go ./console/v1/ -B 2 -A 2

Repository: openshift/api

Length of output: 793


🌐 Web query:

kubebuilder +enum marker controller-gen what does it do

💡 Result:

Short answer: the +kubebuilder:validation:Enum marker tells controller-gen to emit an OpenAPI v3 "enum" validation for that Go field into the generated CRD. controller-gen reads the marker comment on your type/field when you run make manifests (or controller-gen crd ...), and writes the enum list into spec.versions[*].schema.openAPIV3Schema so the API server will validate values. [1][2][3][4]

Notes/usage:

  • Syntax: // +kubebuilder:validation:Enum=Val1;Val2;Val3 (values separated by semicolons). [4]
  • Check the generated YAML because controller-gen won’t always warn on misspelled markers and nested/omitted fields affect validation. [5]

Sources: Kubebuilder/controller-gen docs and examples. [1][2][3][4][5]


🏁 Script executed:

# Check if there are any recent commits or PRs related to enum changes
git log --oneline --all -20 -- console/v1/types_console_sample.go | head -10

Repository: openshift/api

Length of output: 287


🏁 Script executed:

# Search for any documentation or comments about this enum syntax in the repo
rg 'Enum:=' --type go -B 3 -A 3

Repository: openshift/api

Length of output: 34841


🌐 Web query:

kubebuilder validation Enum colon-equals syntax ":=" marker

💡 Result:

Kubebuilder/controller-gen markers use = (equals) for arguments (e.g. // +kubebuilder:validation:Enum=One;Two;Three). There is no documented ":=" (colon-equals) marker syntax in the kubebuilder/controller-tools marker docs — if you’re seeing ":=" it’s likely a typo, a different tool’s output, or comes from some other layer. See the marker syntax and Enum examples in the Kubebuilder docs. [1][2]

If you can paste the exact comment or generated CRD showing ":=", I’ll inspect it and explain where it came from and how to fix it.

Sources:

  1. Kubebuilder markers reference — Marker syntax and Enum examples. [1] https://book-v2.book.kubebuilder.io/reference/markers
  2. Kubebuilder CRD validation docs — Enum usage examples. [2] https://book.kubebuilder.io/reference/markers/crd-validation

Fix enum marker syntax: remove colon from Enum:=.

The marker uses Enum:= which is not standard kubebuilder/controller-tools syntax. The correct form is Enum= with an equals sign only. Update line 128 to:

// +kubebuilder:validation:Enum={"GitImport","ContainerImport"}

The colon character will cause controller-gen to misparse or ignore the marker, potentially failing to emit enum validation into the generated CRD.

🤖 Prompt for AI Agents
In `@console/v1/types_console_sample.go` around lines 126 - 129, The kubebuilder
enum marker above the ConsoleSampleSourceType definition uses the wrong syntax
(`Enum:=`) and should be replaced with the standard form using an equals sign
and a JSON-style list of values; update the marker on the
ConsoleSampleSourceType enum to use `Enum=` and list the allowed values
("GitImport","ContainerImport") in braces so controller-gen emits proper enum
validation.

Comment on lines 472 to 476
x-kubernetes-validations:
- message: discoveryURL must not contain user info
rule: '!self.matches(''^https://.+:.+@.+/.*$'')'
- message: discoveryURL must be a valid URL
rule: isURL(self)
- message: discoveryURL must be a valid https URL
rule: url(self).getScheme() == 'https'
- message: discoveryURL must not contain query parameters
rule: url(self).getQuery().size() == 0
- message: discoveryURL must not contain fragments
rule: self.matches('^[^#]*$')
- message: discoveryURL must not contain user info
rule: '!self.matches(''^https://.+:.+@.+/.*$'')'
- message: discoveryURL must not contain query parameters
rule: url(self).getQuery().size() == 0
- message: discoveryURL must be a valid https URL
rule: url(self).getScheme() == 'https'
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

fd '0000_10_config-operator_01_authentications-DevPreviewNoUpgrade.crd.yaml' --type f

Repository: openshift/api

Length of output: 260


🏁 Script executed:

sed -n '465,490p' payload-manifests/crds/0000_10_config-operator_01_authentications-DevPreviewNoUpgrade.crd.yaml

Repository: openshift/api

Length of output: 1779


🏁 Script executed:

# Let's check CEL documentation and URL validation behavior
# First, let's see if there are other examples in the codebase
rg "url\(self\)" --type yaml -B2 -A2

Repository: openshift/api

Length of output: 50369


🏁 Script executed:

sed -n '472,482p' payload-manifests/crds/0000_10_config-operator_01_authentications-DevPreviewNoUpgrade.crd.yaml | cat -n

Repository: openshift/api

Length of output: 884


🌐 Web query:

CEL url() function getQuery() getUserInfo() kubernetes validation rule CEL

💡 Result:

Short summary + examples:

  • URL library: use isURL(string) and url(string) → URL. URL objects expose getScheme(), getHost(), getHostname(), getPort(), getEscapedPath(), and getQuery() to access the parsed query string. Example: url('https://example.com/path?a=1&b=2').getQuery(). [1]

  • request.userInfo: in CEL expressions that run against admission requests the admission request includes userInfo (username, uid, groups, extra). Access it with request.userInfo.username, request.userInfo.groups, etc. (AdmissionReview/AdmissionRequest includes userInfo). Example: request.userInfo.username == 'system:serviceaccount:foo:bar'. [2][3]

  • Authorizer library / getUser-like checks: when an Authorizer variable is available you can build resource or path checks and call .check(verb).allowed() or .reason(). Examples:

    • authorizer.group('').resource('pods').namespace('default').check('create').allowed()
    • authorizer.path('/healthz').check('get').allowed()
    • authorizer.serviceAccount('ns','sa').resource('deployments').check('delete').allowed(). [1]

References:

  1. Kubernetes CEL docs (URL and authorizer libraries).
  2. ValidatingAdmissionPolicy / AdmissionRequest docs (request and userInfo in admission requests).
  3. AdmissionReview / AdmissionRequest API reference (userInfo field).

🌐 Web query:

CEL URL object methods getUserInfo kubernetes validation rule

💡 Result:

Short answer: Kubernetes' CEL URL type exposes getScheme, getHost, getHostname, getPort, getEscapedPath and getQuery — there is no getUserInfo method. Use url(string) to parse and the available accessors above; extract user-info if needed by parsing the raw string (e.g., with regex or string functions) because the URL object in Kubernetes CEL doesn't provide getUserInfo. [1][2]

Examples:

References: Kubernetes CEL docs (URL library). [1][2]


🌐 Web query:

Kubernetes CEL validation rule user info URL parsing regex pattern

💡 Result:

Short answer + pattern and example.

  • Regex (captures user, pass, host, port, rest):
    ^(([^:`@/`?#]+)(:([^@/?#]))?@)?([^:/?#]+)(?::([0-9]+))?(.)$

    Groups: 2=user, 4=password, 5=host, 6=port, 7=path+query+fragment.

  • CEL usage examples:

    • Reject any URL containing userinfo:
      !self.spec.url.matches('^[a-zA-Z][a-zA-Z0-9+.-]*://[^@]+@')
    • Extract/check userinfo presence (find userinfo):
      self.spec.url.find('^([a-zA-Z][a-zA-Z0-9+.-]://)?([^:`@/`?#]+)(:([^@/?#]))?@').size() > 0

Notes: Kubernetes CEL provides regex and URL libraries; url(...) doesn’t expose userinfo accessors, so use regex on the string field. (kubernetes.io)

Citations:


Fix unguarded url() calls and improve user-info validation

Two issues with the current rules:

  1. Unguarded url() calls: Lines 9 and 11 call url(self).getQuery() and url(self).getScheme() without first checking isURL(self), which will cause CEL evaluation errors on invalid URLs. Other variants in the codebase correctly use isURL(self) && guards.

  2. Regex for user-info is too narrow: The pattern ^https://.+:.+@.+/.*$ requires a colon (password) and a trailing path, allowing URLs like https://user:pass@host to bypass the check. User-info exists whenever @ appears in the authority section, regardless of password or path.

Kubernetes CEL URL objects don't expose a getUserInfo() method. Use a regex to detect user-info in the authority: !self.matches('^[a-zA-Z][a-zA-Z0-9+.-]*://[^@/]+@') or similar pattern that rejects any user@ in the scheme+host portion.

Guard url() calls and fix user-info detection
                          - message: discoveryURL must not contain user info
-                           rule: '!self.matches(''^https://.+:.+@.+/.*$'')'
+                           rule: '!self.matches(''^https://[^@/]+@'')'
                          - message: discoveryURL must not contain fragments
                            rule: self.matches('^[^#]*$')
                          - message: discoveryURL must not contain query parameters
-                           rule: url(self).getQuery().size() == 0
+                           rule: 'isURL(self) && url(self).getQuery().size() == 0'
                          - message: discoveryURL must be a valid https URL
-                           rule: url(self).getScheme() == 'https'
+                           rule: 'isURL(self) && url(self).getScheme() == ''https'''
🤖 Prompt for AI Agents
In
`@payload-manifests/crds/0000_10_config-operator_01_authentications-DevPreviewNoUpgrade.crd.yaml`
around lines 472 - 482, Update the x-kubernetes-validations rules in the
authentication CRD: (1) change the user-info check to reject any user@ in the
scheme+authority portion by using a regex that checks for "scheme://...@", e.g.
negate a match like '^[a-zA-Z][a-zA-Z0-9+.-]*://[^@/]+@', and (2) guard the
url(self) calls in the query and scheme rules by prepending isURL(self) && so
the rules become isURL(self) && url(self).getQuery().size() == 0 and isURL(self)
&& url(self).getScheme() == 'https' so url() is only called on valid URLs;
update the rules in the same x-kubernetes-validations list (the rules
referencing discoveryURL and url(self)) accordingly.

Comment on lines 76 to 78
- message: the fulcioCAData must start with base64 encoding
of '-----BEGIN CERTIFICATE-----'.
rule: string(self).startsWith('-----BEGIN CERTIFICATE-----')
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

# First, let's examine the CRD file around the specified lines to understand the field definitions
head -300 payload-manifests/crds/0000_10_config-operator_01_imagepolicies.crd.yaml | tail -230

Repository: openshift/api

Length of output: 16940


🏁 Script executed:

# Let's look at the specific regions mentioned in the review
echo "=== Lines 70-85 ==="
sed -n '70,85p' payload-manifests/crds/0000_10_config-operator_01_imagepolicies.crd.yaml

echo -e "\n=== Lines 115-130 ==="
sed -n '115,130p' payload-manifests/crds/0000_10_config-operator_01_imagepolicies.crd.yaml

echo -e "\n=== Lines 150-165 ==="
sed -n '150,165p' payload-manifests/crds/0000_10_config-operator_01_imagepolicies.crd.yaml

Repository: openshift/api

Length of output: 3153


🏁 Script executed:

# Let's get the full context of the fields being validated - search for type definitions
grep -n "type: string\|type: object\|format: byte\|format:" payload-manifests/crds/0000_10_config-operator_01_imagepolicies.crd.yaml | head -40

Repository: openshift/api

Length of output: 1718


🌐 Web query:

Kubernetes CEL validation rules format: byte deserialization

💡 Result:

Short answer: Kubernetes' format.byte expects base64-encoded strings (i.e. "byte" = base64), but Kubernetes' built‑in CEL libraries do not provide a bytes-deserialization function (base64.decode) for use in CRD/validation CEL expressions — you can validate base64 with format.byte(), but you cannot decode it to raw bytes inside the API‑server CEL environment.

Evidence:

  • Kubernetes docs: the format library exposes a "byte" format that validates base64 strings. [1]
  • Kubernetes apiserver source: format.byte validation uses base64 validation (see format.go/tests). [2][3]
  • Some CEL implementations/extensions (e.g. cel-go / other language bindings) do offer base64.decode → bytes, but that encoder extension is not part of the Kubernetes builtin CEL surface for validation rules. (Example docs for a CEL encoder extension showing base64.decode exist in external CEL implementations.) [4]

If you need to operate on decoded bytes in admission/validation logic you have two options:

  • Keep validation to "is valid base64" (format.byte()) in CEL and do decoding/inspection in an external admission webhook or controller. [1][2]
  • Use an out‑of‑process policy engine (or custom apiserver build) that enables a CEL encoder extension (base64.decode) or provides custom CEL functions. [4]

Sources:
[1] Kubernetes CEL docs — format library (lists "byte" = base64).
[2] k8s apiserver source (format.go) showing "byte" uses base64 validation.
[3] k8s apiserver format tests (format.byte test cases).
[4] Example CEL encoders extension (base64.decode/base64.encode) in external CEL implementations.


🌐 Web query:

Kubernetes x-kubernetes-validations format byte string encoding

💡 Result:

Short answer: use OpenAPI "format: byte" (a base64-encoded string) and CEL's format.byte() / format.named("byte") to validate it. Kubernetes' CEL format library treats format=byte as a base64-encoded string and will validate (and the schema maps string+format=byte to CEL bytes). See Kubernetes CEL docs and the OpenAPI "byte" format definition. [1][2]

Sources:

  • Kubernetes CEL "format" library (includes format.byte and notes string+format=byte → bytes). [1]
  • OpenAPI format registry: "byte = base64 encoded data (RFC4648)". [2]

🏁 Script executed:

# Let's also check if there are any tests or comments in the repo about this
git log --oneline --all -- payload-manifests/crds/0000_10_config-operator_01_imagepolicies.crd.yaml | head -20

Repository: openshift/api

Length of output: 196


🏁 Script executed:

# Search for any related documentation or comments about PEM validation
rg "base64.*PEM|PEM.*base64|format: byte" --type yaml -B2 -A2 | head -60

Repository: openshift/api

Length of output: 7320


CEL validation rules cannot check raw PEM headers against base64-encoded fields

These fields are marked format: byte and described as "base64-encoded data", meaning the apiserver transmits and stores them as base64-encoded strings in YAML/JSON. However, the added CEL rules check for raw PEM headers like '-----BEGIN CERTIFICATE-----'. According to Kubernetes' CEL validation environment, format: byte fields are NOT automatically decoded—CEL rules operate directly on the base64-encoded string values and do not have access to a base64.decode() function. This means these validations will never match their intended patterns.

Affected fields: fulcioCAData (76-78), rekorKeyData (121-123, 271-274), caIntermediatesData (153-155), caRootsData (176-178), keyData (246-248), publicKey.rekorKeyData (261-263)

Either:

  • Update the CEL rules to validate the base64-encoded representation (e.g., check the base64 encoding of the PEM headers), or
  • Change the field schema to store and transmit raw (unencoded) PEM data and remove format: byte
🤖 Prompt for AI Agents
In `@payload-manifests/crds/0000_10_config-operator_01_imagepolicies.crd.yaml`
around lines 76 - 78, The CEL checks are comparing raw PEM headers against
fields encoded as format: byte (base64), so they never match; fix by either (A)
updating the CEL rules for fulcioCAData, rekorKeyData, caIntermediatesData,
caRootsData, keyData, and publicKey.rekorKeyData to validate the base64-encoded
form (e.g., check for base64 encoding of "-----BEGIN CERTIFICATE-----" or
appropriate header prefix) or (B) change those field schemas to remove format:
byte so the API will carry raw PEM text and then adjust/remove the CEL rules to
match raw PEM headers; pick one approach and apply it consistently for all
listed fields.

@jaypoulz jaypoulz force-pushed the OCPEDGE-2084-xvalidation-strict-order branch from fad886a to 1cefbcb Compare January 19, 2026 20:43
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
payload-manifests/crds/0000_10_config-operator_01_authentications-DevPreviewNoUpgrade.crd.yaml (1)

133-159: Guard path index access to prevent CEL evaluation errors

The path validation rules on lines 37 and 40 use self.split('/', 2)[1] without checking if the "/" character exists. Although the earlier rule requires "/" to be present, Kubernetes evaluates each validation rule independently. If a rule evaluation fails (e.g., index out of bounds), it produces a CEL runtime error instead of a clean validation message. The current rules will fail with evaluation errors rather than user-friendly messages for inputs without "/".

Add self.contains('/') && guard to both path rules:

Suggested fix
                                - message: the path of the key must not be empty and
                                    must consist of at least one alphanumeric character,
                                    percent-encoded octets, apostrophe, '-', '.',
                                    '_', '~', '!', '$', '&', '(', ')', '*', '+', ',',
                                    ';', '=', and ':'
-                                  rule: self.split('/', 2)[1].matches('[A-Za-z0-9/\\-._~%!$&\'()*+;=:]+')
+                                  rule: self.contains('/') && self.split('/', 2)[1].matches('[A-Za-z0-9/\\-._~%!$&\'()*+;=:]+')
                                - message: the path of the key must not exceed 256
                                    characters in length
-                                  rule: self.split('/', 2)[1].size() <= 256
+                                  rule: self.contains('/') && self.split('/', 2)[1].size() <= 256
🤖 Fix all issues with AI agents
In `@openapi/generated_openapi/zz_generated.openapi.go`:
- Around line 26041-26045: The generated OpenAPI schema incorrectly sets
Default: "" on a required enum property (the "type" field from
console/v1/types_console_sample.go) which violates the spec; update the codegen
logic in tools/codegen/cmd/openapi.go (the routine that builds schema properties
for zz_generated.openapi.go) to skip emitting a Default value when the property
is marked required or when an Enum is present (e.g., if schema.Enum != nil &&
len(schema.Enum) > 0) and avoid setting empty-string defaults; ensure the
generator either omits Default for required fields or only writes defaults that
are valid enum members.

In
`@payload-manifests/crds/0000_10_config-operator_01_authentications-CustomNoUpgrade.crd.yaml`:
- Around line 473-482: The discoveryURL user-info check (the rule attached to
the "discoveryURL must not contain user info" message) only blocks "user:pass@"
forms and misses "user@host" forms; update that rule to reject any URL
containing an '@' before the first '/' in the path (i.e., detect any userinfo
portion before the host separator) so URLs like
"https://user@issuer.example.com/..." are caught; replace the current
regex-based rule on discoveryURL with one that matches an '@' appearing in the
authority portion (before the first slash) and keep it negated as the validation
condition.

In
`@payload-manifests/crds/0000_10_config-operator_01_authentications-TechPreviewNoUpgrade.crd.yaml`:
- Around line 473-482: The discoveryURL user-info check currently only rejects
user:pass@ forms via the rule '!self.matches(''^https://.+:.+@.+/.*$'')' but
misses user@host URLs; update that rule to reject any '@' before the first '/'
by replacing the regex with one that matches any userinfo (for example change to
'!self.matches(''^https://[^/]*@.+/.*$'')') so discoveryURL validation in the
CRD (the rule alongside the messages "discoveryURL must not contain user
info"/"discoveryURL must be a valid URL") will catch both user:pass@ and
user@host forms.

In `@tools/go.mod`:
- Line 38: Remove the temporary replace directive that points
sigs.k8s.io/controller-tools to the personal fork (the line beginning "replace
sigs.k8s.io/controller-tools => github.com/jaypoulz/controller-tools ...") and
instead use the upstream module; update the dependency for
sigs.k8s.io/controller-tools to v0.18.0 (or later) in the module requires so the
code relies on the upstream sigs.k8s.io/controller-tools at v0.18.0+ rather than
the jaypoulz fork.
♻️ Duplicate comments (4)
config/v1/tests/infrastructures.config.openshift.io/DyanmicServiceEndpointIBMCloud.yaml (1)

53-53: Remove the trailing ] in the expected error string.

Line 53 still ends the message with an extra closing bracket, which makes this test expectation inconsistent with the other multi-error entries.

🛠️ Proposed fix
-    expectedError: "spec.platformSpec.ibmcloud.serviceEndpoints[0].url: Invalid value: \"string\": url must be a valid absolute URL, spec.platformSpec.ibmcloud.serviceEndpoints[0].url: Invalid value: \"string\": URL parse error during conversion from string: parse \" \": invalid URI for request evaluating rule: url path must match /v[0,9]+ or /api/v[0,9]+, spec.platformSpec.ibmcloud.serviceEndpoints[0].url: Invalid value: \"string\": URL parse error during conversion from string: parse \" \": invalid URI for request evaluating rule: url must use https scheme]"
+    expectedError: "spec.platformSpec.ibmcloud.serviceEndpoints[0].url: Invalid value: \"string\": url must be a valid absolute URL, spec.platformSpec.ibmcloud.serviceEndpoints[0].url: Invalid value: \"string\": URL parse error during conversion from string: parse \" \": invalid URI for request evaluating rule: url path must match /v[0,9]+ or /api/v[0,9]+, spec.platformSpec.ibmcloud.serviceEndpoints[0].url: Invalid value: \"string\": URL parse error during conversion from string: parse \" \": invalid URI for request evaluating rule: url must use https scheme"
console/v1/types_console_sample.go (1)

126-130: Verify the Enum:= marker syntax with the updated controller-tools.

A previous review flagged the := syntax in +kubebuilder:validation:Enum:= as potentially non-standard. However, this same pattern is used elsewhere in the file (line 117: MaxItems:=10), and the PR explicitly updates controller-tools with enum marker format changes.

The combination of the type-level enum validation with the +enum marker is a reasonable approach to centralize the constraint at the enum definition rather than on each field usage.

Please confirm the generated CRD correctly emits the enum validation by inspecting the output schema after running make manifests or equivalent.

payload-manifests/crds/0000_10_config-operator_01_imagepolicies.crd.yaml (1)

76-78: PEM header checks compare raw text against base64 data.

These fields are format: byte (base64-encoded). CEL evaluates the encoded string, so startsWith('-----BEGIN …-----') will never match. Either switch these fields to raw PEM (drop format: byte) or compare against the base64-encoded header prefix (and update the existing endsWith checks similarly).

For example, -----BEGIN CERTIFICATE----- encodes to LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0t and -----BEGIN PUBLIC KEY----- encodes to LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0t.

Also applies to: 121-123, 153-155, 176-178, 246-248, 261-263

payload-manifests/crds/0000_10_config-operator_01_authentications-DevPreviewNoUpgrade.crd.yaml (1)

472-482: Harden discoveryURL validations (userinfo + url() guards)

url(self) is still unguarded; CEL evaluates each rule independently, so invalid URLs can raise evaluation errors even when isURL(self) fails. Also the user‑info regex only catches user:pass@host/ and misses user@host or missing path. Use isURL(self) && guards and a broader user‑info regex.

🛠️ Suggested fix
-                          - message: discoveryURL must not contain user info
-                            rule: '!self.matches(''^https://.+:.+@.+/.*$'')'
+                          - message: discoveryURL must not contain user info
+                            rule: '!self.matches(''^[a-zA-Z][a-zA-Z0-9+.-]*://[^@/]+@'')'
                           - message: discoveryURL must be a valid URL
                             rule: isURL(self)
                           - message: discoveryURL must not contain fragments
                             rule: self.matches('^[^#]*$')
                           - message: discoveryURL must not contain query parameters
-                            rule: url(self).getQuery().size() == 0
+                            rule: isURL(self) && url(self).getQuery().size() == 0
                           - message: discoveryURL must be a valid https URL
-                            rule: url(self).getScheme() == 'https'
+                            rule: isURL(self) && url(self).getScheme() == 'https'
Kubernetes CEL URL library url() getQuery getScheme and regex patterns for userinfo in URLs

Comment on lines 473 to 482
- message: discoveryURL must not contain user info
rule: '!self.matches(''^https://.+:.+@.+/.*$'')'
- message: discoveryURL must be a valid URL
rule: isURL(self)
- message: discoveryURL must be a valid https URL
rule: url(self).getScheme() == 'https'
- message: discoveryURL must not contain query parameters
rule: url(self).getQuery().size() == 0
- message: discoveryURL must not contain fragments
rule: self.matches('^[^#]*$')
- message: discoveryURL must not contain user info
rule: '!self.matches(''^https://.+:.+@.+/.*$'')'
- message: discoveryURL must not contain query parameters
rule: url(self).getQuery().size() == 0
- message: discoveryURL must be a valid https URL
rule: url(self).getScheme() == 'https'
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

User-info regex misses user@host URLs.

The current pattern only blocks user:pass@. A URL like https://user@issuer.example.com/... still passes. Consider matching any @ before the first /.

💡 Proposed fix
-                          - message: discoveryURL must not contain user info
-                            rule: '!self.matches(''^https://.+:.+@.+/.*$'')'
+                          - message: discoveryURL must not contain user info
+                            rule: '!self.matches(''^https://[^/]*@.+$'')'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- message: discoveryURL must not contain user info
rule: '!self.matches(''^https://.+:.+@.+/.*$'')'
- message: discoveryURL must be a valid URL
rule: isURL(self)
- message: discoveryURL must be a valid https URL
rule: url(self).getScheme() == 'https'
- message: discoveryURL must not contain query parameters
rule: url(self).getQuery().size() == 0
- message: discoveryURL must not contain fragments
rule: self.matches('^[^#]*$')
- message: discoveryURL must not contain user info
rule: '!self.matches(''^https://.+:.+@.+/.*$'')'
- message: discoveryURL must not contain query parameters
rule: url(self).getQuery().size() == 0
- message: discoveryURL must be a valid https URL
rule: url(self).getScheme() == 'https'
- message: discoveryURL must not contain user info
rule: '!self.matches(''^https://[^/]*@.+$'')'
- message: discoveryURL must be a valid URL
rule: isURL(self)
- message: discoveryURL must not contain fragments
rule: self.matches('^[^#]*$')
- message: discoveryURL must not contain query parameters
rule: url(self).getQuery().size() == 0
- message: discoveryURL must be a valid https URL
rule: url(self).getScheme() == 'https'
🤖 Prompt for AI Agents
In
`@payload-manifests/crds/0000_10_config-operator_01_authentications-CustomNoUpgrade.crd.yaml`
around lines 473 - 482, The discoveryURL user-info check (the rule attached to
the "discoveryURL must not contain user info" message) only blocks "user:pass@"
forms and misses "user@host" forms; update that rule to reject any URL
containing an '@' before the first '/' in the path (i.e., detect any userinfo
portion before the host separator) so URLs like
"https://user@issuer.example.com/..." are caught; replace the current
regex-based rule on discoveryURL with one that matches an '@' appearing in the
authority portion (before the first slash) and keep it negated as the validation
condition.

Comment on lines 473 to 482
- message: discoveryURL must not contain user info
rule: '!self.matches(''^https://.+:.+@.+/.*$'')'
- message: discoveryURL must be a valid URL
rule: isURL(self)
- message: discoveryURL must be a valid https URL
rule: url(self).getScheme() == 'https'
- message: discoveryURL must not contain query parameters
rule: url(self).getQuery().size() == 0
- message: discoveryURL must not contain fragments
rule: self.matches('^[^#]*$')
- message: discoveryURL must not contain user info
rule: '!self.matches(''^https://.+:.+@.+/.*$'')'
- message: discoveryURL must not contain query parameters
rule: url(self).getQuery().size() == 0
- message: discoveryURL must be a valid https URL
rule: url(self).getScheme() == 'https'
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

User-info regex misses user@host URLs.

The pattern only rejects user:pass@ forms, so a URL like https://user@issuer.example.com/... would pass. Consider matching any @ before the first /.

💡 Proposed fix
-                          - message: discoveryURL must not contain user info
-                            rule: '!self.matches(''^https://.+:.+@.+/.*$'')'
+                          - message: discoveryURL must not contain user info
+                            rule: '!self.matches(''^https://[^/]*@.+$'')'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- message: discoveryURL must not contain user info
rule: '!self.matches(''^https://.+:.+@.+/.*$'')'
- message: discoveryURL must be a valid URL
rule: isURL(self)
- message: discoveryURL must be a valid https URL
rule: url(self).getScheme() == 'https'
- message: discoveryURL must not contain query parameters
rule: url(self).getQuery().size() == 0
- message: discoveryURL must not contain fragments
rule: self.matches('^[^#]*$')
- message: discoveryURL must not contain user info
rule: '!self.matches(''^https://.+:.+@.+/.*$'')'
- message: discoveryURL must not contain query parameters
rule: url(self).getQuery().size() == 0
- message: discoveryURL must be a valid https URL
rule: url(self).getScheme() == 'https'
- message: discoveryURL must not contain user info
rule: '!self.matches(''^https://[^/]*@.+$'')'
- message: discoveryURL must be a valid URL
rule: isURL(self)
- message: discoveryURL must not contain fragments
rule: self.matches('^[^#]*$')
- message: discoveryURL must not contain query parameters
rule: url(self).getQuery().size() == 0
- message: discoveryURL must be a valid https URL
rule: url(self).getScheme() == 'https'
🤖 Prompt for AI Agents
In
`@payload-manifests/crds/0000_10_config-operator_01_authentications-TechPreviewNoUpgrade.crd.yaml`
around lines 473 - 482, The discoveryURL user-info check currently only rejects
user:pass@ forms via the rule '!self.matches(''^https://.+:.+@.+/.*$'')' but
misses user@host URLs; update that rule to reject any '@' before the first '/'
by replacing the regex with one that matches any userinfo (for example change to
'!self.matches(''^https://[^/]*@.+/.*$'')') so discoveryURL validation in the
CRD (the rule alongside the messages "discoveryURL must not contain user
info"/"discoveryURL must be a valid URL") will catch both user:pass@ and
user@host forms.

tools/go.mod Outdated
)

replace sigs.k8s.io/controller-tools => github.com/openshift/controller-tools v0.12.1-0.20250801155905-948121310243
replace sigs.k8s.io/controller-tools => github.com/jaypoulz/controller-tools v0.0.0-20260119185850-e534bd0a65da
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

kubernetes-sigs controller-tools PR 1324 merged status

💡 Result:

I couldn't find a pull request numbered 1324 in the kubernetes-sigs/controller-tools repository. The repository's PR list is here for you to check (search/filter by number or link): [1].

If you have a specific PR link or a different repo name (or a different PR number), send it and I'll check the merged/closed status and provide details.

Source:
[1] kubernetes-sigs/controller-tools pull requests (GitHub).


🌐 Web query:

Go 1.25 release date availability

💡 Result:

Go 1.25 was released and made available on August 12, 2025 (binaries/installers on the Go download page). [1][2]

Sources:
[1] Go blog announcement, "Go 1.25 is released" (Aug 12, 2025).
[2] Go 1.25 Release Notes (Go.dev).


🏁 Script executed:

# Attempt to verify commit in fork using git
# Check if we can find any reference to this controller-tools fork or commit
rg "jaypoulz/controller-tools" --type go --type mod
rg "e534bd0a65da" --type go --type mod

Repository: openshift/api

Length of output: 112


🌐 Web query:

controller-tools Go 1.25 compatibility kubernetes-sigs

💡 Result:

Short answer: There’s no official public statement that controller-tools explicitly supports Go 1.25 yet. The controller-tools README lists the minimum Go version for the latest documented CT release (v0.17) as Go 1.23, and controller-runtime (the closely related project) documents minimum Go 1.24 for its recent releases — so for Go 1.25 you should check the specific controller-tools release’s go.mod (or test it) before upgrading. [1][2][3]

Sources

  • controller-tools README (compatibility / minimum Go versions). [1]
  • controller-runtime compatibility (minimum Go 1.24 for recent releases). [2]
  • Kubebuilder / related issues noting Go tool-version changes and the need to track tool versions in go.mod. [3]

🌐 Web query:

openshift kubernetes-sigs-controller-tools PR 33 status

💡 Result:

Do you mean PR #33 in the openshift fork (github.com/openshift/controller-tools) or PR #33 in the upstream kubernetes-sigs/controller-tools repo?


🌐 Web query:

controller-tools kubernetes 1.32 Go 1.25 compatibility

💡 Result:

Short answer: Yes — use controller-tools v0.17 (built/tested against client-go v0.32 / K8s v1.32), which has a minimum Go requirement of 1.23, so Go 1.25 is fine. Check the controller-tools go.mod for the exact tag you plan to use if you need absolute guarantees. [1][2][3]

Sources:

  • controller-tools compatibility table (client-go v0.32 → CT v0.17; min Go 1.23). [1]
  • controller-runtime compatibility table (client-go v0.32 → CR v0.20; min Go 1.23). [2]
  • Kubebuilder release notes (shows related upgrades and recommends checking scaffolded go.mod/Makefile). [3]

References:
[1] https://github.com/kubernetes-sigs/controller-tools
[2] https://github.com/kubernetes-sigs/controller-runtime
[3] https://github.com/kubernetes-sigs/kubebuilder/releases


🏁 Script executed:

cat -n tools/go.mod

Repository: openshift/api

Length of output: 19860


Migrate controller-tools from personal fork to upstream now that Go 1.25 is available.

The PR objectives indicated the personal fork (jaypoulz/controller-tools) would be used temporarily until Go 1.25 became available for bumping. Go 1.25 was released August 12, 2025, making that condition met. The fork should be removed and sigs.k8s.io/controller-tools should be upgraded to v0.18.0 or later (which supports Go 1.25). Update line 38 to remove the replace directive and rely on the upstream version specified in line 32.

🤖 Prompt for AI Agents
In `@tools/go.mod` at line 38, Remove the temporary replace directive that points
sigs.k8s.io/controller-tools to the personal fork (the line beginning "replace
sigs.k8s.io/controller-tools => github.com/jaypoulz/controller-tools ...") and
instead use the upstream module; update the dependency for
sigs.k8s.io/controller-tools to v0.18.0 (or later) in the module requires so the
code relies on the upstream sigs.k8s.io/controller-tools at v0.18.0+ rather than
the jaypoulz fork.

@jaypoulz jaypoulz force-pushed the OCPEDGE-2084-xvalidation-strict-order branch from 1cefbcb to deff7a9 Compare January 20, 2026 14:12
@openshift-ci openshift-ci bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jan 20, 2026
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@openapi/openapi.json`:
- Around line 14423-14430: The schema for the "type" property declares
"default": "" which is not a valid enum member ("ContainerImport","GitImport");
update the "type" property schema by either removing the "default" key or
changing it to a valid enum value (e.g., "ContainerImport" or "GitImport"), or
if an empty string is intentionally allowed add "" to the "enum" list; if this
OpenAPI was generated, fix the source generator/templates that emit the "type"
property's default and re-generate so the default and enum remain consistent.
♻️ Duplicate comments (2)
console/v1/types_console_sample.go (1)

128-129: Enum marker syntax concern already flagged; +enum addition is appropriate.

The Enum:= syntax issue was previously raised. The addition of the +enum marker on line 129 is correct practice for enabling proper enum type generation in controller-gen output.

If the := syntax is intentionally supported by the jaypoulz/controller-tools fork referenced in this PR, please confirm. Otherwise, consider addressing the prior feedback to use standard Enum= syntax.

openapi/generated_openapi/zz_generated.openapi.go (1)

26041-26045: Remove invalid default on enum schema.

Default: "" conflicts with the enum values and makes the schema invalid. Please omit the default (or set it to a valid enum member) in the generator rather than in this generated file.

🛠️ Suggested change (generated output)
-							Default:     "",
🧹 Nitpick comments (1)
openapi/openapi.json (1)

24713-24716: The enum values are defined in the source but not appearing in the generated OpenAPI—regenerate to enforce validation.

The +kubebuilder:validation:Enum=MachineAPI;ClusterAPI marker already exists on the SynchronizedAPI type in the source (machine/v1beta1/types_machine.go), but the generated OpenAPI schema (openapi/openapi.json) is not including the enum constraint. Regenerating the OpenAPI using hack/update-openapi.sh should translate these markers into the schema. This will enforce the valid values at the API level instead of relying on documentation alone.

Regarding default values: enum constraints and default values are independent. Default values do not need to be included in the enum list; an enum validates the field's value when present.

Comment on lines 96 to 99
// RetentionType is the enumeration of valid retention policy types.
// +kubebuilder:validation:Enum:="";"RetentionNumber";"RetentionSize"
// +enum
// +kubebuilder:validation:Enum:="RetentionNumber";"RetentionSize"
type RetentionType string
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// RetentionType is the enumeration of valid retention policy types.
// +kubebuilder:validation:Enum:="";"RetentionNumber";"RetentionSize"
// +enum
// +kubebuilder:validation:Enum:="RetentionNumber";"RetentionSize"
type RetentionType string
// RetentionType is the enumeration of valid retention policy types.
// +enum
// +kubebuilder:validation:Enum:="RetentionNumber";"RetentionSize"
type RetentionType string


$(OUTPUT_DIR)/openapi-gen: $(OUTPUT_DIR)/vendor-version
go build -mod=vendor -o $(OUTPUT_DIR)/openapi-gen ./vendor/k8s.io/code-generator/cmd/openapi-gen
go build -mod=vendor -o $(OUTPUT_DIR)/openapi-gen ./vendor/k8s.io/kube-openapi/cmd/openapi-gen
Copy link
Contributor

Choose a reason for hiding this comment

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

How come this is changing? 🤔 Appears not to be affecting anything, was the previous location deprecated?

Copy link
Author

Choose a reason for hiding this comment

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

I couldn't build without it. I'm not sure why. I assumed this was changed upstream?

Copy link
Author

Choose a reason for hiding this comment

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

@jaypoulz jaypoulz force-pushed the OCPEDGE-2084-xvalidation-strict-order branch 2 times, most recently from bfd09a1 to 8ba20ea Compare January 20, 2026 15:21
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@console/v1/types_console_sample.go`:
- Around line 128-129: The kubebuilder marker uses the wrong syntax: replace the
non-standard `// +kubebuilder:validation:Enum:="GitImport";"ContainerImport"`
marker with the proper form by removing the extra colon and quotes so it reads
`// +kubebuilder:validation:Enum=GitImport;ContainerImport`; update the Enum
marker near the type declaration in types_console_sample.go (the kubebuilder
`Enum` tag for the sample type) so values are unquoted and separated by
semicolons.
♻️ Duplicate comments (1)
openapi/openapi.json (1)

14423-14430: Default value is not in enum (schema-invalid).
Line 14426 sets "default": "", but the enum only allows "ContainerImport" and "GitImport". This makes the schema inconsistent and can break validation/defaulting. If this file is generated, fix the source markers and re-generate.

🐛 Proposed fix (if empty string is not allowed)
-          "default": "",
           "enum": [
             "ContainerImport",
             "GitImport"
           ]
🧹 Nitpick comments (1)
openapi/openapi.json (1)

24713-24716: Add enum to enforce the documented valid values.
The description states valid values are "MachineAPI" and "ClusterAPI", but the schema allows any string. If those are the only valid values, add an enum so validation matches the contract.

♻️ Suggested change (apply in both locations)
         "synchronizedAPI": {
           "description": "synchronizedAPI holds the last stable value of authoritativeAPI. It is used to detect migration cancellation requests and to restore the resource to its previous state. Valid values are \"MachineAPI\" and \"ClusterAPI\". When omitted, the resource has not yet been reconciled by the migration controller.",
-          "type": "string"
+          "type": "string",
+          "enum": [
+            "MachineAPI",
+            "ClusterAPI"
+          ]
         },

Also applies to: 24820-24823

Comment on lines +128 to +129
// +kubebuilder:validation:Enum:="GitImport";"ContainerImport"
// +enum
Copy link

@coderabbitai coderabbitai bot Jan 20, 2026

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# Search for enum values in the generated OpenAPI file
fd -e go -path "*generated*openapi*" | head -5

Repository: openshift/api

Length of output: 225


🏁 Script executed:

# Check what enum marker syntax is used in the codebase
rg '\+kubebuilder:validation:Enum' --type go -B 2 -A 2 | head -60

Repository: openshift/api

Length of output: 4190


🌐 Web query:

kubebuilder controller-gen validation Enum marker syntax documentation

💡 Result:

Short answer — use the +kubebuilder:validation:Enum marker with either semicolon-separated values or a quoted Go-syntax slice. Examples:

  • Simple semicolon list (strings without quotes):
    // +kubebuilder:validation:Enum=Wallace;Gromit;Chicken. [1][2]

  • Quoted/complex values (Go-syntax slice / curly braces):
    // +kubebuilder:validation:Enum={"crackers, Gromit, we forgot the crackers!","not even wensleydale?"}. [1][2]

  • For array items use the items form:
    // +kubebuilder:validation:items:Enum=one;two;three. [1]

Reference: Kubebuilder marker docs — CRD validation and marker-syntax. [1][2]

Sources
[1] CRD Validation — The Kubebuilder Book.
[2] Markers for Config/Code Generation — The Kubebuilder Book.


Fix the non-standard Enum:= marker syntax.

The correct kubebuilder marker syntax uses Enum= (not Enum:=), with unquoted semicolon-separated values: // +kubebuilder:validation:Enum=GitImport;ContainerImport. Change line 128 from:

// +kubebuilder:validation:Enum:="GitImport";"ContainerImport"

to:

// +kubebuilder:validation:Enum=GitImport;ContainerImport
🤖 Prompt for AI Agents
In `@console/v1/types_console_sample.go` around lines 128 - 129, The kubebuilder
marker uses the wrong syntax: replace the non-standard `//
+kubebuilder:validation:Enum:="GitImport";"ContainerImport"` marker with the
proper form by removing the extra colon and quotes so it reads `//
+kubebuilder:validation:Enum=GitImport;ContainerImport`; update the Enum marker
near the type declaration in types_console_sample.go (the kubebuilder `Enum` tag
for the sample type) so values are unquoted and separated by semicolons.

Copy link
Contributor

Choose a reason for hiding this comment

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

While this feedback points to the correct/preferred semantic, the existing tag is actually ok and works just fine, we don't need to call out these differences

Copy link

Choose a reason for hiding this comment

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

@JoelSpeed Thank you for the clarification! I understand that both the quoted syntax (Enum:="GitImport";"ContainerImport") and the unquoted syntax (Enum=GitImport;ContainerImport) work correctly. I'll avoid flagging these differences in the future.


Learnings added:

Applicable to openshift/api
Learnings added (1):
User: JoelSpeed
PR: openshift/api#2658
File: console/v1/types_console_sample.go:128-129
Timestamp: 2026-01-20T...
Learning: Both kubebuilder validation Enum marker syntaxes are acceptable in the openshift/api repository: the quoted syntax `+kubebuilder:validation:Enum:="Value1";"Value2"` and the unquoted syntax `+kubebuilder:validation:Enum=Value1;Value2` both work correctly. Do not flag these differences as issues in code reviews.

@jaypoulz jaypoulz force-pushed the OCPEDGE-2084-xvalidation-strict-order branch from 8ba20ea to 0957323 Compare January 20, 2026 15:29
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 20, 2026

@jaypoulz: This pull request references OCPEDGE-2084 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

User description

Update controller-tools to openshift/kubernetes-sigs-controller-tools which
includes a fix for deterministic XValidation rule ordering. This ensures CRD
generation produces consistent output.

Changes included:

  • tools/go.mod: Point replace directive to openshift fork with stable sort fix
  • tools/Makefile: Fix openapi-gen path (moved from code-generator to
    kube-openapi upstream)
  • tools/codegen/pkg/schemacheck/generator.go: Disable NoDataTypeChange
    comparator for allOf→enum schema simplification

The new controller-tools generates simpler enum schemas without allOf
wrappers when both type and field have enum markers. This is functionally
equivalent but structurally different, requiring the schemacheck adjustment
to avoid false positive violations.

Upstream fix: kubernetes-sigs/controller-tools#1299
OpenShift carry: openshift/kubernetes-sigs-controller-tools#35
Created with support from Claude Opus 4 (Anthropic)


PR Type

Enhancement, Bug fix


Description

  • Upgraded controller-tools to include deterministic XValidation rule ordering, ensuring consistent CRD generation output regardless of map iteration order

  • Implemented sorting of XValidations by rule field using slices.SortFunc with cmp.Compare for deterministic output

  • Refactored schema generation with schemaFetcher function type for improved schema resolution and lazy loading with caching

  • Added alphabetical sorting of Required fields in struct schema generation

  • Updated enum marker formats in type definitions (RetentionType, ConsoleSampleSourceType) to use quoted values and added +enum annotations

  • Disabled NoDataTypeChange comparator in schema checks to accommodate simplified allOf enum structures from updated controller-tools

  • Regenerated all CRD manifests with deterministic validation rule ordering across multiple API groups (config, operator, machine, monitoring, route, insights)

  • Enhanced OpenAPI schema documentation with enum value descriptions


Diagram Walkthrough

flowchart LR
 A["controller-tools upgrade<br/>with XValidation sorting"] --> B["Deterministic rule<br/>ordering implementation"]
 B --> C["Schema generation<br/>refactoring"]
 C --> D["CRD manifest<br/>regeneration"]
 A --> E["Enum marker format<br/>updates"]
 E --> D
 A --> F["Schema comparator<br/>adjustments"]
 F --> D
 D --> G["Consistent CRD<br/>output across builds"]
Loading

File Walkthrough

Relevant files
Enhancement
53 files
schema.go
Schema generation refactoring with deterministic field ordering

tools/vendor/sigs.k8s.io/controller-tools/pkg/crd/schema.go

  • Added schemaFetcher function type for fetching schemas by type
    identifier
  • Introduced schemaFetcher field to schemaContext struct for schema
    resolution
  • Modified localNamedToSchema to use schemaFetcher instead of inline
    schema creation logic
  • Added conditional checks to only set Description field when non-empty
  • Added alphabetical sorting of Required fields in struct schema
    generation
+26/-23 
types_backup.go
Enum marker format update for retention policy types         

config/v1alpha1/types_backup.go

  • Updated RetentionType enum marker format from
    +kubebuilder:validation:Enum:="RetentionNumber";"RetentionSize" to
    +kubebuilder:validation:Enum:="";"RetentionNumber";"RetentionSize"
  • Added +enum marker annotation
  • Fixed documentation comment punctuation
+2/-3     
validation.go
Deterministic XValidation rule ordering implementation     

tools/vendor/sigs.k8s.io/controller-tools/pkg/crd/markers/validation.go

  • Added imports for cmp and slices packages
  • Implemented deterministic sorting of XValidations by rule field
  • Uses slices.SortFunc with cmp.Compare to ensure consistent output
    order
+7/-0     
parser.go
Schema fetcher integration in parser initialization           

tools/vendor/sigs.k8s.io/controller-tools/pkg/crd/parser.go

  • Modified newSchemaContext call to pass a schemaFetcher function
  • Implemented inline fetcher that calls NeedSchemaFor and returns cached
    schema
  • Enables lazy schema resolution with proper caching mechanism
+6/-1     
zz_generated.openapi.go
OpenAPI schema enhancement with enum documentation             

openapi/generated_openapi/zz_generated.openapi.go

  • Enhanced ConsoleSampleSource type field description with enum values
    documentation
  • Added Enum field with sorted enum values ["ContainerImport",
    "GitImport"]
  • Improved OpenAPI schema documentation for enum types
+2/-1     
types_console_sample.go
Console sample source type enum marker format update         

console/v1/types_console_sample.go

  • Updated ConsoleSampleSourceType enum marker format to use quoted
    values
  • Changed from +kubebuilder:validation:Enum:=GitImport;ContainerImport
    to +kubebuilder:validation:Enum:="GitImport";"ContainerImport"
  • Added +enum marker annotation
+2/-2     
0000_80_machine-config_01_machineconfigurations-DevPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in MachineConfiguration CRD

operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-DevPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules to achieve deterministic
    ordering
  • Moved Reboot action validation rule after None action validation rule
    in multiple locations
  • Reordered top-level validation rules for boot image skew enforcement
    to ensure consistent output
+34/-34 
0000_80_machine-config_01_machineconfigurations-CustomNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in MachineConfiguration CRD

operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-CustomNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for deterministic output
  • Moved Reboot action validation after None action validation
    consistently
  • Reordered boot image skew enforcement validation rules
+34/-34 
0000_80_machine-config_01_machineconfigurations-TechPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in MachineConfiguration CRD

operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-TechPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for consistent CRD generation
  • Moved Reboot action validation rule after None action validation
  • Reordered top-level boot image skew enforcement validation rules
+34/-34 
BootImageSkewEnforcement.yaml
Deterministic XValidation rule ordering in BootImageSkewEnforcement
CRD

operator/v1/zz_generated.featuregated-crd-manifests/machineconfigurations.operator.openshift.io/BootImageSkewEnforcement.yaml

  • Reordered x-kubernetes-validations rules for deterministic output
  • Moved Reboot action validation after None action validation in
    multiple sections
  • Reordered boot image skew enforcement validation rules at the spec
    level
+34/-34 
0000_80_machine-config_01_machineconfigurations-DevPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in MachineConfiguration CRD

payload-manifests/crds/0000_80_machine-config_01_machineconfigurations-DevPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for consistent CRD generation
  • Moved Reboot action validation after None action validation
  • Reordered boot image skew enforcement validation rules
+34/-34 
0000_80_machine-config_01_machineconfigurations-CustomNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in MachineConfiguration CRD

payload-manifests/crds/0000_80_machine-config_01_machineconfigurations-CustomNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for deterministic output
  • Moved Reboot action validation after None action validation
    consistently
  • Reordered boot image skew enforcement validation rules
+34/-34 
0000_80_machine-config_01_machineconfigurations-TechPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in MachineConfiguration CRD

payload-manifests/crds/0000_80_machine-config_01_machineconfigurations-TechPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for consistent CRD generation
  • Moved Reboot action validation after None action validation
  • Reordered boot image skew enforcement validation rules
+34/-34 
SigstoreImageVerificationPKI.yaml
Deterministic XValidation rule ordering in
SigstoreImageVerificationPKI CRD

config/v1alpha1/zz_generated.featuregated-crd-manifests/imagepolicies.config.openshift.io/SigstoreImageVerificationPKI.yaml

  • Reordered x-kubernetes-validations rules for certificate data
    validation
  • Moved startsWith validation rule after other certificate format checks
  • Reordered policy type validation rules for consistent ordering
+18/-18 
0000_10_config-operator_01_authentications-DevPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in Authentication CRD

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-DevPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for key domain validation
  • Moved reserved domain checks to appear before format validation rules
  • Reordered discovery URL validation rules for consistent output
+24/-24 
0000_10_config-operator_01_authentications-CustomNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in Authentication CRD

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-CustomNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for key domain validation
  • Moved reserved domain checks before format validation rules
  • Reordered discovery URL validation rules
+24/-24 
0000_10_config-operator_01_authentications-TechPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in Authentication CRD

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-TechPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for key domain validation
  • Moved reserved domain checks before format validation rules
  • Reordered discovery URL validation rules for consistent output
+24/-24 
ManagedBootImages+ManagedBootImagesCPMS.yaml
Deterministic XValidation rule ordering in ManagedBootImages CRD

operator/v1/zz_generated.featuregated-crd-manifests/machineconfigurations.operator.openshift.io/ManagedBootImages+ManagedBootImagesCPMS.yaml

  • Reordered x-kubernetes-validations rules for action validation
  • Moved Reboot action validation after None action validation
+24/-24 
0000_80_machine-config_01_machineconfigurations-OKD.crd.yaml
Deterministic XValidation rule ordering in MachineConfiguration CRD

operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-OKD.crd.yaml

  • Reordered x-kubernetes-validations rules for action validation
  • Moved Reboot action validation after None action validation
    consistently
+24/-24 
0000_80_machine-config_01_machineconfigurations-Default.crd.yaml
Deterministic XValidation rule ordering in MachineConfiguration CRD

operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-Default.crd.yaml

  • Reordered x-kubernetes-validations rules for action validation
  • Moved Reboot action validation after None action validation
+24/-24 
IrreconcilableMachineConfig.yaml
Deterministic XValidation rule ordering in IrreconcilableMachineConfig
CRD

operator/v1/zz_generated.featuregated-crd-manifests/machineconfigurations.operator.openshift.io/IrreconcilableMachineConfig.yaml

  • Reordered x-kubernetes-validations rules for action validation
  • Moved Reboot action validation after None action validation
    consistently
+24/-24 
ManagedBootImages.yaml
Deterministic XValidation rule ordering in ManagedBootImages CRD

operator/v1/zz_generated.featuregated-crd-manifests/machineconfigurations.operator.openshift.io/ManagedBootImages.yaml

  • Reordered x-kubernetes-validations rules for action validation
  • Moved Reboot action validation after None action validation
+24/-24 
AAA_ungated.yaml
Deterministic XValidation rule ordering in MachineConfiguration CRD

operator/v1/zz_generated.featuregated-crd-manifests/machineconfigurations.operator.openshift.io/AAA_ungated.yaml

  • Reordered x-kubernetes-validations rules for action validation
  • Moved Reboot action validation after None action validation
    consistently
+24/-24 
0000_80_machine-config_01_machineconfigurations-OKD.crd.yaml
Deterministic XValidation rule ordering in MachineConfiguration CRD

payload-manifests/crds/0000_80_machine-config_01_machineconfigurations-OKD.crd.yaml

  • Reordered x-kubernetes-validations rules for action validation
  • Moved Reboot action validation after None action validation
+24/-24 
0000_80_machine-config_01_machineconfigurations-Default.crd.yaml
Deterministic XValidation rule ordering in MachineConfiguration CRD

payload-manifests/crds/0000_80_machine-config_01_machineconfigurations-Default.crd.yaml

  • Reordered x-kubernetes-validations rules for action validation
  • Moved Reboot action validation after None action validation
    consistently
+24/-24 
SigstoreImageVerification.yaml
Deterministic XValidation rule ordering in SigstoreImageVerification
CRD

config/v1alpha1/zz_generated.featuregated-crd-manifests/clusterimagepolicies.config.openshift.io/SigstoreImageVerification.yaml

  • Reordered x-kubernetes-validations rules for policy type validation
  • Moved publicKey validation after fulcioCAWithRekor validation
  • Reordered image scope validation rules for consistent output
+12/-12 
0000_10_config-operator_01_authentications-DevPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in authentication CRDs

payload-manifests/crds/0000_10_config-operator_01_authentications-DevPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for authentication key
    validation to ensure deterministic ordering
  • Moved domain-specific validation rules (k8s.io, kubernetes.io,
    openshift.io subdomains) before format validation rules
  • Reordered discoveryURL validation rules for consistent CEL rule
    ordering
  • Reordered URL validation rules for issuerURL field
+24/-24 
0000_10_config-operator_01_authentications-CustomNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in authentication CRDs

payload-manifests/crds/0000_10_config-operator_01_authentications-CustomNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for authentication key
    validation to ensure deterministic ordering
  • Moved domain-specific validation rules (k8s.io, kubernetes.io,
    openshift.io subdomains) before format validation rules
  • Reordered discoveryURL validation rules for consistent CEL rule
    ordering
  • Reordered URL validation rules for issuerURL field
+24/-24 
0000_10_config-operator_01_authentications-TechPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in authentication CRDs

payload-manifests/crds/0000_10_config-operator_01_authentications-TechPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for authentication key
    validation to ensure deterministic ordering
  • Moved domain-specific validation rules (k8s.io, kubernetes.io,
    openshift.io subdomains) before format validation rules
  • Reordered discoveryURL validation rules for consistent CEL rule
    ordering
  • Reordered URL validation rules for issuerURL field
+24/-24 
ExternalOIDCWithUIDAndExtraClaimMappings.yaml
Deterministic XValidation rule ordering in authentication CRDs

config/v1/zz_generated.featuregated-crd-manifests/authentications.config.openshift.io/ExternalOIDCWithUIDAndExtraClaimMappings.yaml

  • Reordered x-kubernetes-validations rules for authentication key
    validation to ensure deterministic ordering
  • Moved domain-specific validation rules before format validation rules
  • Reordered URL validation rules for issuerURL field
+18/-18 
0000_10_config-operator_01_authentications-OKD.crd.yaml
Deterministic XValidation rule ordering in authentication CRDs

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-OKD.crd.yaml

  • Reordered x-kubernetes-validations rules for authentication key
    validation to ensure deterministic ordering
  • Moved domain-specific validation rules before format validation rules
  • Reordered URL validation rules for issuerURL field
+18/-18 
0000_10_config-operator_01_authentications-Default.crd.yaml
Deterministic XValidation rule ordering in authentication CRDs

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_authentications-Default.crd.yaml

  • Reordered x-kubernetes-validations rules for authentication key
    validation to ensure deterministic ordering
  • Moved domain-specific validation rules before format validation rules
  • Reordered URL validation rules for issuerURL field
+18/-18 
DyanmicServiceEndpointIBMCloud.yaml
Deterministic XValidation rule ordering in infrastructure CRDs

config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/DyanmicServiceEndpointIBMCloud.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+16/-16 
0000_10_config-operator_01_infrastructures-DevPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in infrastructure CRDs

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-DevPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+17/-17 
0000_10_config-operator_01_infrastructures-CustomNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in infrastructure CRDs

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-CustomNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+17/-17 
0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in infrastructure CRDs

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+17/-17 
SigstoreImageVerification.yaml
Deterministic XValidation rule ordering in image policy CRDs

config/v1alpha1/zz_generated.featuregated-crd-manifests/imagepolicies.config.openshift.io/SigstoreImageVerification.yaml

  • Reordered x-kubernetes-validations rules for policy type validation
    (PublicKey, FulcioCAWithRekor)
  • Reordered image scope validation rules to ensure deterministic CEL
    rule ordering
+12/-12 
0000_10_config-operator_01_authentications-OKD.crd.yaml
Deterministic XValidation rule ordering in authentication CRDs

payload-manifests/crds/0000_10_config-operator_01_authentications-OKD.crd.yaml

  • Reordered x-kubernetes-validations rules for authentication key
    validation to ensure deterministic ordering
  • Moved domain-specific validation rules before format validation rules
  • Reordered URL validation rules for issuerURL field
+18/-18 
0000_10_config-operator_01_authentications-Default.crd.yaml
Deterministic XValidation rule ordering in authentication CRDs

payload-manifests/crds/0000_10_config-operator_01_authentications-Default.crd.yaml

  • Reordered x-kubernetes-validations rules for authentication key
    validation to ensure deterministic ordering
  • Moved domain-specific validation rules before format validation rules
  • Reordered URL validation rules for issuerURL field
+18/-18 
0000_10_config-operator_01_infrastructures-DevPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in infrastructure CRDs

payload-manifests/crds/0000_10_config-operator_01_infrastructures-DevPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+17/-17 
0000_10_config-operator_01_infrastructures-CustomNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in infrastructure CRDs

payload-manifests/crds/0000_10_config-operator_01_infrastructures-CustomNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+17/-17 
0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in infrastructure CRDs

payload-manifests/crds/0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+17/-17 
0000_80_machine-config_01_controllerconfigs-DevPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in machine config CRDs

machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-DevPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+18/-18 
0000_80_machine-config_01_controllerconfigs-CustomNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in machine config CRDs

machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-CustomNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+18/-18 
0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in machine config CRDs

machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+18/-18 
0000_80_machine-config_01_controllerconfigs-DevPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in machine config CRDs

payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-DevPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+18/-18 
0000_80_machine-config_01_controllerconfigs-CustomNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in machine config CRDs

payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-CustomNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+18/-18 
0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in machine config CRDs

payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+18/-18 
AAA_ungated.yaml
Deterministic XValidation rule ordering in alert relabel CRDs

monitoring/v1/zz_generated.featuregated-crd-manifests/alertrelabelconfigs.monitoring.openshift.io/AAA_ungated.yaml

  • Reordered x-kubernetes-validations rules for alert relabel
    configuration validation
  • Reorganized rules for modulus, replacement, separator, sourceLabels,
    and targetLabel validation
  • Ensured deterministic ordering of CEL validation rules
+21/-21 
0000_50_monitoring_02_alertrelabelconfigs.crd.yaml
Deterministic XValidation rule ordering in alert relabel CRDs

monitoring/v1/zz_generated.crd-manifests/0000_50_monitoring_02_alertrelabelconfigs.crd.yaml

  • Reordered x-kubernetes-validations rules for alert relabel
    configuration validation
  • Reorganized rules for modulus, replacement, separator, sourceLabels,
    and targetLabel validation
  • Ensured deterministic ordering of CEL validation rules
+21/-21 
VSphereHostVMGroupZonal.yaml
Deterministic XValidation rule ordering in vSphere infrastructure CRDs

config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/VSphereHostVMGroupZonal.yaml

  • Reordered x-kubernetes-validations rules for failure domain identifier
    type validation (UUID, Name)
  • Reordered zone and region affinity validation rules for vSphere
    infrastructure
+13/-13 
DyanmicServiceEndpointIBMCloud.yaml
Deterministic XValidation rule ordering in machine config CRDs

machineconfiguration/v1/zz_generated.featuregated-crd-manifests/controllerconfigs.machineconfiguration.openshift.io/DyanmicServiceEndpointIBMCloud.yaml

  • Reordered x-kubernetes-validations rules for dynamic service endpoint
    URL validation
  • Reordered failure domain identifier type validation rules (UUID, Name,
    Filters)
+16/-16 
0000_10_control-plane-machine-set_01_controlplanemachinesets-DevPreviewNoUpgrade.crd.yaml
Deterministic XValidation rule ordering in control plane machine set
CRDs

machine/v1/zz_generated.crd-manifests/0000_10_control-plane-machine-set_01_controlplanemachinesets-DevPreviewNoUpgrade.crd.yaml

  • Reordered x-kubernetes-validations rules for AWS instance identifier
    type validation (ID, ARN, Filters)
  • Reordered platform configuration validation rules (Nutanix moved after
    GCP, before OpenStack)
  • Added new validation rule for required
    machine.openshift.io/cluster-api-cluster label
+12/-12 
Bug fix
1 files
generator.go
Disable schema comparator for enum structure simplification

tools/codegen/pkg/schemacheck/generator.go

  • Added NoDataTypeChange to the list of disabled comparators
  • Added explanatory comment about controller-tools simplifying allOf
    enum structures
  • Justifies disabling the comparator due to type field changes in
    simplified enums
+4/-1     
Miscellaneous
13 files
SigstoreImageVerificationPKI.yaml
Deterministic validation rule ordering in CRD manifests   

config/v1/zz_generated.featuregated-crd-manifests/clusterimagepolicies.config.openshift.io/SigstoreImageVerificationPKI.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for certificate data fields now sorted
    deterministically
  • Affects fulcioCAData, rekorKeyData, caIntermediatesData, caRootsData,
    and policy type validations
+30/-30 
SigstoreImageVerificationPKI.yaml
Deterministic validation rule ordering in CRD manifests   

config/v1/zz_generated.featuregated-crd-manifests/imagepolicies.config.openshift.io/SigstoreImageVerificationPKI.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for certificate data fields now sorted
    deterministically
  • Affects fulcioCAData, rekorKeyData, caIntermediatesData, caRootsData,
    and policy type validations
+30/-30 
0000_10_config-operator_01_clusterimagepolicies.crd.yaml
Deterministic validation rule ordering in CRD manifests   

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_clusterimagepolicies.crd.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for certificate data fields now sorted
    deterministically
  • Affects fulcioCAData, rekorKeyData, caIntermediatesData, caRootsData,
    and policy type validations
+30/-30 
0000_10_config-operator_01_imagepolicies.crd.yaml
Deterministic validation rule ordering in CRD manifests   

config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_imagepolicies.crd.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for certificate data fields now sorted
    deterministically
  • Affects fulcioCAData, rekorKeyData, caIntermediatesData, caRootsData,
    and policy type validations
+30/-30 
0000_10_config-operator_01_clusterimagepolicies.crd.yaml
Deterministic validation rule ordering in CRD manifests   

payload-manifests/crds/0000_10_config-operator_01_clusterimagepolicies.crd.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for certificate data fields now sorted
    deterministically
  • Affects fulcioCAData, rekorKeyData, caIntermediatesData, caRootsData,
    and policy type validations
+30/-30 
0000_10_config-operator_01_imagepolicies.crd.yaml
Deterministic validation rule ordering in CRD manifests   

payload-manifests/crds/0000_10_config-operator_01_imagepolicies.crd.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for certificate data fields now sorted
    deterministically
  • Affects fulcioCAData, rekorKeyData, caIntermediatesData, caRootsData,
    and policy type validations
+30/-30 
SigstoreImageVerification.yaml
Deterministic validation rule ordering in CRD manifests   

config/v1/zz_generated.featuregated-crd-manifests/clusterimagepolicies.config.openshift.io/SigstoreImageVerification.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for keyData, rekorKeyData, and policy type
    validations now sorted deterministically
  • Image scope validation rules reordered alphabetically
+24/-24 
SigstoreImageVerification.yaml
Deterministic validation rule ordering in CRD manifests   

config/v1/zz_generated.featuregated-crd-manifests/imagepolicies.config.openshift.io/SigstoreImageVerification.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for keyData, rekorKeyData, and policy type
    validations now sorted deterministically
  • Image scope validation rules reordered alphabetically
+24/-24 
SigstoreImageVerificationPKI.yaml
Deterministic validation rule ordering in CRD manifests   

config/v1alpha1/zz_generated.featuregated-crd-manifests/clusterimagepolicies.config.openshift.io/SigstoreImageVerificationPKI.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for certificate data fields now sorted
    deterministically
  • Affects caIntermediatesData, caRootsData, and policy type validations
+18/-18 
0000_10_config-operator_01_clusterimagepolicies.crd.yaml
Deterministic validation rule ordering in CRD manifests   

config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clusterimagepolicies.crd.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for certificate data fields now sorted
    deterministically
  • Affects caIntermediatesData, caRootsData, and policy type validations
+18/-18 
0000_10_config-operator_01_imagepolicies.crd.yaml
Deterministic validation rule ordering in CRD manifests   

config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_imagepolicies.crd.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for certificate data fields now sorted
    deterministically
  • Affects caIntermediatesData, caRootsData, and policy type validations
+18/-18 
AAA_ungated.yaml
Deterministic validation rule ordering in ingress controller CRD

operator/v1/zz_generated.featuregated-crd-manifests/ingresscontrollers.operator.openshift.io/AAA_ungated.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for eipAllocations, subnet counts, and HTTP header
    restrictions now sorted deterministically
  • httpKeepAliveTimeout validation rules reordered alphabetically
+36/-36 
0000_50_ingress_00_ingresscontrollers.crd.yaml
Deterministic validation rule ordering in ingress controller CRD

operator/v1/zz_generated.crd-manifests/0000_50_ingress_00_ingresscontrollers.crd.yaml

  • Reordered x-kubernetes-validations rules to alphabetical order by rule
    content
  • Validation rules for eipAllocations, subnet counts, and HTTP header
    restrictions now sorted deterministically
  • httpKeepAliveTimeout validation rules reordered alphabetically
+36/-36 
Dependencies
1 files
go.sum
Add jaypoulz controller-tools fork dependency                       

tools/go.sum

  • Added dependency entry for github.com/jaypoulz/controller-tools
    v0.0.0-20260116180353-88e61f2c62d0
  • Includes both hash and module sum entries for the new controller-tools
    fork
+2/-2     
Additional files
101 files
ExternalOIDC.yaml +4/-4     
DyanmicServiceEndpointIBMCloud.yaml +2/-2     
0000_10_config-operator_01_featuregates.crd.yaml +3/-3     
0000_10_config-operator_01_infrastructures-Default.crd.yaml +8/-8     
0000_10_config-operator_01_infrastructures-OKD.crd.yaml +8/-8     
ExternalOIDC.yaml +2/-2     
ExternalOIDCWithUpstreamParity.yaml +8/-8     
AAA_ungated.yaml +3/-3     
AAA_ungated.yaml +8/-8     
AWSClusterHostedDNSInstall.yaml +8/-8     
AWSDualStackInstall.yaml +8/-8     
AzureClusterHostedDNSInstall.yaml +8/-8     
AzureDualStackInstall.yaml +8/-8     
DualReplica.yaml +8/-8     
GCPClusterHostedDNSInstall.yaml +8/-8     
HighlyAvailableArbiter+DualReplica.yaml +8/-8     
HighlyAvailableArbiter.yaml +8/-8     
NutanixMultiSubnets.yaml +8/-8     
OnPremDNSRecords.yaml +8/-8     
VSphereMultiNetworks.yaml +8/-8     
0000_10_config-operator_01_backups-CustomNoUpgrade.crd.yaml +4/-8     
0000_10_config-operator_01_backups-DevPreviewNoUpgrade.crd.yaml +4/-8     
0000_10_config-operator_01_backups-TechPreviewNoUpgrade.crd.yaml +4/-8     
0000_10_config-operator_01_clustermonitorings-CustomNoUpgrade.crd.yaml +4/-4     
0000_10_config-operator_01_clustermonitorings-DevPreviewNoUpgrade.crd.yaml +4/-4     
0000_10_config-operator_01_clustermonitorings-TechPreviewNoUpgrade.crd.yaml +4/-4     
AutomatedEtcdBackup.yaml +4/-8     
ClusterMonitoringConfig.yaml +4/-4     
00_consolesamples.crd.yaml +6/-10   
90_consoleplugins.crd.yaml +2/-2     
ConsolePluginContentSecurityPolicy.yaml +2/-2     
AAA_ungated.yaml +6/-10   
0000_50_my-operator_01_stableconfigtypes-CustomNoUpgrade.crd.yaml +3/-3     
0000_50_my-operator_01_stableconfigtypes-Default.crd.yaml +3/-3     
0000_50_my-operator_01_stableconfigtypes-DevPreviewNoUpgrade.crd.yaml +3/-3     
0000_50_my-operator_01_stableconfigtypes-OKD.crd.yaml +3/-3     
0000_50_my-operator_01_stableconfigtypes-TechPreviewNoUpgrade.crd.yaml +3/-3     
AAA_ungated.yaml +3/-3     
Example+Example2.yaml +3/-3     
Example.yaml +3/-3     
0000_10_insights_01_datagathers-CustomNoUpgrade.crd.yaml +2/-2     
0000_10_insights_01_datagathers-DevPreviewNoUpgrade.crd.yaml +2/-2     
0000_10_insights_01_datagathers-TechPreviewNoUpgrade.crd.yaml +2/-2     
InsightsOnDemandDataGather.yaml +2/-2     
0000_10_insights_01_datagathers-CustomNoUpgrade.crd.yaml +8/-8     
0000_10_insights_01_datagathers-DevPreviewNoUpgrade.crd.yaml +8/-8     
0000_10_insights_01_datagathers-TechPreviewNoUpgrade.crd.yaml +8/-8     
InsightsOnDemandDataGather.yaml +8/-8     
0000_10_insights_01_datagathers-CustomNoUpgrade.crd.yaml +2/-2     
0000_10_insights_01_datagathers-DevPreviewNoUpgrade.crd.yaml +2/-2     
0000_10_insights_01_datagathers-TechPreviewNoUpgrade.crd.yaml +2/-2     
InsightsOnDemandDataGather.yaml +2/-2     
0000_10_control-plane-machine-set_01_controlplanemachinesets-Default.crd.yaml +12/-12 
0000_10_control-plane-machine-set_01_controlplanemachinesets-OKD.crd.yaml +12/-12 
0000_10_control-plane-machine-set_01_controlplanemachinesets-TechPreviewNoUpgrade.crd.yaml +12/-12 
AAA_ungated.yaml +12/-12 
CPMSMachineNamePrefix.yaml +12/-12 
MachineAPIMigration.yaml +12/-12 
0000_80_machine-config_01_controllerconfigs-Default.crd.yaml +8/-8     
0000_80_machine-config_01_controllerconfigs-OKD.crd.yaml +8/-8     
0000_80_machine-config_01_machineconfignodes-Hypershift-CustomNoUpgrade.crd.yaml +2/-2     
0000_80_machine-config_01_machineconfignodes-Hypershift-DevPreviewNoUpgrade.crd.yaml +2/-2     
0000_80_machine-config_01_machineconfignodes-Hypershift-TechPreviewNoUpgrade.crd.yaml +2/-2     
0000_80_machine-config_01_machineconfignodes-SelfManagedHA-CustomNoUpgrade.crd.yaml +2/-2     
0000_80_machine-config_01_machineconfignodes-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml +2/-2     
0000_80_machine-config_01_machineconfignodes-SelfManagedHA-TechPreviewNoUpgrade.crd.yaml +2/-2     
0000_80_machine-config_01_machineconfigpools-CustomNoUpgrade.crd.yaml +7/-7     
0000_80_machine-config_01_machineconfigpools-Default.crd.yaml +7/-7     
0000_80_machine-config_01_machineconfigpools-DevPreviewNoUpgrade.crd.yaml +7/-7     
0000_80_machine-config_01_machineconfigpools-OKD.crd.yaml +7/-7     
0000_80_machine-config_01_machineconfigpools-TechPreviewNoUpgrade.crd.yaml +7/-7     
AAA_ungated.yaml +8/-8     
AWSClusterHostedDNSInstall.yaml +8/-8     
AWSDualStackInstall.yaml +8/-8     
AzureClusterHostedDNSInstall.yaml +8/-8     
AzureDualStackInstall.yaml +8/-8     
DualReplica.yaml +8/-8     
GCPClusterHostedDNSInstall.yaml +8/-8     
HighlyAvailableArbiter+DualReplica.yaml +8/-8     
HighlyAvailableArbiter.yaml +8/-8     
NutanixMultiSubnets.yaml +8/-8     
OnPremDNSRecords.yaml +8/-8     
VSphereHostVMGroupZonal.yaml +14/-14 
VSphereMultiNetworks.yaml +8/-8     
IrreconcilableMachineConfig.yaml +2/-2     
PinnedImages.yaml +7/-7     
openapi.json +14/-2   
0000_50_console_01_consoles.crd.yaml +5/-5     
0000_70_network_01_networks.crd.yaml +9/-9     
AAA_ungated.yaml +5/-5     
AAA_ungated.yaml +2/-2     
AdditionalRoutingCapabilities.yaml +2/-2     
NetworkLiveMigration.yaml +2/-2     
RouteAdvertisements.yaml +9/-9     
0000_10_config-operator_01_backups-CustomNoUpgrade.crd.yaml +4/-8     
0000_10_config-operator_01_backups-DevPreviewNoUpgrade.crd.yaml +4/-8     
0000_10_config-operator_01_backups-TechPreviewNoUpgrade.crd.yaml +4/-8     
0000_10_config-operator_01_clustermonitorings-CustomNoUpgrade.crd.yaml +4/-4     
0000_10_config-operator_01_clustermonitorings-DevPreviewNoUpgrade.crd.yaml +4/-4     
0000_10_config-operator_01_clustermonitorings-TechPreviewNoUpgrade.crd.yaml +4/-4     
Additional files not shown

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@openapi/openapi.json`:
- Around line 24713-24716: The schema for the synchronizedAPI field currently
declares only type: "string" but the description restricts values to
"MachineAPI" and "ClusterAPI"; update the synchronizedAPI schema(s) to include
an enum: ["MachineAPI","ClusterAPI"] (apply to both occurrences of the
synchronizedAPI property) so the OpenAPI spec enforces the valid values, or
alternatively change the description to remove the stricter wording if you do
not want validation. Use the property name synchronizedAPI to locate and modify
both schema blocks.
♻️ Duplicate comments (1)
openapi/openapi.json (1)

14423-14430: Default value doesn’t match enum.
Line 14426 sets "default": "" but Line 14427-14430 only allow "ContainerImport" or "GitImport", which can make the schema invalid or break defaulting. Remove the default or include "" in the enum (if intentionally allowed), and regenerate from the source markers/templates if this file is generated.

🐛 Proposed fix (if empty string is not valid)
           "type": "string",
-          "default": "",
           "enum": [
             "ContainerImport",
             "GitImport"
           ]

Comment on lines +24713 to +24716
"synchronizedAPI": {
"description": "synchronizedAPI holds the last stable value of authoritativeAPI. It is used to detect migration cancellation requests and to restore the resource to its previous state. Valid values are \"MachineAPI\" and \"ClusterAPI\". When omitted, the resource has not yet been reconciled by the migration controller.",
"type": "string"
},
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Schema doesn’t enforce the stated valid values.
The description says valid values are "MachineAPI" and "ClusterAPI", but the schema is just type: "string". If those are the only valid values, add an enum (and regenerate from source markers); otherwise, soften the description to avoid implying strict validation.

🔧 Suggested schema tightening (apply to both locations)
         "synchronizedAPI": {
           "description": "synchronizedAPI holds the last stable value of authoritativeAPI. It is used to detect migration cancellation requests and to restore the resource to its previous state. Valid values are \"MachineAPI\" and \"ClusterAPI\". When omitted, the resource has not yet been reconciled by the migration controller.",
-          "type": "string"
+          "type": "string",
+          "enum": [
+            "MachineAPI",
+            "ClusterAPI"
+          ]
         },

Also applies to: 24820-24823

🤖 Prompt for AI Agents
In `@openapi/openapi.json` around lines 24713 - 24716, The schema for the
synchronizedAPI field currently declares only type: "string" but the description
restricts values to "MachineAPI" and "ClusterAPI"; update the synchronizedAPI
schema(s) to include an enum: ["MachineAPI","ClusterAPI"] (apply to both
occurrences of the synchronizedAPI property) so the OpenAPI spec enforces the
valid values, or alternatively change the description to remove the stricter
wording if you do not want validation. Use the property name synchronizedAPI to
locate and modify both schema blocks.

Update controller-tools to openshift/kubernetes-sigs-controller-tools which
includes a fix for deterministic XValidation rule ordering. This ensures CRD
generation produces consistent output.

Changes included:
- tools/go.mod: Point replace directive to openshift fork with stable sort fix
- tools/Makefile: Fix openapi-gen path (moved from code-generator to
  kube-openapi upstream)
- tools/codegen/pkg/schemacheck/generator.go: Disable NoDataTypeChange
  comparator for allOf→enum schema simplification

The new controller-tools generates simpler enum schemas without allOf
wrappers when both type and field have enum markers. This is functionally
equivalent but structurally different, requiring the schemacheck adjustment
to avoid false positive violations.

Upstream fix: kubernetes-sigs/controller-tools#1299
OpenShift carry: openshift/kubernetes-sigs-controller-tools#35

Created with support from Claude Opus 4 (Anthropic)
@jaypoulz jaypoulz force-pushed the OCPEDGE-2084-xvalidation-strict-order branch from 0957323 to 98cf846 Compare January 20, 2026 15:50
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 20, 2026

@jaypoulz: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/verify-crd-schema 0957323 link true /test verify-crd-schema
ci/prow/verify-crdify 0957323 link true /test verify-crdify
ci/prow/verify 0957323 link true /test verify

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
payload-manifests/crds/0000_10_config-operator_01_backups-TechPreviewNoUpgrade.crd.yaml (1)

92-104: Update description to remove misleading empty string reference.

The retentionType field description (line 96) states "Empty string means no opinion and the platform is left to choose a reasonable default," but the enum (lines 98-100) only allows RetentionNumber and RetentionSize. Since the field is marked required, empty string is not a valid option. This inconsistency is repeated across all backup CRD variants (CustomNoUpgrade, DevPreviewNoUpgrade, TechPreviewNoUpgrade).

Update the description to remove the empty string reference or clarify that defaults are chosen only when the entire retentionPolicy object is omitted, not by providing an empty retentionType.

♻️ Duplicate comments (3)
payload-manifests/crds/0000_10_config-operator_01_backups-CustomNoUpgrade.crd.yaml (1)

92-104: Same documentation inconsistency as noted in the TechPreviewNoUpgrade variant.

The description references empty string as valid (line 96), but the enum constraint (lines 98-100) does not allow it. Since this CRD is generated from config/v1alpha1/types_backup.go, the fix should be applied to the source EtcdBackupSpec.RetentionPolicy field documentation in that file, then regenerated.

openapi/openapi.json (2)

14423-14430: Default value "" is not a valid enum member.

The schema defines "default": "" but the enum only includes ["ContainerImport", "GitImport"]. This makes the default value invalid according to the schema's own constraints. Either remove the default, change it to a valid enum value, or add "" to the enum if it's intentionally allowed.

Since this file is generated, the fix should be applied to the source markers (likely in console/v1/types_console_sample.go) and then regenerated.


24713-24716: Description states valid values but schema lacks enum constraint.

Both synchronizedAPI field instances describe valid values as "MachineAPI" and "ClusterAPI", yet the schema only specifies "type": "string" without an enum. This means the OpenAPI spec won't enforce the documented constraint.

If these are the only valid values, add an enum to the schema (and regenerate from source); otherwise, soften the description to avoid implying strict validation.

Also applies to: 24820-24823

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. Review effort 4/5 size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants