Skip to content
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

bugfix: Expose new environment variables to Patroni run #1106

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arthlr
Copy link

@arthlr arthlr commented Apr 10, 2025

Summary

This Pull Request ensures that the newly introduced environment variables — KUBERNETES_LEADER_LABEL_VALUE and KUBERNETES_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 and KUBERNETES_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 the LEADER_LABEL_VALUE constant, which is expected to derive its value from the KUBERNETES_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

  • No breaking changes expected.
  • Enables correct configuration of Kubernetes leader election behavior when using these new environment variables.
  • Backward compatible for users not using these variables.

This aims to fix the issue #1105

@arthlr arthlr changed the title Fix: Expose new environment variables to Patroni run bugfix: Expose new environment variables to Patroni run Apr 10, 2025
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.

1 participant