spring-native
spring-native copied to clipboard
Add support for Spring Cloud Kubernetes
Hi,
Is there any word on support for Spring Cloud Kubernetes? I have checked the support section of the documents and nothing is mentioned.
Here is a minimal example:
spring-cloud-kubernetes-native-example.zip
A quick run of the compiler shows the current issues:
org.springframework.aot.context.bootstrap.generator.BeanDefinitionGenerationException: Failed to handle bean with name 'discoveryInformerConfigurer' and type 'org.springframework.cloud.kubernetes.client.discovery.SpringCloudKubernetesInformerFactoryProcessor'
at org.springframework.aot.context.bootstrap.generator.ApplicationContextAotProcessor.writeBeanDefinitions(ApplicationContextAotProcessor.java:138)
at org.springframework.aot.context.bootstrap.generator.ApplicationContextAotProcessor.bootstrapMethod(ApplicationContextAotProcessor.java:104)
at org.springframework.aot.context.bootstrap.generator.ApplicationContextAotProcessor.process(ApplicationContextAotProcessor.java:96)
at org.springframework.aot.build.ContextBootstrapContributor.contribute(ContextBootstrapContributor.java:80)
at org.springframework.aot.build.BootstrapCodeGenerator.generate(BootstrapCodeGenerator.java:91)
at org.springframework.aot.build.BootstrapCodeGenerator.generate(BootstrapCodeGenerator.java:71)
at org.springframework.aot.build.GenerateBootstrapCommand.call(GenerateBootstrapCommand.java:107)
at org.springframework.aot.build.GenerateBootstrapCommand.call(GenerateBootstrapCommand.java:42)
at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
at picocli.CommandLine.access$1300(CommandLine.java:145)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2346)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2311)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
at picocli.CommandLine.execute(CommandLine.java:2078)
at org.springframework.aot.build.GenerateBootstrapCommand.main(GenerateBootstrapCommand.java:112)
Caused by: java.lang.IllegalStateException: Multiple privileged packages: [org.springframework.cloud.kubernetes.client.discovery, io.kubernetes.client.spring.extended.controller]
at org.springframework.aot.context.bootstrap.generator.infrastructure.ProtectedAccessAnalysis.getPrivilegedPackageName(ProtectedAccessAnalysis.java:57)
at org.springframework.aot.context.bootstrap.generator.bean.DefaultBeanRegistrationWriter.writeBeanRegistration(DefaultBeanRegistrationWriter.java:105)
at org.springframework.aot.context.bootstrap.generator.ApplicationContextAotProcessor.writeBeanDefinitions(ApplicationContextAotProcessor.java:130)
... 15 more
Loving the direction of this btw, looking forward to boot 3 with major support 😃.
(If I have posted this in the wrong place and it should be in the spring cloud kubernetes repo I'm very sorry)
Edit: Forgot to add the minimal example
Thanks for the request, I can't make any promises when we will add support for that.
+1 only package in a group of services I have missing support.
Thanks for the report but Spring Native is in minimal maintenance mode so we won't add more support to it. Please give that a try with the latest Spring Boot 3 milestone and create an issue in Spring Framework if that still occurs. To get started check https://spring.io/blog/2022/09/26/native-support-in-spring-boot-3-0-0-m5.