spring-cloud-kubernetes icon indicating copy to clipboard operation
spring-cloud-kubernetes copied to clipboard

SpEL expression filter support in Kubernetes Java Client

Open timtebeek opened this issue 3 years ago • 2 comments

Describe the bug The documentation lists a property spring.cloud.kubernetes.discovery.filter:

SpEL expression to filter services AFTER they have been retrieved from the Kubernetes API server.

This property is declared in spring-cloud-kubernetes-commons, yet seems to be only implemented in spring-cloud-kubernetes-fabric8-discovery. The corresponding getServices in spring-cloud-kubernetes-client-discovery does not (yet?) filter using this filter expression.

I'm not sure what the plans are for parity between discovery implementations. If this support is not planned an addition to the documentation might be in order, to note that some properties are not supported in all implementations.

timtebeek avatar Mar 15 '22 08:03 timtebeek

I agree with this bug, both clients should work the same. In general, I could fix this, but when I get my hands to it, unless there will be someone else before.

wind57 avatar Mar 15 '22 10:03 wind57

Stumbled across the same when migrating from fabric8, thanks for validating what I was seeing.

dounix avatar Aug 10 '22 22:08 dounix

I started work on this one here. If accepted, it will be part of the next release...

wind57 avatar Apr 24 '23 20:04 wind57