-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for component contributions in DevWorkspace custom resource
Add field `.spec.contributions` to the DevWorkspace custom resource to allow specifying additional resources (e.g. editors, etc.) that should be included in a DevWorkspace. This allows for adding additional components to a workspace while using the .spec.template field to store a devfile. Signed-off-by: Angel Misevski <[email protected]>
- Loading branch information
Showing
2 changed files
with
25 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters