Skip to content

Conversation

@alexalex89
Copy link

Enables setting a securityContext for the default initContainers.

@alexalex89
Copy link
Author

Closes #797

@alexalex89
Copy link
Author

@HoustonPutman @janhoy
Could you please check if that's fine with you?

@alexalex89
Copy link
Author

@janhoy Fixed format error

@alexalex89 alexalex89 requested a review from janhoy September 25, 2025 05:53
@alexalex89
Copy link
Author

@janhoy May you please review and approve? :-) Thx

@alexalex89
Copy link
Author

@janhoy Any news? :)

@janhoy janhoy requested a review from Copilot November 23, 2025 20:28
Copilot finished reviewing on behalf of janhoy November 23, 2025 20:29
Copy link

Copilot AI left a 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 DefaultInitContainerSecurityContext field to PodOptions API 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.

@janhoy
Copy link
Contributor

janhoy commented Nov 24, 2025

Add changelog entry to Chart.yaml

@alexalex89
Copy link
Author

Done @janhoy

@janhoy
Copy link
Contributor

janhoy commented Nov 25, 2025

This looks solid to me now, but since I'm still a Go novice I defer to @HoustonPutman or @gerlowskija to land this.

@janhoy janhoy requested a review from gerlowskija November 25, 2025 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants