Skip to content

Conversation

@ash-thakur-rh
Copy link
Contributor

@ash-thakur-rh ash-thakur-rh commented Dec 12, 2025

Description

Fixes #7371

This PR upgrades OpenShift models to the latest version, introducing new API resources including ClusterImagePolicy, ImagePolicy, and extensive policy management classes (FulcioCAWithRekor, PolicyRootOfTrust, PKI, etc.). It also adds cluster-api models including metal3 v1alpha1 resources and Azure cluster API v1beta1 support to miscellaneous module.

Key Changes

OpenAPI Generator (Go):

  • Added new package patterns for cluster-api-provider-azure and PowerVC(new types in installer) installer types.
  • cluster-api-provider-azure is now directly referenced in OpenShift installer making it a direct dependency of openshift/installer project, which was not the case with previous versions. openshift/installer now uses types from cluster-api-provider-azure as well, making cluster-api-provider-azure types to be scanned and generated in openapi schema generator.
  • Updated OpenShift dependency versions (api, cloud-credential-operator, cluster-network-operator, cluster-node-tuning-operator, hive, installer)
  • Upgraded cluster-api from v1.10.4 to v1.11.2 (pinned to v1.10.9 for compatibility)

Java Model Fixes:

  • Fixed module build order by moving openshift-model-miscellaneous before openshift-model-installer
  • Added missing PowerVC package mapping in installer
  • Corrected OSGi exports for cluster-api types
  • Resolved compilation errors and fixed imports/formatting

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change
  • Chore (non-breaking change which doesn't affect codebase;
    test, version modification, documentation, etc.)

Checklist

  • Code contributed by me aligns with current project license: Apache 2.0
  • I Added CHANGELOG entry regarding this change
  • I have implemented unit tests to cover my changes
  • I have added/updated the javadocs and other documentation accordingly
  • No new bugs, code smells, etc. in SonarCloud report
  • I tested my code in Kubernetes
  • I tested my code in OpenShift

@ash-thakur-rh ash-thakur-rh changed the title feature(openshift): upgrade OpenShift Models feat(openapi): upgrade OpenShift Models Dec 12, 2025
- Move openshift-model-miscellaneous before openshift-model-installer
  in the reactor build order, as installer now depends on miscellaneous
  for cluster-api types (DataDisk, etc.)
- Remove incorrect OSGi export for io.fabric8.kubernetes.api.model.clusterapi**
  which is not actually generated; cluster-api types are now in
  io.fabric8.openshift.api.model.miscellaneous.clusterapi.v1beta1
  and io.fabric8.openshift.api.model.miscellaneous.metal3.v1beta1
PowerVC installer types are included in OpenAPI schema generation
(packages.go:50) but were missing from the package mappings in
openshift-model-installer pom.xml, causing OSGi bundle resolution
failures for missing package com.github.openshift.installer.pkg.types.powervc
@ash-thakur-rh ash-thakur-rh marked this pull request as ready for review December 15, 2025 11:33
Copy link
Member

@manusa manusa left a comment

Choose a reason for hiding this comment

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

Thanks for looking into this.
Could you please extract the changes in openapi-gen-processors.go and openapi-gen.go to a separate PR so that it's clear that these changes don't affect the currently generated code.

github.com/operator-framework/api v0.33.0
github.com/operator-framework/operator-lifecycle-manager v0.33.0
github.com/ovn-org/ovn-kubernetes/go-controller v0.0.0-20241030140127-a68ef49d9441
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.84.1
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will take of this in a separate PR, as there are too many changes in this PR.

@ash-thakur-rh
Copy link
Contributor Author

ash-thakur-rh commented Dec 16, 2025

CI checks will fail until is #7380 is done.

@manusa
Copy link
Member

manusa commented Dec 17, 2025

There are reported changed files on the model of the structs affected by the inline/embedded structs.
Can you check. I understand that the logic that was applied initially is not matching what we implemented in scope of #7350

@ash-thakur-rh
Copy link
Contributor Author

ash-thakur-rh commented Dec 17, 2025

There are reported changed files on the model of the structs affected by the inline/embedded structs. Can you check. I understand that the logic that was applied initially is not matching what we implemented in scope of #7350

Hi @manusa , I am checking the same. Change in AzureManagedControlPlaneClassSpec, AzureManagedControlPlaneSpec and AzureManagedControlPlaneTemplateResourceSpec is expected but not in chaos-mesh. Also, I think introduction of cluster-api-provider-azure has introduced complexity to models generation, as it has types with same names which were already part of metal3 etc. I am figuring out a way to separate Azure related models from others.

@ash-thakur-rh
Copy link
Contributor Author

Issue for change in chaos openapi json might be timing issue. The issue might be that when processInlineDuplicateFields checks the embedded type's members, the processSwaggerIgnore hasn't processed the embedded type yet. That is why we are getting no changes in some runs.
When we access m.Type.Members, the swaggerignore might not have been converted to ,omitted yet.

@ash-thakur-rh
Copy link
Contributor Author

I was able to identify the issue and fix it for now. Lets discuss approaches for handling timing issue tomorrow.

@manusa manusa self-requested a review December 18, 2025 05:28
@manusa manusa added this to the 7.5.0 milestone Dec 18, 2025 — with automated-tasks
Copy link
Member

@manusa manusa left a comment

Choose a reason for hiding this comment

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

Ignore previous comments, LGTM, thx!

@manusa manusa merged commit 06a9364 into fabric8io:main Dec 18, 2025
18 of 20 checks passed
@ash-thakur-rh ash-thakur-rh deleted the openshift-model-upgrade branch December 18, 2025 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenShift 4.20 compatibility

3 participants