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

Propagate Che user informations and preferences to DevWorkspaces #19061

Closed
Tracked by #20444 ...
benoitf opened this issue Feb 12, 2021 · 9 comments
Closed
Tracked by #20444 ...

Propagate Che user informations and preferences to DevWorkspaces #19061

benoitf opened this issue Feb 12, 2021 · 9 comments
Assignees
Labels
area/che-server engine/devworkspace Issues related to Che configured to use the devworkspace controller as workspace engine. kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P2 Has a minor but important impact to the usage or development of the system.

Comments

@benoitf
Copy link
Contributor

benoitf commented Feb 12, 2021

Is your task related to a problem? Please describe.

For example:

  1. che-theia will require dashboard URL to display redirect.
    But for example this information is not propagated to a workspace (no che api server to reach or no config map having this information)

  2. I would want to grab user information (like che user id/user name/ user email, etc)

Describe the solution you'd like

Have dashboard/che creating configMap with this kind of information

Describe alternatives you've considered

N/A

Additional context

che-theia can't grab information if it's not provided by 3rd party

@benoitf benoitf added kind/task Internal things, technical debt, and to-do tasks to be performed. engine/devworkspace Issues related to Che configured to use the devworkspace controller as workspace engine. area/che-server labels Feb 12, 2021
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Feb 12, 2021
@yhontyk yhontyk added severity/P2 Has a minor but important impact to the usage or development of the system. and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Feb 12, 2021
@tsmaeder
Copy link
Contributor

@benoitf "workspace/user settings" is a technical term in Theia IDE. What you mean is information about the che user and che workspace, right? How about we call it "workspace configuration" for clarity?

@benoitf
Copy link
Contributor Author

benoitf commented Feb 15, 2021

I called it 'che information' like workspace/user settings as it's a che information coming from the Che Rest API.
Che has REST api endpoints: /workspace/settings and /user
It's not tied to Theia

@benoitf benoitf changed the title Propagate 'che information' like workspace/user settings to workspaces using dev workspace operator Propagate 'che REST API information' like workspace/user settings to workspaces using dev workspace operator Feb 15, 2021
@benoitf benoitf changed the title Propagate 'che REST API information' like workspace/user settings to workspaces using dev workspace operator Propagate 'che REST API information' like workspace settings/users to devworkspaces Feb 15, 2021
@skabashnyuk
Copy link
Contributor

What about an idea to put user profile/preference to some CR in user's namespace. Would it be possible from the Theia side to read it directly from CR without having a REST API for it? CC @sleshchenko

@sleshchenko
Copy link
Member

What about an idea to put user profile/preference to some CR in user's namespace. Would it be possible from the Theia side to read it directly from CR without having a REST API for it? CC @sleshchenko

yes, but it's the question who will put that info near DevWorkspace CR.

@skabashnyuk
Copy link
Contributor

skabashnyuk commented Sep 6, 2021

We could create such two secrets (separate for user profile and prefereces) that can be reused Che7 based workspaces and Devworkspaces after k8s namespace provisioning.

apiVersion: v1
kind: Secret
metadata:
  name: che-user-profile
  namespace: user1-che
  annotations:
    che.eclipse.org/automount-workspace-secret: 'true'
    che.eclipse.org/mount-path: /che-conf/user/profile
    che.eclipse.org/mount-as: file
  labels:
    controller.devfile.io/mount-to-devworkspace: "true"
    app.kubernetes.io/part-of: che.eclipse.org
    app.kubernetes.io/component: workspace-secret
type: Opaque
data:
  id: id
  name: user1
  email: user1@site.com
apiVersion: v1
kind: Secret
metadata:
  name: che-user-preference
  namespace: user1-che
  annotations:
    che.eclipse.org/automount-workspace-secret: 'true'
    che.eclipse.org/mount-path: /che-conf/user/preferences
    che.eclipse.org/mount-as: file
  labels:
    controller.devfile.io/mount-to-devworkspace: "true"
    app.kubernetes.io/part-of: che.eclipse.org
    app.kubernetes.io/component: workspace-secret
type: Opaque
data:
  k: v
  k2: v2

@l0rd l0rd changed the title Propagate 'che REST API information' like workspace settings/users to devworkspaces Propagate Che user informations and preferences to DevWorkspaces Sep 8, 2021
@l0rd
Copy link
Contributor

l0rd commented Sep 8, 2021

@skabashnyuk looks good to me. A few comments:

  • we don't really need that for devfile v1 workspaces don't we? I mean: if that makes things easier che server side and theia side let's support v1 ws too, but otherwise that's not required.
  • we should avoid using che in the path to make productization easier (i.e. for crw). What about /home/user/.workspace-config/user/[profile|preferences]?
  • controller.devfile.io/mount-path and controller.devfile.io/mount-to-devworkspace should be annotations, not labels

@skabashnyuk
Copy link
Contributor

skabashnyuk commented Sep 8, 2021

we don't really need that for devfile v1 workspaces don't we? I mean: if that makes things easier che server side and theia side let's support v1 ws too, but otherwise that's not required.

We thought about that in two contexts

  • of data migration for the users who have Che7 based workspace now and eventually want to use devworkspace.
  • Changing backend/(single point of truth) for Che7 based workspaces from database to k8s secrets.

If that is not needed we can make them for devworkspaces only.

we should avoid using che in the path to make productization easier (i.e. for crw). What about /home/user/.workspace-config/user/[profile|preferences]

That path was selected because of https://github.com/eclipse-che/che-operator/blob/9cfd823f536b69dd44b8ee308750157adba2e258/pkg/deploy/defaults.go#L158. What about /config/user/[profile|preferences] I have some doubts that '/home/user' is standard for all our images CC @nickboldt

controller.devfile.io/mount-path and controller.devfile.io/mount-to-devworkspace should be annotations, not labels

you right for mount-path, for mount-to-devworkspace it looks like a label.
Are you sure https://github.com/devfile/devworkspace-operator/blob/ea794d07cb897c3fee05b3380c2ef8b88946678f/pkg/constants/metadata.go#L27 devfile/devworkspace-operator#417

@l0rd
Copy link
Contributor

l0rd commented Sep 8, 2021

My understanding is that even if we create those secrets the devfile v1 to devfile v2 migration would still require users to manually convert the workspaces so I am still skeptical on the value. And I would not invest in devfile v1 workspaces anymore: we should push hard on devfile v2 and deprecate v1 as soon as we have all the features that we need.

👍 to use the path /config/user/[profile|preferences]

Ack for mount-to-devworkspace as a label

@xbaran4
Copy link
Contributor

xbaran4 commented Sep 29, 2021

Resolved with eclipse-che/che-server#117

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/che-server engine/devworkspace Issues related to Che configured to use the devworkspace controller as workspace engine. kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P2 Has a minor but important impact to the usage or development of the system.
Projects
None yet
Development

No branches or pull requests

8 participants