-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
dependenciesPull requests that update a dependency filePull requests that update a dependency file
Description
Describe the bug
While running the contextLoads test Spring Cloud Kubernetes fails with the following:
Error creating bean with name 'kubernetesKubectlCreateProcessor': Unsatisfied dependency expressed through field
'apiClient'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with
name 'defaultApiClient' defined in class path resource
[io/kubernetes/client/spring/extended/controller/config/KubernetesInformerAutoConfiguration.class]: Bean
instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException:
Failed to instantiate [io.kubernetes.client.openapi.ApiClient]: Factory method 'defaultApiClient' threw exception;
nested exception is java.lang.NullPointerException: Cannot invoke "Object.getClass()" because "expiryObj" is null
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:659)
...
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'defaultApiClient' defined in class path resource [io/kubernetes/client/spring/extended/controller/config/KubernetesInformerAutoConfiguration.class]:
Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException:
Failed to instantiate [io.kubernetes.client.openapi.ApiClient]: Factory method 'defaultApiClient' threw exception;
nested exception is java.lang.NullPointerException: Cannot invoke "Object.getClass()" because "expiryObj" is null
...
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [io.kubernetes.client.openapi.ApiClient]:
Factory method 'defaultApiClient' threw exception; nested exception is java.lang.NullPointerException:
Cannot invoke "Object.getClass()" because "expiryObj" is null
...
Caused by: java.lang.NullPointerException: Cannot invoke "Object.getClass()" because "expiryObj" is null
at io.kubernetes.client.util.authenticators.GCPAuthenticator.isExpired(GCPAuthenticator.java:54)
at io.kubernetes.client.util.KubeConfig.getAccessToken(KubeConfig.java:214)
Is there a way to tell Spring Cloud Kubernetes to not try to access the API and authenticate while running JUnit tests?
Metadata
Metadata
Assignees
Labels
dependenciesPull requests that update a dependency filePull requests that update a dependency file