Closed ZisisTsatsas closed 6 months ago
@ZisisTsatsas Hi Zisis! Thanks for the issue reporting!
You are right, the docs were not updated.
But it was my mistake when I renamed the class a half of the year ago... Seems we need to rename the class back to Kube
.
So, finally there should be old two types: Kube
and PollKube
... and docs can be unchanged.
Sorry, for this breaking change!
@ggnaegi Do you agree using old types Kube
and PollKube
? But I know you don't use these providers...
@ZisisTsatsas Could you help me with resolving this breaking change plz? Or, I will work on the issue this weekend... Sorry, I'm very busy today and will be offline right away.
The root cause of the problem: https://github.com/ThreeMammals/Ocelot/blob/c9510b1c6aed7902e681978f5104bd2780f2f5dd/src/Ocelot/ServiceDiscovery/ServiceDiscoveryProviderFactory.cs#L59
of these block of code: https://github.com/ThreeMammals/Ocelot/blob/c9510b1c6aed7902e681978f5104bd2780f2f5dd/src/Ocelot/ServiceDiscovery/ServiceDiscoveryProviderFactory.cs#L55-L63
where _delegates is ServiceDiscoveryFinderDelegate
and it is added into the DI:
https://github.com/ThreeMammals/Ocelot/blob/c9510b1c6aed7902e681978f5104bd2780f2f5dd/src/Ocelot.Provider.Kubernetes/OcelotBuilderExtensions.cs#L11
Finally, in this line of code we have
https://github.com/ThreeMammals/Ocelot/blob/c9510b1c6aed7902e681978f5104bd2780f2f5dd/src/Ocelot/ServiceDiscovery/ServiceDiscoveryProviderFactory.cs#L59
→ if ("KubernetesServiceDiscoveryProvider".ToLower() == "Kube".ToLower())
which is false
always!
This is the bug and the breaking change ❗
Hi @ZisisTsatsas !
I found a couple of issues related to Kube
provider and attached them to your PR 👉
So, these bugs will be closed officially by your PR 😉
@ggnaegi FYI
Funny fact is that the breaking change was introduced in 15.0.0 release by Tom in the commit https://github.com/ThreeMammals/Ocelot/commit/6e5471a714dddb0a3a40fbb97eac2810cee1c78d 🤯 I thought that I was the author of the bug in 19.x or 20.0 releases 🤣 but No: Tom did the thing. 😄
@ZisisTsatsas Will you use our updated & fixed Kubernetes provider and Ocelot after the release? 😉
@ZisisTsatsas Will you use our updated & fixed Kubernetes provider and Ocelot after the release? 😉
I will be using it! Thanks for the quick udpate
The
Type
field for the Kubernetes example is outdated in the docsUpdate by Maintainer on Feb 10, 2024 👉
Fixes #1527 #1529
1527
1529