Repository navigation
Conversation
lfrancke
force-pushed
the
feat/harden-containers-by-default
branch
from
December 3, 2026 08:25
4dbde7c to
d57a5a0
Compare
lfrancke
marked this pull request as ready for review
December 3, 2026 08:30
lfrancke
enabled auto-merge
December 3, 2026 08:33
sbernauer
self-requested a review
December 4, 2026 07:50
Member
|
Thanks for running the extensive test suite! I see a few potential things to improve:
I pushed a branch where I addressed the feedback, happy for you to take it or copy it over to your PR: https://github.com/stackabletech/operator-rs/tree/chore/container-builder-stackable-defaults |
Member
Author
|
Thanks. I'm only on the phone now so will look in detail later. The CHANGELOG entry actually is already a shortened version and I kept it in mostly for Spark to consider again if any "user pods" could be affected but I don't care too much about it. |
Member
Author
|
Thanks. Looked at it now. I took your entire branch as is. So now you get to review your own code :) |
Member
Author
Release notes |
This branch has not been deployed
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
ContainerBuilder::newandContainerBuilder::defaultare removed in favour ofContainerBuilder::with_stackable_defaults, consistent withPodSecurityContextBuilder::with_stackable_defaults(#1205).It starts every container with
SecurityContextBuilder::with_stackable_defaults():allowPrivilegeEscalation: falseandcapabilities.drop: [ALL]. Vector, git-sync andv2::builder::pod::container::new_container_buildergo through it, so the operators need no code change: all of them build their containers vianew_container_builder(I actually tested this, see below).Together with the pod-level
runAsNonRootandseccompProfile: RuntimeDefaultfrom #1205 and #1292, Pods built by the operators meet therestrictedPod Security Standard. 🥳 (So far this was only the case for our operator pods)Important
Spark drivers and executors and Airflow KubernetesExecutor workers are "affected" by this as well if they are built from our pod templates. So, this'd be a breaking change for anyone relying on these elevated privileges.
I ran all 16 operater suites on main (using jig) built against this change with Pod Security
audit=restrictedproduct-config-compat, which needs a comparison file to be updated.restrictedviolations in Pods the operators create: 377 without this change, 0 with it.Spark drivers and executors and Airflow workers: 246 and 0.
Definition of Done Checklist
Author
Reviewer
Acceptance
Definition of Done Checklist
Author
Reviewer
Acceptance