Skip to content

gce: Force delete IG with a missing Instance#17897

Open
Camila-B wants to merge 10 commits intokubernetes:masterfrom
Camila-B:delete-ig-no-instance
Open

gce: Force delete IG with a missing Instance#17897
Camila-B wants to merge 10 commits intokubernetes:masterfrom
Camila-B:delete-ig-no-instance

Conversation

@Camila-B
Copy link
Contributor

  • Added a --force flag to kops delete instancegroup
  • Updated the fi.Cloud interface's GetCloudGroups method to accept a GetCloudGroupsOptions struct
  • Added logic to handle missing instances gracefully when fetching clouds and the WarnMissingInstance option is enabled
  • Implemented an instanceClient in cloudmock to track GCE instances.
  • Added new integration tests in cmd/kops/delete_instancegroup_test.go and pkg/instancegroups/delete_test.go to verify the new deletion logic and the --force flag
  • Depends on gce: Require zones on instancegroup creation #17849
  • Ref: Can't delete an InstanceGroup with a missing instance (GCP) #17626

@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. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jan 29, 2026
@k8s-ci-robot
Copy link
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
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 rifelpet 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

@k8s-ci-robot k8s-ci-robot added area/api area/provider/aws Issues or PRs related to aws provider area/provider/azure Issues or PRs related to azure provider area/provider/digitalocean Issues or PRs related to digitalocean provider area/provider/gcp Issues or PRs related to gcp provider area/provider/hetzner Issues or PRs related to Hetzner provider area/provider/openstack Issues or PRs related to openstack provider area/provider/scaleway Issues or PRs related to Scaleway provider area/rolling-update needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jan 29, 2026
@Camila-B Camila-B force-pushed the delete-ig-no-instance branch from bcf9b6d to c3af367 Compare February 2, 2026 21:17
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Feb 2, 2026
Copy link
Contributor

@rramkumar1 rramkumar1 left a comment

Choose a reason for hiding this comment

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

Thanks! This looks good..just a few small things.

name := LastComponent(id)
instance, err := c.Compute().Instances().Get(project, zoneName, name)
if err != nil {
if IsNotFound(err) && options.WarnMissingInstance {
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't quite follow what we need WarnMissingInstance for. Could you elaborate?

Copy link
Contributor

Choose a reason for hiding this comment

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

Nvmd, I get it now.

@Camila-B Camila-B changed the title [WIP] gce: Force delete IG with a missing Instance gce: Force delete IG with a missing Instance Feb 3, 2026
@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 Feb 3, 2026
@rramkumar1
Copy link
Contributor

@hakman Do you mind adding ok-to-test?

@hakman
Copy link
Member

hakman commented Feb 12, 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 Feb 12, 2026
@Camila-B
Copy link
Contributor Author

/retest

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

Labels

area/api area/documentation area/provider/aws Issues or PRs related to aws provider area/provider/azure Issues or PRs related to azure provider area/provider/digitalocean Issues or PRs related to digitalocean provider area/provider/gcp Issues or PRs related to gcp provider area/provider/hetzner Issues or PRs related to Hetzner provider area/provider/openstack Issues or PRs related to openstack provider area/provider/scaleway Issues or PRs related to Scaleway provider area/rolling-update cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants