Allow setting env vars for config-reloader created for Prometheus Kind
xbglowx opened this issue · comments
Component(s)
Prometheus
What is missing? Please describe.
The ability to pass env vars to the config-reloader that is created by the operator that is for Prometheus Kind.
I originally created an issue under the helm chart, but I think a better place for it would be here instead? prometheus-community/helm-charts#3982
Describe alternatives you've considered.
I was able to use Kustomize to patch the config-reloader container that is part of the Operator Pod, since that is a resource that gets created directly from the helm chart, but can't do the same for the config-reloader that gets created by Prometheus kind.
Environment Information.
Environment
Kubernetes Version: 1.27.12
Prometheus-Operator Version: v0.71.2
it should be possible using strategic merge patch: https://prometheus-operator.dev/docs/operator/strategic-merge-patch/#how-to-inject-an-environment-variable-in-an-existing-container
But if the request is "I want the containers to pick up the correct GOMAXPROCS based on the CPU resource limits", I'd be open to integrate with https://github.com/uber-go/automaxprocs.
it should be possible using strategic merge patch: https://prometheus-operator.dev/docs/operator/strategic-merge-patch/#how-to-inject-an-environment-variable-in-an-existing-container
Thanks and sorry that I totally missed that option.
But if the request is "I want the containers to pick up the correct GOMAXPROCS based on the CPU resource limits", I'd be open to integrate with https://github.com/uber-go/automaxprocs.
Yes, this would be a nice to have, so that one doesn't have to worry about setting GOMAXPROCS in the first place.