-
Notifications
You must be signed in to change notification settings - Fork 131
Added defaultInitContainerSecurityContext #796
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
base: main
Are you sure you want to change the base?
Added defaultInitContainerSecurityContext #796
Conversation
|
Closes #797 |
|
@HoustonPutman @janhoy |
|
@janhoy Fixed format error |
|
@janhoy May you please review and approve? :-) Thx |
|
@janhoy Any news? :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR enables setting a security context for the default init containers created by the Solr Operator. The implementation adds a new defaultInitContainerSecurityContext field to the PodOptions API, following the same pattern as the existing defaultInitContainerResources field.
- Added
DefaultInitContainerSecurityContextfield toPodOptionsAPI type - Updated controller logic to apply security context to operator-created init containers
- Extended Helm chart with configuration support and documentation
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| api/v1beta1/common_types.go | Adds DefaultInitContainerSecurityContext field to PodOptions struct |
| controllers/util/solr_util.go | Updates init container generation to apply custom security context when provided |
| controllers/solrcloud_controller_test.go | Adds comprehensive test coverage for the new security context functionality |
| helm/solr/values.yaml | Adds defaultInitContainerSecurityContext configuration option |
| helm/solr/templates/_custom_option_helpers.tpl | Adds template logic to render security context in generated manifests |
| helm/solr/README.md | Documents the new podOptions.defaultInitContainerSecurityContext option |
| helm/solr-operator/crds/crds.yaml | Adds full Kubernetes SecurityContext schema to CRD definitions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Add changelog entry to Chart.yaml |
|
Done @janhoy |
|
This looks solid to me now, but since I'm still a Go novice I defer to @HoustonPutman or @gerlowskija to land this. |
Enables setting a securityContext for the default initContainers.