-
Notifications
You must be signed in to change notification settings - Fork 1k
Order of env variables in sidecontainers changed #979
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@fischerman can you also comment on this, as you are using are probably using this feature in prod? |
Makes sense to have the operator environment variables first. Didn't think about that. PR from @spohner looks good! |
I sent in the PR #946 which sources env variables from a secret. There I particularly allow to "override" certain variables related to backups and buckets - but in general those used by the operator for core functionality should come first if there is not use-case and this would rather create unintended effects. |
workaround for a better postgres-operator-integration until we get the fix from zalando/postgres-operator#979
We use https://github.com/wrouesnel/postgres_exporter as a global sidecar to export metrics. In the manifest file we define environment variables based on the injected environment variables like this:
With the merge of #890 the order of which environment variables are added changed. The order of the env variables is actually a part of the API spec according to kubernetes/kubernetes#40373 (could not find it in the spec docs directly).
By adding the common fields last in the env array a pattern like the one above is no longer supported and this could break some apps.
Should be an easy fix by swapping the order in the append method here
postgres-operator/pkg/cluster/k8sres.go
Line 534 in d52296c
I will create a simple PR for this ASAP.
The text was updated successfully, but these errors were encountered: