redhat-developer / intellij-kubernetes

IntelliJ Kubernetes plugin
https://plugins.jetbrains.com/plugin/15921-kubernetes-by-red-hat
Eclipse Public License 2.0
20 stars 20 forks source link

As a user I want to be able to re-authenticate on the sandbox #374

Open adietish opened 2 years ago

adietish commented 2 years ago

Steps:

  1. ASSERT: have an outdated token on the sandbox
    $ oc get pod
    error: You must be logged in to the server (Unauthorized)
  2. ASSERT: have a resource yml file, ex.
    
    apiVersion: apps/v1
    kind: Deployment
    metadata:
    name: nginx-rolling
    spec:
    replicas: 1
    selector:
    matchLabels:
      app: nginx-rolling
    strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
    template:
    metadata:
      labels:
        app: nginx-rolling
    spec:
      containers:
        - image: nginx
          name: nginx
          ports:
            - containerPort: 8080

3. EXEC: open the resource yml file in an editor

**Result:**
Editor shows an error notification, telling you that you're not authorized
![image](https://user-images.githubusercontent.com/25126/161942201-1fe7b890-34e8-4bdf-ae91-ff9c750957e3.png)
You now have to browse to your web console, log in, copy the login command and execute it in the terminal 

**Expected result:**
As a user I want to be able to execute these steps in the IDE
jeffmaury commented 2 years ago

Don't know how to fix this as each Kubernetes distribution has its own way of handling authentication

adietish commented 2 years ago

@jeffmaury isn't there a way to query the supported auth methods (user/pass, oauth, etc.)?

jeffmaury commented 2 years ago

Not sure it's standardized. Some providers use a local binary (EKS, GCP,...)