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

if I'm not authorized to my Kubernetes cluster, the icon used is OpenShift #741

Closed
adietish opened this issue Apr 4, 2024 · 3 comments
Closed
Assignees
Labels
kind/bug Something isn't working severity/minor
Milestone

Comments

@adietish
Copy link
Collaborator

adietish commented Apr 4, 2024

depends on redhat-developer/intellij-common#216

Steps:

  1. ASSERT: have a kubernetes cluster that you're not authorized to
  2. EXEC: launch plugin & look at the cluster icon

Result:
Even though my cluster is a kubernetes cluster, the icon that is used is the icon for OpenShift clusters

@adietish
Copy link
Collaborator Author

adietish commented Apr 4, 2024

The reason for this is that the code thinks that a cluster, where talking OpenShift to it errors with unauthorized, is an OpenShift cluster.
https://github.com/redhat-developer/intellij-common/blob/c9630d81fe209956bb97e7b0be7e5b72ffb09a15/src/main/java/com/redhat/devtools/intellij/common/kubernetes/ClusterHelper.java#L29-L33

try {
     return osClient.isSupported();
} catch (KubernetesClientException e) {
     return e.getCode() == HttpURLConnection.HTTP_UNAUTHORIZED;
}

@adietish adietish self-assigned this Apr 8, 2024
@adietish adietish added kind/bug Something isn't working severity/minor labels Apr 8, 2024
@adietish adietish added this to the 1.3.0 milestone Apr 8, 2024
@adietish adietish moved this to 👀 In review in IDE Cloudaptors Apr 8, 2024
@adietish
Copy link
Collaborator Author

adietish commented Apr 9, 2024

This is also causing OIDC tokens not to be refreshed as reported in #726 (comment)

@adietish adietish changed the title when I'm not authorized to my kubernetes cluster, the icon used is OpenShift if I'm not authorized to my kubernetes cluster, the icon used is OpenShift Apr 9, 2024
@adietish adietish changed the title if I'm not authorized to my kubernetes cluster, the icon used is OpenShift if I'm not authorized to my Kubernetes cluster, the icon used is OpenShift Apr 9, 2024
@adietish
Copy link
Collaborator Author

adietish commented Apr 9, 2024

This is fixed by redhat-developer/intellij-common#216
Closing.

@adietish adietish closed this as completed Apr 9, 2024
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in IDE Cloudaptors Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working severity/minor
Projects
Status: ✅ Done
Development

No branches or pull requests

1 participant