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

Add contributions field to the DevWorkspace custom resource #879

Merged
merged 2 commits into from
Sep 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
851 changes: 851 additions & 0 deletions crds/workspace.devfile.io_devworkspaces.v1beta1.yaml

Large diffs are not rendered by default.

851 changes: 851 additions & 0 deletions crds/workspace.devfile.io_devworkspaces.yaml

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions pkg/apis/workspaces/v1alpha2/component_contribution.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package v1alpha2

import attributes "github.com/devfile/api/v2/pkg/attributes"

type ComponentContribution struct {
// Mandatory name that allows referencing the component
// from other elements (such as commands) or from an external
// devfile that may reference this component through a parent or a plugin.
// +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
// +kubebuilder:validation:MaxLength=63
Name string `json:"name"`
// Map of implementation-dependant free-form YAML attributes.
// +optional
// +kubebuilder:validation:Type=object
// +kubebuilder:pruning:PreserveUnknownFields
// +kubebuilder:validation:Schemaless
Attributes attributes.Attributes `json:"attributes,omitempty"`
// Reference to a remote Devfile or DevWorkspace resource to be included
// in the DevWorkspace.
PluginComponent `json:",inline"`
}
7 changes: 4 additions & 3 deletions pkg/apis/workspaces/v1alpha2/devworkspace_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import (

// DevWorkspaceSpec defines the desired state of DevWorkspace
type DevWorkspaceSpec struct {
Started bool `json:"started"`
RoutingClass string `json:"routingClass,omitempty"`
Template DevWorkspaceTemplateSpec `json:"template,omitempty"`
Started bool `json:"started"`
RoutingClass string `json:"routingClass,omitempty"`
Template DevWorkspaceTemplateSpec `json:"template,omitempty"`
Contributions []ComponentContribution `json:"contributions,omitempty"`
}

// DevWorkspaceStatus defines the observed state of DevWorkspace
Expand Down
30 changes: 30 additions & 0 deletions pkg/apis/workspaces/v1alpha2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading