Skip to content

⚠️ Migrate API to use *Seconds instead of metav1.Duration fields #12327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sbueringer
Copy link
Member

@sbueringer sbueringer commented Jun 5, 2025

Signed-off-by: Stefan Büringer buringerst@vmware.com

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Part of #10852

WIP => not finished yet + contains multiple other PRs

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 5, 2025
@k8s-ci-robot
Copy link
Contributor

[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 joelspeed for approval. For more information see the Code Review Process.

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

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

@k8s-ci-robot k8s-ci-robot added the do-not-merge/needs-area PR is missing an area label label Jun 5, 2025
@k8s-ci-robot k8s-ci-robot requested review from elmiko and g-gaston June 5, 2025 19:15
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jun 5, 2025
@sbueringer sbueringer changed the title [WIP] ⚠️ Remove version handling of unsupported Kubernetes versions from KCP [WIP] ⚠️ Migrate API to use *Seconds instead of metav1.Duration fields Jun 5, 2025
@sbueringer sbueringer force-pushed the pr-nodurations branch 3 times, most recently from be504a8 to 9ef4092 Compare June 6, 2025 12:45
@sbueringer
Copy link
Member Author

/test pull-cluster-api-e2e-conformance-ci-latest-main
/test pull-cluster-api-e2e-conformance-main
/test pull-cluster-api-e2e-latestk8s-main
/test pull-cluster-api-e2e-main
/test pull-cluster-api-e2e-mink8s-main
/test pull-cluster-api-e2e-upgrade-1-33-1-34-main

@sbueringer sbueringer added the area/api Issues or PRs related to the APIs label Jun 6, 2025
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/needs-area PR is missing an area label label Jun 6, 2025
@sbueringer
Copy link
Member Author

/test pull-cluster-api-e2e-conformance-ci-latest-main
/test pull-cluster-api-e2e-conformance-main
/test pull-cluster-api-e2e-latestk8s-main
/test pull-cluster-api-e2e-main
/test pull-cluster-api-e2e-mink8s-main
/test pull-cluster-api-e2e-upgrade-1-33-1-34-main

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 6, 2025
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 6, 2025
@sbueringer
Copy link
Member Author

/hold

Contains #12319 (but this PR is also not ready yet)

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 6, 2025
@sbueringer
Copy link
Member Author

/test pull-cluster-api-e2e-conformance-ci-latest-main
/test pull-cluster-api-e2e-conformance-main
/test pull-cluster-api-e2e-latestk8s-main
/test pull-cluster-api-e2e-main
/test pull-cluster-api-e2e-mink8s-main
/test pull-cluster-api-e2e-upgrade-1-33-1-34-main

@sbueringer sbueringer force-pushed the pr-nodurations branch 2 times, most recently from 3a4bfaa to 1dbd38b Compare June 6, 2025 16:02
@sbueringer
Copy link
Member Author

/test pull-cluster-api-e2e-conformance-ci-latest-main
/test pull-cluster-api-e2e-conformance-main
/test pull-cluster-api-e2e-latestk8s-main
/test pull-cluster-api-e2e-main
/test pull-cluster-api-e2e-mink8s-main
/test pull-cluster-api-e2e-upgrade-1-33-1-34-main

@sbueringer sbueringer changed the title [WIP] ⚠️ Migrate API to use *Seconds instead of metav1.Duration fields ⚠️ Migrate API to use *Seconds instead of metav1.Duration fields Jun 6, 2025
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 6, 2025
@sbueringer
Copy link
Member Author

/test pull-cluster-api-e2e-conformance-ci-latest-main
/test pull-cluster-api-e2e-conformance-main
/test pull-cluster-api-e2e-latestk8s-main
/test pull-cluster-api-e2e-main
/test pull-cluster-api-e2e-mink8s-main
/test pull-cluster-api-e2e-upgrade-1-33-1-34-main

@fabriziopandini
Copy link
Member

/test pull-cluster-api-e2e-main

Copy link
Member

@fabriziopandini fabriziopandini left a comment

Choose a reason for hiding this comment

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

SGTM
I will take another look after rebase

@@ -104,6 +104,13 @@ proposal because most of the changes described below are a consequence of the wo
- The `unhealthyConditions` field has been renamed to `unhealthyNodeConditions` in following struct:
- `spec.topology.controlPlane.machineHealthCheck`
- `spec.topology.workers.machineDeployments[].machineHealthCheck`
- The following fields in `spec.topology.{controlPlane,workers.machineDeployments[],workers.machinePools[]` have been renamed: (their type was also changed from Duration to int)
Copy link
Member

Choose a reason for hiding this comment

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

nit

Suggested change
- The following fields in `spec.topology.{controlPlane,workers.machineDeployments[],workers.machinePools[]` have been renamed: (their type was also changed from Duration to int)
- All the fields of type Duration in `spec.topology.{controlPlane,workers.machineDeployments[],workers.machinePools[]` have been renamed by adding the `Seconds` suffix and their type was changed to int32, thus aligning to K8s guidelines.

Same in few other places

must be propagated to machines without triggering rollouts.
See [In place propagation of changes affecting Kubernetes objects only] as well as [Metadata propagation] for more details.

<aside class="note warning">
Copy link
Member

Choose a reason for hiding this comment

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

Let's document this in the migration guide too, under contract changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api Issues or PRs related to the APIs cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants