Skip to content

Conversation

@2uasimojo
Copy link
Member

@2uasimojo 2uasimojo commented Jan 19, 2026

User description

The comment for the config/v1/Infrastructure.Spec.PlatformSpec.Type was outdated with respect to the consts defined for the PlatformType typedef. Update.


PR Type

Documentation


Description

  • Update PlatformType comment to reflect current platform constants

  • Add missing "IBMCloud" and "External" platform types

  • Improve comment formatting and readability


Diagram Walkthrough

flowchart LR
  A["PlatformType Comment"] -- "Add IBMCloud, External" --> B["Updated Platforms List"]
  A -- "Improve formatting" --> C["Better Readability"]
  B --> D["Accurate Documentation"]
  C --> D
Loading

File Walkthrough

Relevant files
Documentation
types_infrastructure.go
Update PlatformType comment with missing platforms             

config/v1/types_infrastructure.go

  • Updated PlatformSpec.Type field comment to include "IBMCloud" and
    "External" platforms
  • Removed outdated platform references and reorganized the list
  • Reformatted comment text for improved line wrapping and readability
  • Clarified component support behavior for unrecognized platforms
+4/-3     

@openshift-ci-robot
Copy link

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci-robot
Copy link

@2uasimojo: This pull request explicitly references no jira issue.

Details

In response to this:

The comment for the config/v1/Infrastructure.Spec.PlatformSpec.Type was outdated with respect to the consts defined for the PlatformType typedef. Update.

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-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
@coderabbitai
Copy link

coderabbitai bot commented Jan 19, 2026

📝 Walkthrough

Walkthrough

Platform enumeration documentation and schemas were updated to add "IBMCloud" and "External" as valid platform values. Changes touch PlatformSpec/type comments, generated Swagger/OpenAPI documentation, and multiple CRD OpenAPI schemas and payload manifests. No Go type signatures, function signatures, or runtime control flow were modified.

🚥 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 clearly summarizes the main change: updating the outdated PlatformType comment to include IBMCloud and External platforms.
Description check ✅ Passed The description is well-related to the changeset, explaining the outdated comment issue and documenting the updates to PlatformType, addition of missing platforms, and formatting improvements.

✏️ 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.

@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
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
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

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 19, 2026

Hello @2uasimojo! 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.

@openshift-ci openshift-ci bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jan 19, 2026
@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
Enforce enum field validation

Add a +kubebuilder:validation:Enum marker to the PlatformType field to enforce
CRD schema validation for the supported platform types.

config/v1/types_infrastructure.go [310-311]

 // +unionDiscriminator
+// +kubebuilder:validation:Enum=AWS;Azure;BareMetal;GCP;Libvirt;OpenStack;VSphere;oVirt;IBMCloud;KubeVirt;EquinixMetal;PowerVS;AlibabaCloud;Nutanix;External;None
 Type PlatformType `json:"type"`
  • Apply / Chat
Suggestion importance[1-10]: 7

__

Why: The suggestion correctly proposes to add a +kubebuilder:validation:Enum marker, which improves API robustness by enforcing the allowed platform types at the CRD validation level, rather than just documenting them in a comment.

Medium
  • Update

@2uasimojo
Copy link
Member Author

/assign @JoelSpeed

So:

  • I put these in the order of the consts...
  • ...except "None" which seemed to have a special place at the end.
  • Otherwise I didn't try to overthink it. Notably, I left Alibaba, despite it being obsolete.

@2uasimojo
Copy link
Member Author

PR Code Suggestions ✨

Explore these optional code suggestions:

Category **Suggestion                                                                                                                                    ** Impact
Possible issue
Enforce enum field validation
Add a +kubebuilder:validation:Enum marker to the PlatformType field to enforce CRD schema validation for the supported platform types.

config/v1/types_infrastructure.go [310-311]

 // +unionDiscriminator
+// +kubebuilder:validation:Enum=AWS;Azure;BareMetal;GCP;Libvirt;OpenStack;VSphere;oVirt;IBMCloud;KubeVirt;EquinixMetal;PowerVS;AlibabaCloud;Nutanix;External;None
 Type PlatformType `json:"type"`
  • Apply / Chat

Suggestion importance[1-10]: 7
__

Why: The suggestion correctly proposes to add a +kubebuilder:validation:Enum marker, which improves API robustness by enforcing the allowed platform types at the CRD validation level, rather than just documenting them in a comment.

Medium

  • More

IIUC we don't use enums because it can break backward compatibility.

@2uasimojo 2uasimojo force-pushed the infra-platformtype-comment branch from 19c87dc to ef70680 Compare January 19, 2026 20:02
@openshift-ci openshift-ci bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 19, 2026
@2uasimojo
Copy link
Member Author

/test verify

@qodo-code-review
Copy link

qodo-code-review bot commented Jan 19, 2026

PR-Agent: could not fine a component named verify in a supported language in this PR.

@JoelSpeed
Copy link
Contributor

Looks like we need a ./hack/update-payload-crds.sh running here

// "OpenStack", "VSphere", "oVirt", "KubeVirt", "EquinixMetal", "PowerVS",
// "AlibabaCloud", "Nutanix" and "None". Individual components may not support all platforms,
// and must handle unrecognized platforms as None if they do not support that platform.
// "OpenStack", "VSphere", "oVirt", "IBMCloud", "KubeVirt", "EquinixMetal",
Copy link
Contributor

@JoelSpeed JoelSpeed Jan 20, 2026

Choose a reason for hiding this comment

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

While this now reflects the list, we don't actually support Equinix or Alibaba, and I thought oVirt went too. We should probably think about removing those constants from the API at some point

Copy link
Member Author

Choose a reason for hiding this comment

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

...but not in this PR?

Copy link
Member Author

Choose a reason for hiding this comment

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

IIUC the ways this list can be used, we wouldn't want to remove a given value until the last OCP release that supports it is EOL, right?

Copy link
Contributor

Choose a reason for hiding this comment

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

Quite possibly, of which, it would be the oVirt part. I think that is EOL now though , it went in ~4.14 I think

The comment for the config/v1/Infrastructure.Spec.PlatformSpec.Type was
outdated with respect to the consts defined for the PlatformType
typedef. Update.
@2uasimojo 2uasimojo force-pushed the infra-platformtype-comment branch from ef70680 to e87c917 Compare January 20, 2026 15:30
@2uasimojo
Copy link
Member Author

Looks like we need a ./hack/update-payload-crds.sh running 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: 1

Caution

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

⚠️ Outside diff range comments (3)
payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-Default.crd.yaml (1)

2482-2513: Update PlatformStatus.type description to list all supported platform values.

The description in the source file (config/v1/types_infrastructure.go, line 418-425) is missing "IBMCloud", "KubeVirt", and "External" from the allowed values list, while the enum correctly includes them. Update the description to match PlatformSpec.type, which lists all 16 supported platforms consistently.

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

2904-2907: Update PlatformStatus.Type description to include all supported platforms.

The source Go type comment for PlatformStatus.Type in config/v1/types_infrastructure.go (lines 422-423) is missing "IBMCloud", "KubeVirt", and "External" from its description, while PlatformSpec.Type (lines 305-306) has been updated to include them. The enum validation already supports all platforms. Update the PlatformStatus.Type comment to match, then regenerate the CRD by running ./hack/update-payload-crds.sh.

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

2898-2929: Update the status.platformStatus.type description to include all supported platform types.

The description at lines 2904-2905 lists allowed values as "AWS", "Azure", "BareMetal", "GCP", "Libvirt", "OpenStack", "VSphere", "oVirt", "EquinixMetal", "PowerVS", "AlibabaCloud", "Nutanix" and "None", but the enum at lines 2911-2928 also includes IBMCloud, KubeVirt, and External. The source code in config/v1/types_infrastructure.go documents all these platforms. The description should be updated to match the enum; regenerating the CRD manifests from the source types should resolve this.

🤖 Fix all issues with AI agents
In
`@payload-manifests/crds/0000_10_config-operator_01_infrastructures-CustomNoUpgrade.crd.yaml`:
- Around line 631-634: The description for status.platformStatus.type is out of
date—update the text to match the spec type enumeration (including "IBMCloud",
"External", and any other newly added platforms such as "OpenStack", "VSphere",
"oVirt", "KubeVirt", "EquinixMetal", "PowerVS", "AlibabaCloud", "Nutanix", and
"None"); locate the description for status.platformStatus.type (and the OKD
variant) in the CRD and replace the old platform list with the exact updated
list used by spec.type so both descriptions are consistent.
🧹 Nitpick comments (2)
payload-manifests/crds/0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml (1)

2597-2627: Consider updating status.platformStatus.type description for consistency.

