feat!: Add PodSecurityContextBuilder::with_stackable_defaults#1205
Open
feat!: Add PodSecurityContextBuilder::with_stackable_defaults#1205
PodSecurityContextBuilder::with_stackable_defaults#1205Conversation
sbernauer
commented
Apr 28, 2026
| /// It is recommended to use the [`PodSecurityContextBuilder::with_stackable_defaults`] instead | ||
| /// (if possible). | ||
| pub fn stackable_default_pod_security_context() -> PodSecurityContext { | ||
| todo!("Lars needs to define the exact settings he wants"); |
Member
There was a problem hiding this comment.
I would just leave the with_recommended_settings() function empty for now and keep the TODO in the issue, so that this pull request can be merged.
siegfriedweber
requested changes
May 11, 2026
| pub fn new() -> Self { | ||
| Self::default() | ||
| /// Construct a new [`PodSecurityContextBuilder`] that is pre-filled with Stackable's defaults. | ||
| pub fn with_stackable_defaults() -> Self { |
Member
There was a problem hiding this comment.
- I prefer a vendor neutral term like
with_recommended_settings, similar to https://search.nixos.org/options?channel=25.11&query=services.nginx.recommended. - I would keep the
newfunction and not force the settings yet:new().with_recommended_settings(). On the one hand, this pull request can then be merged now, and on the other hand, it is not guaranteed that we will be able to roll out this change on all operators at the same time. If we want to force the recommended settings later (which I would not do), we could create a function likenew_with_recommended_settingsand remove thenewfunction. - I would already use the builder functions here, to ensure that builder functions exist to override these settings.
- I asked for the
stackable_default_pod_security_contextfunction but it is not necessary and can be removed. The recommended settings can also be retrieved viaPodSecurityContextBuilder::new().with_recommended_settings().build().
| pod_security_context: PodSecurityContext, | ||
| } | ||
|
|
||
| impl PodSecurityContextBuilder { |
Member
There was a problem hiding this comment.
There should also be defaults for the SecurityContextBuilder.
| /// It is recommended to use the [`PodSecurityContextBuilder::with_stackable_defaults`] instead | ||
| /// (if possible). | ||
| pub fn stackable_default_pod_security_context() -> PodSecurityContext { | ||
| todo!("Lars needs to define the exact settings he wants"); |
Member
There was a problem hiding this comment.
I would just leave the with_recommended_settings() function empty for now and keep the TODO in the issue, so that this pull request can be merged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Part of stackabletech/issues#645
Definition of Done Checklist
Author
Reviewer
Acceptance