Skip to content
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

Potential NPE when deploying on Kubernetes / Openshift #19870

Closed
iocanel opened this issue Sep 2, 2021 · 1 comment · Fixed by #19871
Closed

Potential NPE when deploying on Kubernetes / Openshift #19870

iocanel opened this issue Sep 2, 2021 · 1 comment · Fixed by #19871
Assignees
Labels
area/kubernetes kind/bug Something isn't working
Milestone

Comments

@iocanel
Copy link
Contributor

iocanel commented Sep 2, 2021

Describe the bug

The method below may return null, when adapt fails.

    private static OpenShiftClient toOpenshiftClient(KubernetesClient client) {
        try {
            return client.adapt(OpenShiftClient.class);
        } catch (KubernetesClientException e) {
            KubernetesClientErrorHandler.handle(e);
            return null; // will never happen
        }
    }

So, what is supposed to never happen actually does.

Expected behavior

handle() should always throw an Exception

Actual behavior

handle() only throws SSL related exception Exception

How to Reproduce?

Just create an app add the quarkus-openshift extension and run mvn -Dquarkus.kubernetes.deploy=true against an unreachable cluster.

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@iocanel iocanel added the kind/bug Something isn't working label Sep 2, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Sep 2, 2021

/cc @geoand

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubernetes kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants