bugfix: Expose new environment variables to Patroni run #1106
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This Pull Request ensures that the newly introduced environment variables —
KUBERNETES_LEADER_LABEL_VALUE
andKUBERNETES_STANDBY_LEADER_LABEL_VALUE
— are correctly passed to the Patroni process by removing them from the filtering logic in the entrypoint script.Context & Motivation
The variables
KUBERNETES_LEADER_LABEL_VALUE
andKUBERNETES_STANDBY_LEADER_LABEL_VALUE
were unintentionally excluded from the environment passed to the running Patroni process due to the default filtering logic in the Spilo entrypoint script. As a result, their values were not available at runtime rendering the configuration ineffective.Specifically, when Patroni invokes the
callback_role.py
script, it relies on theLEADER_LABEL_VALUE
constant, which is expected to derive its value from theKUBERNETES_LEADER_LABEL_VALUE
environment variable. Since this variable was not passed through, the callback logic silently falls back to the default value (master
), breaking expected behavior in customized deployments.Impact
This aims to fix the issue #1105