console icon indicating copy to clipboard operation
console copied to clipboard

Update Web Terminal label selector in Console frontend

Open AObuchow opened this issue 1 year ago • 0 comments

There is currently a discrepancy between the OpenShift Console's frontend and backend regarding the expected value of the controller.devfile.io/creator on Web Terminal DevWorkspaces when logged in as kubeadmin:

  • The backend expects the controller.devfile.io/creator label to be set to the username (kube:admin). This should be changing once https://github.com/openshift/console/issues/13879 is resolved.
  • The frontend still expects the controller.devfile.io/creator label to be an empty string "". See here and here.

My suggestion is the following:

  1. Resolve https://github.com/openshift/console/issues/13879 first, as it will determine the encoding/hashing process used for the controller.devfile.io/creator label
  2. Use the agreed-upon encoding/hashing process to properly select the controller.devfile.io/creator label by value in the cloud-shell frontend when kubeadmin is the user.
    • Optional, alternate solution): Rather than having a special case for kubeadmin (which never has a UID), the frontend could check if the user has a UID. If no UID is present, then the expected value of the controller.devfile.io/creator label should be the encoded/hashed value of the username.

Additional Context

This is a blocker for https://github.com/openshift/console/issues/13696, and a follow-up on an earlier comment of mine..

AObuchow avatar May 21 '24 20:05 AObuchow