Skip to content

🌱 api: relax validation for Machine .status.addresses to maximum of 256 instead of 128 items#13395

Merged
k8s-ci-robot merged 1 commit intokubernetes-sigs:mainfrom
MadJlzz:pr-relax-machines-status-addresses-even-further
Mar 3, 2026
Merged

🌱 api: relax validation for Machine .status.addresses to maximum of 256 instead of 128 items#13395
k8s-ci-robot merged 1 commit intokubernetes-sigs:mainfrom
MadJlzz:pr-relax-machines-status-addresses-even-further

Conversation

@MadJlzz
Copy link
Copy Markdown
Contributor

@MadJlzz MadJlzz commented Mar 2, 2026


What this PR does / why we need it:

This PR relaxes even more the validation which was added in v1.11 to allow more entries in the Machine's .status.addresses slice.

  • Before: maximum of 128 items
  • After: maximum of 256 items

I've encountered this validation error while trying to upgrade a cluster from 1.32 to 1.34. I did upgrade capi providers which introduced this initial validation in v1.11

I am using Azure's CNI as per my network provider with a networkInterfaces.privateIPConfigs of 180 and a max-pods of 180 in the kubeletExtraArgs opts.

In fact, the following error:

E0302 13:39:37.204234       1 controller.go:353] "Reconciler error" err="failed to patch Machine k991azc/k991azc-control-plane-btxqm: Machine.cluster.x-k8s.io \"k991azc-control-plane-btxqm\" is invalid: status.addresses: Too many: 181: must have at most 128 items" controller="machine" controllerGroup="cluster.x-k8s.io" controllerKind="Machine" Machine="k991azc/k991azc-control-plane-btxqm" namespace="k991azc" name="k991azc-control-plane-btxqm" reconcileID="cdaadd25-7728-44f1-9fa3-e09854d41ff6"

was blocking any kind of other patches ~ in my case, the nodeRef value allowing capi to understand a node has successfully rolled out. (with a side effect of never beeing able fully upgrade a cluster)

I am still not sure why they're putting all pods IPs inside the machine's status.addresses though...

This PR is a follow up of #13060

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

/area api

@k8s-ci-robot k8s-ci-robot added the area/api Issues or PRs related to the APIs label Mar 2, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Welcome @MadJlzz!

It looks like this is your first PR to kubernetes-sigs/cluster-api 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/cluster-api has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 2, 2026
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 2, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @MadJlzz. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 2, 2026
@sbueringer
Copy link
Copy Markdown
Member

/hold

Let's try to get an answer why all Pod IPs are added as Node IPs, that sounds just wrong to me

@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 Mar 2, 2026
@sbueringer
Copy link
Copy Markdown
Member

Okay let's go ahead with this. But to be clear. I think it should be investigated if this pattern of setting Pod IPs as Machine IPs is really correct.

In general I'm -1 on keep increasing the number of supported Machine IPs if someone wants to run more Pods on Nodes and CAPZ keeps adding Pod IPs as Machine IPs (except if we have a clear story why this makes sense and is semantically correct)

/ok-to-test
/lgtm
/approve
/hold cancel

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 3, 2026
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 3, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: ccf0aa3312b262f1e85fd78bbfc5f6034ffa0379

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sbueringer

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 3, 2026
@sbueringer
Copy link
Copy Markdown
Member

/cherry-pick release-1.12

@sbueringer
Copy link
Copy Markdown
Member

/cherry-pick release-1.11

@k8s-infra-cherrypick-robot
Copy link
Copy Markdown

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

Details

In response to this:

/cherry-pick release-1.12

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.

@k8s-infra-cherrypick-robot
Copy link
Copy Markdown

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

Details

In response to this:

/cherry-pick release-1.11

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.

@k8s-ci-robot k8s-ci-robot merged commit 5232739 into kubernetes-sigs:main Mar 3, 2026
23 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.13 milestone Mar 3, 2026
@k8s-infra-cherrypick-robot
Copy link
Copy Markdown

@sbueringer: new pull request created: #13399

Details

In response to this:

/cherry-pick release-1.12

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.

@k8s-infra-cherrypick-robot
Copy link
Copy Markdown

@sbueringer: new pull request created: #13400

Details

In response to this:

/cherry-pick release-1.11

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

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/api Issues or PRs related to the APIs cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants