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

[V2] Set default statefulset image based on securityProfile #693

Merged
merged 3 commits into from
Sep 26, 2024

Conversation

rquitales
Copy link
Member

Proposed changes

This update removes the default CRD validation marker from the workspace.spec.image field, allowing for dynamic image selection based on the value of workspace.spec.securityProfile. When securityProfile is set to baseline, the image defaults to pulumi/pulumi:latest. If securityProfile is marked as restricted, the system will instead select pulumi/pulumi:latest-nonroot. If a user specifies their own image, then that value is used instead. Handling these default settings within the controller is necessary, as CRD validation markers cannot accommodate conditional defaults.

Before implementing this feature, additional ginkgo tests were introduced to confirm that the desired behavior is properly achieved.

Related issues (optional)

Closes: #653

@rquitales rquitales self-assigned this Sep 26, 2024
@rquitales rquitales added the impact/no-changelog-required This issue doesn't require a CHANGELOG update label Sep 26, 2024
@rquitales rquitales force-pushed the rquitales/default-image branch from f160fbe to c2ce13e Compare September 26, 2024 19:56
Copy link

codecov bot commented Sep 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.28%. Comparing base (b912fd4) to head (c2ce13e).
Report is 1 commits behind head on v2.

Additional details and impacted files
@@            Coverage Diff             @@
##               v2     #693      +/-   ##
==========================================
+ Coverage   49.11%   49.28%   +0.17%     
==========================================
  Files          26       26              
  Lines        2877     2887      +10     
==========================================
+ Hits         1413     1423      +10     
  Misses       1287     1287              
  Partials      177      177              

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

Copy link
Contributor

@EronWright EronWright left a comment

Choose a reason for hiding this comment

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

fabulous

@rquitales rquitales merged commit 88a213d into v2 Sep 26, 2024
7 checks passed
@rquitales rquitales deleted the rquitales/default-image branch September 26, 2024 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact/no-changelog-required This issue doesn't require a CHANGELOG update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants