-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[UD] Support factory create policies for devWorkspaces #19711
Comments
label value format is pretty limited, so annotation is our way. Currently, we have apiVersion: workspace.devfile.io/v1alpha2
kind: DevWorkspace
metadata:
annotations:
che.eclipse.org/devfile-source: |
scm:
repo: 'https://github.com/che-samples/java-spring-petclinic.git'
revision: devfilev2
fileName: devfile.yaml apiVersion: workspace.devfile.io/v1alpha2
kind: DevWorkspace
metadata:
annotations:
che.eclipse.org/devfile-source: |
url:
location: >-
https://raw.githubusercontent.com/che-samples/java-spring-petclinic/devfilev2/devfile.yaml But it does not seem to be appropriate to store policyCreate, so instead of repurposing existing annotation I propose to use apiVersion: workspace.devfile.io/v1alpha2
kind: DevWorkspace
metadata:
annotations:
che.eclipse.org/factory-parameters: url=https://raw.githubusercontent.com/che-samples/java-spring-petclinic/devfilev2/devfile.yaml&policies.create=peruser ^ So, dashboard is able to find a proper workspace for peruser, even without requesting Che Server to analyze devfile source. |
I would prefer if we have structured content and smaller names something like metadata:
annotations:
che.eclipse.org/factory: |
createPolicy: peruser |
I'm OK with factory as well.
well, devfile source does not have an original URL but like in scm case has analyzed and probably modified content, like apiVersion: workspace.devfile.io/v1alpha2
kind: DevWorkspace
metadata:
annotations:
che.eclipse.org/devfile-source: |
factory:
params: url=https://raw.githubusercontent.com/che-samples/java-spring-petclinic/devfilev2/devfile.yaml&policies.create=peruser&devfile.override=metadata.name=your-first-dw
scm:
repo: 'https://github.com/che-samples/java-spring-petclinic.git'
revision: devfilev2
fileName: devfile.yaml ^ devfile.override is just here for an example, we haven't agreed yet if we need it for devworkspace. |
I'm not sure I understand the use case where we need to override url from an url factory maybe we would need to rename devfile-source to factory then Also why do we need factory params in the DevWorkspace ? AFAIK we would only need in the devfile (like user want to define a perUser policy) |
Is your task related to a problem? Please describe.
Che Workspaces supports two create policies: perClick, perUser.
But DevWorkspaces does not support them which cause to:
To store used policy DevWorkspace CR labels/annotations should be used.
The text was updated successfully, but these errors were encountered: