-
Notifications
You must be signed in to change notification settings - Fork 20
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
possibility to set namespaces manually when the autodiscover featre is disabled by the organization #717
Comments
Hi @deejonz: Thanks for reporting what you're missing feature wise.
This would set the current namespace that you provide in name. |
Hi @adietish, thanks for your replay. I can't access such menu and it's stuck on loading ... so the only context menu I can see is 'Refresh' ... |
Hi @deejonz, this looks very bad. Loading the tree is breaking even before the namespaces are retrieved. Can you find any relevant stacktrace in the intellij logs (Help > Show Log in Finder, and then open the file in an editor)? |
like this?
|
@deejonz awesome, thanks! That's exactly what I needed. Explains it. Fixing it shouldn't take too long :) |
very good, thanks! |
for my own documentation, here's how to create a user that cannot list the namespaces on minikube (assumes minikube cert & key exist at Required to replicate the issue:
Steps:
openssl genrsa -out user1.key 2048
openssl req -new -key user1.key -out user1.csr -subj "/CN=user1/O=group1"
openssl x509 -req -in user1.csr -CA ~/.minikube/ca.crt -CAkey ~/.minikube/ca.key -CAcreateserial -out user1.crt -days 500
kubectl config set-credentials user1 --client-certificate=user1.crt --client-key=user1.key
kubectl config set-context user1-context --cluster=minikube --user=user1
kubectl config use-context user1-context
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
namespace: default
name: can-read-pods
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "watch", "list"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: read-pods
namespace: default
subjects:
- kind: User
name: user1
apiGroup: rbac.authorization.k8s.io
roleRef:
kind: ClusterRole
name: can-read-pods
apiGroup: rbac.authorization.k8s.io |
I cannot change the organization config at all, you should change the plugin to allow to enter manually the namespace like other plugins I use. |
Signed-off-by: Andre Dietisheim <[email protected]>
@deejonz: sure thing, I was pasting the above only for my own documentation purposes so that I (and PR reviewers) can replicate a setup where things behave for me/us like they do for you :) |
sure no problem |
Signed-off-by: Andre Dietisheim <[email protected]>
@deejonz here's how things behave with the current fix: Screen.Recording.2024-03-18.at.11.32.31.movMissing anything? |
Hello, thanks for your investigation but this is not what I get here... when I open my context I see an unexpected IDE error, the message on the bottom right corner of the screen with the error icon. If I open it I see that stacktrace I pasted the last time.
I'm using IntelliJ IDEA 2023.3.5 (Community Edition) but I was getting the same issue with the earlier versions. |
Signed-off-by: Andre Dietisheim <[email protected]>
Signed-off-by: Andre Dietisheim <[email protected]>
Hi @deejonz, Btw. the dashboard error is a different issue. It would be great if there was a stacktrace that you could share. I'd open a new issue for it. |
Hi @adietish, |
Hi @deejonz, |
Now it works! Very nice thank you. There are some of those errors I pasted above when opening deployments for example, but I'll create a separate task. Thanks. |
Hi @deejonz, |
Hi @deejonz, |
Hi @adietish, yes I pasted it on the other bug I opened today.
|
@deejonz maybe restarting the IDE helps? I suspect an issue in the kubernetes-client library caused by a change in your access token or cluster certificate? |
@adietish so when I restart the IDE it works fine. I start to opening pods, deployment, etc to see if it works. At some point I get that issue with src is null. From that moment everything is stuck. If I refresh it's all broken like below: here's another stacktrace a bit different:
|
I tried three times and I can reproduce everytime. It seems that error is not coming with a specific element, but only after opening a certain amount of items. |
"items" as in different kubernetes resource types (categories in the resource tree)? |
this last time 47 clicks, including opening items (like expanding pods one by one), I tried another time and it was 48.. very similar. |
Signed-off-by: Andre Dietisheim <[email protected]>
possibility to add namespaces manually when the autodiscover feature is disabled by the organization:
com.redhat.devtools.intellij.kubernetes.model.util.ResourceException: Could not get Namespaces for server https://myorganization.com
The text was updated successfully, but these errors were encountered: