-
Notifications
You must be signed in to change notification settings - Fork 88
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
feat: support workspace defaults #1395
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1395 +/- ##
=======================================
Coverage 63.27% 63.27%
=======================================
Files 70 70
Lines 5827 5827
=======================================
Hits 3687 3687
Misses 1777 1777
Partials 363 363 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@amisevsk @l0rd could you please review in conjunction with devfile/devworkspace-operator#844
are we good with the format described in the eclipse-che/che#21353
As I recall last time we discussed more explicit definition - defaultContainer
and defaultEditor
@tolusha maybe to avoid confusion lets merge #1324 first ?
|
Agree. let's wait for #1324 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally LGTM, but could use some improved docs. I also wonder how this will interplay with #1324, I suspect it'll cause merge conflicts.
Edit: should have read the existing discussion -- apologies there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this point it will also be necessary to add these fields to the v2 spec and implement conversion between the two -- I can help with that if you like.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Thanks @olexii4
DefaultEditor string `json:"defaultEditor,omitempty"` | ||
// Default components applied to DevWorkspaces. | ||
// These default components are meant to be used when a Devfile, that does not contain any components. | ||
// +optional | ||
DefaultComponents []devfile.Component `json:"defaultComponents,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@l0rd please, take a look at the final structure we are planning to have in place:
devEnvironments:
(...)
defaultComponents [ ]
defaultEditor: ""
Any concerns?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@olexii4 LGTM
could you please update the description with the new v2 format. Currently it still shows an old CR format with obsolete server
instead of devEnvironments
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: amisevsk, ibuziuk, olexii4 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
New changes are detected. LGTM label has been removed. |
[10:22:59] → CustomResourceDefinition.apiextensions.k8s.io "checlusters.org.eclipse.che" is invalid: [spec.versions[0].schema.openAPIV3Schema.properties[spec].properties[server].properties[workspaceDefaultComponents].items.properties[attributes].allOf[0].x-kubernetes-preserve-unknown-fields: Forbidden: must be false to be structural, spec.versions[0].schema.openAPIV3Schema.properties[spec].properties[server].properties[workspaceDefaultComponents].items.properties[attributes].allOf[1].x-kubernetes-preserve-unknown-fields: Forbidden: must be false to be structural, spec.versions[0].schema.openAPIV3Schema.properties[spec].properties[server].properties[workspaceDefaultComponents].items.properties[container].properties[endpoints].items.properties[attributes].allOf[0].x-kubernetes-preserve-unknown-fields: Forbidden: must be false to be structural, spec.versions[0].schema.openAPIV3Schema.properties[spec].properties[server].properties[workspaceDefaultComponents].items.properties[container].properties[endpoints].items.properties[attributes].allOf[1].x-kubernetes-preserve-unknown-fields: Forbidden: must be false to be structural, spec.versions[0].schema.openAPIV3Schema.properties[spec].properties[server].properties[workspaceDefaultComponents].items.properties[kubernetes].properties[endpoints].items.properties[attributes].allOf[0].x-kubernetes-preserve-unknown-fields: Forbidden: must be false to be structural, spec.versions[0].schema.openAPIV3Schema.properties[spec].properties[server].properties[workspaceDefaultComponents].items.properties[kubernetes].properties[endpoints].items.properties[attributes].allOf[1].x-kubernetes-preserve-unknown-fields: Forbidden: must be false to be structural, spec.versions[0].schema.openAPIV3Schema.properties[spec].properties[server].properties[workspaceDefaultComponents].items.properties[openshift].properties[endpoints].items.properties[attributes].allOf[0].x-kubernetes-preserve-unknown-fields: Forbidden: must be false to be structural, spec.versions[0].schema.openAPIV3Schema.properties[spec].properties[server].properties[workspaceDefaultComponents].items.properties[openshift].properties[endpoints].items.properties[attributes].allOf[1].x-kubernetes-preserve-unknown-fields: Forbidden: must be false to be structural, spec.versions[0].schema.openAPIV3Schema.properties[spec].properties[server].properties[workspaceDefaultComponents].items.properties[plugin].properties[commands].items.properties[attributes].allOf[0].x-kubernetes-preserve-unknown-fields: Forbidden: must be false to be structural, spec.versions[0].schema.openAPIV3Schema.properties[spec].properties[server].properties[workspaceDefaultComponents].items.properties[plugin].properties[commands].items.properties[attributes].allOf[1].x-kubernetes-preserve-unknown-fields: Forbidden: must be false to be structural, spec.versions[0].schema.openAPIV3Schema.properties[spec].properties[server].properties[workspaceDefaultComponents].items.properties[plugin].properties[components].items.properties[attributes].allOf[0].x-kubernetes-preserve-unknown-fields: Forbidden: must be false to be structural, spec.versions[0].schema.openAPIV3Schema.properties[spec].properties[server].properties[workspaceDefaultComponents].items.properties[plugin].properties[components].items.properties[attributes].allOf[1].x-kubernetes-preserve-unknown-fields: Forbidden: must be false to be structural, spec.versions[0].schema.openAPIV3Schema.properties[spec].properties[server].properties[workspaceDefaultComponents].items.properties[plugin].properties[components].items.properties[container].properties[endpoints].items.properties[attributes].allOf[0].x-kubernetes-preserve-unknown-fields: Forbidden: must be false to be structural, spec.versions[0].schema.openAPIV3Schema.properties[spec].properties[server].properties[workspaceDefaultComponents].items.properties[plugin].properties[components].items.properties[container].properties[endpoints].items.properties[attributes].allOf[1].x-kubernetes-preserve-unknown-fields: Forbidden: must be false to be structural, spec.versions[0].schema.openAPIV3Schema.properties[spec].properties[server].properties[workspaceDefaultComponents].items.properties[plugin].properties[components].items.properties[kubernetes].properties[endpoints].items.properties[attributes].allOf[0].x-kubernetes-preserve-unknown-fields: Forbidden: must be false to be structural, spec.versions[0].schema.openAPIV3Schema.properties[spec].properties[server].properties[workspaceDefaultComponents].items.properties[plugin].properties[components].items.properties[kubernetes].properties[endpoints].items.properties[attributes].allOf[1].x-kubernetes-preserve-unknown-fields: Forbidden: must be false to be structural, spec.versions[0].schema.openAPIV3Schema.properties[spec].properties[server].properties[workspaceDefaultComponents].items.properties[plugin].properties[components].items.properties[openshift].properties[endpoints].items.properties[attributes].allOf[0].x-kubernetes-preserve-unknown-fields: Forbidden: must be false to be structural, spec.versions[0].schema.openAPIV3Schema.properties[spec].properties[server].properties[workspaceDefaultComponents].items.properties[plugin].properties[components].items.properties[openshift].properties[endpoints].items.properties[attributes].allOf[1].x-kubernetes-preserve-unknown-fields: Forbidden: must be false to be structural, spec.versions[1].schema.openAPIV3Schema.properties[spec].properties[devEnvironments].properties[defaultComponents].items.properties[attributes].allOf[0].x-kubernetes-preserve-unknown-fields: Forbidden: must be false to be structural, spec.versions[1].schema.openAPIV3Schema.properties[spec].properties[devEnvironments].properties[defaultComponents].items.properties[attributes].allOf[1].x-kubernetes-preserve-unknown-fields: Forbidden: must be false to be structural, spec.versions[1].schema.openAPIV3Schema.properties[spec].properties[devEnvironments].properties[defaultComponents].items.properties[container].properties[endpoints].items.properties[attributes].allOf[0].x-kubernetes-preserve-unknown-fields: Forbidden: must be false to be structural, spec.versions[1].schema.openAPIV3Schema.properties[spec].properties[devEnvironments].properties[defaultComponents].items.properties[container].properties[endpoints].items.properties[attributes].allOf[1].x-kubernetes-preserve-unknown-fields: Forbidden: must be false to be structural, spec.versions[1].schema.openAPIV3Schema.properties[spec].properties[devEnvironments].properties[defaultComponents].items.properties[kubernetes].properties[endpoints].items.properties[attributes].allOf[0].x-kubernetes-preserve-unknown-fields: Forbidden: must be false to be structural, spec.versions[1].schema.openAPIV3Schema.properties[spec].properties[devEnvironments].properties[defaultComponents].items.properties[kubernetes].properties[endpoints].items.properties[attributes].allOf[1].x-kubernetes-preserve-unknown-fields: Forbidden: must be false to be structural, spec.versions[1].schema.openAPIV3Schema.properties[spec].properties[devEnvironments].properties[defaultComponents].items.properties[openshift].properties[endpoints].items.properties[attributes].allOf[0].x-kubernetes-preserve-unknown-fields: Forbidden: must be false to be structural, spec.versions[1].schema.openAPIV3Schema.properties[spec].properties[devEnvironments].properties[defaultComponents].items.properties[openshift].properties[endpoints].items.properties[attributes].allOf[1].x-kubernetes-preserve-unknown-fields: Forbidden: must be false to be structural, spec.versions[1].schema.openAPIV3Schema.properties[spec].properties[devEnvironments].properties[defaultComponents].items.properties[plugin].properties[commands].items.properties[attributes].allOf[0].x-kubernetes-preserve-unknown-fields: Forbidden: must be false to be structural, spec.versions[1].schema.openAPIV3Schema.properties[spec].properties[devEnvironments].properties[defaultComponents].items.properties[plugin].properties[commands].items.properties[attributes].allOf[1].x-kubernetes-preserve-unknown-fields: Forbidden: must be false to be structural, spec.versions[1].schema.openAPIV3Schema.properties[spec].properties[devEnvironments].properties[defaultComponents].items.properties[plugin].properties[components].items.properties[attributes].allOf[0].x-kubernetes-preserve-unknown-fields: Forbidden: must be false to be structural, spec.versions[1].schema.openAPIV3Schema.properties[spec].properties[devEnvironments].properties[defaultComponents].items.properties[plugin].properties[components].items.properties[attributes].allOf[1].x-kubernetes-preserve-unknown-fields: Forbidden: must be false to be structural, spec.versions[1].schema.openAPIV3Schema.properties[spec].properties[devEnvironments].properties[defaultComponents].items.properties[plugin].properties[components].items.properties[container].properties[endpoints].items.properties[attributes].allOf[0].x-kubernetes-preserve-unknown-fields: Forbidden: must be false to be structural, spec.versions[1].schema.openAPIV3Schema.properties[spec].properties[devEnvironments].properties[defaultComponents].items.properties[plugin].properties[components].items.properties[container].properties[endpoints].items.properties[attributes].allOf[1].x-kubernetes-preserve-unknown-fields: Forbidden: must be false to be structural, spec.versions[1].schema.openAPIV3Schema.properties[spec].properties[devEnvironments].properties[defaultComponents].items.properties[plugin].properties[components].items.properties[kubernetes].properties[endpoints].items.properties[attributes].allOf[0].x-kubernetes-preserve-unknown-fields: Forbidden: must be false to be structural, spec.versions[1].schema.openAPIV3Schema.properties[spec].properties[devEnvironments].properties[defaultComponents].items.properties[plugin].properties[components].items.properties[kubernetes].properties[endpoints].items.properties[attributes].allOf[1].x-kubernetes-preserve-unknown-fields: Forbidden: must be false to be structural, spec.versions[1].schema.openAPIV3Schema.properties[spec].properties[devEnvironments].properties[defaultComponents].items.properties[plugin].properties[components].items.properties[openshift].properties[endpoints].items.properties[attributes].allOf[0].x-kubernetes-preserve-unknown-fields: Forbidden: must be false to be structural, spec.versions[1].schema.openAPIV3Schema.properties[spec].properties[devEnvironments].properties[defaultComponents].items.properties[plugin].properties[components].items.properties[openshift].properties[endpoints].items.properties[attributes].allOf[1].x-kubernetes-preserve-unknown-fields: Forbidden: must be false to be structural] |
@amisevsk Did you face such kind the problem? |
@tolusha Hmmm, I remember there being some issues with preserveUnknownFields in the devfile/api but I don't remember what was done to fix it. |
I see difference in CRD generation devfile:
operator:
|
Signed-off-by: Oleksii Orel <[email protected]>
Signed-off-by: Anatolii Bazko <[email protected]>
Signed-off-by: Anatolii Bazko <[email protected]>
Signed-off-by: Anatolii Bazko <[email protected]>
Switched to a new controller-gen version (v0.4.1 -> v0.7.0) |
Signed-off-by: Anatolii Bazko <[email protected]>
/retest |
@olexii4: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Signed-off-by: Oleksii Orel [email protected]
What does this PR do?
Add support for workspace default editor and workspace default components.
Example:
Screenshot/screencast of this PR
What issues does this PR fix or reference?
It needs for eclipse-che/che#21353
How to test this PR?
PR Checklist
As the author of this Pull Request I made sure that:
What issues does this PR fix or reference
andHow to test this PR
completedReviewers
Reviewers, please comment how you tested the PR when approving it.