Skip to content

fix(callback_role): support custom Kubernetes cluster domains#1194

Open
mdoulabi1 wants to merge 42 commits into
zalando:masterfrom
mdoulabi1:master
Open

fix(callback_role): support custom Kubernetes cluster domains#1194
mdoulabi1 wants to merge 42 commits into
zalando:masterfrom
mdoulabi1:master

Conversation

@mdoulabi1
Copy link
Copy Markdown

Problem

spilo fails to patch pod labels on Kubernetes clusters with custom cluster domains
(e.g., cluster.bk1 instead of cluster.local). The callback_role.py script
had hardcoded kubernetes.default.svc.cluster.local.

Solution

Use KUBERNETES_SERVICE_HOST environment variable to allow users to specify
custom API server URLs.

Changes

  • Line 17: Replace hardcoded URL with env var lookup

Usage

Users can now set KUBERNETES_SERVICE_HOST env var:

env:
  - name: KUBERNETES_SERVICE_HOST
    value: "https://kubernetes.default.svc.cluster.bk1"

Backwards Compatibility

Fully backwards compatible - defaults to previous behavior if env var not set.
   

hughcapet and others added 30 commits December 6, 2024 15:31
Co-authored-by: Rob Nickmans <nickmansrob@gmail.com>
* Patroni 4.0
* timescaledb 2.18.0
- Fix timescaledb installation logic
- Make leader tag value for native AWS configurable
- Retain multiple minor versions of timescaledb

---------
Co-authored-by: idanovinda <idanovinda@gmail.com>
Additionally fix LOG_S3_TAGS parsing logic
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
- keep AWS_EC2_METADATA_SERVICE* envs to enable wal-g
- use custom wal-e
* Write AWS_EC2_METADATA_SERVICE_ENDPOINT* env files only when actually needed
hughcapet and others added 11 commits February 12, 2026 13:54
keep at least 5 minor versions, but ensure compatibility with the
lowest/oldest PG version (where possible)
Co-authored-by: Ida Novindasari <idanovinda@gmail.com>
Instead, handle PUT IMDS request differently + add timeouts
https://github.com/wal-g/wal-g/releases/tag/v3.0.8

Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
* Update bg_mon, pg_mon, pg_profile, pg_permissions refs

* Use pgdg for set_user and pg_permissions
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
- Support PG18
- Patroni 4.1.0
- bg_mon from the original repo

Not included for PG18:
- pglogical-ticker
- pgl-ddl-deploy

---------

Co-authored-by: Ida Novindasari <idanovinda@gmail.com>
Replace hardcoded cluster.local with KUBERNETES_SERVICE_HOST env var.

Users can now set custom cluster domains like:
- https://kubernetes.default.svc.cluster.bk1
- http://192.168.1.1:8443

Fully backwards compatible - defaults to previous behavior.

Fixes: patroni could not patch pod labels on clusters
with custom cluster domains.
@zalando-robot
Copy link
Copy Markdown

Cannot start a pipeline due to:

No accountable user for this pipeline: no Zalando employee associated to this GitHub username

Click on pipeline status check Details link below for more information.

@mdoulabi1 mdoulabi1 closed this Apr 4, 2026
@mdoulabi1 mdoulabi1 reopened this May 16, 2026
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.

6 participants