Skip to content
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

PODAUTO-318: Implement HCP karpenter deletion #5540

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

maxcao13
Copy link
Contributor

@maxcao13 maxcao13 commented Feb 3, 2025

What this PR does / why we need it:
This commit implements supporting cascading deletion of karpenter provisioned nodes upon deletion of a hosted control plane. Also modifies the current Karpenter e2e test to test deletion of an HCP is not blocked by karpenter nodes, and adds a unit test.

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes https://issues.redhat.com/browse/PODAUTO-318

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

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

openshift-ci-robot commented Feb 3, 2025

@maxcao13: This pull request references PODAUTO-318 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 story to target the "4.19.0" version, but no target version was set.

In response to this:

What this PR does / why we need it:
This commit implements supporting cascading deletion of karpenter provisioned nodes upon deletion of a hosted control plane. Also modifies the current Karpenter e2e test to test deletion of an HCP is not blocked by karpenter nodes, and adds a unit test.

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes https://issues.redhat.com/browse/PODAUTO-318

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

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 review from csrwng and enxebre February 3, 2025 17:29
@openshift-ci openshift-ci bot added area/testing Indicates the PR includes changes for e2e testing and removed do-not-merge/needs-area labels Feb 3, 2025
@maxcao13
Copy link
Contributor Author

maxcao13 commented Feb 3, 2025

/cc joelsmith elmiko mtulio
If you guys don't mind taking a look as well ^^

@muraee
Copy link
Contributor

muraee commented Feb 4, 2025

should we get this #5522 merged first?

Copy link
Contributor

@elmiko elmiko left a comment

Choose a reason for hiding this comment

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

this is looking nice, thanks @maxcao13 !

i have a question, but it's not a blocker.

@maxcao13
Copy link
Contributor Author

maxcao13 commented Feb 4, 2025

should we get this #5522 merged first?

Probably makes sense for this to wait for that to be merged (whether we import the upstream or mirrored deps) since it's easier for me to resolve the TODOs this way.

@maxcao13 maxcao13 force-pushed the karpenter-deletion branch 2 times, most recently from 3d6d17d to 883c4e4 Compare February 5, 2025 02:33
@enxebre
Copy link
Member

enxebre commented Feb 6, 2025

ok let's ship #5522 then rebase and proceed here

@maxcao13 maxcao13 force-pushed the karpenter-deletion branch 2 times, most recently from 3931371 to af5f15c Compare February 7, 2025 04:47
@enxebre
Copy link
Member

enxebre commented Feb 7, 2025

@muraee
Copy link
Contributor

muraee commented Feb 7, 2025

you can register it in main.go just like the NodeClaim:
https://github.com/openshift/hypershift/blob/main/karpenter-operator/main.go#L82-L85

@maxcao13
Copy link
Contributor Author

maxcao13 commented Feb 7, 2025

/retest

@enxebre
Copy link
Member

enxebre commented Feb 10, 2025

/approve
ptal @muraee

Copy link
Contributor

openshift-ci bot commented Feb 10, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: enxebre, maxcao13

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

The pull request process is described 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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 10, 2025
This commit implements supporting foreground cascading deletion of karpenter provisioned nodes upon deletion of a hosted control plane. The karpenter operator waits until all nodepools and nodeclaims are deleted in the guest cluster before removing its karpenter finalizer.
Also modifies the current Karpenter e2e test to test deletion of an HCP is not blocked by karpenter nodes, and adds a unit test.

Signed-off-by: Max Cao <[email protected]>
@maxcao13
Copy link
Contributor Author

/retest

@muraee
Copy link
Contributor

muraee commented Feb 11, 2025

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 11, 2025
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 076e970 and 2 for PR HEAD 2625593 in total

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 2a3ed73 and 1 for PR HEAD 2625593 in total

Copy link
Contributor

@elmiko elmiko left a comment

Choose a reason for hiding this comment

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

thanks @maxcao13 , lgtm

Copy link
Contributor

openshift-ci bot commented Feb 11, 2025

@maxcao13: all tests passed!

Full PR test history. Your PR dashboard.

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.

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/testing Indicates the PR includes changes for e2e testing jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants