Skip to content

gce: Require zones on instancegroup creation#17849

Merged
k8s-ci-robot merged 4 commits intokubernetes:masterfrom
Camila-B:fix-instancegroup
Jan 31, 2026
Merged

gce: Require zones on instancegroup creation#17849
k8s-ci-robot merged 4 commits intokubernetes:masterfrom
Camila-B:fix-instancegroup

Conversation

@Camila-B
Copy link
Copy Markdown
Contributor

@Camila-B Camila-B commented Jan 9, 2026

This PR adds a zone flag to kops create instancegroup and makes it mandatory for GCE clusters. It also validates in the splitToZones func that the number of zones is greater than 0.

Ref: #17563

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla bot commented Jan 9, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Welcome @Camila-B!

It looks like this is your first PR to kubernetes/kops 🎉. 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/kops 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 size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 9, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @Camila-B. Thanks for your PR.

I'm waiting for a kubernetes 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. Regular contributors should join the org to skip this step.

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 requested a review from hakman January 9, 2026 00:14
@k8s-ci-robot k8s-ci-robot requested a review from olemarkus January 9, 2026 00:14
@k8s-ci-robot k8s-ci-robot added area/provider/aws Issues or PRs related to aws provider area/provider/gcp Issues or PRs related to gcp provider area/rolling-update cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jan 9, 2026
Comment thread cmd/kops/create_instancegroup_test.go Outdated
allErrs = append(allErrs, IsValidValue(fieldSpec.Child("gcpProvisioningModel"), ig.Spec.GCPProvisioningModel, []string{"STANDARD", "SPOT"})...)
}

if len(ig.Spec.Zones) == 0 {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@hakman just want to confirm this would not be a breaking change?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If it's "broken already", i.e. if you created an IG (on GCE) with no zones then bad things would happen, then it's not a breaking change. I think that is true, and I can check unless someone knows for sure?

Copy link
Copy Markdown
Contributor

@rramkumar1 rramkumar1 Jan 23, 2026

Choose a reason for hiding this comment

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

Confirmed that IG requires zones in the GCE API. I think in this case, the error happens before any GCE API call.

In any case, the IG creation would be broken regardless so agreed that this should not be a breaking change.

@rramkumar1
Copy link
Copy Markdown
Contributor

/assign @hakman

@hakman
Copy link
Copy Markdown
Member

hakman commented Jan 13, 2026

/ok-to-test

@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 needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 13, 2026
@Camila-B
Copy link
Copy Markdown
Contributor Author

/test pull-kops-test

Comment thread cmd/kops/create_instancegroup_test.go Outdated
@rramkumar1
Copy link
Copy Markdown
Contributor

@hakman Would you be able to take a look at this? All tests are passing now.

@Camila-B Camila-B requested a review from justinsb January 27, 2026 18:03
@Camila-B
Copy link
Copy Markdown
Contributor Author

/retest


i++
if i > len(targetSizes) {
if i >= len(targetSizes) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice catch!

@justinsb
Copy link
Copy Markdown
Member

Verified that this was required anyway, so not a breaking change, and that this code works with manual testing

Thanks @Camila-B (and @rramkumar1 )

/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 31, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: justinsb

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 Jan 31, 2026
@k8s-ci-robot k8s-ci-robot merged commit fd9e4d8 into kubernetes:master Jan 31, 2026
27 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.36 milestone Jan 31, 2026
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 area/documentation area/provider/aws Issues or PRs related to aws provider area/provider/gcp Issues or PRs related to gcp provider area/rolling-update 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/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants