extraEnv doesn't support pod-level env vars
In !1377 (merged), we added extraEnv
to our charts.
However, this is only available at the chart level. For Sidekiq in particular, it would be useful for us to be able to define these values at the pod level. That's because in Sidekiq we use pods to represent different workloads (using the queue selector - which is actually passed as an env var to the container!), and those workloads might need different values for those env vars.
Two examples of this are:
-
gitlab-com/gl-infra/scalability#447 (closed) - for our VMs, we set a
DB_POOL_HEADROOM
env var that adds some extra connections to the pool, depending on the workload. In our charts, we can only do this if all pods share the same workload, which isn't true. (Nitpick: it's actually close enough that it would work right now, but it would bite us in future.) -
gitlab-org/gitlab#225190 (closed) is similar - we want to add the shard name (which is also the pod name) for Sidekiq to Sentry. It's easiest to support this with an env var because it's a very niche use case. But
extraEnv
doesn't work here.