The status.platformStatus.type description (lines 2603-2606) lists platforms but is missing "IBMCloud", "KubeVirt", and "External" despite these values being present in its enum. This is outside the scope of the current PR focused on spec.platformSpec.type, but may warrant a follow-up for consistency.

config/v1/zz_generated.swagger_doc_generated.go (1)

1926-1928: Align PlatformStatus.type allowed values with the updated PlatformSpec list.

PlatformSpec.type now documents IBMCloud/External (and KubeVirt), but PlatformStatus.type still lists an older subset. For Swagger doc consistency, consider updating the status description in the source comment and regenerating the file.

♻️ Suggested doc alignment (update source + regenerate)
-    "type":         "type is the underlying infrastructure provider for the cluster. This value controls whether infrastructure automation such as service load balancers, dynamic volume provisioning, machine creation and deletion, and other integrations are enabled. If None, no infrastructure automation is enabled. Allowed values are \"AWS\", \"Azure\", \"BareMetal\", \"GCP\", \"Libvirt\", \"OpenStack\", \"VSphere\", \"oVirt\", \"EquinixMetal\", \"PowerVS\", \"AlibabaCloud\", \"Nutanix\" and \"None\". Individual components may not support all platforms, and must handle unrecognized platforms as None if they do not support that platform.\n\nThis value will be synced with to the `status.platform` and `status.platformStatus.type`. Currently this value cannot be changed once set.",
+    "type":         "type is the underlying infrastructure provider for the cluster. This value controls whether infrastructure automation such as service load balancers, dynamic volume provisioning, machine creation and deletion, and other integrations are enabled. If None, no infrastructure automation is enabled. Allowed values are \"AWS\", \"Azure\", \"BareMetal\", \"GCP\", \"Libvirt\", \"OpenStack\", \"VSphere\", \"oVirt\", \"IBMCloud\", \"KubeVirt\", \"EquinixMetal\", \"PowerVS\", \"AlibabaCloud\", \"Nutanix\", \"External\", and \"None\". Individual components may not support all platforms, and must handle unrecognized platforms as None if they do not support that platform.\n\nThis value will be synced with to the `status.platform` and `status.platformStatus.type`. Currently this value cannot be changed once set.",

Comment on lines +631 to +634
"OpenStack", "VSphere", "oVirt", "IBMCloud", "KubeVirt", "EquinixMetal",
"PowerVS", "AlibabaCloud", "Nutanix", "External", and "None". Individual
components may not support all platforms, and must handle unrecognized
platforms as None if they do not support that platform.
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

Keep status.platformStatus.type description aligned with this updated list.

The spec type description now includes IBMCloud/External, but the later status.platformStatus.type description in this CRD still lists the older platform set. Please update that description (and the OKD variant) so the docs don’t conflict.

🤖 Prompt for AI Agents
In
`@payload-manifests/crds/0000_10_config-operator_01_infrastructures-CustomNoUpgrade.crd.yaml`
around lines 631 - 634, The description for status.platformStatus.type is out of
date—update the text to match the spec type enumeration (including "IBMCloud",
"External", and any other newly added platforms such as "OpenStack", "VSphere",
"oVirt", "KubeVirt", "EquinixMetal", "PowerVS", "AlibabaCloud", "Nutanix", and
"None"); locate the description for status.platformStatus.type (and the OKD
variant) in the CRD and replace the old platform list with the exact updated
list used by spec.type so both descriptions are consistent.

@JoelSpeed
Copy link
Contributor

/lgtm
/verified bypass

No need for verification, docs only update

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jan 20, 2026
@openshift-ci-robot
Copy link

@JoelSpeed: The verified label has been added.

Details

In response to this:

/lgtm
/verified bypass

No need for verification, docs only update

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 lgtm Indicates that a PR is ready to be merged. label Jan 20, 2026
@openshift-ci-robot
Copy link

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aws-ovn
/test e2e-aws-ovn-hypershift
/test e2e-aws-ovn-hypershift-conformance
/test e2e-aws-ovn-techpreview
/test e2e-aws-serial-1of2
/test e2e-aws-serial-2of2
/test e2e-aws-serial-techpreview-1of2
/test e2e-aws-serial-techpreview-2of2
/test e2e-azure
/test e2e-gcp
/test e2e-upgrade
/test e2e-upgrade-out-of-change

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 20, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JoelSpeed

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

The pull request process is described 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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 20, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 20, 2026

@2uasimojo: all tests passed!

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.

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. Review effort 1/5 size/L Denotes a PR that changes 100-499 lines, ignoring generated files. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants