Skip to content

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

Open
mdoulabi1 wants to merge 1 commit into
zalando:triggerfrom
mdoulabi1:fix-callback-role-custom-cluster-domain
Open

fix(callback_role): support custom Kubernetes cluster domains#1201
mdoulabi1 wants to merge 1 commit into
zalando:triggerfrom
mdoulabi1:fix-callback-role-custom-cluster-domain

Conversation

@mdoulabi1
Copy link
Copy Markdown

Summary

  • support custom Kubernetes cluster domains in callback role handling
  • remove the assumption that the cluster always uses the default Kubernetes DNS suffix

Problem

The current callback role behavior assumes the default Kubernetes cluster domain. In environments that use a custom cluster domain, generated service or callback-related addresses do not resolve correctly, which breaks
callback role behavior.

This change updates the callback role logic to work with custom Kubernetes cluster domains instead of relying on the default DNS suffix.

Test

  • verified behavior with a custom Kubernetes cluster domain
  • confirmed the existing default cluster domain behavior remains unchanged

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.

(cherry picked from commit 0b78ed2)
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