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: add WorkspaceReclaimPolicy to Stack spec #804

Merged
merged 5 commits into from
Feb 6, 2025

Conversation

rquitales
Copy link
Member

@rquitales rquitales commented Feb 5, 2025

Proposed Changes

This PR introduces the WorkspaceReclaimPolicy option in the Stack spec. By default, it is set to Retain, preserving the current behavior where a Workspace (along with its associated StatefulSet and pod) is not deleted after a successful sync. When set to Delete, the Workspace pod is removed after a successful sync, effectively scaling the workload down to zero.

Testing

  • Added envtests to verify that the Workspace object is deleted.
  • Manually validated on a GKE cluster.

Related Issues (Optional)

Fixes #694

@rquitales

This comment was marked as outdated.

Copy link

codecov bot commented Feb 6, 2025

Codecov Report

Attention: Patch coverage is 33.33333% with 10 lines in your changes missing coverage. Please review.

Project coverage is 51.38%. Comparing base (59017f2) to head (a77a9a3).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...tor/internal/controller/pulumi/stack_controller.go 33.33% 8 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #804      +/-   ##
==========================================
- Coverage   51.44%   51.38%   -0.07%     
==========================================
  Files          30       30              
  Lines        4216     4231      +15     
==========================================
+ Hits         2169     2174       +5     
- Misses       1862     1870       +8     
- Partials      185      187       +2     

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

@rquitales rquitales force-pushed the rquitales/retain-delete-ws branch from 33050e6 to 1271737 Compare February 6, 2025 18:16
@rquitales rquitales requested a review from EronWright February 6, 2025 18:24
@rquitales rquitales self-assigned this Feb 6, 2025
@rquitales rquitales marked this pull request as ready for review February 6, 2025 18:24
@rquitales rquitales force-pushed the rquitales/retain-delete-ws branch 2 times, most recently from bfc8e33 to ca8756c Compare February 6, 2025 20:42
@rquitales rquitales force-pushed the rquitales/retain-delete-ws branch from 2a66596 to c0e6dc7 Compare February 6, 2025 22:22
@rquitales rquitales force-pushed the rquitales/retain-delete-ws branch 2 times, most recently from 8463e76 to 10d493d Compare February 6, 2025 23:10
@rquitales rquitales force-pushed the rquitales/retain-delete-ws branch from 10d493d to a77a9a3 Compare February 6, 2025 23:20
@rquitales rquitales enabled auto-merge (squash) February 6, 2025 23:21
@rquitales rquitales merged commit e46b376 into master Feb 6, 2025
11 checks passed
@rquitales rquitales deleted the rquitales/retain-delete-ws branch February 6, 2025 23:28
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.

Option to retain or delete the workspace after successful sync
2 participants