Description
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:
env:
- name: DATA_SOURCE_URI
value: localhost/postgres?sslmode=disable
- name: DATA_SOURCE_USER
value: $(POSTGRES_USER)
- name: DATA_SOURCE_PASS
value: $(POSTGRES_PASSWORD)
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.