Skip to content

feat: support envFrom on Solr pods - #877

Open
Anurag-S1ngh wants to merge 2 commits into
apache:mainfrom
Anurag-S1ngh:feat/677-pod-envfrom
Open

Anurag-S1ngh wants to merge 2 commits into
apache:mainfrom
Anurag-S1ngh:feat/677-pod-envfrom

Conversation

@Anurag-S1ngh

Copy link
Copy Markdown

Summary

  • Add envFrom to PodOptions, so a SolrCloud can load a ConfigMap or Secret into the Solr container environment the way a plain StatefulSet can, instead of only inline envVars.
  • Regenerate the deepcopy and CRD/Helm schemas. SolrPrometheusExporter also gains the field because it shares PodOptions.
  • Pass the sources to the generated Solr container and assert them in the pod-options reconcile test.

Fixes #677

Test plan

  • go build ./...
  • go vet ./...
  • go test ./api/... ./controllers/... with KUBEBUILDER_ASSETS from setup-envtest use 1.36.0: all pass, including the envtest controllers suite

Why: pod options only allow inline environment variables, so a SolrCloud
cannot load a ConfigMap or Secret into the container environment the way a
plain StatefulSet can. Add EnvFrom next to EnvVariables and regenerate the
deepcopy and CRD schemas, which also exposes it on the Prometheus exporter
because both share PodOptions.
Why: the API now accepts envFrom sources but the generated StatefulSet
ignored them. Append the configured sources to the Solr container and
assert them in the pod-options reconcile test, so a ConfigMap or Secret
reaches the container environment.

This branch has not been deployed

No deployments
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.

Add the ability to add Environment variables as a configmap

1 participant