console
console copied to clipboard
Update Web Terminal label selector in Console frontend
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/creatorlabel 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/creatorlabel to be an empty string"". See here and here.
My suggestion is the following:
- Resolve https://github.com/openshift/console/issues/13879 first, as it will determine the encoding/hashing process used for the
controller.devfile.io/creatorlabel - Use the agreed-upon encoding/hashing process to properly select the
controller.devfile.io/creatorlabel 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/creatorlabel should be the encoded/hashed value of the username.
- 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
Additional Context
This is a blocker for https://github.com/openshift/console/issues/13696, and a follow-up on an earlier comment of mine..