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

feat: Support Karpenter NodeClaim API in workspace #366

Merged
merged 5 commits into from
May 7, 2024

Conversation

helayoty
Copy link
Collaborator

@helayoty helayoty commented Apr 30, 2024

Reason for Change:

  • Workspace controller can support nodeClaims API.

Workspace controller won't migrate the current machine nodes. The behavior for CRUD operation:

Create

  • Both nodeClaims or Machine APIs will be used to create a node based on featureGate,

Ownership

  • Both machines and nodeClaims objects which created by the same workspace will be associated to it until got deleted.

Delete

  • Deleting the workspace will delete both (if any) old machines objects and nodeClaims.

  • Add unit tests for supporting node claims, and managing migrated clusters (both machines and nodeClaims).

  • Replace the deprecated func FromInt with FromInt32.

  • Update error message lint warning, start with lowercase characters.

Requirements

  • added unit tests and e2e tests (if applicable).

Issue Fixed:
#339

Notes for Reviewers:

@helayoty helayoty changed the title feat:Support Karpenter NodeClaim API in workspace feat: Support Karpenter NodeClaim API in workspace Apr 30, 2024
@helayoty helayoty force-pushed the helayoty/support-nc-workspace branch from c1b343f to 1ccf48d Compare April 30, 2024 02:12
@codecov-commenter
Copy link

codecov-commenter commented Apr 30, 2024

Codecov Report

Attention: Patch coverage is 49.10714% with 57 lines in your changes are missing coverage. Please review.

Project coverage is 60.62%. Comparing base (fde6369) to head (ae9c77e).
Report is 22 commits behind head on main.

Files Patch % Lines
pkg/controllers/workspace_controller.go 41.23% 52 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #366      +/-   ##
==========================================
- Coverage   62.89%   60.62%   -2.27%     
==========================================
  Files          14       29      +15     
  Lines        1307     2301     +994     
==========================================
+ Hits          822     1395     +573     
- Misses        447      835     +388     
- Partials       38       71      +33     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bangqipropel
Copy link
Collaborator

what happened between k8s 1.27 and 1.29?

Signed-off-by: Heba Elayoty <hebaelayoty@gmail.com>
Signed-off-by: Heba Elayoty <hebaelayoty@gmail.com>
@helayoty
Copy link
Collaborator Author

helayoty commented May 4, 2024

what happened between k8s 1.27 and 1.29?

@bangqipropel any k8s version before 1.29 will use machine API. Otherwise, the nodeClaim API will be used.

@bangqipropel
Copy link
Collaborator

what happened between k8s 1.27 and 1.29?

@bangqipropel any k8s version before 1.29 will use machine API. Otherwise, the nodeClaim API will be used.

I see, before I saw 1.27 also, that was why I asked

pkg/controllers/workspace_controller.go Outdated Show resolved Hide resolved
pkg/controllers/workspace_controller.go Outdated Show resolved Hide resolved
pkg/controllers/workspace_controller.go Outdated Show resolved Hide resolved
pkg/controllers/workspace_controller.go Outdated Show resolved Hide resolved
pkg/controllers/workspace_controller.go Outdated Show resolved Hide resolved
pkg/controllers/workspace_controller.go Outdated Show resolved Hide resolved
pkg/controllers/workspace_controller.go Outdated Show resolved Hide resolved
pkg/controllers/workspace_gc_finalizer.go Outdated Show resolved Hide resolved
Signed-off-by: Heba Elayoty <hebaelayoty@gmail.com>
Signed-off-by: Heba Elayoty <hebaelayoty@gmail.com>
Signed-off-by: Heba Elayoty <hebaelayoty@gmail.com>
@helayoty helayoty enabled auto-merge (squash) May 7, 2024 05:47
@helayoty helayoty merged commit cb2d964 into main May 7, 2024
7 checks passed
@helayoty helayoty deleted the helayoty/support-nc-workspace branch May 7, 2024 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants