-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Nullpointer in 6.12.1 with Config.empty client setup #6007
Comments
@adenhartog Hello, I tried reproducing the issue and could reproduce it with KubernetesClient v6.12.1 However, when I run the same code with KubernetesClient v6.13.0 I don't see the NPE anymore. Could you please check if issue is resolved with the newer version? |
I believe it is. |
@tinystorm : Thanks for confirming! I see #5221 has a different NPE stack trace compared to this issue. I think this was a new regression from #5888 However, with v6.13.0 I am not able to reproduce. Maybe with #5914 this issue got fixed as we're using Optional.map to filter out null AuthProviderConfig scenario Line 194 in 6b7d516
|
I can also confirm that this issue is fixed in 6.13.0. Thanks! |
@adenhartog : Shall we close this issue then :-) ? |
Resolved |
Describe the bug
We use
ConfigBuilder(Config.empty())
to create an empty config so that we have no autoconfig or other interference from the presence of a pre-existing~/.kube/config
file. We do that because we run our app in container but the OpenShift serviceaccount associated with the Pod does not have the necessary rights.This works on 6.12.0 but gives a null pointer on 6.12.1.
Fabric8 Kubernetes Client version
6.12.1
Steps to reproduce
In Kotlin:
Expected behavior
The name of a pod on stdout, and not an Exception.
Runtime
OpenShift
Kubernetes API Server version
other (please specify in additional context)
Environment
other (please specify in additional context)
Fabric8 Kubernetes Client Logs
Additional context
Probably caused by: "fix: updated OpenId access and refresh token persistend in in-memory"
4ec7c99#diff-89177530c5f2c684ec110696ebeb2676d2aed8abc96a6919752c2d214e82233f
Things I have tried:
OpenShiftConfig
instead of a genericConfig
, but this gives the same error.AuthProviderConfig
through its respective builder and passing that to the Config. That fixes the original problem but fails a bit later with:Cannot invoke "io.fabric8.kubernetes.api.model.AuthProviderConfig.getConfig()" because the return value of "io.fabric8.kubernetes.api.model.AuthInfo.getAuthProvider()" is null
Config.empty()
param toConfigBuilder()
, this works only when the current-context in~/.kube/config
is present and has a valid token when I do this on my machine. But in the Pod, this causes the Openshift serviceaccount to win out over the credentials we pass, so this also fails. After performing anoc logout
on my machine, I get the original null pointer.Environment: both Linux (in a Pod) and Windows
Not relevant since this is entirely a client side issue, but since this info is requested:
Kubernetes Server Version: v1.27.10+28ed2d7
The text was updated successfully, but these errors were encountered: