-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Application fails to start on local when Kubernetes config is present in .kube directory #434
Comments
@sujeet100 you can disable the environment deduction: https://docs.micronaut.io/latest/guide/#environments
|
Does that address your issue? |
setting MICRONAUT_ENV_DEDUCTION = false did not fix the issue, still seeing the same exception.
|
I think the problem is triggered by https://github.com/micronaut-projects/micronaut-kubernetes/blob/master/kubernetes-client/src/main/java/io/micronaut/kubernetes/client/ApiClientFactory.java#L84 As per their Javadoc:
|
@pgressa any update on this issue? |
So one thing that could be done is to add an opt-out property, something like |
@alvarosanchez can we annotate clientBuilder singleton Line 65 in 56c0ad7
with @requires(env = Environment.KUBERNETES) |
The annotation should go to the factory class instead. I would do the job, yes, but feels to me like a breaking change. |
I ran into this issue in a GitLab CI Pipeline test stage. Locally Disabling I took a look at the dependency path and saw that the ApiClient bean is being required by DefaultSharedIndexInformerFactory which has a Once I disabled |
was having the same problem with minikube. could only run tests when in my
|
Expected Behavior
Hi people,
Recently we upgraded to the latest version of Micronuat Kubernetes and we are facing following error on startup in local environment
Note: For local environment we do not use kubernetes, however there is a config file in ~/.kube directory which causes micronaut to think that it's running in a Kubernetes environment.
Is there a way to disable this for local environment?
Actual Behaviour
The application fails to start with an exception
If the config file is removed from the ~/.kube directory, then the application starts properly.
Steps To Reproduce
implementation("io.micronaut.kubernetes:micronaut-kubernetes-discovery-client")
Environment Information
Example Application
No response
Version
3.3.3
The text was updated successfully, but these errors were encountered: