Repository navigation
Add automountServiceAccountToken to the pod options - #911
Open
shaynhornik wants to merge 1 commit into
Open
shaynhornik wants to merge 1 commit into
shaynhornik wants to merge 1 commit into
Conversation
SolrCloud and SolrPrometheusExporter pod options get an optional automountServiceAccountToken, which is passed on to the pod spec of the StatefulSet and the Deployment. When it is not set the field is left out of the pod spec, as before. Solr, the Prometheus Exporter and the containers the operator creates do not use the Kubernetes API, so the docs only warn about user-provided sidecar and init containers. The ZookeeperCluster CRD of the Zookeeper Operator has no such option, so provided Zookeeper pods are not covered. Generated-by: Claude Code (Claude Fable 5.2) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This was referenced Nov 21, 2026
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.
Summary
Fixes #701.
Adds an optional
automountServiceAccountTokento the pod options ofSolrCloud(customSolrKubeOptions.podOptions) andSolrPrometheusExporter(customKubeOptions.podOptions). It is passed to the pod spec of the StatefulSet and the Deployment, so the Service Account token can be kept out of the pods, which is what the AKS / Azure Defender finding in the issue asks for.CopyPodTemplatescopies it, so setting, changing or removing it reaches an existing StatefulSet or Deployment.setup-zkand TLS init containers, the backup code and the exporter, and found nothing that uses the Kubernetes API or the mounted token. The field comment and docs only warn about the user's own sidecar and init containers.PodPolicyin zookeeper-operator v0.2.15 has no such option. The docs say so and point to the Service Account setting instead.Also included: regenerated CRDs and deepcopy, a "Service Account Token" section in
custom-kube-options.adoc, thesolrHelm chart (podOptions.automountServiceAccountToken, rendered forfalseas well astrue, README row) and changelog entries in both charts.Test plan
falsewhen set, on the SolrCloud StatefulSet and the exporter Deployment; a new context sets and then removes it on an existing StatefulSet. With thecontrollers/utilchanges reverted, 3 specs fail.go test ./controllers -v: 88 of 88 specs pass.go test ./api/... ./controllers/util/...passes.make manifests generate,check-format,check-manifests,check-generated,vet,check-docsand./hack/check_license.shpass.helm lintandhelm templateonhelm/solr: unset renders nothing;falseandtruerender.ah lintpasses.Generated-by: Claude Code (Claude Fable 5.2). I reviewed and tested the change.
🤖 Generated with Claude Code