We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent abbc85c commit c6e34bcCopy full SHA for c6e34bc
1 file changed
crates/stackable-operator/src/builder/pod/security.rs
@@ -168,12 +168,15 @@ impl PodSecurityContextBuilder {
168
///
169
/// * `runAsNonRoot: true`
170
pub fn with_stackable_defaults() -> Self {
171
- Self {
172
- pod_security_context: PodSecurityContext {
173
- run_as_non_root: Some(true),
174
- ..Default::default()
175
- },
176
- }
+ // We are using the builder functions to ensure that builder functions exist to override these settings.
+ let mut builder = Self {
+ pod_security_context: PodSecurityContext::default(),
+ };
+
+ // Reason: Running as root is bad
177
+ builder.run_as_non_root(true);
178
179
+ builder
180
}
181
182
pub fn build(&self) -> PodSecurityContext {
0 commit comments