Skip to content

Allow chained references of custom environment variables to all generated envs #2905

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

siegenthalerroger
Copy link

Fixes #2227

Currently custom environment variables are added after most generated envs but notably before WAL_BUCKET_SCOPE_SUFFIX and _PREFIX. This means that referencing one of these values from a custom env is impossible (k8s has an implied ordering of env vars).

I have changed this to always have custom envs being at the end of the list while still respecting the overrideability of only certain envs. It is now possible to use WAL-E with Azure Storage Accounts while including the UID of the cluster in the backup path.

tldr: Works now, didn't before


apiVersion: v1
kind: ConfigMap
metadata:
  name: pod-env-overrides
  namespace: postgres-operator-system
data:
  WALG_AZ_PREFIX: "azure://container-name/$(SCOPE)$(WAL_BUCKET_SCOPE_SUFFIX)/$(PGVERSION)"

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.

wal-g when setting WALG_AZ_PREFIX only substitutes $(SCOPE) and $(PGVERSION)
1 participant