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

fix: Default to kubernetes pod IP instead of deprecated pod DNS names #1244

Merged
merged 3 commits into from
Jan 22, 2024

Conversation

johanandren
Copy link
Member

Naive search replace to see what breaks in CI

References #1242

…names

Naive search replace to see what breaks in CI
@vcanuel
Copy link

vcanuel commented Dec 18, 2023

If I may, we are looking for pods (in https://github.com/akka/akka-management/blob/6a49c2c0f29959976d3a6a903db3c7761e8afab1/discovery-kubernetes-api/src/main/scala/akka/discovery/kubernetes/KubernetesApiServiceDiscovery.scala#L149C16-L149C16) but maybe we need to find the service instead. Thanks for looking at this issue :)

@johanandren
Copy link
Member Author

johanandren commented Dec 19, 2023

Hmm, then I think I changed too much to start with, the label selection should still be about pods and I'll have to dig a bit deeper than a search-replace.

As far as I understand the only thing we want to change here is to not use the pod dns names as those are deprecated.

@johanandren
Copy link
Member Author

The problem is actually that the svc name does not resolve unless there is a service collecting the pods and the pods are ready. Usually Akka forming cluster is something you want to wait for before marking the pods as ready, to not accept requests before a node has joined the cluster.

I wonder if the right thing isn't just to switch to akka.discovery.kubernetes-api.use-raw-ip=true to avoid using the deprecated dns names for the pods.

@vcanuel
Copy link

vcanuel commented Dec 19, 2023

The problem is actually that the svc name does not resolve unless there is a service collecting the pods and the pods are ready. Usually Akka forming cluster is something you want to wait for before marking the pods as ready, to not accept requests before a node has joined the cluster.

I wonder if the right thing isn't just to switch to akka.discovery.kubernetes-api.use-raw-ip=true to avoid using the deprecated dns names for the pods.

That's how we fixed it indeed ;)

@johanandren
Copy link
Member Author

Thanks for verifying, then that should probably be the default (and should anyway work with older Kubernetes versions as well)

@johanandren johanandren marked this pull request as ready for review December 19, 2023 16:29
@johanandren johanandren changed the title fix: Migrate to kubernetes svc DNS names from the deprecated pod DNS names fix: Default to kubernetes pod IP instead of deprecated pod DNS names Dec 19, 2023
@johanandren johanandren requested a review from patriknw January 18, 2024 07:43
Copy link
Member

@octonato octonato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@octonato octonato merged commit 09c9f55 into main Jan 22, 2024
12 checks passed
@octonato octonato deleted the wip-svc-in-k8-dns-names branch January 22, 2024 13:09
@octonato octonato added this to the 1.5.1 milestone Jan 22, 2024
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.

3 participants