Skip to content

Conversation

@vr4manta
Copy link
Contributor

@vr4manta vr4manta commented Dec 10, 2025

SPLAT-2584

Changes

  • Modified IPAM creation logic to set apiVersion to v1beta2 when cluster capi operator is TP.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Dec 10, 2025
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Dec 10, 2025

@vr4manta: This pull request references SPLAT-2584 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 task to target the "4.21.0" version, but no target version was set.

Details

In response to this:

SPLAT-2584

Changes

  • Modified IPAM creation logic to set apiVersion to v1beta2 when cluster capi operator is TP.

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 Dec 10, 2025

[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 rvanderp3 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

@vr4manta vr4manta changed the title SPLAT-2584: Added ability to install different IPAM version when in TP. SPLAT-2584: Added ability to use / configure different IPAM version when in TP for static IP Dec 10, 2025
@jcpowermac
Copy link
Contributor

/payload-job periodic-ci-openshift-release-master-nightly-4.21-e2e-vsphere-static-ovn-techpreview

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 11, 2025

@jcpowermac: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-master-nightly-4.21-e2e-vsphere-static-ovn-techpreview

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/c0f1ab20-d695-11f0-9231-8a9bbd9a3dde-0

@vr4manta
Copy link
Contributor Author

/payload-job periodic-ci-openshift-release-master-nightly-4.21-e2e-vsphere-static-ovn-techpreview

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 11, 2025

@vr4manta: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-master-nightly-4.21-e2e-vsphere-static-ovn-techpreview

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/79244030-d697-11f0-9ff2-d00654ba5c8f-0

@vr4manta
Copy link
Contributor Author

/retest

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 11, 2025

@vr4manta: The following test 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/okd-scos-e2e-vsphere-ovn 71858c3 link false /test okd-scos-e2e-vsphere-ovn

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.

@damdo
Copy link
Member

damdo commented Dec 15, 2025

/payload-job-with-prs periodic-ci-openshift-release-master-nightly-4.21-e2e-vsphere-static-ovn-techpreview openshift/cluster-api#256

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 15, 2025

@damdo: it appears that you have attempted to use some version of the payload command, but your comment was incorrectly formatted and cannot be acted upon. See the docs for usage info.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 15, 2025

@damdo: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-master-nightly-4.21-e2e-vsphere-static-ovn-techpreview

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/25d712e0-d9b7-11f0-915d-938ad3de1c37-0

@damdo
Copy link
Member

damdo commented Dec 15, 2025

/payload-job-with-prs periodic-ci-openshift-release-master-nightly-4.21-e2e-vsphere-static-ovn-techpreview openshift/cluster-api#256

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 15, 2025

@damdo: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-master-nightly-4.21-e2e-vsphere-static-ovn-techpreview

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/290b3bd0-d9b7-11f0-84df-7de543f5755b-0

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
logrus.Debug("updating capi ipam apiVersion from v1beta1 to v1beta2 when feature gate ClusterAPIMachineManagement is enabled")

We tend to avoid fmt.Println where possible. Let's use standard logger instead?

Copy link
Member

Choose a reason for hiding this comment

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

I am surprised golint is cool with fmt.Println 🤣 even though it was very strict in the past.

Comment on lines 154 to 159
Copy link
Member

@tthvo tthvo Dec 16, 2025

Choose a reason for hiding this comment

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

Even though we set the apiVersion to ipam.cluster.x-k8s.io/v1beta2, the resulting struct is actually still ipam.cluster.x-k8s.io/v1beta1 👇

That means we are creating v1beta1 CR manifests (i.e. using v1beta1 spec/status fields), but with v1beta2 as apiVersion.

I guess v1beta2 should be backwards compatible and this is just a temporary fix, so we are fine. Ideally, we should have a conversion func to properly convert from v1beta1 struct to v1beta2 counterpart (e.g. copy the logic from webhook or the webhook should handle it :D).

Copy link
Member

Choose a reason for hiding this comment

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

AFAIK, there are differences in struct presentations between the two versions (i.e. different field struct name, but same json/yaml field name). However, manifest contents are exactly the same. So, we are safe here 👍

@damdo
Copy link
Member

damdo commented Dec 16, 2025

/retitle SPLAT-2584,OCPBUGS-69434: Added ability to use / configure different IPAM version when in TP for static IP

@openshift-ci openshift-ci bot changed the title SPLAT-2584: Added ability to use / configure different IPAM version when in TP for static IP SPLAT-2584,OCPBUGS-69434: Added ability to use / configure different IPAM version when in TP for static IP Dec 16, 2025
@openshift-ci-robot openshift-ci-robot added the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Dec 16, 2025
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Dec 16, 2025

@vr4manta: This pull request references SPLAT-2584 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 task to target the "4.22.0" version, but no target version was set.

This pull request references Jira Issue OCPBUGS-69434, which is invalid:

  • expected the bug to target either version "4.22." or "openshift-4.22.", but it targets "4.21.0" instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

SPLAT-2584

Changes

  • Modified IPAM creation logic to set apiVersion to v1beta2 when cluster capi operator is TP.

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.

if config.EnabledFeatureGates().Enabled(features.FeatureGateClusterAPIMachineManagement) {
fmt.Println("Processing api update")
for index := range claim {
claim[index].APIVersion = "ipam.cluster.x-k8s.io/v1beta2"
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use the v1beta2 packages directly? They can be vendored as the installer is up to date with capi 1.11

Copy link
Contributor

Choose a reason for hiding this comment

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

Or possibly continue to create the v1beta1, but call the conversion directly via scheme (i.e. no webhook involved) if we need v1beta2.

@damdo
Copy link
Member

damdo commented Dec 16, 2025

We'll need to backport to release-4.21 too cc. @patrickdillon @vr4manta @jcpowermac @rvanderp3

/cherry-pick release-4.21

@openshift-cherrypick-robot

@damdo: once the present PR merges, I will cherry-pick it on top of release-4.21 in a new PR and assign it to you.

Details

In response to this:

We'll need to backport to release-4.21 too cc. @patrickdillon @vr4manta @jcpowermac @rvanderp3

/cherry-pick release-4.21

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.

@tthvo
Copy link
Member

tthvo commented Dec 16, 2025

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Dec 16, 2025
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Dec 16, 2025

@tthvo: This pull request references SPLAT-2584 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 task to target the "4.22.0" version, but no target version was set.

This pull request references Jira Issue OCPBUGS-69434, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.22.0) matches configured target version for branch (4.22.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @sunzhaohua2

Details

In response to this:

/jira refresh

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 requested a review from sunzhaohua2 December 16, 2025 22:48
@tthvo
Copy link
Member

tthvo commented Dec 16, 2025

/test e2e-vsphere-static-ovn

@damdo
Copy link
Member

damdo commented Dec 17, 2025

Superseded by #10169

@damdo
Copy link
Member

damdo commented Dec 17, 2025

/close

In favour of #10169

@openshift-ci openshift-ci bot closed this Dec 17, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 17, 2025

@damdo: Closed this PR.

Details

In response to this:

/close

In favour of #10169

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.

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

Labels

jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants