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

ServiceInstance not injectable after upgrade to 2021.0.0 (K8S Client 2.1.0)

Open JWThewes opened this issue 4 years ago • 4 comments

I upgraded our project to Spring Boot 2.6.1 and Spring Cloud 2021.0.0 and now I can't inject an instance of ServiceInstance anymore. I would have expected to get the ServiceInstance instance of the current running application. That was the case in the previous release.

JWThewes avatar Dec 06 '21 08:12 JWThewes

can you expand on this issue a bit? As it is right now, I don't think it is possible to triage it.

wind57 avatar Dec 06 '21 13:12 wind57

Well before 2021.0.0 I was able to simply inject an instance of ServiceInstance. This happened to be the information of the actual instance (pod). For example I was able to inject ServiceInstance and call getInstanceId(). This has given me the pod id. No I get a NoBeanDefinitionFoundException. Currently my workaround is to use the Fabric8PodUtils and invoke currentPod().get().getMetadata().getUid()

Would be great to be able to inject the "self"ServiceInstance to have the Spring Cloud abstraction over here too.

JWThewes avatar Feb 10 '22 10:02 JWThewes

can you provide a simple, reproducible example, should be available on github. This way we can look into the issue and understand how to re-produce it.

wind57 avatar Feb 11 '22 12:02 wind57

It seems like the axon-cloud-extension (https://github.com/AxonFramework/extension-springcloud) runs into a problem related to the issue reported here. I do not have a simple reproducible github exampe, but it is thoroughly described at : https://discuss.axoniq.io/t/compatibilty-axon-springcloud-extension-with-org-springframework-cloud/3856

rnsd avatar May 18 '22 08:05 rnsd

Can you provide a complete, minimal, verifiable sample that reproduces the problem? It should be available as a GitHub (or similar) project or attached to this issue as a zip file.

ryanjbaxter avatar Aug 18 '22 00:08 ryanjbaxter

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

spring-cloud-issues avatar Aug 25 '22 00:08 spring-cloud-issues

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.

spring-cloud-issues avatar Sep 01 '22 00:09 spring-cloud-issues