ServiceInstance not injectable after upgrade to 2021.0.0 (K8S Client 2.1.0)
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.
can you expand on this issue a bit? As it is right now, I don't think it is possible to triage it.
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.
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.
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
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.
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.
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.