feat: Add configurable security context support to Katib controller pods#2618
Open
jsonmp-k8 wants to merge 2 commits intokubeflow:masterfrom
Open
feat: Add configurable security context support to Katib controller pods#2618jsonmp-k8 wants to merge 2 commits intokubeflow:masterfrom
jsonmp-k8 wants to merge 2 commits intokubeflow:masterfrom
Conversation
|
🎉 Welcome to the Kubeflow Katib repo! 🎉 Thanks for opening your first PR! We're excited to have you onboard 🚀 Next steps:
Feel free to ask questions in the comments. Thanks again for contributing! 🙏 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Add explicit, per-component security context configuration to the KatibConfig API so that suggestion deployments, early stopping sidecars, and metrics collector sidecars can run with hardened security defaults. - Add PodSecurityContext field to SuggestionConfig for pod-level security - Add SecurityContext field to EarlyStoppingConfig and MetricsCollectorConfig for container-level security - Apply security contexts in composer (deployments) and webhook (sidecars) - Metrics collector config SecurityContext takes precedence over legacy InjectSecurityContext flag, preserving backward compatibility - Update all 6 katib-config.yaml manifests with hardened defaults (runAsNonRoot, drop ALL capabilities, seccomp RuntimeDefault) - Update deepcopy functions and add tests for all new fields Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Jaison Paul <paul.jaison@gmail.com>
5cef4cf to
10b1353
Compare
Fix gofmt struct field alignment in inject_webhook_test.go and add non-root USER 1000 directive to all 11 Dockerfiles to comply with runAsNonRoot security context. Signed-off-by: Jaison Paul <paul.jaison@gmail.com>
Member
|
/retest |
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.
Summary
PodSecurityContextfor suggestions,SecurityContextfor early stopping and metrics collector containers)InjectSecurityContextflagkatib-config.yamlmanifests with hardened defaults (runAsNonRoot, drop ALL capabilities, seccomp RuntimeDefault)Test plan
go test ./pkg/apis/config/v1beta1/...— SecurityContext fields survive defaulting round-tripgo test ./pkg/controller.v1beta1/suggestion/composer/...— Deployment created with PodSecurityContext and early stopping SecurityContextgo test ./pkg/webhook/v1beta1/pod/...— Config SecurityContext takes precedence over legacy flag; fallback works; nil case preserved🤖 Generated with Claude Code