From 12d4ebe204f39b3dd85a81554446216f7a4d9109 Mon Sep 17 00:00:00 2001 From: Angel Misevski Date: Thu, 20 Jan 2022 12:01:51 -0500 Subject: [PATCH] Restore v1alpha1 DevWorkspace CRD The v1alpha1 apiVersion of the DevWorkspace (and DevWorkspaceTemplate) CRD was removed prematurely as there are existing users that depend on it. This commit restores the v1alpha1 API as removed in PR #639 in order to allow dependents of the DevWorkspace API to update to later versions of the v1alpha2 API without breaking v1alpha1 compatibility. Signed-off-by: Angel Misevski --- build.sh | 4 +- ...pace.devfile.io_devworkspaces.v1beta1.yaml | 11737 +++++++++++----- crds/workspace.devfile.io_devworkspaces.yaml | 4082 ++++++ ...file.io_devworkspacetemplates.v1beta1.yaml | 11107 ++++++++++----- ...pace.devfile.io_devworkspacetemplates.yaml | 3875 +++++ devfile.api.code-workspace | 6 +- generator/crds/zz_generated.markerhelp.go | 1 - generator/getters/zz_generated.markerhelp.go | 1 - .../interfaces/zz_generated.markerhelp.go | 1 - .../overrides/zz_generated.markerhelp.go | 1 - generator/schemas/zz_generated.markerhelp.go | 1 - generator/validate/zz_generated.markerhelp.go | 1 - go.mod | 3 +- .../v1alpha1/attributes_conversion.go | 40 + pkg/apis/workspaces/v1alpha1/commands.go | 215 + .../v1alpha1/commands_conversion.go | 105 + .../v1alpha1/commands_conversion_test.go | 62 + .../workspaces/v1alpha1/component__plugin.go | 13 + .../v1alpha1/component_container.go | 71 + .../v1alpha1/component_kubernetes_like.go | 51 + .../v1alpha1/component_plugin_conversion.go | 166 + .../workspaces/v1alpha1/component_volume.go | 23 + pkg/apis/workspaces/v1alpha1/components.go | 126 + .../v1alpha1/components_conversion.go | 59 + .../v1alpha1/components_conversion_test.go | 60 + pkg/apis/workspaces/v1alpha1/conversion.go | 171 + .../workspaces/v1alpha1/conversion_test.go | 302 + .../v1alpha1/devworkspace_conversion.go | 19 + .../workspaces/v1alpha1/devworkspace_types.go | 100 + .../devworkspacetemplate_conversion.go | 20 + .../v1alpha1/devworkspacetemplate_spec.go | 36 + .../v1alpha1/devworkspacetemplate_types.go | 32 + pkg/apis/workspaces/v1alpha1/doc.go | 4 + pkg/apis/workspaces/v1alpha1/endpoint.go | 105 + pkg/apis/workspaces/v1alpha1/events.go | 26 + .../workspaces/v1alpha1/events_conversion.go | 19 + .../v1alpha1/events_conversion_test.go | 29 + .../workspaces/v1alpha1/import_reference.go | 49 + pkg/apis/workspaces/v1alpha1/keyed.go | 113 + .../v1alpha1/override_directives.go | 58 + pkg/apis/workspaces/v1alpha1/overrides.go | 41 + pkg/apis/workspaces/v1alpha1/parent.go | 6 + .../workspaces/v1alpha1/parent_conversion.go | 273 + .../v1alpha1/parent_conversion_test.go | 40 + pkg/apis/workspaces/v1alpha1/projects.go | 112 + .../v1alpha1/projects_conversion.go | 137 + .../v1alpha1/projects_conversion_test.go | 55 + pkg/apis/workspaces/v1alpha1/register.go | 22 + pkg/apis/workspaces/v1alpha1/union.go | 20 + .../workspaces/v1alpha1/union_definitions.go | 177 + .../v1alpha1/union_implementation.go | 103 + pkg/apis/workspaces/v1alpha1/union_test.go | 62 + .../v1alpha1/zz_generated.deepcopy.go | 1217 ++ .../v1alpha2/zz_generated.deepcopy.go | 1 - 54 files changed, 27759 insertions(+), 7401 deletions(-) create mode 100644 pkg/apis/workspaces/v1alpha1/attributes_conversion.go create mode 100644 pkg/apis/workspaces/v1alpha1/commands.go create mode 100644 pkg/apis/workspaces/v1alpha1/commands_conversion.go create mode 100644 pkg/apis/workspaces/v1alpha1/commands_conversion_test.go create mode 100644 pkg/apis/workspaces/v1alpha1/component__plugin.go create mode 100644 pkg/apis/workspaces/v1alpha1/component_container.go create mode 100644 pkg/apis/workspaces/v1alpha1/component_kubernetes_like.go create mode 100644 pkg/apis/workspaces/v1alpha1/component_plugin_conversion.go create mode 100644 pkg/apis/workspaces/v1alpha1/component_volume.go create mode 100644 pkg/apis/workspaces/v1alpha1/components.go create mode 100644 pkg/apis/workspaces/v1alpha1/components_conversion.go create mode 100644 pkg/apis/workspaces/v1alpha1/components_conversion_test.go create mode 100644 pkg/apis/workspaces/v1alpha1/conversion.go create mode 100644 pkg/apis/workspaces/v1alpha1/conversion_test.go create mode 100644 pkg/apis/workspaces/v1alpha1/devworkspace_conversion.go create mode 100644 pkg/apis/workspaces/v1alpha1/devworkspace_types.go create mode 100644 pkg/apis/workspaces/v1alpha1/devworkspacetemplate_conversion.go create mode 100644 pkg/apis/workspaces/v1alpha1/devworkspacetemplate_spec.go create mode 100644 pkg/apis/workspaces/v1alpha1/devworkspacetemplate_types.go create mode 100644 pkg/apis/workspaces/v1alpha1/doc.go create mode 100644 pkg/apis/workspaces/v1alpha1/endpoint.go create mode 100644 pkg/apis/workspaces/v1alpha1/events.go create mode 100644 pkg/apis/workspaces/v1alpha1/events_conversion.go create mode 100644 pkg/apis/workspaces/v1alpha1/events_conversion_test.go create mode 100644 pkg/apis/workspaces/v1alpha1/import_reference.go create mode 100644 pkg/apis/workspaces/v1alpha1/keyed.go create mode 100644 pkg/apis/workspaces/v1alpha1/override_directives.go create mode 100644 pkg/apis/workspaces/v1alpha1/overrides.go create mode 100644 pkg/apis/workspaces/v1alpha1/parent.go create mode 100644 pkg/apis/workspaces/v1alpha1/parent_conversion.go create mode 100644 pkg/apis/workspaces/v1alpha1/parent_conversion_test.go create mode 100644 pkg/apis/workspaces/v1alpha1/projects.go create mode 100644 pkg/apis/workspaces/v1alpha1/projects_conversion.go create mode 100644 pkg/apis/workspaces/v1alpha1/projects_conversion_test.go create mode 100644 pkg/apis/workspaces/v1alpha1/register.go create mode 100644 pkg/apis/workspaces/v1alpha1/union.go create mode 100644 pkg/apis/workspaces/v1alpha1/union_definitions.go create mode 100644 pkg/apis/workspaces/v1alpha1/union_implementation.go create mode 100644 pkg/apis/workspaces/v1alpha1/union_test.go create mode 100644 pkg/apis/workspaces/v1alpha1/zz_generated.deepcopy.go diff --git a/build.sh b/build.sh index 0eb754fe9..e50006f21 100755 --- a/build.sh +++ b/build.sh @@ -51,11 +51,11 @@ generator/build/generator "interfaces" "paths=./pkg/apis/workspaces/v1alpha2" echo "Generating K8S CRDs" -generator/build/generator "crds" "output:crds:artifacts:config=crds" "paths=./pkg/apis/workspaces/v1alpha2;" +generator/build/generator "crds" "output:crds:artifacts:config=crds" "paths=./pkg/apis/workspaces/v1alpha2;./pkg/apis/workspaces/v1alpha1" echo "Generating DeepCopy implementations" -generator/build/generator "deepcopy" "paths=./pkg/apis/workspaces/v1alpha2;" +generator/build/generator "deepcopy" "paths=./pkg/apis/workspaces/v1alpha2;./pkg/apis/workspaces/v1alpha1" echo "Generating JsonSchemas" diff --git a/crds/workspace.devfile.io_devworkspaces.v1beta1.yaml b/crds/workspace.devfile.io_devworkspaces.v1beta1.yaml index 71f03f330..50ace3bf6 100644 --- a/crds/workspace.devfile.io_devworkspaces.v1beta1.yaml +++ b/crds/workspace.devfile.io_devworkspaces.v1beta1.yaml @@ -6,19 +6,6 @@ metadata: creationTimestamp: null name: devworkspaces.workspace.devfile.io spec: - additionalPrinterColumns: - - JSONPath: .status.devworkspaceId - description: The devworkspace's unique id - name: DevWorkspace ID - type: string - - JSONPath: .status.phase - description: The current devworkspace startup phase - name: Phase - type: string - - JSONPath: .status.message - description: Additional information about the devworkspace - name: Info - type: string group: workspace.devfile.io names: kind: DevWorkspace @@ -31,3936 +18,8086 @@ spec: scope: Namespaced subresources: status: {} - validation: - openAPIV3Schema: - description: DevWorkspace is the Schema for the devworkspaces API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: DevWorkspaceSpec defines the desired state of DevWorkspace - properties: - routingClass: - type: string - started: - type: boolean - template: - description: Structure of the devworkspace. This is also the specification - of a devworkspace template. - properties: - attributes: - description: Map of implementation-dependant free-form YAML attributes. - type: object - x-kubernetes-preserve-unknown-fields: true - commands: - description: Predefined, ready-to-use, devworkspace-related commands - items: - oneOf: - - required: - - exec - - required: - - apply - - required: - - composite - - required: - - custom - properties: - apply: - description: "Command that consists in applying a given component - definition, typically bound to a devworkspace event. \n - For example, when an `apply` command is bound to a `preStart` - event, and references a `container` component, it will start - the container as a K8S initContainer in the devworkspace - POD, unless the component has its `dedicatedPod` field set - to `true`. \n When no `apply` command exist for a given - component, it is assumed the component will be applied at - devworkspace start by default, unless `deployByDefault` - for that component is set to false." - properties: - component: - description: Describes component that will be applied - type: string - group: - description: Defines the group this command is part of - properties: - isDefault: - description: Identifies the default command for a - given group kind - type: boolean - kind: - description: Kind of group the command is part of - enum: - - build - - run - - test - - debug - - deploy - type: string - required: - - kind - type: object - label: - description: Optional label that provides a label for - this command to be used in Editor UI menus for example - type: string - required: - - component - type: object - attributes: - description: Map of implementation-dependant free-form YAML - attributes. - type: object - x-kubernetes-preserve-unknown-fields: true - commandType: - description: Type of devworkspace command - enum: - - Exec - - Apply - - Composite - - Custom - type: string - composite: - description: Composite command that allows executing several - sub-commands either sequentially or concurrently - properties: - commands: - description: The commands that comprise this composite - command - items: - type: string - type: array - group: - description: Defines the group this command is part of - properties: - isDefault: - description: Identifies the default command for a - given group kind - type: boolean - kind: - description: Kind of group the command is part of - enum: - - build - - run - - test - - debug - - deploy - type: string - required: - - kind - type: object - label: - description: Optional label that provides a label for - this command to be used in Editor UI menus for example - type: string - parallel: - description: Indicates if the sub-commands should be executed - concurrently - type: boolean - type: object - custom: - description: Custom command whose logic is implementation-dependant - and should be provided by the user possibly through some - dedicated plugin - properties: - commandClass: - description: Class of command that the associated implementation - component should use to process this command with the - appropriate logic - type: string - embeddedResource: - description: Additional free-form configuration for this - custom command that the implementation component will - know how to use - type: object - x-kubernetes-embedded-resource: true - x-kubernetes-preserve-unknown-fields: true - group: - description: Defines the group this command is part of - properties: - isDefault: - description: Identifies the default command for a - given group kind - type: boolean - kind: - description: Kind of group the command is part of - enum: - - build - - run - - test - - debug - - deploy + version: v1alpha1 + versions: + - additionalPrinterColumns: + - JSONPath: .status.workspaceId + description: The workspace's unique id + name: Workspace ID + type: string + - JSONPath: .status.phase + description: The current workspace startup phase + name: Phase + type: string + - JSONPath: .status.ideUrl + description: Url endpoint for accessing workspace + name: URL + type: string + deprecated: true + name: v1alpha1 + schema: + openAPIV3Schema: + description: DevWorkspace is the Schema for the devworkspaces API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: DevWorkspaceSpec defines the desired state of DevWorkspace + properties: + routingClass: + type: string + started: + type: boolean + template: + description: Structure of the workspace. This is also the specification + of a workspace template. + properties: + commands: + description: Predefined, ready-to-use, workspace-related commands + items: + oneOf: + - required: + - exec + - required: + - apply + - required: + - vscodeTask + - required: + - vscodeLaunch + - required: + - composite + - required: + - custom + properties: + apply: + description: "Command that consists in applying a given + component definition, typically bound to a workspace event. + \n For example, when an `apply` command is bound to a + `preStart` event, and references a `container` component, + it will start the container as a K8S initContainer in + the workspace POD, unless the component has its `dedicatedPod` + field set to `true`. \n When no `apply` command exist + for a given component, it is assumed the component will + be applied at workspace start by default." + properties: + attributes: + additionalProperties: type: string - required: - - kind - type: object - label: - description: Optional label that provides a label for - this command to be used in Editor UI menus for example - type: string - required: - - commandClass - - embeddedResource - type: object - exec: - description: CLI Command executed in an existing component - container - properties: - commandLine: - description: "The actual command-line string \n Special - variables that can be used: \n - `$PROJECTS_ROOT`: - A path where projects sources are mounted as defined - by container component's sourceMapping. \n - `$PROJECT_SOURCE`: - A path to a project source ($PROJECTS_ROOT/). - If there are multiple projects, this will point to the - directory of the first one." - type: string - component: - description: Describes component to which given action - relates - type: string - env: - description: Optional list of environment variables that - have to be set before running the command - items: + description: Optional map of free-form additional command + attributes + type: object + component: + description: Describes component that will be applied + type: string + group: + description: Defines the group this command is part + of properties: - name: - type: string - value: + isDefault: + description: Identifies the default command for + a given group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug type: string required: - - name - - value - type: object - type: array - group: - description: Defines the group this command is part of - properties: - isDefault: - description: Identifies the default command for a - given group kind - type: boolean - kind: - description: Kind of group the command is part of - enum: - - build - - run - - test - - debug - - deploy + - kind + type: object + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + type: string + label: + description: Optional label that provides a label for + this command to be used in Editor UI menus for example + type: string + required: + - id + type: object + commandType: + description: Type of workspace command + enum: + - Exec + - Apply + - VscodeTask + - VscodeLaunch + - Composite + - Custom + type: string + composite: + description: Composite command that allows executing several + sub-commands either sequentially or concurrently + properties: + attributes: + additionalProperties: type: string - required: - - kind - type: object - hotReloadCapable: - description: "Whether the command is capable to reload - itself when source code changes. If set to `true` the - command won't be restarted and it is expected to handle - file changes on its own. \n Default value is `false`" - type: boolean - label: - description: Optional label that provides a label for - this command to be used in Editor UI menus for example - type: string - workingDir: - description: "Working directory where the command should - be executed \n Special variables that can be used: \n - \ - `$PROJECTS_ROOT`: A path where projects sources - are mounted as defined by container component's sourceMapping. - \n - `$PROJECT_SOURCE`: A path to a project source - ($PROJECTS_ROOT/). If there are multiple - projects, this will point to the directory of the first - one." - type: string - required: - - commandLine - - component - type: object - id: - description: Mandatory identifier that allows referencing - this command in composite commands, from a parent, or in - events. - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - required: - - id - type: object - type: array - components: - description: List of the devworkspace components, such as editor - and plugins, user-provided containers, or other types of components - items: - oneOf: - - required: - - container - - required: - - kubernetes - - required: - - openshift - - required: - - volume - - required: - - image - - required: - - plugin - - required: - - custom - properties: - attributes: - description: Map of implementation-dependant free-form YAML - attributes. - type: object - x-kubernetes-preserve-unknown-fields: true - componentType: - description: Type of component - enum: - - Container - - Kubernetes - - Openshift - - Volume - - Image - - Plugin - - Custom - type: string - container: - description: Allows adding and configuring devworkspace-related - containers - properties: - annotation: - description: Annotations that should be added to specific - resources for this container - properties: - deployment: - additionalProperties: - type: string - description: Annotations to be added to deployment - type: object - service: - additionalProperties: - type: string - description: Annotations to be added to service - type: object - type: object - args: - description: "The arguments to supply to the command running - the dockerimage component. The arguments are supplied - either to the default command provided in the image - or to the overridden command. \n Defaults to an empty - array, meaning use whatever is defined in the image." - items: - type: string - type: array - command: - description: "The command to run in the dockerimage component - instead of the default one provided in the image. \n - Defaults to an empty array, meaning use whatever is - defined in the image." - items: - type: string - type: array - cpuLimit: - type: string - cpuRequest: - type: string - dedicatedPod: - description: "Specify if a container should run in its - own separated pod, instead of running as part of the - main development environment pod. \n Default value is - `false`" - type: boolean - endpoints: - items: + description: Optional map of free-form additional command + attributes + type: object + commands: + description: The commands that comprise this composite + command + items: + type: string + type: array + group: + description: Defines the group this command is part + of properties: - annotation: - additionalProperties: - type: string - description: Annotations to be added to Kubernetes - Ingress or Openshift Route - type: object - attributes: - description: "Map of implementation-dependant string-based - free-form attributes. \n Examples of Che-specific - attributes: \n - cookiesAuthEnabled: \"true\" - / \"false\", \n - type: \"terminal\" / \"ide\" - / \"ide-dev\"," - type: object - x-kubernetes-preserve-unknown-fields: true - exposure: - description: "Describes how the endpoint should - be exposed on the network. \n - `public` means - that the endpoint will be exposed on the public - network, typically through a K8S ingress or an - OpenShift route. \n - `internal` means that the - endpoint will be exposed internally outside of - the main devworkspace POD, typically by K8S services, - to be consumed by other elements running on the - same cloud internal network. \n - `none` means - that the endpoint will not be exposed and will - only be accessible inside the main devworkspace - POD, on a local address. \n Default value is `public`" - enum: - - public - - internal - - none - type: string - name: - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - path: - description: Path of the endpoint URL - type: string - protocol: - description: "Describes the application and transport - protocols of the traffic that will go through - this endpoint. \n - `http`: Endpoint will have - `http` traffic, typically on a TCP connection. - It will be automaticaly promoted to `https` when - the `secure` field is set to `true`. \n - `https`: - Endpoint will have `https` traffic, typically - on a TCP connection. \n - `ws`: Endpoint will - have `ws` traffic, typically on a TCP connection. - It will be automaticaly promoted to `wss` when - the `secure` field is set to `true`. \n - `wss`: - Endpoint will have `wss` traffic, typically on - a TCP connection. \n - `tcp`: Endpoint will have - traffic on a TCP connection, without specifying - an application protocol. \n - `udp`: Endpoint - will have traffic on an UDP connection, without - specifying an application protocol. \n Default - value is `http`" - enum: - - http - - https - - ws - - wss - - tcp - - udp - type: string - secure: - description: Describes whether the endpoint should - be secured and protected by some authentication - process. This requires a protocol of `https` or - `wss`. + isDefault: + description: Identifies the default command for + a given group kind type: boolean - targetPort: - description: The port number should be unique. - type: integer - required: - - name - - targetPort - type: object - type: array - env: - description: "Environment variables used in this container. - \n The following variables are reserved and cannot be - overridden via env: \n - `$PROJECTS_ROOT` \n - `$PROJECT_SOURCE`" - items: - properties: - name: - type: string - value: + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug type: string required: - - name - - value + - kind type: object - type: array - image: - type: string - memoryLimit: - type: string - memoryRequest: - type: string - mountSources: - description: "Toggles whether or not the project source - code should be mounted in the component. \n Defaults - to true for all component types except plugins and components - that set `dedicatedPod` to true." - type: boolean - sourceMapping: - description: Optional specification of the path in the - container where project sources should be transferred/mounted - when `mountSources` is `true`. When omitted, the default - value of /projects is used. - type: string - volumeMounts: - description: List of volumes mounts that should be mounted - is this container. - items: - description: Volume that should be mounted to a component - container + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + type: string + label: + description: Optional label that provides a label for + this command to be used in Editor UI menus for example + type: string + parallel: + description: Indicates if the sub-commands should be + executed concurrently + type: boolean + required: + - id + type: object + custom: + description: Custom command whose logic is implementation-dependant + and should be provided by the user possibly through some + dedicated plugin + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional command + attributes + type: object + commandClass: + description: Class of command that the associated implementation + component should use to process this command with + the appropriate logic + type: string + embeddedResource: + description: Additional free-form configuration for + this custom command that the implementation component + will know how to use + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + group: + description: Defines the group this command is part + of properties: - name: - description: The volume mount name is the name of - an existing `Volume` component. If several containers - mount the same volume name then they will reuse - the same volume and will be able to access to - the same files. - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - path: - description: The path in the component container - where the volume should be mounted. If not path - is mentioned, default path is the is `/`. + isDefault: + description: Identifies the default command for + a given group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug type: string required: - - name + - kind type: object - type: array - required: - - image - type: object - custom: - description: Custom component whose logic is implementation-dependant - and should be provided by the user possibly through some - dedicated controller - properties: - componentClass: - description: Class of component that the associated implementation - controller should use to process this command with the - appropriate logic - type: string - embeddedResource: - description: Additional free-form configuration for this - custom component that the implementation controller - will know how to use - type: object - x-kubernetes-embedded-resource: true - x-kubernetes-preserve-unknown-fields: true - required: - - componentClass - - embeddedResource - type: object - image: - description: Allows specifying the definition of an image - for outer loop builds - oneOf: - - required: - - dockerfile - properties: - autoBuild: - description: "Defines if the image should be built during - startup. \n Default value is `false`" - type: boolean - dockerfile: - description: Allows specifying dockerfile type build - oneOf: - - required: - - uri - - required: - - devfileRegistry - - required: - - git - properties: - args: - description: The arguments to supply to the dockerfile - build. - items: - type: string - type: array - buildContext: - description: Path of source directory to establish - build context. Defaults to ${PROJECT_ROOT} in the - container + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + type: string + label: + description: Optional label that provides a label for + this command to be used in Editor UI menus for example + type: string + required: + - commandClass + - embeddedResource + - id + type: object + exec: + description: CLI Command executed in an existing component + container + properties: + attributes: + additionalProperties: type: string - devfileRegistry: - description: Dockerfile's Devfile Registry source + description: Optional map of free-form additional command + attributes + type: object + commandLine: + description: "The actual command-line string \n Special + variables that can be used: \n - `$PROJECTS_ROOT`: + A path where projects sources are mounted \n - `$PROJECT_SOURCE`: + A path to a project source ($PROJECTS_ROOT/). + If there are multiple projects, this will point to + the directory of the first one." + type: string + component: + description: Describes component to which given action + relates + type: string + env: + description: Optional list of environment variables + that have to be set before running the command + items: properties: - id: - description: Id in a devfile registry that contains - a Dockerfile. The src in the OCI registry required - for the Dockerfile build will be downloaded - for building the image. - type: string - registryUrl: - description: Devfile Registry URL to pull the - Dockerfile from when using the Devfile Registry - as Dockerfile src. To ensure the Dockerfile - gets resolved consistently in different environments, - it is recommended to always specify the `devfileRegistryUrl` - when `Id` is used. + name: type: string - required: - - id - type: object - git: - description: Dockerfile's Git source - properties: - checkoutFrom: - description: Defines from what the project should - be checked out. Required if there are more than - one remote configured - properties: - remote: - description: The remote name should be used - as init. Required if there are more than - one remote configured - type: string - revision: - description: The revision to checkout from. - Should be branch name, tag or commit id. - Default branch is used if missing or specified - revision is not found. - type: string - type: object - fileLocation: - description: Location of the Dockerfile in the - Git repository when using git as Dockerfile - src. Defaults to Dockerfile. + value: type: string - remotes: - additionalProperties: - type: string - description: The remotes map which should be initialized - in the git project. Projects must have at least - one remote configured while StarterProjects - & Image Component's Git source can only have - at most one remote configured. - type: object required: - - remotes + - name + - value type: object - rootRequired: - description: "Specify if a privileged builder pod - is required. \n Default value is `false`" - type: boolean - srcType: - description: Type of Dockerfile src - enum: - - Uri - - DevfileRegistry - - Git - type: string - uri: - description: URI Reference of a Dockerfile. It can - be a full URL or a relative URI from the current - devfile as the base URI. - type: string - type: object - imageName: - description: Name of the image for the resulting outerloop - build - type: string - imageType: - description: Type of image - enum: - - Dockerfile - type: string - required: - - imageName - type: object - kubernetes: - description: Allows importing into the devworkspace the Kubernetes - resources defined in a given manifest. For example this - allows reusing the Kubernetes definitions used to deploy - some runtime components in production. - oneOf: - - required: - - uri - - required: - - inlined - properties: - deployByDefault: - description: "Defines if the component should be deployed - during startup. \n Default value is `false`" - type: boolean - endpoints: - items: + type: array + group: + description: Defines the group this command is part + of properties: - annotation: - additionalProperties: - type: string - description: Annotations to be added to Kubernetes - Ingress or Openshift Route - type: object - attributes: - description: "Map of implementation-dependant string-based - free-form attributes. \n Examples of Che-specific - attributes: \n - cookiesAuthEnabled: \"true\" - / \"false\", \n - type: \"terminal\" / \"ide\" - / \"ide-dev\"," - type: object - x-kubernetes-preserve-unknown-fields: true - exposure: - description: "Describes how the endpoint should - be exposed on the network. \n - `public` means - that the endpoint will be exposed on the public - network, typically through a K8S ingress or an - OpenShift route. \n - `internal` means that the - endpoint will be exposed internally outside of - the main devworkspace POD, typically by K8S services, - to be consumed by other elements running on the - same cloud internal network. \n - `none` means - that the endpoint will not be exposed and will - only be accessible inside the main devworkspace - POD, on a local address. \n Default value is `public`" + isDefault: + description: Identifies the default command for + a given group kind + type: boolean + kind: + description: Kind of group the command is part of enum: - - public - - internal - - none + - build + - run + - test + - debug type: string - name: - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - path: - description: Path of the endpoint URL - type: string - protocol: - description: "Describes the application and transport - protocols of the traffic that will go through - this endpoint. \n - `http`: Endpoint will have - `http` traffic, typically on a TCP connection. - It will be automaticaly promoted to `https` when - the `secure` field is set to `true`. \n - `https`: - Endpoint will have `https` traffic, typically - on a TCP connection. \n - `ws`: Endpoint will - have `ws` traffic, typically on a TCP connection. - It will be automaticaly promoted to `wss` when - the `secure` field is set to `true`. \n - `wss`: - Endpoint will have `wss` traffic, typically on - a TCP connection. \n - `tcp`: Endpoint will have - traffic on a TCP connection, without specifying - an application protocol. \n - `udp`: Endpoint - will have traffic on an UDP connection, without - specifying an application protocol. \n Default - value is `http`" - enum: - - http - - https - - ws - - wss - - tcp - - udp - type: string - secure: - description: Describes whether the endpoint should - be secured and protected by some authentication - process. This requires a protocol of `https` or - `wss`. - type: boolean - targetPort: - description: The port number should be unique. - type: integer required: - - name - - targetPort + - kind type: object - type: array - inlined: - description: Inlined manifest - type: string - locationType: - description: Type of Kubernetes-like location - enum: - - Uri - - Inlined - type: string - uri: - description: Location in a file fetched from a uri. - type: string - type: object - name: - description: 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. - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - openshift: - description: Allows importing into the devworkspace the OpenShift - resources defined in a given manifest. For example this - allows reusing the OpenShift definitions used to deploy - some runtime components in production. - oneOf: - - required: - - uri - - required: - - inlined - properties: - deployByDefault: - description: "Defines if the component should be deployed - during startup. \n Default value is `false`" - type: boolean - endpoints: - items: + hotReloadCapable: + description: "Whether the command is capable to reload + itself when source code changes. If set to `true` + the command won't be restarted and it is expected + to handle file changes on its own. \n Default value + is `false`" + type: boolean + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + type: string + label: + description: Optional label that provides a label for + this command to be used in Editor UI menus for example + type: string + workingDir: + description: "Working directory where the command should + be executed \n Special variables that can be used: + \n - `${PROJECTS_ROOT}`: A path where projects sources + are mounted \n - `${PROJECT_SOURCE}`: A path to a + project source (${PROJECTS_ROOT}/). + If there are multiple projects, this will point to + the directory of the first one." + type: string + required: + - id + type: object + vscodeLaunch: + description: "Command providing the definition of a VsCode + launch action \n Deprecated; removed in v1alpha2" + oneOf: + - required: + - uri + - required: + - inlined + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional command + attributes + type: object + group: + description: Defines the group this command is part + of properties: - annotation: - additionalProperties: - type: string - description: Annotations to be added to Kubernetes - Ingress or Openshift Route - type: object - attributes: - description: "Map of implementation-dependant string-based - free-form attributes. \n Examples of Che-specific - attributes: \n - cookiesAuthEnabled: \"true\" - / \"false\", \n - type: \"terminal\" / \"ide\" - / \"ide-dev\"," - type: object - x-kubernetes-preserve-unknown-fields: true - exposure: - description: "Describes how the endpoint should - be exposed on the network. \n - `public` means - that the endpoint will be exposed on the public - network, typically through a K8S ingress or an - OpenShift route. \n - `internal` means that the - endpoint will be exposed internally outside of - the main devworkspace POD, typically by K8S services, - to be consumed by other elements running on the - same cloud internal network. \n - `none` means - that the endpoint will not be exposed and will - only be accessible inside the main devworkspace - POD, on a local address. \n Default value is `public`" + isDefault: + description: Identifies the default command for + a given group kind + type: boolean + kind: + description: Kind of group the command is part of enum: - - public - - internal - - none + - build + - run + - test + - debug type: string - name: - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - path: - description: Path of the endpoint URL - type: string - protocol: - description: "Describes the application and transport - protocols of the traffic that will go through - this endpoint. \n - `http`: Endpoint will have - `http` traffic, typically on a TCP connection. - It will be automaticaly promoted to `https` when - the `secure` field is set to `true`. \n - `https`: - Endpoint will have `https` traffic, typically - on a TCP connection. \n - `ws`: Endpoint will - have `ws` traffic, typically on a TCP connection. - It will be automaticaly promoted to `wss` when - the `secure` field is set to `true`. \n - `wss`: - Endpoint will have `wss` traffic, typically on - a TCP connection. \n - `tcp`: Endpoint will have - traffic on a TCP connection, without specifying - an application protocol. \n - `udp`: Endpoint - will have traffic on an UDP connection, without - specifying an application protocol. \n Default - value is `http`" - enum: - - http - - https - - ws - - wss - - tcp - - udp - type: string - secure: - description: Describes whether the endpoint should - be secured and protected by some authentication - process. This requires a protocol of `https` or - `wss`. - type: boolean - targetPort: - description: The port number should be unique. - type: integer required: - - name - - targetPort + - kind type: object - type: array - inlined: - description: Inlined manifest - type: string - locationType: - description: Type of Kubernetes-like location - enum: - - Uri - - Inlined - type: string - uri: - description: Location in a file fetched from a uri. - type: string - type: object - plugin: - description: "Allows importing a plugin. \n Plugins are mainly - imported devfiles that contribute components, commands and - events as a consistent single unit. They are defined in - either YAML files following the devfile syntax, or as `DevWorkspaceTemplate` - Kubernetes Custom Resources" - oneOf: - - required: - - uri - - required: + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + type: string + inlined: + description: Inlined content of the VsCode configuration + type: string + locationType: + description: Type of Vscode configuration command location + enum: + - Uri + - Inlined + type: string + uri: + description: Location as an absolute of relative URI + the VsCode configuration will be fetched from + type: string + required: - id - - required: - - kubernetes - properties: - commands: - description: Overrides of commands encapsulated in a parent - devfile or a plugin. Overriding is done according to - K8S strategic merge patch standard rules. - items: - oneOf: - - required: - - exec - - required: - - apply - - required: - - composite + type: object + vscodeTask: + description: "Command providing the definition of a VsCode + Task \n Deprecated; removed in v1alpha2" + oneOf: + - required: + - uri + - required: + - inlined + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional command + attributes + type: object + group: + description: Defines the group this command is part + of properties: - apply: - description: "Command that consists in applying - a given component definition, typically bound - to a devworkspace event. \n For example, when - an `apply` command is bound to a `preStart` event, - and references a `container` component, it will - start the container as a K8S initContainer in - the devworkspace POD, unless the component has - its `dedicatedPod` field set to `true`. \n When - no `apply` command exist for a given component, - it is assumed the component will be applied at - devworkspace start by default, unless `deployByDefault` - for that component is set to false." - properties: - component: - description: Describes component that will be - applied - type: string - group: - description: Defines the group this command - is part of - properties: - isDefault: - description: Identifies the default command - for a given group kind - type: boolean - kind: - description: Kind of group the command is - part of - enum: - - build - - run - - test - - debug - - deploy - type: string - type: object - label: - description: Optional label that provides a - label for this command to be used in Editor - UI menus for example - type: string - type: object - attributes: - description: Map of implementation-dependant free-form - YAML attributes. - type: object - x-kubernetes-preserve-unknown-fields: true - commandType: - description: Type of devworkspace command + isDefault: + description: Identifies the default command for + a given group kind + type: boolean + kind: + description: Kind of group the command is part of enum: - - Exec - - Apply - - Composite - type: string - composite: - description: Composite command that allows executing - several sub-commands either sequentially or concurrently - properties: - commands: - description: The commands that comprise this - composite command - items: - type: string - type: array - group: - description: Defines the group this command - is part of - properties: - isDefault: - description: Identifies the default command - for a given group kind - type: boolean - kind: - description: Kind of group the command is - part of - enum: - - build - - run - - test - - debug - - deploy - type: string - type: object - label: - description: Optional label that provides a - label for this command to be used in Editor - UI menus for example - type: string - parallel: - description: Indicates if the sub-commands should - be executed concurrently - type: boolean - type: object - exec: - description: CLI Command executed in an existing - component container - properties: - commandLine: - description: "The actual command-line string - \n Special variables that can be used: \n - \ - `$PROJECTS_ROOT`: A path where projects - sources are mounted as defined by container - component's sourceMapping. \n - `$PROJECT_SOURCE`: - A path to a project source ($PROJECTS_ROOT/). - If there are multiple projects, this will - point to the directory of the first one." - type: string - component: - description: Describes component to which given - action relates - type: string - env: - description: Optional list of environment variables - that have to be set before running the command - items: - properties: - name: - type: string - value: - type: string - required: - - name - type: object - type: array - group: - description: Defines the group this command - is part of - properties: - isDefault: - description: Identifies the default command - for a given group kind - type: boolean - kind: - description: Kind of group the command is - part of - enum: - - build - - run - - test - - debug - - deploy - type: string - type: object - hotReloadCapable: - description: "Whether the command is capable - to reload itself when source code changes. - If set to `true` the command won't be restarted - and it is expected to handle file changes - on its own. \n Default value is `false`" - type: boolean - label: - description: Optional label that provides a - label for this command to be used in Editor - UI menus for example - type: string - workingDir: - description: "Working directory where the command - should be executed \n Special variables that - can be used: \n - `$PROJECTS_ROOT`: A path - where projects sources are mounted as defined - by container component's sourceMapping. \n - \ - `$PROJECT_SOURCE`: A path to a project - source ($PROJECTS_ROOT/). If - there are multiple projects, this will point - to the directory of the first one." - type: string - type: object - id: - description: Mandatory identifier that allows referencing - this command in composite commands, from a parent, - or in events. - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + - build + - run + - test + - debug type: string required: - - id + - kind type: object - type: array - components: - description: Overrides of components encapsulated in a - parent devfile or a plugin. Overriding is done according - to K8S strategic merge patch standard rules. - items: - oneOf: - - required: - - container - - required: - - kubernetes - - required: - - openshift - - required: - - volume - - required: - - image - properties: - attributes: - description: Map of implementation-dependant free-form - YAML attributes. - type: object - x-kubernetes-preserve-unknown-fields: true - componentType: - description: Type of component - enum: - - Container - - Kubernetes - - Openshift - - Volume - - Image - type: string - container: - description: Allows adding and configuring devworkspace-related - containers - properties: - annotation: - description: Annotations that should be added - to specific resources for this container - properties: - deployment: - additionalProperties: - type: string - description: Annotations to be added to - deployment - type: object - service: - additionalProperties: - type: string - description: Annotations to be added to - service - type: object - type: object - args: - description: "The arguments to supply to the - command running the dockerimage component. - The arguments are supplied either to the default - command provided in the image or to the overridden - command. \n Defaults to an empty array, meaning - use whatever is defined in the image." - items: - type: string - type: array - command: - description: "The command to run in the dockerimage - component instead of the default one provided - in the image. \n Defaults to an empty array, - meaning use whatever is defined in the image." - items: - type: string - type: array - cpuLimit: + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + type: string + inlined: + description: Inlined content of the VsCode configuration + type: string + locationType: + description: Type of Vscode configuration command location + enum: + - Uri + - Inlined + type: string + uri: + description: Location as an absolute of relative URI + the VsCode configuration will be fetched from + type: string + required: + - id + type: object + type: object + type: array + components: + description: List of the workspace components, such as editor + and plugins, user-provided containers, or other types of components + items: + oneOf: + - required: + - container + - required: + - kubernetes + - required: + - openshift + - required: + - volume + - required: + - plugin + - required: + - custom + properties: + componentType: + description: Type of component + enum: + - Container + - Kubernetes + - Openshift + - Volume + - Plugin + - Custom + type: string + container: + description: Allows adding and configuring workspace-related + containers + properties: + args: + description: "The arguments to supply to the command + running the dockerimage component. The arguments are + supplied either to the default command provided in + the image or to the overridden command. \n Defaults + to an empty array, meaning use whatever is defined + in the image." + items: + type: string + type: array + command: + description: "The command to run in the dockerimage + component instead of the default one provided in the + image. \n Defaults to an empty array, meaning use + whatever is defined in the image." + items: + type: string + type: array + dedicatedPod: + description: "Specify if a container should run in its + own separated pod, instead of running as part of the + main development environment pod. \n Default value + is `false`" + type: boolean + endpoints: + items: + properties: + attributes: + additionalProperties: type: string - cpuRequest: + description: "Map of implementation-dependant + string-based free-form attributes. \n Examples + of Che-specific attributes: \n - cookiesAuthEnabled: + \"true\" / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint should + be exposed on the network. \n - `public` means + that the endpoint will be exposed on the public + network, typically through a K8S ingress or + an OpenShift route. \n - `internal` means that + the endpoint will be exposed internally outside + of the main workspace POD, typically by K8S + services, to be consumed by other elements running + on the same cloud internal network. \n - `none` + means that the endpoint will not be exposed + and will only be accessible inside the main + workspace POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application and transport + protocols of the traffic that will go through + this endpoint. \n - `http`: Endpoint will have + `http` traffic, typically on a TCP connection. + It will be automaticaly promoted to `https` + when the `secure` field is set to `true`. \n + - `https`: Endpoint will have `https` traffic, + typically on a TCP connection. \n - `ws`: Endpoint + will have `ws` traffic, typically on a TCP connection. + It will be automaticaly promoted to `wss` when + the `secure` field is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, typically + on a TCP connection. \n - `tcp`: Endpoint will + have traffic on a TCP connection, without specifying + an application protocol. \n - `udp`: Endpoint + will have traffic on an UDP connection, without + specifying an application protocol. \n Default + value is `http`" + type: string + secure: + description: Describes whether the endpoint should + be secured and protected by some authentication + process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + env: + description: Environment variables used in this container + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + image: + type: string + memoryLimit: + type: string + mountSources: + type: boolean + name: + type: string + sourceMapping: + description: Optional specification of the path in the + container where project sources should be transferred/mounted + when `mountSources` is `true`. When omitted, the value + of the `PROJECTS_ROOT` environment variable is used. + type: string + volumeMounts: + description: List of volumes mounts that should be mounted + is this container. + items: + description: Volume that should be mounted to a component + container + properties: + name: + description: The volume mount name is the name + of an existing `Volume` component. If several + containers mount the same volume name then they + will reuse the same volume and will be able + to access to the same files. + type: string + path: + description: The path in the component container + where the volume should be mounted. If not path + is mentioned, default path is the is `/`. + type: string + required: + - name + type: object + type: array + required: + - name + type: object + custom: + description: Custom component whose logic is implementation-dependant + and should be provided by the user possibly through some + dedicated controller + properties: + componentClass: + description: Class of component that the associated + implementation controller should use to process this + command with the appropriate logic + type: string + embeddedResource: + description: Additional free-form configuration for + this custom component that the implementation controller + will know how to use + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + name: + description: Mandatory name that allows referencing + the component in commands, or inside a parent + type: string + required: + - componentClass + - embeddedResource + - name + type: object + kubernetes: + description: Allows importing into the workspace the Kubernetes + resources defined in a given manifest. For example this + allows reusing the Kubernetes definitions used to deploy + some runtime components in production. + oneOf: + - required: + - uri + - required: + - inlined + properties: + endpoints: + items: + properties: + attributes: + additionalProperties: type: string - dedicatedPod: - description: "Specify if a container should - run in its own separated pod, instead of running - as part of the main development environment - pod. \n Default value is `false`" - type: boolean - endpoints: - items: + description: "Map of implementation-dependant + string-based free-form attributes. \n Examples + of Che-specific attributes: \n - cookiesAuthEnabled: + \"true\" / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint should + be exposed on the network. \n - `public` means + that the endpoint will be exposed on the public + network, typically through a K8S ingress or + an OpenShift route. \n - `internal` means that + the endpoint will be exposed internally outside + of the main workspace POD, typically by K8S + services, to be consumed by other elements running + on the same cloud internal network. \n - `none` + means that the endpoint will not be exposed + and will only be accessible inside the main + workspace POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application and transport + protocols of the traffic that will go through + this endpoint. \n - `http`: Endpoint will have + `http` traffic, typically on a TCP connection. + It will be automaticaly promoted to `https` + when the `secure` field is set to `true`. \n + - `https`: Endpoint will have `https` traffic, + typically on a TCP connection. \n - `ws`: Endpoint + will have `ws` traffic, typically on a TCP connection. + It will be automaticaly promoted to `wss` when + the `secure` field is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, typically + on a TCP connection. \n - `tcp`: Endpoint will + have traffic on a TCP connection, without specifying + an application protocol. \n - `udp`: Endpoint + will have traffic on an UDP connection, without + specifying an application protocol. \n Default + value is `http`" + type: string + secure: + description: Describes whether the endpoint should + be secured and protected by some authentication + process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + name: + description: Mandatory name that allows referencing + the component in commands, or inside a parent + type: string + uri: + description: Location in a file fetched from a uri. + type: string + required: + - name + type: object + openshift: + description: Allows importing into the workspace the OpenShift + resources defined in a given manifest. For example this + allows reusing the OpenShift definitions used to deploy + some runtime components in production. + oneOf: + - required: + - uri + - required: + - inlined + properties: + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant + string-based free-form attributes. \n Examples + of Che-specific attributes: \n - cookiesAuthEnabled: + \"true\" / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint should + be exposed on the network. \n - `public` means + that the endpoint will be exposed on the public + network, typically through a K8S ingress or + an OpenShift route. \n - `internal` means that + the endpoint will be exposed internally outside + of the main workspace POD, typically by K8S + services, to be consumed by other elements running + on the same cloud internal network. \n - `none` + means that the endpoint will not be exposed + and will only be accessible inside the main + workspace POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application and transport + protocols of the traffic that will go through + this endpoint. \n - `http`: Endpoint will have + `http` traffic, typically on a TCP connection. + It will be automaticaly promoted to `https` + when the `secure` field is set to `true`. \n + - `https`: Endpoint will have `https` traffic, + typically on a TCP connection. \n - `ws`: Endpoint + will have `ws` traffic, typically on a TCP connection. + It will be automaticaly promoted to `wss` when + the `secure` field is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, typically + on a TCP connection. \n - `tcp`: Endpoint will + have traffic on a TCP connection, without specifying + an application protocol. \n - `udp`: Endpoint + will have traffic on an UDP connection, without + specifying an application protocol. \n Default + value is `http`" + type: string + secure: + description: Describes whether the endpoint should + be secured and protected by some authentication + process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + name: + description: Mandatory name that allows referencing + the component in commands, or inside a parent + type: string + uri: + description: Location in a file fetched from a uri. + type: string + required: + - name + type: object + plugin: + description: "Allows importing a plugin. \n Plugins are + mainly imported devfiles that contribute components, commands + and events as a consistent single unit. They are defined + in either YAML files following the devfile syntax, or + as `DevWorkspaceTemplate` Kubernetes Custom Resources" + oneOf: + - required: + - uri + - required: + - id + - required: + - kubernetes + properties: + commands: + description: Overrides of commands encapsulated in a + parent devfile or a plugin. Overriding is done using + a strategic merge patch + items: + oneOf: + - required: + - exec + - required: + - apply + - required: + - vscodeTask + - required: + - vscodeLaunch + - required: + - composite + - required: + - custom + properties: + apply: + description: "Command that consists in applying + a given component definition, typically bound + to a workspace event. \n For example, when an + `apply` command is bound to a `preStart` event, + and references a `container` component, it will + start the container as a K8S initContainer in + the workspace POD, unless the component has + its `dedicatedPod` field set to `true`. \n When + no `apply` command exist for a given component, + it is assumed the component will be applied + at workspace start by default." + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + component: + description: Describes component that will + be applied + type: string + group: + description: Defines the group this command + is part of properties: - annotation: - additionalProperties: - type: string - description: Annotations to be added to - Kubernetes Ingress or Openshift Route - type: object - attributes: - description: "Map of implementation-dependant - string-based free-form attributes. \n - Examples of Che-specific attributes: - \n - cookiesAuthEnabled: \"true\" / - \"false\", \n - type: \"terminal\" / - \"ide\" / \"ide-dev\"," - type: object - x-kubernetes-preserve-unknown-fields: true - exposure: - description: "Describes how the endpoint - should be exposed on the network. \n - - `public` means that the endpoint will - be exposed on the public network, typically - through a K8S ingress or an OpenShift - route. \n - `internal` means that the - endpoint will be exposed internally - outside of the main devworkspace POD, - typically by K8S services, to be consumed - by other elements running on the same - cloud internal network. \n - `none` - means that the endpoint will not be - exposed and will only be accessible - inside the main devworkspace POD, on - a local address. \n Default value is - `public`" + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of enum: - - public - - internal - - none + - build + - run + - test + - debug type: string - name: - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - path: - description: Path of the endpoint URL - type: string - protocol: - description: "Describes the application - and transport protocols of the traffic - that will go through this endpoint. - \n - `http`: Endpoint will have `http` - traffic, typically on a TCP connection. - It will be automaticaly promoted to - `https` when the `secure` field is set - to `true`. \n - `https`: Endpoint will - have `https` traffic, typically on a - TCP connection. \n - `ws`: Endpoint - will have `ws` traffic, typically on - a TCP connection. It will be automaticaly - promoted to `wss` when the `secure` - field is set to `true`. \n - `wss`: - Endpoint will have `wss` traffic, typically - on a TCP connection. \n - `tcp`: Endpoint - will have traffic on a TCP connection, - without specifying an application protocol. - \n - `udp`: Endpoint will have traffic - on an UDP connection, without specifying - an application protocol. \n Default - value is `http`" - enum: - - http - - https - - ws - - wss - - tcp - - udp - type: string - secure: - description: Describes whether the endpoint - should be secured and protected by some - authentication process. This requires - a protocol of `https` or `wss`. - type: boolean - targetPort: - description: The port number should be - unique. - type: integer required: - - name + - kind type: object - type: array - env: - description: "Environment variables used in - this container. \n The following variables - are reserved and cannot be overridden via - env: \n - `$PROJECTS_ROOT` \n - `$PROJECT_SOURCE`" - items: + id: + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. + type: string + label: + description: Optional label that provides + a label for this command to be used in Editor + UI menus for example + type: string + required: + - id + type: object + commandType: + description: Type of workspace command + enum: + - Exec + - Apply + - VscodeTask + - VscodeLaunch + - Composite + - Custom + type: string + composite: + description: Composite command that allows executing + several sub-commands either sequentially or + concurrently + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + commands: + description: The commands that comprise this + composite command + items: + type: string + type: array + group: + description: Defines the group this command + is part of properties: - name: - type: string - value: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug type: string required: - - name + - kind type: object - type: array - image: - type: string - memoryLimit: - type: string - memoryRequest: - type: string - mountSources: - description: "Toggles whether or not the project - source code should be mounted in the component. - \n Defaults to true for all component types - except plugins and components that set `dedicatedPod` - to true." - type: boolean - sourceMapping: - description: Optional specification of the path - in the container where project sources should - be transferred/mounted when `mountSources` - is `true`. When omitted, the default value - of /projects is used. - type: string - volumeMounts: - description: List of volumes mounts that should - be mounted is this container. - items: - description: Volume that should be mounted - to a component container + id: + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. + type: string + label: + description: Optional label that provides + a label for this command to be used in Editor + UI menus for example + type: string + parallel: + description: Indicates if the sub-commands + should be executed concurrently + type: boolean + required: + - id + type: object + custom: + description: Custom command whose logic is implementation-dependant + and should be provided by the user possibly + through some dedicated plugin + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + commandClass: + description: Class of command that the associated + implementation component should use to process + this command with the appropriate logic + type: string + embeddedResource: + description: Additional free-form configuration + for this custom command that the implementation + component will know how to use + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + group: + description: Defines the group this command + is part of properties: - name: - description: The volume mount name is - the name of an existing `Volume` component. - If several containers mount the same - volume name then they will reuse the - same volume and will be able to access - to the same files. - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - path: - description: The path in the component - container where the volume should be - mounted. If not path is mentioned, default - path is the is `/`. + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug type: string required: - - name + - kind type: object - type: array - type: object - image: - description: Allows specifying the definition of - an image for outer loop builds - oneOf: - - required: - - dockerfile - - required: - - autoBuild - properties: - autoBuild: - description: "Defines if the image should be - built during startup. \n Default value is - `false`" - type: boolean - dockerfile: - description: Allows specifying dockerfile type - build - oneOf: - - required: - - uri - - required: - - devfileRegistry - - required: - - git - properties: - args: - description: The arguments to supply to - the dockerfile build. - items: - type: string - type: array - buildContext: - description: Path of source directory to - establish build context. Defaults to ${PROJECT_ROOT} - in the container + id: + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. + type: string + label: + description: Optional label that provides + a label for this command to be used in Editor + UI menus for example + type: string + required: + - commandClass + - embeddedResource + - id + type: object + exec: + description: CLI Command executed in an existing + component container + properties: + attributes: + additionalProperties: type: string - devfileRegistry: - description: Dockerfile's Devfile Registry - source + description: Optional map of free-form additional + command attributes + type: object + commandLine: + description: "The actual command-line string + \n Special variables that can be used: \n + \ - `$PROJECTS_ROOT`: A path where projects + sources are mounted \n - `$PROJECT_SOURCE`: + A path to a project source ($PROJECTS_ROOT/). + If there are multiple projects, this will + point to the directory of the first one." + type: string + component: + description: Describes component to which + given action relates + type: string + env: + description: Optional list of environment + variables that have to be set before running + the command + items: properties: - id: - description: Id in a devfile registry - that contains a Dockerfile. The src - in the OCI registry required for the - Dockerfile build will be downloaded - for building the image. + name: type: string - registryUrl: - description: Devfile Registry URL to - pull the Dockerfile from when using - the Devfile Registry as Dockerfile - src. To ensure the Dockerfile gets - resolved consistently in different - environments, it is recommended to - always specify the `devfileRegistryUrl` - when `Id` is used. - type: string - type: object - git: - description: Dockerfile's Git source - properties: - checkoutFrom: - description: Defines from what the project - should be checked out. Required if - there are more than one remote configured - properties: - remote: - description: The remote name should - be used as init. Required if there - are more than one remote configured - type: string - revision: - description: The revision to checkout - from. Should be branch name, tag - or commit id. Default branch is - used if missing or specified revision - is not found. - type: string - type: object - fileLocation: - description: Location of the Dockerfile - in the Git repository when using git - as Dockerfile src. Defaults to Dockerfile. + value: type: string - remotes: - additionalProperties: - type: string - description: The remotes map which should - be initialized in the git project. - Projects must have at least one remote - configured while StarterProjects & - Image Component's Git source can only - have at most one remote configured. - type: object + required: + - name + - value type: object - rootRequired: - description: "Specify if a privileged builder - pod is required. \n Default value is `false`" - type: boolean - srcType: - description: Type of Dockerfile src - enum: - - Uri - - DevfileRegistry - - Git - type: string - uri: - description: URI Reference of a Dockerfile. - It can be a full URL or a relative URI - from the current devfile as the base URI. - type: string - type: object - imageName: - description: Name of the image for the resulting - outerloop build - type: string - imageType: - description: Type of image - enum: - - Dockerfile - - AutoBuild - type: string - type: object - kubernetes: - description: Allows importing into the devworkspace - the Kubernetes resources defined in a given manifest. - For example this allows reusing the Kubernetes - definitions used to deploy some runtime components - in production. - oneOf: - - required: - - uri - - required: - - inlined - properties: - deployByDefault: - description: "Defines if the component should - be deployed during startup. \n Default value - is `false`" - type: boolean - endpoints: - items: + type: array + group: + description: Defines the group this command + is part of properties: - annotation: - additionalProperties: - type: string - description: Annotations to be added to - Kubernetes Ingress or Openshift Route - type: object - attributes: - description: "Map of implementation-dependant - string-based free-form attributes. \n - Examples of Che-specific attributes: - \n - cookiesAuthEnabled: \"true\" / - \"false\", \n - type: \"terminal\" / - \"ide\" / \"ide-dev\"," - type: object - x-kubernetes-preserve-unknown-fields: true - exposure: - description: "Describes how the endpoint - should be exposed on the network. \n - - `public` means that the endpoint will - be exposed on the public network, typically - through a K8S ingress or an OpenShift - route. \n - `internal` means that the - endpoint will be exposed internally - outside of the main devworkspace POD, - typically by K8S services, to be consumed - by other elements running on the same - cloud internal network. \n - `none` - means that the endpoint will not be - exposed and will only be accessible - inside the main devworkspace POD, on - a local address. \n Default value is - `public`" + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of enum: - - public - - internal - - none + - build + - run + - test + - debug type: string - name: - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - path: - description: Path of the endpoint URL - type: string - protocol: - description: "Describes the application - and transport protocols of the traffic - that will go through this endpoint. - \n - `http`: Endpoint will have `http` - traffic, typically on a TCP connection. - It will be automaticaly promoted to - `https` when the `secure` field is set - to `true`. \n - `https`: Endpoint will - have `https` traffic, typically on a - TCP connection. \n - `ws`: Endpoint - will have `ws` traffic, typically on - a TCP connection. It will be automaticaly - promoted to `wss` when the `secure` - field is set to `true`. \n - `wss`: - Endpoint will have `wss` traffic, typically - on a TCP connection. \n - `tcp`: Endpoint - will have traffic on a TCP connection, - without specifying an application protocol. - \n - `udp`: Endpoint will have traffic - on an UDP connection, without specifying - an application protocol. \n Default - value is `http`" - enum: - - http - - https - - ws - - wss - - tcp - - udp - type: string - secure: - description: Describes whether the endpoint - should be secured and protected by some - authentication process. This requires - a protocol of `https` or `wss`. - type: boolean - targetPort: - description: The port number should be - unique. - type: integer required: - - name + - kind type: object - type: array - inlined: - description: Inlined manifest - type: string - locationType: - description: Type of Kubernetes-like location - enum: - - Uri - - Inlined - type: string - uri: - description: Location in a file fetched from - a uri. - type: string - type: object - name: - description: 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. - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - openshift: - description: Allows importing into the devworkspace - the OpenShift resources defined in a given manifest. - For example this allows reusing the OpenShift - definitions used to deploy some runtime components - in production. - oneOf: - - required: - - uri - - required: - - inlined - properties: - deployByDefault: - description: "Defines if the component should - be deployed during startup. \n Default value - is `false`" - type: boolean - endpoints: - items: + hotReloadCapable: + description: "Whether the command is capable + to reload itself when source code changes. + If set to `true` the command won't be restarted + and it is expected to handle file changes + on its own. \n Default value is `false`" + type: boolean + id: + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. + type: string + label: + description: Optional label that provides + a label for this command to be used in Editor + UI menus for example + type: string + workingDir: + description: "Working directory where the + command should be executed \n Special variables + that can be used: \n - `${PROJECTS_ROOT}`: + A path where projects sources are mounted + \n - `${PROJECT_SOURCE}`: A path to a project + source (${PROJECTS_ROOT}/). + If there are multiple projects, this will + point to the directory of the first one." + type: string + required: + - id + type: object + vscodeLaunch: + description: "Command providing the definition + of a VsCode launch action \n Deprecated; removed + in v1alpha2" + oneOf: + - required: + - uri + - required: + - inlined + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + group: + description: Defines the group this command + is part of properties: - annotation: - additionalProperties: - type: string - description: Annotations to be added to - Kubernetes Ingress or Openshift Route - type: object - attributes: - description: "Map of implementation-dependant - string-based free-form attributes. \n - Examples of Che-specific attributes: - \n - cookiesAuthEnabled: \"true\" / - \"false\", \n - type: \"terminal\" / - \"ide\" / \"ide-dev\"," - type: object - x-kubernetes-preserve-unknown-fields: true - exposure: - description: "Describes how the endpoint - should be exposed on the network. \n - - `public` means that the endpoint will - be exposed on the public network, typically - through a K8S ingress or an OpenShift - route. \n - `internal` means that the - endpoint will be exposed internally - outside of the main devworkspace POD, - typically by K8S services, to be consumed - by other elements running on the same - cloud internal network. \n - `none` - means that the endpoint will not be - exposed and will only be accessible - inside the main devworkspace POD, on - a local address. \n Default value is - `public`" + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of enum: - - public - - internal - - none + - build + - run + - test + - debug type: string - name: - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - path: - description: Path of the endpoint URL - type: string - protocol: - description: "Describes the application - and transport protocols of the traffic - that will go through this endpoint. - \n - `http`: Endpoint will have `http` - traffic, typically on a TCP connection. - It will be automaticaly promoted to - `https` when the `secure` field is set - to `true`. \n - `https`: Endpoint will - have `https` traffic, typically on a - TCP connection. \n - `ws`: Endpoint - will have `ws` traffic, typically on - a TCP connection. It will be automaticaly - promoted to `wss` when the `secure` - field is set to `true`. \n - `wss`: - Endpoint will have `wss` traffic, typically - on a TCP connection. \n - `tcp`: Endpoint - will have traffic on a TCP connection, - without specifying an application protocol. - \n - `udp`: Endpoint will have traffic - on an UDP connection, without specifying - an application protocol. \n Default - value is `http`" - enum: - - http - - https - - ws - - wss - - tcp - - udp - type: string - secure: - description: Describes whether the endpoint - should be secured and protected by some - authentication process. This requires - a protocol of `https` or `wss`. - type: boolean - targetPort: - description: The port number should be - unique. - type: integer required: - - name + - kind type: object - type: array - inlined: - description: Inlined manifest - type: string - locationType: - description: Type of Kubernetes-like location - enum: - - Uri - - Inlined - type: string - uri: - description: Location in a file fetched from - a uri. - type: string - type: object - volume: - description: Allows specifying the definition of - a volume shared by several other components - properties: - ephemeral: - description: Ephemeral volumes are not stored - persistently across restarts. Defaults to - false - type: boolean - size: - description: Size of the volume - type: string - type: object - required: - - name - type: object - type: array - id: - description: Id in a registry that contains a Devfile - yaml file - type: string - importReferenceType: - description: type of location from where the referenced - template structure should be retrieved - enum: - - Uri - - Id - - Kubernetes - type: string - kubernetes: - description: Reference to a Kubernetes CRD of type DevWorkspaceTemplate - properties: - name: - type: string - namespace: - type: string - required: - - name - type: object - registryUrl: - description: Registry URL to pull the parent devfile from - when using id in the parent reference. To ensure the - parent devfile gets resolved consistently in different - environments, it is recommended to always specify the - `registryUrl` when `id` is used. - type: string - uri: - description: URI Reference of a parent devfile YAML file. - It can be a full URL or a relative URI with the current - devfile as the base URI. - type: string - type: object - volume: - description: Allows specifying the definition of a volume - shared by several other components - properties: - ephemeral: - description: Ephemeral volumes are not stored persistently - across restarts. Defaults to false - type: boolean - size: - description: Size of the volume - type: string - type: object - required: - - name - type: object - type: array - events: - description: Bindings of commands to events. Each command is referred-to - by its name. - properties: - postStart: - description: IDs of commands that should be executed after the - devworkspace is completely started. In the case of Che-Theia, - these commands should be executed after all plugins and extensions - have started, including project cloning. This means that those - commands are not triggered until the user opens the IDE in - his browser. - items: - type: string - type: array - postStop: - description: IDs of commands that should be executed after stopping - the devworkspace. - items: - type: string - type: array - preStart: - description: IDs of commands that should be executed before - the devworkspace start. Kubernetes-wise, these commands would - typically be executed in init containers of the devworkspace - POD. - items: - type: string - type: array - preStop: - description: IDs of commands that should be executed before - stopping the devworkspace. - items: - type: string - type: array - type: object - parent: - description: Parent devworkspace template - oneOf: - - required: - - uri - - required: - - id - - required: - - kubernetes - properties: - attributes: - description: Overrides of attributes encapsulated in a parent - devfile. Overriding is done according to K8S strategic merge - patch standard rules. - type: object - x-kubernetes-preserve-unknown-fields: true - commands: - description: Overrides of commands encapsulated in a parent - devfile or a plugin. Overriding is done according to K8S strategic - merge patch standard rules. - items: - oneOf: - - required: - - exec - - required: - - apply - - required: - - composite - properties: - apply: - description: "Command that consists in applying a given - component definition, typically bound to a devworkspace - event. \n For example, when an `apply` command is bound - to a `preStart` event, and references a `container` - component, it will start the container as a K8S initContainer - in the devworkspace POD, unless the component has its - `dedicatedPod` field set to `true`. \n When no `apply` - command exist for a given component, it is assumed the - component will be applied at devworkspace start by default, - unless `deployByDefault` for that component is set to - false." - properties: - component: - description: Describes component that will be applied - type: string - group: - description: Defines the group this command is part - of - properties: - isDefault: - description: Identifies the default command for - a given group kind - type: boolean - kind: - description: Kind of group the command is part - of - enum: - - build - - run - - test - - debug - - deploy - type: string - type: object - label: - description: Optional label that provides a label - for this command to be used in Editor UI menus for - example - type: string - type: object - attributes: - description: Map of implementation-dependant free-form - YAML attributes. - type: object - x-kubernetes-preserve-unknown-fields: true - commandType: - description: Type of devworkspace command - enum: - - Exec - - Apply - - Composite - type: string - composite: - description: Composite command that allows executing several - sub-commands either sequentially or concurrently - properties: - commands: - description: The commands that comprise this composite - command - items: - type: string - type: array - group: - description: Defines the group this command is part - of - properties: - isDefault: - description: Identifies the default command for - a given group kind - type: boolean - kind: - description: Kind of group the command is part - of - enum: - - build - - run - - test - - debug - - deploy - type: string - type: object - label: - description: Optional label that provides a label - for this command to be used in Editor UI menus for - example - type: string - parallel: - description: Indicates if the sub-commands should - be executed concurrently - type: boolean - type: object - exec: - description: CLI Command executed in an existing component - container - properties: - commandLine: - description: "The actual command-line string \n Special - variables that can be used: \n - `$PROJECTS_ROOT`: - A path where projects sources are mounted as defined - by container component's sourceMapping. \n - `$PROJECT_SOURCE`: - A path to a project source ($PROJECTS_ROOT/). - If there are multiple projects, this will point - to the directory of the first one." - type: string - component: - description: Describes component to which given action - relates - type: string - env: - description: Optional list of environment variables - that have to be set before running the command - items: - properties: - name: - type: string - value: - type: string - required: - - name - type: object - type: array - group: - description: Defines the group this command is part - of - properties: - isDefault: - description: Identifies the default command for - a given group kind - type: boolean - kind: - description: Kind of group the command is part - of - enum: - - build - - run - - test - - debug - - deploy - type: string - type: object - hotReloadCapable: - description: "Whether the command is capable to reload - itself when source code changes. If set to `true` - the command won't be restarted and it is expected - to handle file changes on its own. \n Default value - is `false`" - type: boolean - label: - description: Optional label that provides a label - for this command to be used in Editor UI menus for - example - type: string - workingDir: - description: "Working directory where the command - should be executed \n Special variables that can - be used: \n - `$PROJECTS_ROOT`: A path where projects - sources are mounted as defined by container component's - sourceMapping. \n - `$PROJECT_SOURCE`: A path to - a project source ($PROJECTS_ROOT/). - If there are multiple projects, this will point - to the directory of the first one." - type: string - type: object - id: - description: Mandatory identifier that allows referencing - this command in composite commands, from a parent, or - in events. - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - required: - - id - type: object - type: array - components: - description: Overrides of components encapsulated in a parent - devfile or a plugin. Overriding is done according to K8S strategic - merge patch standard rules. - items: - oneOf: - - required: - - container - - required: - - kubernetes - - required: - - openshift - - required: - - volume - - required: - - image - - required: - - plugin - properties: - attributes: - description: Map of implementation-dependant free-form - YAML attributes. - type: object - x-kubernetes-preserve-unknown-fields: true - componentType: - description: Type of component - enum: - - Container - - Kubernetes - - Openshift - - Volume - - Image - - Plugin - type: string - container: - description: Allows adding and configuring devworkspace-related - containers - properties: - annotation: - description: Annotations that should be added to specific - resources for this container - properties: - deployment: - additionalProperties: - type: string - description: Annotations to be added to deployment - type: object - service: - additionalProperties: - type: string - description: Annotations to be added to service - type: object - type: object - args: - description: "The arguments to supply to the command - running the dockerimage component. The arguments - are supplied either to the default command provided - in the image or to the overridden command. \n Defaults - to an empty array, meaning use whatever is defined - in the image." - items: - type: string - type: array - command: - description: "The command to run in the dockerimage - component instead of the default one provided in - the image. \n Defaults to an empty array, meaning - use whatever is defined in the image." - items: - type: string - type: array - cpuLimit: - type: string - cpuRequest: - type: string - dedicatedPod: - description: "Specify if a container should run in - its own separated pod, instead of running as part - of the main development environment pod. \n Default - value is `false`" - type: boolean - endpoints: - items: - properties: - annotation: - additionalProperties: - type: string - description: Annotations to be added to Kubernetes - Ingress or Openshift Route - type: object - attributes: - description: "Map of implementation-dependant - string-based free-form attributes. \n Examples - of Che-specific attributes: \n - cookiesAuthEnabled: - \"true\" / \"false\", \n - type: \"terminal\" - / \"ide\" / \"ide-dev\"," - type: object - x-kubernetes-preserve-unknown-fields: true - exposure: - description: "Describes how the endpoint should - be exposed on the network. \n - `public` means - that the endpoint will be exposed on the public - network, typically through a K8S ingress or - an OpenShift route. \n - `internal` means - that the endpoint will be exposed internally - outside of the main devworkspace POD, typically - by K8S services, to be consumed by other elements - running on the same cloud internal network. - \n - `none` means that the endpoint will not - be exposed and will only be accessible inside - the main devworkspace POD, on a local address. - \n Default value is `public`" - enum: - - public - - internal - - none - type: string - name: - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - path: - description: Path of the endpoint URL - type: string - protocol: - description: "Describes the application and - transport protocols of the traffic that will - go through this endpoint. \n - `http`: Endpoint - will have `http` traffic, typically on a TCP - connection. It will be automaticaly promoted - to `https` when the `secure` field is set - to `true`. \n - `https`: Endpoint will have - `https` traffic, typically on a TCP connection. - \n - `ws`: Endpoint will have `ws` traffic, - typically on a TCP connection. It will be - automaticaly promoted to `wss` when the `secure` - field is set to `true`. \n - `wss`: Endpoint - will have `wss` traffic, typically on a TCP - connection. \n - `tcp`: Endpoint will have - traffic on a TCP connection, without specifying - an application protocol. \n - `udp`: Endpoint - will have traffic on an UDP connection, without - specifying an application protocol. \n Default - value is `http`" - enum: - - http - - https - - ws - - wss - - tcp - - udp - type: string - secure: - description: Describes whether the endpoint - should be secured and protected by some authentication - process. This requires a protocol of `https` - or `wss`. - type: boolean - targetPort: - description: The port number should be unique. - type: integer - required: - - name - type: object - type: array - env: - description: "Environment variables used in this container. - \n The following variables are reserved and cannot - be overridden via env: \n - `$PROJECTS_ROOT` \n - \ - `$PROJECT_SOURCE`" - items: - properties: - name: - type: string - value: - type: string - required: - - name - type: object - type: array - image: - type: string - memoryLimit: - type: string - memoryRequest: - type: string - mountSources: - description: "Toggles whether or not the project source - code should be mounted in the component. \n Defaults - to true for all component types except plugins and - components that set `dedicatedPod` to true." - type: boolean - sourceMapping: - description: Optional specification of the path in - the container where project sources should be transferred/mounted - when `mountSources` is `true`. When omitted, the - default value of /projects is used. - type: string - volumeMounts: - description: List of volumes mounts that should be - mounted is this container. - items: - description: Volume that should be mounted to a - component container - properties: - name: - description: The volume mount name is the name - of an existing `Volume` component. If several - containers mount the same volume name then - they will reuse the same volume and will be - able to access to the same files. - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - path: - description: The path in the component container - where the volume should be mounted. If not - path is mentioned, default path is the is - `/`. - type: string - required: - - name - type: object - type: array - type: object - image: - description: Allows specifying the definition of an image - for outer loop builds - oneOf: - - required: - - dockerfile - - required: - - autoBuild - properties: - autoBuild: - description: "Defines if the image should be built - during startup. \n Default value is `false`" - type: boolean - dockerfile: - description: Allows specifying dockerfile type build - oneOf: - - required: - - uri - - required: - - devfileRegistry - - required: - - git - properties: - args: - description: The arguments to supply to the dockerfile - build. - items: - type: string - type: array - buildContext: - description: Path of source directory to establish - build context. Defaults to ${PROJECT_ROOT} in - the container - type: string - devfileRegistry: - description: Dockerfile's Devfile Registry source - properties: id: - description: Id in a devfile registry that - contains a Dockerfile. The src in the OCI - registry required for the Dockerfile build - will be downloaded for building the image. - type: string - registryUrl: - description: Devfile Registry URL to pull - the Dockerfile from when using the Devfile - Registry as Dockerfile src. To ensure the - Dockerfile gets resolved consistently in - different environments, it is recommended - to always specify the `devfileRegistryUrl` - when `Id` is used. + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. + type: string + inlined: + description: Inlined content of the VsCode + configuration + type: string + locationType: + description: Type of Vscode configuration + command location + enum: + - Uri + - Inlined type: string + uri: + description: Location as an absolute of relative + URI the VsCode configuration will be fetched + from + type: string + required: + - id type: object - git: - description: Dockerfile's Git source + vscodeTask: + description: "Command providing the definition + of a VsCode Task \n Deprecated; removed in v1alpha2" + oneOf: + - required: + - uri + - required: + - inlined properties: - checkoutFrom: - description: Defines from what the project - should be checked out. Required if there - are more than one remote configured + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + group: + description: Defines the group this command + is part of properties: - remote: - description: The remote name should be - used as init. Required if there are - more than one remote configured - type: string - revision: - description: The revision to checkout - from. Should be branch name, tag or - commit id. Default branch is used if - missing or specified revision is not - found. + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug type: string + required: + - kind type: object - fileLocation: - description: Location of the Dockerfile in - the Git repository when using git as Dockerfile - src. Defaults to Dockerfile. + id: + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. type: string - remotes: - additionalProperties: - type: string - description: The remotes map which should - be initialized in the git project. Projects - must have at least one remote configured - while StarterProjects & Image Component's - Git source can only have at most one remote - configured. - type: object + inlined: + description: Inlined content of the VsCode + configuration + type: string + locationType: + description: Type of Vscode configuration + command location + enum: + - Uri + - Inlined + type: string + uri: + description: Location as an absolute of relative + URI the VsCode configuration will be fetched + from + type: string + required: + - id type: object - rootRequired: - description: "Specify if a privileged builder - pod is required. \n Default value is `false`" - type: boolean - srcType: - description: Type of Dockerfile src + type: object + type: array + components: + description: Overrides of components encapsulated in + a plugin. Overriding is done using a strategic merge + patch. A plugin cannot override embedded plugin components. + items: + oneOf: + - required: + - container + - required: + - kubernetes + - required: + - openshift + - required: + - volume + properties: + componentType: + description: Type of component override for a + plugin enum: - - Uri - - DevfileRegistry - - Git + - Container + - Kubernetes + - Openshift + - Volume type: string - uri: - description: URI Reference of a Dockerfile. It - can be a full URL or a relative URI from the - current devfile as the base URI. - type: string - type: object - imageName: - description: Name of the image for the resulting outerloop - build - type: string - imageType: - description: Type of image - enum: - - Dockerfile - - AutoBuild - type: string - type: object - kubernetes: - description: Allows importing into the devworkspace the - Kubernetes resources defined in a given manifest. For - example this allows reusing the Kubernetes definitions - used to deploy some runtime components in production. - oneOf: - - required: - - uri - - required: - - inlined - properties: - deployByDefault: - description: "Defines if the component should be deployed - during startup. \n Default value is `false`" - type: boolean - endpoints: - items: - properties: - annotation: - additionalProperties: - type: string - description: Annotations to be added to Kubernetes - Ingress or Openshift Route - type: object - attributes: - description: "Map of implementation-dependant - string-based free-form attributes. \n Examples - of Che-specific attributes: \n - cookiesAuthEnabled: - \"true\" / \"false\", \n - type: \"terminal\" - / \"ide\" / \"ide-dev\"," - type: object - x-kubernetes-preserve-unknown-fields: true - exposure: - description: "Describes how the endpoint should - be exposed on the network. \n - `public` means - that the endpoint will be exposed on the public - network, typically through a K8S ingress or - an OpenShift route. \n - `internal` means - that the endpoint will be exposed internally - outside of the main devworkspace POD, typically - by K8S services, to be consumed by other elements - running on the same cloud internal network. - \n - `none` means that the endpoint will not - be exposed and will only be accessible inside - the main devworkspace POD, on a local address. - \n Default value is `public`" - enum: - - public - - internal - - none - type: string - name: - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - path: - description: Path of the endpoint URL - type: string - protocol: - description: "Describes the application and - transport protocols of the traffic that will - go through this endpoint. \n - `http`: Endpoint - will have `http` traffic, typically on a TCP - connection. It will be automaticaly promoted - to `https` when the `secure` field is set - to `true`. \n - `https`: Endpoint will have - `https` traffic, typically on a TCP connection. - \n - `ws`: Endpoint will have `ws` traffic, - typically on a TCP connection. It will be - automaticaly promoted to `wss` when the `secure` - field is set to `true`. \n - `wss`: Endpoint - will have `wss` traffic, typically on a TCP - connection. \n - `tcp`: Endpoint will have - traffic on a TCP connection, without specifying - an application protocol. \n - `udp`: Endpoint - will have traffic on an UDP connection, without - specifying an application protocol. \n Default - value is `http`" - enum: - - http - - https - - ws - - wss - - tcp - - udp - type: string - secure: - description: Describes whether the endpoint - should be secured and protected by some authentication - process. This requires a protocol of `https` - or `wss`. - type: boolean - targetPort: - description: The port number should be unique. - type: integer - required: - - name - type: object - type: array - inlined: - description: Inlined manifest - type: string - locationType: - description: Type of Kubernetes-like location - enum: - - Uri - - Inlined - type: string - uri: - description: Location in a file fetched from a uri. - type: string - type: object - name: - description: 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. - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - openshift: - description: Allows importing into the devworkspace the - OpenShift resources defined in a given manifest. For - example this allows reusing the OpenShift definitions - used to deploy some runtime components in production. - oneOf: - - required: - - uri - - required: - - inlined - properties: - deployByDefault: - description: "Defines if the component should be deployed - during startup. \n Default value is `false`" - type: boolean - endpoints: - items: - properties: - annotation: - additionalProperties: - type: string - description: Annotations to be added to Kubernetes - Ingress or Openshift Route - type: object - attributes: - description: "Map of implementation-dependant - string-based free-form attributes. \n Examples - of Che-specific attributes: \n - cookiesAuthEnabled: - \"true\" / \"false\", \n - type: \"terminal\" - / \"ide\" / \"ide-dev\"," - type: object - x-kubernetes-preserve-unknown-fields: true - exposure: - description: "Describes how the endpoint should - be exposed on the network. \n - `public` means - that the endpoint will be exposed on the public - network, typically through a K8S ingress or - an OpenShift route. \n - `internal` means - that the endpoint will be exposed internally - outside of the main devworkspace POD, typically - by K8S services, to be consumed by other elements - running on the same cloud internal network. - \n - `none` means that the endpoint will not - be exposed and will only be accessible inside - the main devworkspace POD, on a local address. - \n Default value is `public`" - enum: - - public - - internal - - none - type: string - name: - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - path: - description: Path of the endpoint URL - type: string - protocol: - description: "Describes the application and - transport protocols of the traffic that will - go through this endpoint. \n - `http`: Endpoint - will have `http` traffic, typically on a TCP - connection. It will be automaticaly promoted - to `https` when the `secure` field is set - to `true`. \n - `https`: Endpoint will have - `https` traffic, typically on a TCP connection. - \n - `ws`: Endpoint will have `ws` traffic, - typically on a TCP connection. It will be - automaticaly promoted to `wss` when the `secure` - field is set to `true`. \n - `wss`: Endpoint - will have `wss` traffic, typically on a TCP - connection. \n - `tcp`: Endpoint will have - traffic on a TCP connection, without specifying - an application protocol. \n - `udp`: Endpoint - will have traffic on an UDP connection, without - specifying an application protocol. \n Default - value is `http`" - enum: - - http - - https - - ws - - wss - - tcp - - udp - type: string - secure: - description: Describes whether the endpoint - should be secured and protected by some authentication - process. This requires a protocol of `https` - or `wss`. - type: boolean - targetPort: - description: The port number should be unique. - type: integer - required: - - name - type: object - type: array - inlined: - description: Inlined manifest - type: string - locationType: - description: Type of Kubernetes-like location - enum: - - Uri - - Inlined - type: string - uri: - description: Location in a file fetched from a uri. - type: string - type: object - plugin: - description: "Allows importing a plugin. \n Plugins are - mainly imported devfiles that contribute components, - commands and events as a consistent single unit. They - are defined in either YAML files following the devfile - syntax, or as `DevWorkspaceTemplate` Kubernetes Custom - Resources" - oneOf: - - required: - - uri - - required: - - id - - required: - - kubernetes - properties: - commands: - description: Overrides of commands encapsulated in - a parent devfile or a plugin. Overriding is done - according to K8S strategic merge patch standard - rules. - items: - oneOf: - - required: - - exec - - required: - - apply - - required: - - composite - properties: - apply: - description: "Command that consists in applying - a given component definition, typically bound - to a devworkspace event. \n For example, when - an `apply` command is bound to a `preStart` - event, and references a `container` component, - it will start the container as a K8S initContainer - in the devworkspace POD, unless the component - has its `dedicatedPod` field set to `true`. - \n When no `apply` command exist for a given - component, it is assumed the component will - be applied at devworkspace start by default, - unless `deployByDefault` for that component - is set to false." - properties: - component: - description: Describes component that will - be applied + container: + description: Configuration overriding for a Container + component in a plugin + properties: + args: + description: "The arguments to supply to the + command running the dockerimage component. + The arguments are supplied either to the + default command provided in the image or + to the overridden command. \n Defaults to + an empty array, meaning use whatever is + defined in the image." + items: type: string - group: - description: Defines the group this command - is part of + type: array + command: + description: "The command to run in the dockerimage + component instead of the default one provided + in the image. \n Defaults to an empty array, + meaning use whatever is defined in the image." + items: + type: string + type: array + dedicatedPod: + description: "Specify if a container should + run in its own separated pod, instead of + running as part of the main development + environment pod. \n Default value is `false`" + type: boolean + endpoints: + items: properties: - isDefault: - description: Identifies the default - command for a given group kind - type: boolean - kind: - description: Kind of group the command - is part of + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant + string-based free-form attributes. + \n Examples of Che-specific attributes: + \n - cookiesAuthEnabled: \"true\" + / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint + should be exposed on the network. + \n - `public` means that the endpoint + will be exposed on the public network, + typically through a K8S ingress or + an OpenShift route. \n - `internal` + means that the endpoint will be exposed + internally outside of the main workspace + POD, typically by K8S services, to + be consumed by other elements running + on the same cloud internal network. + \n - `none` means that the endpoint + will not be exposed and will only + be accessible inside the main workspace + POD, on a local address. \n Default + value is `public`" enum: - - build - - run - - test - - debug - - deploy + - public + - internal + - none + type: string + name: type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application + and transport protocols of the traffic + that will go through this endpoint. + \n - `http`: Endpoint will have `http` + traffic, typically on a TCP connection. + It will be automaticaly promoted to + `https` when the `secure` field is + set to `true`. \n - `https`: Endpoint + will have `https` traffic, typically + on a TCP connection. \n - `ws`: Endpoint + will have `ws` traffic, typically + on a TCP connection. It will be automaticaly + promoted to `wss` when the `secure` + field is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, + typically on a TCP connection. \n + - `tcp`: Endpoint will have traffic + on a TCP connection, without specifying + an application protocol. \n - `udp`: + Endpoint will have traffic on an UDP + connection, without specifying an + application protocol. \n Default value + is `http`" + type: string + secure: + description: Describes whether the endpoint + should be secured and protected by + some authentication process + type: boolean + targetPort: + type: integer + required: + - name type: object - label: - description: Optional label that provides - a label for this command to be used in - Editor UI menus for example - type: string - type: object - attributes: - description: Map of implementation-dependant - free-form YAML attributes. - type: object - x-kubernetes-preserve-unknown-fields: true - commandType: - description: Type of devworkspace command - enum: - - Exec - - Apply - - Composite - type: string - composite: - description: Composite command that allows executing - several sub-commands either sequentially or - concurrently - properties: - commands: - description: The commands that comprise - this composite command - items: - type: string - type: array - group: - description: Defines the group this command - is part of + type: array + env: + description: Environment variables used in + this container + items: properties: - isDefault: - description: Identifies the default - command for a given group kind - type: boolean - kind: - description: Kind of group the command - is part of - enum: - - build - - run - - test - - debug - - deploy + name: + type: string + value: type: string + required: + - name + - value type: object - label: - description: Optional label that provides - a label for this command to be used in - Editor UI menus for example - type: string - parallel: - description: Indicates if the sub-commands - should be executed concurrently - type: boolean - type: object - exec: - description: CLI Command executed in an existing - component container - properties: - commandLine: - description: "The actual command-line string - \n Special variables that can be used: - \n - `$PROJECTS_ROOT`: A path where projects - sources are mounted as defined by container - component's sourceMapping. \n - `$PROJECT_SOURCE`: - A path to a project source ($PROJECTS_ROOT/). - If there are multiple projects, this will - point to the directory of the first one." - type: string - component: - description: Describes component to which - given action relates - type: string - env: - description: Optional list of environment - variables that have to be set before running - the command - items: - properties: - name: - type: string - value: - type: string - required: - - name - type: object - type: array - group: - description: Defines the group this command - is part of + type: array + image: + type: string + memoryLimit: + type: string + mountSources: + type: boolean + name: + type: string + sourceMapping: + description: Optional specification of the + path in the container where project sources + should be transferred/mounted when `mountSources` + is `true`. When omitted, the value of the + `PROJECTS_ROOT` environment variable is + used. + type: string + volumeMounts: + description: List of volumes mounts that should + be mounted is this container. + items: + description: Volume that should be mounted + to a component container properties: - isDefault: - description: Identifies the default - command for a given group kind - type: boolean - kind: - description: Kind of group the command - is part of - enum: - - build - - run - - test - - debug - - deploy + name: + description: The volume mount name is + the name of an existing `Volume` component. + If several containers mount the same + volume name then they will reuse the + same volume and will be able to access + to the same files. type: string + path: + description: The path in the component + container where the volume should + be mounted. If not path is mentioned, + default path is the is `/`. + type: string + required: + - name type: object - hotReloadCapable: - description: "Whether the command is capable - to reload itself when source code changes. - If set to `true` the command won't be - restarted and it is expected to handle - file changes on its own. \n Default value - is `false`" - type: boolean - label: - description: Optional label that provides - a label for this command to be used in - Editor UI menus for example - type: string - workingDir: - description: "Working directory where the - command should be executed \n Special - variables that can be used: \n - `$PROJECTS_ROOT`: - A path where projects sources are mounted - as defined by container component's sourceMapping. - \n - `$PROJECT_SOURCE`: A path to a project - source ($PROJECTS_ROOT/). - If there are multiple projects, this will - point to the directory of the first one." - type: string - type: object - id: - description: Mandatory identifier that allows - referencing this command in composite commands, - from a parent, or in events. - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - required: - - id - type: object - type: array - components: - description: Overrides of components encapsulated - in a parent devfile or a plugin. Overriding is done - according to K8S strategic merge patch standard - rules. - items: - oneOf: - - required: - - container - - required: - - kubernetes - - required: - - openshift - - required: - - volume - - required: - - image - properties: - attributes: - description: Map of implementation-dependant - free-form YAML attributes. - type: object - x-kubernetes-preserve-unknown-fields: true - componentType: - description: Type of component - enum: - - Container - - Kubernetes - - Openshift - - Volume - - Image - type: string - container: - description: Allows adding and configuring devworkspace-related - containers - properties: - annotation: - description: Annotations that should be - added to specific resources for this container + type: array + required: + - name + type: object + kubernetes: + description: Configuration overriding for a Kubernetes + component in a plugin + oneOf: + - required: + - uri + - required: + - inlined + properties: + endpoints: + items: properties: - deployment: + attributes: additionalProperties: type: string - description: Annotations to be added - to deployment + description: "Map of implementation-dependant + string-based free-form attributes. + \n Examples of Che-specific attributes: + \n - cookiesAuthEnabled: \"true\" + / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," type: object - service: - additionalProperties: + exposure: + description: "Describes how the endpoint + should be exposed on the network. + \n - `public` means that the endpoint + will be exposed on the public network, + typically through a K8S ingress or + an OpenShift route. \n - `internal` + means that the endpoint will be exposed + internally outside of the main workspace + POD, typically by K8S services, to + be consumed by other elements running + on the same cloud internal network. + \n - `none` means that the endpoint + will not be exposed and will only + be accessible inside the main workspace + POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application + and transport protocols of the traffic + that will go through this endpoint. + \n - `http`: Endpoint will have `http` + traffic, typically on a TCP connection. + It will be automaticaly promoted to + `https` when the `secure` field is + set to `true`. \n - `https`: Endpoint + will have `https` traffic, typically + on a TCP connection. \n - `ws`: Endpoint + will have `ws` traffic, typically + on a TCP connection. It will be automaticaly + promoted to `wss` when the `secure` + field is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, + typically on a TCP connection. \n + - `tcp`: Endpoint will have traffic + on a TCP connection, without specifying + an application protocol. \n - `udp`: + Endpoint will have traffic on an UDP + connection, without specifying an + application protocol. \n Default value + is `http`" + type: string + secure: + description: Describes whether the endpoint + should be secured and protected by + some authentication process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + name: + description: Mandatory name that allows referencing + the component in commands, or inside a parent + type: string + uri: + description: Location in a file fetched from + a uri. + type: string + required: + - name + type: object + openshift: + description: Configuration overriding for an OpenShift + component in a plugin + oneOf: + - required: + - uri + - required: + - inlined + properties: + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant + string-based free-form attributes. + \n Examples of Che-specific attributes: + \n - cookiesAuthEnabled: \"true\" + / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint + should be exposed on the network. + \n - `public` means that the endpoint + will be exposed on the public network, + typically through a K8S ingress or + an OpenShift route. \n - `internal` + means that the endpoint will be exposed + internally outside of the main workspace + POD, typically by K8S services, to + be consumed by other elements running + on the same cloud internal network. + \n - `none` means that the endpoint + will not be exposed and will only + be accessible inside the main workspace + POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application + and transport protocols of the traffic + that will go through this endpoint. + \n - `http`: Endpoint will have `http` + traffic, typically on a TCP connection. + It will be automaticaly promoted to + `https` when the `secure` field is + set to `true`. \n - `https`: Endpoint + will have `https` traffic, typically + on a TCP connection. \n - `ws`: Endpoint + will have `ws` traffic, typically + on a TCP connection. It will be automaticaly + promoted to `wss` when the `secure` + field is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, + typically on a TCP connection. \n + - `tcp`: Endpoint will have traffic + on a TCP connection, without specifying + an application protocol. \n - `udp`: + Endpoint will have traffic on an UDP + connection, without specifying an + application protocol. \n Default value + is `http`" + type: string + secure: + description: Describes whether the endpoint + should be secured and protected by + some authentication process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + name: + description: Mandatory name that allows referencing + the component in commands, or inside a parent + type: string + uri: + description: Location in a file fetched from + a uri. + type: string + required: + - name + type: object + volume: + description: Configuration overriding for a Volume + component in a plugin + properties: + ephemeral: + description: Ephemeral volumes are not stored + persistently across restarts. Defaults to + false + type: boolean + name: + description: Mandatory name that allows referencing + the Volume component in Container volume + mounts or inside a parent + type: string + size: + description: Size of the volume + type: string + required: + - name + type: object + type: object + type: array + id: + description: Id in a registry that contains a Devfile + yaml file + type: string + importReferenceType: + description: type of location from where the referenced + template structure should be retrieved + enum: + - Uri + - Id + - Kubernetes + type: string + kubernetes: + description: Reference to a Kubernetes CRD of type DevWorkspaceTemplate + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object + name: + description: Optional name that allows referencing the + component in commands, or inside a parent If omitted + it will be infered from the location (uri or registryEntry) + type: string + registryUrl: + type: string + uri: + description: Uri of a Devfile yaml file + type: string + type: object + volume: + description: Allows specifying the definition of a volume + shared by several other components + properties: + ephemeral: + description: Ephemeral volumes are not stored persistently + across restarts. Defaults to false + type: boolean + name: + description: Mandatory name that allows referencing + the Volume component in Container volume mounts or + inside a parent + type: string + size: + description: Size of the volume + type: string + required: + - name + type: object + type: object + type: array + events: + description: Bindings of commands to events. Each command is referred-to + by its name. + properties: + postStart: + description: Names of commands that should be executed after + the workspace is completely started. In the case of Che-Theia, + these commands should be executed after all plugins and + extensions have started, including project cloning. This + means that those commands are not triggered until the user + opens the IDE in his browser. + items: + type: string + type: array + postStop: + description: Names of commands that should be executed after + stopping the workspace. + items: + type: string + type: array + preStart: + description: Names of commands that should be executed before + the workspace start. Kubernetes-wise, these commands would + typically be executed in init containers of the workspace + POD. + items: + type: string + type: array + preStop: + description: Names of commands that should be executed before + stopping the workspace. + items: + type: string + type: array + type: object + parent: + description: Parent workspace template + oneOf: + - required: + - uri + - required: + - id + - required: + - kubernetes + properties: + commands: + description: Overrides of commands encapsulated in a parent + devfile or a plugin. Overriding is done using a strategic + merge patch + items: + oneOf: + - required: + - exec + - required: + - apply + - required: + - vscodeTask + - required: + - vscodeLaunch + - required: + - composite + - required: + - custom + properties: + apply: + description: "Command that consists in applying a given + component definition, typically bound to a workspace + event. \n For example, when an `apply` command is + bound to a `preStart` event, and references a `container` + component, it will start the container as a K8S initContainer + in the workspace POD, unless the component has its + `dedicatedPod` field set to `true`. \n When no `apply` + command exist for a given component, it is assumed + the component will be applied at workspace start by + default." + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + component: + description: Describes component that will be applied + type: string + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command is part + of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + type: string + label: + description: Optional label that provides a label + for this command to be used in Editor UI menus + for example + type: string + required: + - id + type: object + commandType: + description: Type of workspace command + enum: + - Exec + - Apply + - VscodeTask + - VscodeLaunch + - Composite + - Custom + type: string + composite: + description: Composite command that allows executing + several sub-commands either sequentially or concurrently + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + commands: + description: The commands that comprise this composite + command + items: + type: string + type: array + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command is part + of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + type: string + label: + description: Optional label that provides a label + for this command to be used in Editor UI menus + for example + type: string + parallel: + description: Indicates if the sub-commands should + be executed concurrently + type: boolean + required: + - id + type: object + custom: + description: Custom command whose logic is implementation-dependant + and should be provided by the user possibly through + some dedicated plugin + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + commandClass: + description: Class of command that the associated + implementation component should use to process + this command with the appropriate logic + type: string + embeddedResource: + description: Additional free-form configuration + for this custom command that the implementation + component will know how to use + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command is part + of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + type: string + label: + description: Optional label that provides a label + for this command to be used in Editor UI menus + for example + type: string + required: + - commandClass + - embeddedResource + - id + type: object + exec: + description: CLI Command executed in an existing component + container + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + commandLine: + description: "The actual command-line string \n + Special variables that can be used: \n - `$PROJECTS_ROOT`: + A path where projects sources are mounted \n - + `$PROJECT_SOURCE`: A path to a project source + ($PROJECTS_ROOT/). If there are + multiple projects, this will point to the directory + of the first one." + type: string + component: + description: Describes component to which given + action relates + type: string + env: + description: Optional list of environment variables + that have to be set before running the command + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command is part + of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + hotReloadCapable: + description: "Whether the command is capable to + reload itself when source code changes. If set + to `true` the command won't be restarted and it + is expected to handle file changes on its own. + \n Default value is `false`" + type: boolean + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + type: string + label: + description: Optional label that provides a label + for this command to be used in Editor UI menus + for example + type: string + workingDir: + description: "Working directory where the command + should be executed \n Special variables that can + be used: \n - `${PROJECTS_ROOT}`: A path where + projects sources are mounted \n - `${PROJECT_SOURCE}`: + A path to a project source (${PROJECTS_ROOT}/). + If there are multiple projects, this will point + to the directory of the first one." + type: string + required: + - id + type: object + vscodeLaunch: + description: "Command providing the definition of a + VsCode launch action \n Deprecated; removed in v1alpha2" + oneOf: + - required: + - uri + - required: + - inlined + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command is part + of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + type: string + inlined: + description: Inlined content of the VsCode configuration + type: string + locationType: + description: Type of Vscode configuration command + location + enum: + - Uri + - Inlined + type: string + uri: + description: Location as an absolute of relative + URI the VsCode configuration will be fetched from + type: string + required: + - id + type: object + vscodeTask: + description: "Command providing the definition of a + VsCode Task \n Deprecated; removed in v1alpha2" + oneOf: + - required: + - uri + - required: + - inlined + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command is part + of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + type: string + inlined: + description: Inlined content of the VsCode configuration + type: string + locationType: + description: Type of Vscode configuration command + location + enum: + - Uri + - Inlined + type: string + uri: + description: Location as an absolute of relative + URI the VsCode configuration will be fetched from + type: string + required: + - id + type: object + type: object + type: array + components: + description: Overrides of components encapsulated in a parent + devfile. Overriding is done using a strategic merge patch + items: + oneOf: + - required: + - container + - required: + - kubernetes + - required: + - openshift + - required: + - volume + - required: + - plugin + - required: + - custom + properties: + componentType: + description: Type of component + enum: + - Container + - Kubernetes + - Openshift + - Volume + - Plugin + - Custom + type: string + container: + description: Allows adding and configuring workspace-related + containers + properties: + args: + description: "The arguments to supply to the command + running the dockerimage component. The arguments + are supplied either to the default command provided + in the image or to the overridden command. \n + Defaults to an empty array, meaning use whatever + is defined in the image." + items: + type: string + type: array + command: + description: "The command to run in the dockerimage + component instead of the default one provided + in the image. \n Defaults to an empty array, meaning + use whatever is defined in the image." + items: + type: string + type: array + dedicatedPod: + description: "Specify if a container should run + in its own separated pod, instead of running as + part of the main development environment pod. + \n Default value is `false`" + type: boolean + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant + string-based free-form attributes. \n Examples + of Che-specific attributes: \n - cookiesAuthEnabled: + \"true\" / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint should + be exposed on the network. \n - `public` + means that the endpoint will be exposed + on the public network, typically through + a K8S ingress or an OpenShift route. \n + - `internal` means that the endpoint will + be exposed internally outside of the main + workspace POD, typically by K8S services, + to be consumed by other elements running + on the same cloud internal network. \n - + `none` means that the endpoint will not + be exposed and will only be accessible inside + the main workspace POD, on a local address. + \n Default value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application and + transport protocols of the traffic that + will go through this endpoint. \n - `http`: + Endpoint will have `http` traffic, typically + on a TCP connection. It will be automaticaly + promoted to `https` when the `secure` field + is set to `true`. \n - `https`: Endpoint + will have `https` traffic, typically on + a TCP connection. \n - `ws`: Endpoint will + have `ws` traffic, typically on a TCP connection. + It will be automaticaly promoted to `wss` + when the `secure` field is set to `true`. + \n - `wss`: Endpoint will have `wss` traffic, + typically on a TCP connection. \n - `tcp`: + Endpoint will have traffic on a TCP connection, + without specifying an application protocol. + \n - `udp`: Endpoint will have traffic on + an UDP connection, without specifying an + application protocol. \n Default value is + `http`" + type: string + secure: + description: Describes whether the endpoint + should be secured and protected by some + authentication process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + env: + description: Environment variables used in this + container + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + image: + type: string + memoryLimit: + type: string + mountSources: + type: boolean + name: + type: string + sourceMapping: + description: Optional specification of the path + in the container where project sources should + be transferred/mounted when `mountSources` is + `true`. When omitted, the value of the `PROJECTS_ROOT` + environment variable is used. + type: string + volumeMounts: + description: List of volumes mounts that should + be mounted is this container. + items: + description: Volume that should be mounted to + a component container + properties: + name: + description: The volume mount name is the + name of an existing `Volume` component. + If several containers mount the same volume + name then they will reuse the same volume + and will be able to access to the same files. + type: string + path: + description: The path in the component container + where the volume should be mounted. If not + path is mentioned, default path is the is + `/`. + type: string + required: + - name + type: object + type: array + required: + - name + type: object + custom: + description: Custom component whose logic is implementation-dependant + and should be provided by the user possibly through + some dedicated controller + properties: + componentClass: + description: Class of component that the associated + implementation controller should use to process + this command with the appropriate logic + type: string + embeddedResource: + description: Additional free-form configuration + for this custom component that the implementation + controller will know how to use + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + name: + description: Mandatory name that allows referencing + the component in commands, or inside a parent + type: string + required: + - componentClass + - embeddedResource + - name + type: object + kubernetes: + description: Allows importing into the workspace the + Kubernetes resources defined in a given manifest. + For example this allows reusing the Kubernetes definitions + used to deploy some runtime components in production. + oneOf: + - required: + - uri + - required: + - inlined + properties: + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant + string-based free-form attributes. \n Examples + of Che-specific attributes: \n - cookiesAuthEnabled: + \"true\" / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint should + be exposed on the network. \n - `public` + means that the endpoint will be exposed + on the public network, typically through + a K8S ingress or an OpenShift route. \n + - `internal` means that the endpoint will + be exposed internally outside of the main + workspace POD, typically by K8S services, + to be consumed by other elements running + on the same cloud internal network. \n - + `none` means that the endpoint will not + be exposed and will only be accessible inside + the main workspace POD, on a local address. + \n Default value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application and + transport protocols of the traffic that + will go through this endpoint. \n - `http`: + Endpoint will have `http` traffic, typically + on a TCP connection. It will be automaticaly + promoted to `https` when the `secure` field + is set to `true`. \n - `https`: Endpoint + will have `https` traffic, typically on + a TCP connection. \n - `ws`: Endpoint will + have `ws` traffic, typically on a TCP connection. + It will be automaticaly promoted to `wss` + when the `secure` field is set to `true`. + \n - `wss`: Endpoint will have `wss` traffic, + typically on a TCP connection. \n - `tcp`: + Endpoint will have traffic on a TCP connection, + without specifying an application protocol. + \n - `udp`: Endpoint will have traffic on + an UDP connection, without specifying an + application protocol. \n Default value is + `http`" + type: string + secure: + description: Describes whether the endpoint + should be secured and protected by some + authentication process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + name: + description: Mandatory name that allows referencing + the component in commands, or inside a parent + type: string + uri: + description: Location in a file fetched from a uri. + type: string + required: + - name + type: object + openshift: + description: Allows importing into the workspace the + OpenShift resources defined in a given manifest. For + example this allows reusing the OpenShift definitions + used to deploy some runtime components in production. + oneOf: + - required: + - uri + - required: + - inlined + properties: + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant + string-based free-form attributes. \n Examples + of Che-specific attributes: \n - cookiesAuthEnabled: + \"true\" / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint should + be exposed on the network. \n - `public` + means that the endpoint will be exposed + on the public network, typically through + a K8S ingress or an OpenShift route. \n + - `internal` means that the endpoint will + be exposed internally outside of the main + workspace POD, typically by K8S services, + to be consumed by other elements running + on the same cloud internal network. \n - + `none` means that the endpoint will not + be exposed and will only be accessible inside + the main workspace POD, on a local address. + \n Default value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application and + transport protocols of the traffic that + will go through this endpoint. \n - `http`: + Endpoint will have `http` traffic, typically + on a TCP connection. It will be automaticaly + promoted to `https` when the `secure` field + is set to `true`. \n - `https`: Endpoint + will have `https` traffic, typically on + a TCP connection. \n - `ws`: Endpoint will + have `ws` traffic, typically on a TCP connection. + It will be automaticaly promoted to `wss` + when the `secure` field is set to `true`. + \n - `wss`: Endpoint will have `wss` traffic, + typically on a TCP connection. \n - `tcp`: + Endpoint will have traffic on a TCP connection, + without specifying an application protocol. + \n - `udp`: Endpoint will have traffic on + an UDP connection, without specifying an + application protocol. \n Default value is + `http`" + type: string + secure: + description: Describes whether the endpoint + should be secured and protected by some + authentication process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + name: + description: Mandatory name that allows referencing + the component in commands, or inside a parent + type: string + uri: + description: Location in a file fetched from a uri. + type: string + required: + - name + type: object + plugin: + description: "Allows importing a plugin. \n Plugins + are mainly imported devfiles that contribute components, + commands and events as a consistent single unit. They + are defined in either YAML files following the devfile + syntax, or as `DevWorkspaceTemplate` Kubernetes Custom + Resources" + oneOf: + - required: + - uri + - required: + - id + - required: + - kubernetes + properties: + commands: + description: Overrides of commands encapsulated + in a parent devfile or a plugin. Overriding is + done using a strategic merge patch + items: + oneOf: + - required: + - exec + - required: + - apply + - required: + - vscodeTask + - required: + - vscodeLaunch + - required: + - composite + - required: + - custom + properties: + apply: + description: "Command that consists in applying + a given component definition, typically + bound to a workspace event. \n For example, + when an `apply` command is bound to a `preStart` + event, and references a `container` component, + it will start the container as a K8S initContainer + in the workspace POD, unless the component + has its `dedicatedPod` field set to `true`. + \n When no `apply` command exist for a given + component, it is assumed the component will + be applied at workspace start by default." + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form + additional command attributes + type: object + component: + description: Describes component that + will be applied + type: string + group: + description: Defines the group this command + is part of + properties: + isDefault: + description: Identifies the default + command for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that + allows referencing this command in composite + commands, from a parent, or in events. + type: string + label: + description: Optional label that provides + a label for this command to be used + in Editor UI menus for example + type: string + required: + - id + type: object + commandType: + description: Type of workspace command + enum: + - Exec + - Apply + - VscodeTask + - VscodeLaunch + - Composite + - Custom + type: string + composite: + description: Composite command that allows + executing several sub-commands either sequentially + or concurrently + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form + additional command attributes + type: object + commands: + description: The commands that comprise + this composite command + items: + type: string + type: array + group: + description: Defines the group this command + is part of + properties: + isDefault: + description: Identifies the default + command for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that + allows referencing this command in composite + commands, from a parent, or in events. + type: string + label: + description: Optional label that provides + a label for this command to be used + in Editor UI menus for example + type: string + parallel: + description: Indicates if the sub-commands + should be executed concurrently + type: boolean + required: + - id + type: object + custom: + description: Custom command whose logic is + implementation-dependant and should be provided + by the user possibly through some dedicated + plugin + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form + additional command attributes + type: object + commandClass: + description: Class of command that the + associated implementation component + should use to process this command with + the appropriate logic + type: string + embeddedResource: + description: Additional free-form configuration + for this custom command that the implementation + component will know how to use + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + group: + description: Defines the group this command + is part of + properties: + isDefault: + description: Identifies the default + command for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that + allows referencing this command in composite + commands, from a parent, or in events. + type: string + label: + description: Optional label that provides + a label for this command to be used + in Editor UI menus for example + type: string + required: + - commandClass + - embeddedResource + - id + type: object + exec: + description: CLI Command executed in an existing + component container + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form + additional command attributes + type: object + commandLine: + description: "The actual command-line + string \n Special variables that can + be used: \n - `$PROJECTS_ROOT`: A path + where projects sources are mounted \n + \ - `$PROJECT_SOURCE`: A path to a project + source ($PROJECTS_ROOT/). + If there are multiple projects, this + will point to the directory of the first + one." + type: string + component: + description: Describes component to which + given action relates + type: string + env: + description: Optional list of environment + variables that have to be set before + running the command + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + group: + description: Defines the group this command + is part of + properties: + isDefault: + description: Identifies the default + command for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + hotReloadCapable: + description: "Whether the command is capable + to reload itself when source code changes. + If set to `true` the command won't be + restarted and it is expected to handle + file changes on its own. \n Default + value is `false`" + type: boolean + id: + description: Mandatory identifier that + allows referencing this command in composite + commands, from a parent, or in events. + type: string + label: + description: Optional label that provides + a label for this command to be used + in Editor UI menus for example + type: string + workingDir: + description: "Working directory where + the command should be executed \n Special + variables that can be used: \n - `${PROJECTS_ROOT}`: + A path where projects sources are mounted + \n - `${PROJECT_SOURCE}`: A path to + a project source (${PROJECTS_ROOT}/). + If there are multiple projects, this + will point to the directory of the first + one." + type: string + required: + - id + type: object + vscodeLaunch: + description: "Command providing the definition + of a VsCode launch action \n Deprecated; + removed in v1alpha2" + oneOf: + - required: + - uri + - required: + - inlined + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form + additional command attributes + type: object + group: + description: Defines the group this command + is part of + properties: + isDefault: + description: Identifies the default + command for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that + allows referencing this command in composite + commands, from a parent, or in events. + type: string + inlined: + description: Inlined content of the VsCode + configuration + type: string + locationType: + description: Type of Vscode configuration + command location + enum: + - Uri + - Inlined + type: string + uri: + description: Location as an absolute of + relative URI the VsCode configuration + will be fetched from + type: string + required: + - id + type: object + vscodeTask: + description: "Command providing the definition + of a VsCode Task \n Deprecated; removed + in v1alpha2" + oneOf: + - required: + - uri + - required: + - inlined + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form + additional command attributes + type: object + group: + description: Defines the group this command + is part of + properties: + isDefault: + description: Identifies the default + command for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that + allows referencing this command in composite + commands, from a parent, or in events. + type: string + inlined: + description: Inlined content of the VsCode + configuration + type: string + locationType: + description: Type of Vscode configuration + command location + enum: + - Uri + - Inlined + type: string + uri: + description: Location as an absolute of + relative URI the VsCode configuration + will be fetched from + type: string + required: + - id + type: object + type: object + type: array + components: + description: Overrides of components encapsulated + in a plugin. Overriding is done using a strategic + merge patch. A plugin cannot override embedded + plugin components. + items: + oneOf: + - required: + - container + - required: + - kubernetes + - required: + - openshift + - required: + - volume + properties: + componentType: + description: Type of component override for + a plugin + enum: + - Container + - Kubernetes + - Openshift + - Volume + type: string + container: + description: Configuration overriding for + a Container component in a plugin + properties: + args: + description: "The arguments to supply + to the command running the dockerimage + component. The arguments are supplied + either to the default command provided + in the image or to the overridden command. + \n Defaults to an empty array, meaning + use whatever is defined in the image." + items: + type: string + type: array + command: + description: "The command to run in the + dockerimage component instead of the + default one provided in the image. \n + Defaults to an empty array, meaning + use whatever is defined in the image." + items: + type: string + type: array + dedicatedPod: + description: "Specify if a container should + run in its own separated pod, instead + of running as part of the main development + environment pod. \n Default value is + `false`" + type: boolean + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant + string-based free-form attributes. + \n Examples of Che-specific attributes: + \n - cookiesAuthEnabled: \"true\" + / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the + endpoint should be exposed on + the network. \n - `public` means + that the endpoint will be exposed + on the public network, typically + through a K8S ingress or an OpenShift + route. \n - `internal` means that + the endpoint will be exposed internally + outside of the main workspace + POD, typically by K8S services, + to be consumed by other elements + running on the same cloud internal + network. \n - `none` means that + the endpoint will not be exposed + and will only be accessible inside + the main workspace POD, on a local + address. \n Default value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint + URL + type: string + protocol: + description: "Describes the application + and transport protocols of the + traffic that will go through this + endpoint. \n - `http`: Endpoint + will have `http` traffic, typically + on a TCP connection. It will be + automaticaly promoted to `https` + when the `secure` field is set + to `true`. \n - `https`: Endpoint + will have `https` traffic, typically + on a TCP connection. \n - `ws`: + Endpoint will have `ws` traffic, + typically on a TCP connection. + It will be automaticaly promoted + to `wss` when the `secure` field + is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, + typically on a TCP connection. + \n - `tcp`: Endpoint will have + traffic on a TCP connection, without + specifying an application protocol. + \n - `udp`: Endpoint will have + traffic on an UDP connection, + without specifying an application + protocol. \n Default value is + `http`" + type: string + secure: + description: Describes whether the + endpoint should be secured and + protected by some authentication + process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + env: + description: Environment variables used + in this container + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + image: + type: string + memoryLimit: + type: string + mountSources: + type: boolean + name: + type: string + sourceMapping: + description: Optional specification of + the path in the container where project + sources should be transferred/mounted + when `mountSources` is `true`. When + omitted, the value of the `PROJECTS_ROOT` + environment variable is used. + type: string + volumeMounts: + description: List of volumes mounts that + should be mounted is this container. + items: + description: Volume that should be mounted + to a component container + properties: + name: + description: The volume mount name + is the name of an existing `Volume` + component. If several containers + mount the same volume name then + they will reuse the same volume + and will be able to access to + the same files. + type: string + path: + description: The path in the component + container where the volume should + be mounted. If not path is mentioned, + default path is the is `/`. + type: string + required: + - name + type: object + type: array + required: + - name + type: object + kubernetes: + description: Configuration overriding for + a Kubernetes component in a plugin + oneOf: + - required: + - uri + - required: + - inlined + properties: + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant + string-based free-form attributes. + \n Examples of Che-specific attributes: + \n - cookiesAuthEnabled: \"true\" + / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the + endpoint should be exposed on + the network. \n - `public` means + that the endpoint will be exposed + on the public network, typically + through a K8S ingress or an OpenShift + route. \n - `internal` means that + the endpoint will be exposed internally + outside of the main workspace + POD, typically by K8S services, + to be consumed by other elements + running on the same cloud internal + network. \n - `none` means that + the endpoint will not be exposed + and will only be accessible inside + the main workspace POD, on a local + address. \n Default value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint + URL + type: string + protocol: + description: "Describes the application + and transport protocols of the + traffic that will go through this + endpoint. \n - `http`: Endpoint + will have `http` traffic, typically + on a TCP connection. It will be + automaticaly promoted to `https` + when the `secure` field is set + to `true`. \n - `https`: Endpoint + will have `https` traffic, typically + on a TCP connection. \n - `ws`: + Endpoint will have `ws` traffic, + typically on a TCP connection. + It will be automaticaly promoted + to `wss` when the `secure` field + is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, + typically on a TCP connection. + \n - `tcp`: Endpoint will have + traffic on a TCP connection, without + specifying an application protocol. + \n - `udp`: Endpoint will have + traffic on an UDP connection, + without specifying an application + protocol. \n Default value is + `http`" + type: string + secure: + description: Describes whether the + endpoint should be secured and + protected by some authentication + process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + name: + description: Mandatory name that allows + referencing the component in commands, + or inside a parent + type: string + uri: + description: Location in a file fetched + from a uri. + type: string + required: + - name + type: object + openshift: + description: Configuration overriding for + an OpenShift component in a plugin + oneOf: + - required: + - uri + - required: + - inlined + properties: + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant + string-based free-form attributes. + \n Examples of Che-specific attributes: + \n - cookiesAuthEnabled: \"true\" + / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the + endpoint should be exposed on + the network. \n - `public` means + that the endpoint will be exposed + on the public network, typically + through a K8S ingress or an OpenShift + route. \n - `internal` means that + the endpoint will be exposed internally + outside of the main workspace + POD, typically by K8S services, + to be consumed by other elements + running on the same cloud internal + network. \n - `none` means that + the endpoint will not be exposed + and will only be accessible inside + the main workspace POD, on a local + address. \n Default value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint + URL + type: string + protocol: + description: "Describes the application + and transport protocols of the + traffic that will go through this + endpoint. \n - `http`: Endpoint + will have `http` traffic, typically + on a TCP connection. It will be + automaticaly promoted to `https` + when the `secure` field is set + to `true`. \n - `https`: Endpoint + will have `https` traffic, typically + on a TCP connection. \n - `ws`: + Endpoint will have `ws` traffic, + typically on a TCP connection. + It will be automaticaly promoted + to `wss` when the `secure` field + is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, + typically on a TCP connection. + \n - `tcp`: Endpoint will have + traffic on a TCP connection, without + specifying an application protocol. + \n - `udp`: Endpoint will have + traffic on an UDP connection, + without specifying an application + protocol. \n Default value is + `http`" + type: string + secure: + description: Describes whether the + endpoint should be secured and + protected by some authentication + process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + name: + description: Mandatory name that allows + referencing the component in commands, + or inside a parent + type: string + uri: + description: Location in a file fetched + from a uri. + type: string + required: + - name + type: object + volume: + description: Configuration overriding for + a Volume component in a plugin + properties: + ephemeral: + description: Ephemeral volumes are not + stored persistently across restarts. + Defaults to false + type: boolean + name: + description: Mandatory name that allows + referencing the Volume component in + Container volume mounts or inside a + parent + type: string + size: + description: Size of the volume + type: string + required: + - name + type: object + type: object + type: array + id: + description: Id in a registry that contains a Devfile + yaml file + type: string + importReferenceType: + description: type of location from where the referenced + template structure should be retrieved + enum: + - Uri + - Id + - Kubernetes + type: string + kubernetes: + description: Reference to a Kubernetes CRD of type + DevWorkspaceTemplate + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object + name: + description: Optional name that allows referencing + the component in commands, or inside a parent + If omitted it will be infered from the location + (uri or registryEntry) + type: string + registryUrl: + type: string + uri: + description: Uri of a Devfile yaml file + type: string + type: object + volume: + description: Allows specifying the definition of a volume + shared by several other components + properties: + ephemeral: + description: Ephemeral volumes are not stored persistently + across restarts. Defaults to false + type: boolean + name: + description: Mandatory name that allows referencing + the Volume component in Container volume mounts + or inside a parent + type: string + size: + description: Size of the volume + type: string + required: + - name + type: object + type: object + type: array + id: + description: Id in a registry that contains a Devfile yaml + file + type: string + importReferenceType: + description: type of location from where the referenced template + structure should be retrieved + enum: + - Uri + - Id + - Kubernetes + type: string + kubernetes: + description: Reference to a Kubernetes CRD of type DevWorkspaceTemplate + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object + projects: + description: Overrides of projects encapsulated in a parent + devfile. Overriding is done using a strategic merge patch. + items: + oneOf: + - required: + - git + - required: + - github + - required: + - zip + - required: + - custom + properties: + clonePath: + description: Path relative to the root of the projects + to which this project should be cloned into. This + is a unix-style relative path (i.e. uses forward slashes). + The path is invalid if it is absolute or tries to + escape the project root through the usage of '..'. + If not specified, defaults to the project name. + type: string + custom: + description: Project's Custom source + properties: + embeddedResource: + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + projectSourceClass: + type: string + required: + - embeddedResource + - projectSourceClass + type: object + git: + description: Project's Git source + properties: + checkoutFrom: + description: Defines from what the project should + be checked out. Required if there are more than + one remote configured + properties: + remote: + description: The remote name should be used + as init. Required if there are more than one + remote configured + type: string + revision: + description: The revision to checkout from. + Should be branch name, tag or commit id. Default + branch is used if missing or specified revision + is not found. + type: string + type: object + remotes: + additionalProperties: + type: string + description: The remotes map which should be initialized + in the git project. Must have at least one remote + configured + type: object + sparseCheckoutDir: + description: Part of project to populate in the + working directory. + type: string + type: object + github: + description: Project's GitHub source + properties: + checkoutFrom: + description: Defines from what the project should + be checked out. Required if there are more than + one remote configured + properties: + remote: + description: The remote name should be used + as init. Required if there are more than one + remote configured + type: string + revision: + description: The revision to checkout from. + Should be branch name, tag or commit id. Default + branch is used if missing or specified revision + is not found. + type: string + type: object + remotes: + additionalProperties: + type: string + description: The remotes map which should be initialized + in the git project. Must have at least one remote + configured + type: object + sparseCheckoutDir: + description: Part of project to populate in the + working directory. + type: string + type: object + name: + description: Project name + type: string + sourceType: + description: Type of project source + enum: + - Git + - Github + - Zip + - Custom + type: string + zip: + description: Project's Zip source + properties: + location: + description: Zip project's source location address. + Should be file path of the archive, e.g. file://$FILE_PATH + type: string + sparseCheckoutDir: + description: Part of project to populate in the + working directory. + type: string + type: object + required: + - name + type: object + type: array + registryUrl: + type: string + starterProjects: + description: Overrides of starter projects encapsulated in + a parent devfile Overriding is done using a strategic merge + patch. + items: + oneOf: + - required: + - git + - required: + - github + - required: + - zip + - required: + - custom + properties: + clonePath: + description: Path relative to the root of the projects + to which this project should be cloned into. This + is a unix-style relative path (i.e. uses forward slashes). + The path is invalid if it is absolute or tries to + escape the project root through the usage of '..'. + If not specified, defaults to the project name. + type: string + custom: + description: Project's Custom source + properties: + embeddedResource: + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + projectSourceClass: + type: string + required: + - embeddedResource + - projectSourceClass + type: object + description: + description: Description of a starter project + type: string + git: + description: Project's Git source + properties: + checkoutFrom: + description: Defines from what the project should + be checked out. Required if there are more than + one remote configured + properties: + remote: + description: The remote name should be used + as init. Required if there are more than one + remote configured + type: string + revision: + description: The revision to checkout from. + Should be branch name, tag or commit id. Default + branch is used if missing or specified revision + is not found. + type: string + type: object + remotes: + additionalProperties: + type: string + description: The remotes map which should be initialized + in the git project. Must have at least one remote + configured + type: object + sparseCheckoutDir: + description: Part of project to populate in the + working directory. + type: string + type: object + github: + description: Project's GitHub source + properties: + checkoutFrom: + description: Defines from what the project should + be checked out. Required if there are more than + one remote configured + properties: + remote: + description: The remote name should be used + as init. Required if there are more than one + remote configured + type: string + revision: + description: The revision to checkout from. + Should be branch name, tag or commit id. Default + branch is used if missing or specified revision + is not found. + type: string + type: object + remotes: + additionalProperties: + type: string + description: The remotes map which should be initialized + in the git project. Must have at least one remote + configured + type: object + sparseCheckoutDir: + description: Part of project to populate in the + working directory. + type: string + type: object + name: + description: Project name + type: string + sourceType: + description: Type of project source + enum: + - Git + - Github + - Zip + - Custom + type: string + zip: + description: Project's Zip source + properties: + location: + description: Zip project's source location address. + Should be file path of the archive, e.g. file://$FILE_PATH + type: string + sparseCheckoutDir: + description: Part of project to populate in the + working directory. + type: string + type: object + required: + - name + type: object + type: array + uri: + description: Uri of a Devfile yaml file + type: string + type: object + projects: + description: Projects worked on in the workspace, containing names + and sources locations + items: + oneOf: + - required: + - git + - required: + - github + - required: + - zip + - required: + - custom + properties: + clonePath: + description: Path relative to the root of the projects to + which this project should be cloned into. This is a unix-style + relative path (i.e. uses forward slashes). The path is + invalid if it is absolute or tries to escape the project + root through the usage of '..'. If not specified, defaults + to the project name. + type: string + custom: + description: Project's Custom source + properties: + embeddedResource: + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + projectSourceClass: + type: string + required: + - embeddedResource + - projectSourceClass + type: object + git: + description: Project's Git source + properties: + checkoutFrom: + description: Defines from what the project should be + checked out. Required if there are more than one remote + configured + properties: + remote: + description: The remote name should be used as init. + Required if there are more than one remote configured + type: string + revision: + description: The revision to checkout from. Should + be branch name, tag or commit id. Default branch + is used if missing or specified revision is not + found. + type: string + type: object + remotes: + additionalProperties: + type: string + description: The remotes map which should be initialized + in the git project. Must have at least one remote + configured + type: object + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + github: + description: Project's GitHub source + properties: + checkoutFrom: + description: Defines from what the project should be + checked out. Required if there are more than one remote + configured + properties: + remote: + description: The remote name should be used as init. + Required if there are more than one remote configured + type: string + revision: + description: The revision to checkout from. Should + be branch name, tag or commit id. Default branch + is used if missing or specified revision is not + found. + type: string + type: object + remotes: + additionalProperties: + type: string + description: The remotes map which should be initialized + in the git project. Must have at least one remote + configured + type: object + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + name: + description: Project name + type: string + sourceType: + description: Type of project source + enum: + - Git + - Github + - Zip + - Custom + type: string + zip: + description: Project's Zip source + properties: + location: + description: Zip project's source location address. + Should be file path of the archive, e.g. file://$FILE_PATH + type: string + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + required: + - name + type: object + type: array + starterProjects: + description: StarterProjects is a project that can be used as + a starting point when bootstrapping new projects + items: + oneOf: + - required: + - git + - required: + - github + - required: + - zip + - required: + - custom + properties: + clonePath: + description: Path relative to the root of the projects to + which this project should be cloned into. This is a unix-style + relative path (i.e. uses forward slashes). The path is + invalid if it is absolute or tries to escape the project + root through the usage of '..'. If not specified, defaults + to the project name. + type: string + custom: + description: Project's Custom source + properties: + embeddedResource: + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + projectSourceClass: + type: string + required: + - embeddedResource + - projectSourceClass + type: object + description: + description: Description of a starter project + type: string + git: + description: Project's Git source + properties: + checkoutFrom: + description: Defines from what the project should be + checked out. Required if there are more than one remote + configured + properties: + remote: + description: The remote name should be used as init. + Required if there are more than one remote configured + type: string + revision: + description: The revision to checkout from. Should + be branch name, tag or commit id. Default branch + is used if missing or specified revision is not + found. + type: string + type: object + remotes: + additionalProperties: + type: string + description: The remotes map which should be initialized + in the git project. Must have at least one remote + configured + type: object + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + github: + description: Project's GitHub source + properties: + checkoutFrom: + description: Defines from what the project should be + checked out. Required if there are more than one remote + configured + properties: + remote: + description: The remote name should be used as init. + Required if there are more than one remote configured + type: string + revision: + description: The revision to checkout from. Should + be branch name, tag or commit id. Default branch + is used if missing or specified revision is not + found. + type: string + type: object + remotes: + additionalProperties: + type: string + description: The remotes map which should be initialized + in the git project. Must have at least one remote + configured + type: object + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + name: + description: Project name + type: string + sourceType: + description: Type of project source + enum: + - Git + - Github + - Zip + - Custom + type: string + zip: + description: Project's Zip source + properties: + location: + description: Zip project's source location address. + Should be file path of the archive, e.g. file://$FILE_PATH + type: string + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + required: + - name + type: object + type: array + type: object + required: + - started + type: object + status: + description: DevWorkspaceStatus defines the observed state of DevWorkspace + properties: + conditions: + description: Conditions represent the latest available observations + of an object's state + items: + description: WorkspaceCondition contains details for the current + condition of this workspace. + properties: + lastTransitionTime: + description: Last time the condition transitioned from one status + to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about + last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's + last transition. + type: string + status: + description: Phase is the status of the condition. Can be True, + False, Unknown. + type: string + type: + description: Type is the type of the condition. + type: string + required: + - status + - type + type: object + type: array + ideUrl: + description: URL at which the Worksace Editor can be joined + type: string + message: + description: Message is a short user-readable message giving additional + information about an object's state + type: string + phase: + type: string + workspaceId: + description: Id of the workspace + type: string + required: + - workspaceId + type: object + type: object + served: false + storage: false + - additionalPrinterColumns: + - JSONPath: .status.devworkspaceId + description: The devworkspace's unique id + name: DevWorkspace ID + type: string + - JSONPath: .status.phase + description: The current devworkspace startup phase + name: Phase + type: string + - JSONPath: .status.message + description: Additional information about the devworkspace + name: Info + type: string + name: v1alpha2 + schema: + openAPIV3Schema: + description: DevWorkspace is the Schema for the devworkspaces API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: DevWorkspaceSpec defines the desired state of DevWorkspace + properties: + routingClass: + type: string + started: + type: boolean + template: + description: Structure of the devworkspace. This is also the specification + of a devworkspace template. + properties: + attributes: + description: Map of implementation-dependant free-form YAML attributes. + type: object + x-kubernetes-preserve-unknown-fields: true + commands: + description: Predefined, ready-to-use, devworkspace-related commands + items: + oneOf: + - required: + - exec + - required: + - apply + - required: + - composite + - required: + - custom + properties: + apply: + description: "Command that consists in applying a given + component definition, typically bound to a devworkspace + event. \n For example, when an `apply` command is bound + to a `preStart` event, and references a `container` component, + it will start the container as a K8S initContainer in + the devworkspace POD, unless the component has its `dedicatedPod` + field set to `true`. \n When no `apply` command exist + for a given component, it is assumed the component will + be applied at devworkspace start by default, unless `deployByDefault` + for that component is set to false." + properties: + component: + description: Describes component that will be applied + type: string + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command for + a given group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug + - deploy + type: string + required: + - kind + type: object + label: + description: Optional label that provides a label for + this command to be used in Editor UI menus for example + type: string + required: + - component + type: object + attributes: + description: Map of implementation-dependant free-form YAML + attributes. + type: object + x-kubernetes-preserve-unknown-fields: true + commandType: + description: Type of devworkspace command + enum: + - Exec + - Apply + - Composite + - Custom + type: string + composite: + description: Composite command that allows executing several + sub-commands either sequentially or concurrently + properties: + commands: + description: The commands that comprise this composite + command + items: + type: string + type: array + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command for + a given group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug + - deploy + type: string + required: + - kind + type: object + label: + description: Optional label that provides a label for + this command to be used in Editor UI menus for example + type: string + parallel: + description: Indicates if the sub-commands should be + executed concurrently + type: boolean + type: object + custom: + description: Custom command whose logic is implementation-dependant + and should be provided by the user possibly through some + dedicated plugin + properties: + commandClass: + description: Class of command that the associated implementation + component should use to process this command with + the appropriate logic + type: string + embeddedResource: + description: Additional free-form configuration for + this custom command that the implementation component + will know how to use + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command for + a given group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug + - deploy + type: string + required: + - kind + type: object + label: + description: Optional label that provides a label for + this command to be used in Editor UI menus for example + type: string + required: + - commandClass + - embeddedResource + type: object + exec: + description: CLI Command executed in an existing component + container + properties: + commandLine: + description: "The actual command-line string \n Special + variables that can be used: \n - `$PROJECTS_ROOT`: + A path where projects sources are mounted as defined + by container component's sourceMapping. \n - `$PROJECT_SOURCE`: + A path to a project source ($PROJECTS_ROOT/). + If there are multiple projects, this will point to + the directory of the first one." + type: string + component: + description: Describes component to which given action + relates + type: string + env: + description: Optional list of environment variables + that have to be set before running the command + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command for + a given group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug + - deploy + type: string + required: + - kind + type: object + hotReloadCapable: + description: "Whether the command is capable to reload + itself when source code changes. If set to `true` + the command won't be restarted and it is expected + to handle file changes on its own. \n Default value + is `false`" + type: boolean + label: + description: Optional label that provides a label for + this command to be used in Editor UI menus for example + type: string + workingDir: + description: "Working directory where the command should + be executed \n Special variables that can be used: + \n - `$PROJECTS_ROOT`: A path where projects sources + are mounted as defined by container component's sourceMapping. + \n - `$PROJECT_SOURCE`: A path to a project source + ($PROJECTS_ROOT/). If there are multiple + projects, this will point to the directory of the + first one." + type: string + required: + - commandLine + - component + type: object + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, or + in events. + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + required: + - id + type: object + type: array + components: + description: List of the devworkspace components, such as editor + and plugins, user-provided containers, or other types of components + items: + oneOf: + - required: + - container + - required: + - kubernetes + - required: + - openshift + - required: + - volume + - required: + - image + - required: + - plugin + - required: + - custom + properties: + attributes: + description: Map of implementation-dependant free-form YAML + attributes. + type: object + x-kubernetes-preserve-unknown-fields: true + componentType: + description: Type of component + enum: + - Container + - Kubernetes + - Openshift + - Volume + - Image + - Plugin + - Custom + type: string + container: + description: Allows adding and configuring devworkspace-related + containers + properties: + annotation: + description: Annotations that should be added to specific + resources for this container + properties: + deployment: + additionalProperties: + type: string + description: Annotations to be added to deployment + type: object + service: + additionalProperties: + type: string + description: Annotations to be added to service + type: object + type: object + args: + description: "The arguments to supply to the command + running the dockerimage component. The arguments are + supplied either to the default command provided in + the image or to the overridden command. \n Defaults + to an empty array, meaning use whatever is defined + in the image." + items: + type: string + type: array + command: + description: "The command to run in the dockerimage + component instead of the default one provided in the + image. \n Defaults to an empty array, meaning use + whatever is defined in the image." + items: + type: string + type: array + cpuLimit: + type: string + cpuRequest: + type: string + dedicatedPod: + description: "Specify if a container should run in its + own separated pod, instead of running as part of the + main development environment pod. \n Default value + is `false`" + type: boolean + endpoints: + items: + properties: + annotation: + additionalProperties: + type: string + description: Annotations to be added to Kubernetes + Ingress or Openshift Route + type: object + attributes: + description: "Map of implementation-dependant + string-based free-form attributes. \n Examples + of Che-specific attributes: \n - cookiesAuthEnabled: + \"true\" / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + x-kubernetes-preserve-unknown-fields: true + exposure: + description: "Describes how the endpoint should + be exposed on the network. \n - `public` means + that the endpoint will be exposed on the public + network, typically through a K8S ingress or + an OpenShift route. \n - `internal` means that + the endpoint will be exposed internally outside + of the main devworkspace POD, typically by K8S + services, to be consumed by other elements running + on the same cloud internal network. \n - `none` + means that the endpoint will not be exposed + and will only be accessible inside the main + devworkspace POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application and transport + protocols of the traffic that will go through + this endpoint. \n - `http`: Endpoint will have + `http` traffic, typically on a TCP connection. + It will be automaticaly promoted to `https` + when the `secure` field is set to `true`. \n + - `https`: Endpoint will have `https` traffic, + typically on a TCP connection. \n - `ws`: Endpoint + will have `ws` traffic, typically on a TCP connection. + It will be automaticaly promoted to `wss` when + the `secure` field is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, typically + on a TCP connection. \n - `tcp`: Endpoint will + have traffic on a TCP connection, without specifying + an application protocol. \n - `udp`: Endpoint + will have traffic on an UDP connection, without + specifying an application protocol. \n Default + value is `http`" + enum: + - http + - https + - ws + - wss + - tcp + - udp + type: string + secure: + description: Describes whether the endpoint should + be secured and protected by some authentication + process. This requires a protocol of `https` + or `wss`. + type: boolean + targetPort: + description: The port number should be unique. + type: integer + required: + - name + - targetPort + type: object + type: array + env: + description: "Environment variables used in this container. + \n The following variables are reserved and cannot + be overridden via env: \n - `$PROJECTS_ROOT` \n - + `$PROJECT_SOURCE`" + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + image: + type: string + memoryLimit: + type: string + memoryRequest: + type: string + mountSources: + description: "Toggles whether or not the project source + code should be mounted in the component. \n Defaults + to true for all component types except plugins and + components that set `dedicatedPod` to true." + type: boolean + sourceMapping: + description: Optional specification of the path in the + container where project sources should be transferred/mounted + when `mountSources` is `true`. When omitted, the default + value of /projects is used. + type: string + volumeMounts: + description: List of volumes mounts that should be mounted + is this container. + items: + description: Volume that should be mounted to a component + container + properties: + name: + description: The volume mount name is the name + of an existing `Volume` component. If several + containers mount the same volume name then they + will reuse the same volume and will be able + to access to the same files. + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + path: + description: The path in the component container + where the volume should be mounted. If not path + is mentioned, default path is the is `/`. + type: string + required: + - name + type: object + type: array + required: + - image + type: object + custom: + description: Custom component whose logic is implementation-dependant + and should be provided by the user possibly through some + dedicated controller + properties: + componentClass: + description: Class of component that the associated + implementation controller should use to process this + command with the appropriate logic + type: string + embeddedResource: + description: Additional free-form configuration for + this custom component that the implementation controller + will know how to use + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + required: + - componentClass + - embeddedResource + type: object + image: + description: Allows specifying the definition of an image + for outer loop builds + oneOf: + - required: + - dockerfile + properties: + autoBuild: + description: "Defines if the image should be built during + startup. \n Default value is `false`" + type: boolean + dockerfile: + description: Allows specifying dockerfile type build + oneOf: + - required: + - uri + - required: + - devfileRegistry + - required: + - git + properties: + args: + description: The arguments to supply to the dockerfile + build. + items: + type: string + type: array + buildContext: + description: Path of source directory to establish + build context. Defaults to ${PROJECT_ROOT} in + the container + type: string + devfileRegistry: + description: Dockerfile's Devfile Registry source + properties: + id: + description: Id in a devfile registry that contains + a Dockerfile. The src in the OCI registry + required for the Dockerfile build will be + downloaded for building the image. + type: string + registryUrl: + description: Devfile Registry URL to pull the + Dockerfile from when using the Devfile Registry + as Dockerfile src. To ensure the Dockerfile + gets resolved consistently in different environments, + it is recommended to always specify the `devfileRegistryUrl` + when `Id` is used. + type: string + required: + - id + type: object + git: + description: Dockerfile's Git source + properties: + checkoutFrom: + description: Defines from what the project should + be checked out. Required if there are more + than one remote configured + properties: + remote: + description: The remote name should be used + as init. Required if there are more than + one remote configured + type: string + revision: + description: The revision to checkout from. + Should be branch name, tag or commit id. + Default branch is used if missing or specified + revision is not found. + type: string + type: object + fileLocation: + description: Location of the Dockerfile in the + Git repository when using git as Dockerfile + src. Defaults to Dockerfile. + type: string + remotes: + additionalProperties: + type: string + description: The remotes map which should be + initialized in the git project. Projects must + have at least one remote configured while + StarterProjects & Image Component's Git source + can only have at most one remote configured. + type: object + required: + - remotes + type: object + rootRequired: + description: "Specify if a privileged builder pod + is required. \n Default value is `false`" + type: boolean + srcType: + description: Type of Dockerfile src + enum: + - Uri + - DevfileRegistry + - Git + type: string + uri: + description: URI Reference of a Dockerfile. It can + be a full URL or a relative URI from the current + devfile as the base URI. + type: string + type: object + imageName: + description: Name of the image for the resulting outerloop + build + type: string + imageType: + description: Type of image + enum: + - Dockerfile + type: string + required: + - imageName + type: object + kubernetes: + description: Allows importing into the devworkspace the + Kubernetes resources defined in a given manifest. For + example this allows reusing the Kubernetes definitions + used to deploy some runtime components in production. + oneOf: + - required: + - uri + - required: + - inlined + properties: + deployByDefault: + description: "Defines if the component should be deployed + during startup. \n Default value is `false`" + type: boolean + endpoints: + items: + properties: + annotation: + additionalProperties: + type: string + description: Annotations to be added to Kubernetes + Ingress or Openshift Route + type: object + attributes: + description: "Map of implementation-dependant + string-based free-form attributes. \n Examples + of Che-specific attributes: \n - cookiesAuthEnabled: + \"true\" / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + x-kubernetes-preserve-unknown-fields: true + exposure: + description: "Describes how the endpoint should + be exposed on the network. \n - `public` means + that the endpoint will be exposed on the public + network, typically through a K8S ingress or + an OpenShift route. \n - `internal` means that + the endpoint will be exposed internally outside + of the main devworkspace POD, typically by K8S + services, to be consumed by other elements running + on the same cloud internal network. \n - `none` + means that the endpoint will not be exposed + and will only be accessible inside the main + devworkspace POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application and transport + protocols of the traffic that will go through + this endpoint. \n - `http`: Endpoint will have + `http` traffic, typically on a TCP connection. + It will be automaticaly promoted to `https` + when the `secure` field is set to `true`. \n + - `https`: Endpoint will have `https` traffic, + typically on a TCP connection. \n - `ws`: Endpoint + will have `ws` traffic, typically on a TCP connection. + It will be automaticaly promoted to `wss` when + the `secure` field is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, typically + on a TCP connection. \n - `tcp`: Endpoint will + have traffic on a TCP connection, without specifying + an application protocol. \n - `udp`: Endpoint + will have traffic on an UDP connection, without + specifying an application protocol. \n Default + value is `http`" + enum: + - http + - https + - ws + - wss + - tcp + - udp + type: string + secure: + description: Describes whether the endpoint should + be secured and protected by some authentication + process. This requires a protocol of `https` + or `wss`. + type: boolean + targetPort: + description: The port number should be unique. + type: integer + required: + - name + - targetPort + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + uri: + description: Location in a file fetched from a uri. + type: string + type: object + name: + description: 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. + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + openshift: + description: Allows importing into the devworkspace the + OpenShift resources defined in a given manifest. For example + this allows reusing the OpenShift definitions used to + deploy some runtime components in production. + oneOf: + - required: + - uri + - required: + - inlined + properties: + deployByDefault: + description: "Defines if the component should be deployed + during startup. \n Default value is `false`" + type: boolean + endpoints: + items: + properties: + annotation: + additionalProperties: + type: string + description: Annotations to be added to Kubernetes + Ingress or Openshift Route + type: object + attributes: + description: "Map of implementation-dependant + string-based free-form attributes. \n Examples + of Che-specific attributes: \n - cookiesAuthEnabled: + \"true\" / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + x-kubernetes-preserve-unknown-fields: true + exposure: + description: "Describes how the endpoint should + be exposed on the network. \n - `public` means + that the endpoint will be exposed on the public + network, typically through a K8S ingress or + an OpenShift route. \n - `internal` means that + the endpoint will be exposed internally outside + of the main devworkspace POD, typically by K8S + services, to be consumed by other elements running + on the same cloud internal network. \n - `none` + means that the endpoint will not be exposed + and will only be accessible inside the main + devworkspace POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application and transport + protocols of the traffic that will go through + this endpoint. \n - `http`: Endpoint will have + `http` traffic, typically on a TCP connection. + It will be automaticaly promoted to `https` + when the `secure` field is set to `true`. \n + - `https`: Endpoint will have `https` traffic, + typically on a TCP connection. \n - `ws`: Endpoint + will have `ws` traffic, typically on a TCP connection. + It will be automaticaly promoted to `wss` when + the `secure` field is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, typically + on a TCP connection. \n - `tcp`: Endpoint will + have traffic on a TCP connection, without specifying + an application protocol. \n - `udp`: Endpoint + will have traffic on an UDP connection, without + specifying an application protocol. \n Default + value is `http`" + enum: + - http + - https + - ws + - wss + - tcp + - udp + type: string + secure: + description: Describes whether the endpoint should + be secured and protected by some authentication + process. This requires a protocol of `https` + or `wss`. + type: boolean + targetPort: + description: The port number should be unique. + type: integer + required: + - name + - targetPort + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + uri: + description: Location in a file fetched from a uri. + type: string + type: object + plugin: + description: "Allows importing a plugin. \n Plugins are + mainly imported devfiles that contribute components, commands + and events as a consistent single unit. They are defined + in either YAML files following the devfile syntax, or + as `DevWorkspaceTemplate` Kubernetes Custom Resources" + oneOf: + - required: + - uri + - required: + - id + - required: + - kubernetes + properties: + commands: + description: Overrides of commands encapsulated in a + parent devfile or a plugin. Overriding is done according + to K8S strategic merge patch standard rules. + items: + oneOf: + - required: + - exec + - required: + - apply + - required: + - composite + properties: + apply: + description: "Command that consists in applying + a given component definition, typically bound + to a devworkspace event. \n For example, when + an `apply` command is bound to a `preStart` + event, and references a `container` component, + it will start the container as a K8S initContainer + in the devworkspace POD, unless the component + has its `dedicatedPod` field set to `true`. + \n When no `apply` command exist for a given + component, it is assumed the component will + be applied at devworkspace start by default, + unless `deployByDefault` for that component + is set to false." + properties: + component: + description: Describes component that will + be applied + type: string + group: + description: Defines the group this command + is part of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug + - deploy + type: string + type: object + label: + description: Optional label that provides + a label for this command to be used in Editor + UI menus for example + type: string + type: object + attributes: + description: Map of implementation-dependant free-form + YAML attributes. + type: object + x-kubernetes-preserve-unknown-fields: true + commandType: + description: Type of devworkspace command + enum: + - Exec + - Apply + - Composite + type: string + composite: + description: Composite command that allows executing + several sub-commands either sequentially or + concurrently + properties: + commands: + description: The commands that comprise this + composite command + items: + type: string + type: array + group: + description: Defines the group this command + is part of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug + - deploy + type: string + type: object + label: + description: Optional label that provides + a label for this command to be used in Editor + UI menus for example + type: string + parallel: + description: Indicates if the sub-commands + should be executed concurrently + type: boolean + type: object + exec: + description: CLI Command executed in an existing + component container + properties: + commandLine: + description: "The actual command-line string + \n Special variables that can be used: \n + \ - `$PROJECTS_ROOT`: A path where projects + sources are mounted as defined by container + component's sourceMapping. \n - `$PROJECT_SOURCE`: + A path to a project source ($PROJECTS_ROOT/). + If there are multiple projects, this will + point to the directory of the first one." + type: string + component: + description: Describes component to which + given action relates + type: string + env: + description: Optional list of environment + variables that have to be set before running + the command + items: + properties: + name: + type: string + value: + type: string + required: + - name + type: object + type: array + group: + description: Defines the group this command + is part of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug + - deploy + type: string + type: object + hotReloadCapable: + description: "Whether the command is capable + to reload itself when source code changes. + If set to `true` the command won't be restarted + and it is expected to handle file changes + on its own. \n Default value is `false`" + type: boolean + label: + description: Optional label that provides + a label for this command to be used in Editor + UI menus for example + type: string + workingDir: + description: "Working directory where the + command should be executed \n Special variables + that can be used: \n - `$PROJECTS_ROOT`: + A path where projects sources are mounted + as defined by container component's sourceMapping. + \n - `$PROJECT_SOURCE`: A path to a project + source ($PROJECTS_ROOT/). + If there are multiple projects, this will + point to the directory of the first one." + type: string + type: object + id: + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + required: + - id + type: object + type: array + components: + description: Overrides of components encapsulated in + a parent devfile or a plugin. Overriding is done according + to K8S strategic merge patch standard rules. + items: + oneOf: + - required: + - container + - required: + - kubernetes + - required: + - openshift + - required: + - volume + - required: + - image + properties: + attributes: + description: Map of implementation-dependant free-form + YAML attributes. + type: object + x-kubernetes-preserve-unknown-fields: true + componentType: + description: Type of component + enum: + - Container + - Kubernetes + - Openshift + - Volume + - Image + type: string + container: + description: Allows adding and configuring devworkspace-related + containers + properties: + annotation: + description: Annotations that should be added + to specific resources for this container + properties: + deployment: + additionalProperties: + type: string + description: Annotations to be added to + deployment + type: object + service: + additionalProperties: + type: string + description: Annotations to be added to + service + type: object + type: object + args: + description: "The arguments to supply to the + command running the dockerimage component. + The arguments are supplied either to the + default command provided in the image or + to the overridden command. \n Defaults to + an empty array, meaning use whatever is + defined in the image." + items: + type: string + type: array + command: + description: "The command to run in the dockerimage + component instead of the default one provided + in the image. \n Defaults to an empty array, + meaning use whatever is defined in the image." + items: + type: string + type: array + cpuLimit: + type: string + cpuRequest: + type: string + dedicatedPod: + description: "Specify if a container should + run in its own separated pod, instead of + running as part of the main development + environment pod. \n Default value is `false`" + type: boolean + endpoints: + items: + properties: + annotation: + additionalProperties: + type: string + description: Annotations to be added + to Kubernetes Ingress or Openshift + Route + type: object + attributes: + description: "Map of implementation-dependant + string-based free-form attributes. + \n Examples of Che-specific attributes: + \n - cookiesAuthEnabled: \"true\" + / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + x-kubernetes-preserve-unknown-fields: true + exposure: + description: "Describes how the endpoint + should be exposed on the network. + \n - `public` means that the endpoint + will be exposed on the public network, + typically through a K8S ingress or + an OpenShift route. \n - `internal` + means that the endpoint will be exposed + internally outside of the main devworkspace + POD, typically by K8S services, to + be consumed by other elements running + on the same cloud internal network. + \n - `none` means that the endpoint + will not be exposed and will only + be accessible inside the main devworkspace + POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application + and transport protocols of the traffic + that will go through this endpoint. + \n - `http`: Endpoint will have `http` + traffic, typically on a TCP connection. + It will be automaticaly promoted to + `https` when the `secure` field is + set to `true`. \n - `https`: Endpoint + will have `https` traffic, typically + on a TCP connection. \n - `ws`: Endpoint + will have `ws` traffic, typically + on a TCP connection. It will be automaticaly + promoted to `wss` when the `secure` + field is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, + typically on a TCP connection. \n + - `tcp`: Endpoint will have traffic + on a TCP connection, without specifying + an application protocol. \n - `udp`: + Endpoint will have traffic on an UDP + connection, without specifying an + application protocol. \n Default value + is `http`" + enum: + - http + - https + - ws + - wss + - tcp + - udp + type: string + secure: + description: Describes whether the endpoint + should be secured and protected by + some authentication process. This + requires a protocol of `https` or + `wss`. + type: boolean + targetPort: + description: The port number should + be unique. + type: integer + required: + - name + type: object + type: array + env: + description: "Environment variables used in + this container. \n The following variables + are reserved and cannot be overridden via + env: \n - `$PROJECTS_ROOT` \n - `$PROJECT_SOURCE`" + items: + properties: + name: + type: string + value: + type: string + required: + - name + type: object + type: array + image: + type: string + memoryLimit: + type: string + memoryRequest: + type: string + mountSources: + description: "Toggles whether or not the project + source code should be mounted in the component. + \n Defaults to true for all component types + except plugins and components that set `dedicatedPod` + to true." + type: boolean + sourceMapping: + description: Optional specification of the + path in the container where project sources + should be transferred/mounted when `mountSources` + is `true`. When omitted, the default value + of /projects is used. + type: string + volumeMounts: + description: List of volumes mounts that should + be mounted is this container. + items: + description: Volume that should be mounted + to a component container + properties: + name: + description: The volume mount name is + the name of an existing `Volume` component. + If several containers mount the same + volume name then they will reuse the + same volume and will be able to access + to the same files. + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + path: + description: The path in the component + container where the volume should + be mounted. If not path is mentioned, + default path is the is `/`. + type: string + required: + - name + type: object + type: array + type: object + image: + description: Allows specifying the definition + of an image for outer loop builds + oneOf: + - required: + - dockerfile + - required: + - autoBuild + properties: + autoBuild: + description: "Defines if the image should + be built during startup. \n Default value + is `false`" + type: boolean + dockerfile: + description: Allows specifying dockerfile + type build + oneOf: + - required: + - uri + - required: + - devfileRegistry + - required: + - git + properties: + args: + description: The arguments to supply to + the dockerfile build. + items: + type: string + type: array + buildContext: + description: Path of source directory + to establish build context. Defaults + to ${PROJECT_ROOT} in the container + type: string + devfileRegistry: + description: Dockerfile's Devfile Registry + source + properties: + id: + description: Id in a devfile registry + that contains a Dockerfile. The + src in the OCI registry required + for the Dockerfile build will be + downloaded for building the image. + type: string + registryUrl: + description: Devfile Registry URL + to pull the Dockerfile from when + using the Devfile Registry as Dockerfile + src. To ensure the Dockerfile gets + resolved consistently in different + environments, it is recommended + to always specify the `devfileRegistryUrl` + when `Id` is used. + type: string + type: object + git: + description: Dockerfile's Git source + properties: + checkoutFrom: + description: Defines from what the + project should be checked out. Required + if there are more than one remote + configured + properties: + remote: + description: The remote name should + be used as init. Required if + there are more than one remote + configured + type: string + revision: + description: The revision to checkout + from. Should be branch name, + tag or commit id. Default branch + is used if missing or specified + revision is not found. + type: string + type: object + fileLocation: + description: Location of the Dockerfile + in the Git repository when using + git as Dockerfile src. Defaults + to Dockerfile. + type: string + remotes: + additionalProperties: + type: string + description: The remotes map which + should be initialized in the git + project. Projects must have at least + one remote configured while StarterProjects + & Image Component's Git source can + only have at most one remote configured. + type: object + type: object + rootRequired: + description: "Specify if a privileged + builder pod is required. \n Default + value is `false`" + type: boolean + srcType: + description: Type of Dockerfile src + enum: + - Uri + - DevfileRegistry + - Git + type: string + uri: + description: URI Reference of a Dockerfile. + It can be a full URL or a relative URI + from the current devfile as the base + URI. + type: string + type: object + imageName: + description: Name of the image for the resulting + outerloop build + type: string + imageType: + description: Type of image + enum: + - Dockerfile + - AutoBuild + type: string + type: object + kubernetes: + description: Allows importing into the devworkspace + the Kubernetes resources defined in a given + manifest. For example this allows reusing the + Kubernetes definitions used to deploy some runtime + components in production. + oneOf: + - required: + - uri + - required: + - inlined + properties: + deployByDefault: + description: "Defines if the component should + be deployed during startup. \n Default value + is `false`" + type: boolean + endpoints: + items: + properties: + annotation: + additionalProperties: + type: string + description: Annotations to be added + to Kubernetes Ingress or Openshift + Route + type: object + attributes: + description: "Map of implementation-dependant + string-based free-form attributes. + \n Examples of Che-specific attributes: + \n - cookiesAuthEnabled: \"true\" + / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + x-kubernetes-preserve-unknown-fields: true + exposure: + description: "Describes how the endpoint + should be exposed on the network. + \n - `public` means that the endpoint + will be exposed on the public network, + typically through a K8S ingress or + an OpenShift route. \n - `internal` + means that the endpoint will be exposed + internally outside of the main devworkspace + POD, typically by K8S services, to + be consumed by other elements running + on the same cloud internal network. + \n - `none` means that the endpoint + will not be exposed and will only + be accessible inside the main devworkspace + POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application + and transport protocols of the traffic + that will go through this endpoint. + \n - `http`: Endpoint will have `http` + traffic, typically on a TCP connection. + It will be automaticaly promoted to + `https` when the `secure` field is + set to `true`. \n - `https`: Endpoint + will have `https` traffic, typically + on a TCP connection. \n - `ws`: Endpoint + will have `ws` traffic, typically + on a TCP connection. It will be automaticaly + promoted to `wss` when the `secure` + field is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, + typically on a TCP connection. \n + - `tcp`: Endpoint will have traffic + on a TCP connection, without specifying + an application protocol. \n - `udp`: + Endpoint will have traffic on an UDP + connection, without specifying an + application protocol. \n Default value + is `http`" + enum: + - http + - https + - ws + - wss + - tcp + - udp + type: string + secure: + description: Describes whether the endpoint + should be secured and protected by + some authentication process. This + requires a protocol of `https` or + `wss`. + type: boolean + targetPort: + description: The port number should + be unique. + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + uri: + description: Location in a file fetched from + a uri. + type: string + type: object + name: + description: 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. + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + openshift: + description: Allows importing into the devworkspace + the OpenShift resources defined in a given manifest. + For example this allows reusing the OpenShift + definitions used to deploy some runtime components + in production. + oneOf: + - required: + - uri + - required: + - inlined + properties: + deployByDefault: + description: "Defines if the component should + be deployed during startup. \n Default value + is `false`" + type: boolean + endpoints: + items: + properties: + annotation: + additionalProperties: type: string description: Annotations to be added - to service + to Kubernetes Ingress or Openshift + Route + type: object + attributes: + description: "Map of implementation-dependant + string-based free-form attributes. + \n Examples of Che-specific attributes: + \n - cookiesAuthEnabled: \"true\" + / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," type: object + x-kubernetes-preserve-unknown-fields: true + exposure: + description: "Describes how the endpoint + should be exposed on the network. + \n - `public` means that the endpoint + will be exposed on the public network, + typically through a K8S ingress or + an OpenShift route. \n - `internal` + means that the endpoint will be exposed + internally outside of the main devworkspace + POD, typically by K8S services, to + be consumed by other elements running + on the same cloud internal network. + \n - `none` means that the endpoint + will not be exposed and will only + be accessible inside the main devworkspace + POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application + and transport protocols of the traffic + that will go through this endpoint. + \n - `http`: Endpoint will have `http` + traffic, typically on a TCP connection. + It will be automaticaly promoted to + `https` when the `secure` field is + set to `true`. \n - `https`: Endpoint + will have `https` traffic, typically + on a TCP connection. \n - `ws`: Endpoint + will have `ws` traffic, typically + on a TCP connection. It will be automaticaly + promoted to `wss` when the `secure` + field is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, + typically on a TCP connection. \n + - `tcp`: Endpoint will have traffic + on a TCP connection, without specifying + an application protocol. \n - `udp`: + Endpoint will have traffic on an UDP + connection, without specifying an + application protocol. \n Default value + is `http`" + enum: + - http + - https + - ws + - wss + - tcp + - udp + type: string + secure: + description: Describes whether the endpoint + should be secured and protected by + some authentication process. This + requires a protocol of `https` or + `wss`. + type: boolean + targetPort: + description: The port number should + be unique. + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + uri: + description: Location in a file fetched from + a uri. + type: string + type: object + volume: + description: Allows specifying the definition + of a volume shared by several other components + properties: + ephemeral: + description: Ephemeral volumes are not stored + persistently across restarts. Defaults to + false + type: boolean + size: + description: Size of the volume + type: string + type: object + required: + - name + type: object + type: array + id: + description: Id in a registry that contains a Devfile + yaml file + type: string + importReferenceType: + description: type of location from where the referenced + template structure should be retrieved + enum: + - Uri + - Id + - Kubernetes + type: string + kubernetes: + description: Reference to a Kubernetes CRD of type DevWorkspaceTemplate + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object + registryUrl: + description: Registry URL to pull the parent devfile + from when using id in the parent reference. To ensure + the parent devfile gets resolved consistently in different + environments, it is recommended to always specify + the `registryUrl` when `id` is used. + type: string + uri: + description: URI Reference of a parent devfile YAML + file. It can be a full URL or a relative URI with + the current devfile as the base URI. + type: string + type: object + volume: + description: Allows specifying the definition of a volume + shared by several other components + properties: + ephemeral: + description: Ephemeral volumes are not stored persistently + across restarts. Defaults to false + type: boolean + size: + description: Size of the volume + type: string + type: object + required: + - name + type: object + type: array + events: + description: Bindings of commands to events. Each command is referred-to + by its name. + properties: + postStart: + description: IDs of commands that should be executed after + the devworkspace is completely started. In the case of Che-Theia, + these commands should be executed after all plugins and + extensions have started, including project cloning. This + means that those commands are not triggered until the user + opens the IDE in his browser. + items: + type: string + type: array + postStop: + description: IDs of commands that should be executed after + stopping the devworkspace. + items: + type: string + type: array + preStart: + description: IDs of commands that should be executed before + the devworkspace start. Kubernetes-wise, these commands + would typically be executed in init containers of the devworkspace + POD. + items: + type: string + type: array + preStop: + description: IDs of commands that should be executed before + stopping the devworkspace. + items: + type: string + type: array + type: object + parent: + description: Parent devworkspace template + oneOf: + - required: + - uri + - required: + - id + - required: + - kubernetes + properties: + attributes: + description: Overrides of attributes encapsulated in a parent + devfile. Overriding is done according to K8S strategic merge + patch standard rules. + type: object + x-kubernetes-preserve-unknown-fields: true + commands: + description: Overrides of commands encapsulated in a parent + devfile or a plugin. Overriding is done according to K8S + strategic merge patch standard rules. + items: + oneOf: + - required: + - exec + - required: + - apply + - required: + - composite + properties: + apply: + description: "Command that consists in applying a given + component definition, typically bound to a devworkspace + event. \n For example, when an `apply` command is + bound to a `preStart` event, and references a `container` + component, it will start the container as a K8S initContainer + in the devworkspace POD, unless the component has + its `dedicatedPod` field set to `true`. \n When no + `apply` command exist for a given component, it is + assumed the component will be applied at devworkspace + start by default, unless `deployByDefault` for that + component is set to false." + properties: + component: + description: Describes component that will be applied + type: string + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command is part + of + enum: + - build + - run + - test + - debug + - deploy + type: string + type: object + label: + description: Optional label that provides a label + for this command to be used in Editor UI menus + for example + type: string + type: object + attributes: + description: Map of implementation-dependant free-form + YAML attributes. + type: object + x-kubernetes-preserve-unknown-fields: true + commandType: + description: Type of devworkspace command + enum: + - Exec + - Apply + - Composite + type: string + composite: + description: Composite command that allows executing + several sub-commands either sequentially or concurrently + properties: + commands: + description: The commands that comprise this composite + command + items: + type: string + type: array + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command is part + of + enum: + - build + - run + - test + - debug + - deploy + type: string + type: object + label: + description: Optional label that provides a label + for this command to be used in Editor UI menus + for example + type: string + parallel: + description: Indicates if the sub-commands should + be executed concurrently + type: boolean + type: object + exec: + description: CLI Command executed in an existing component + container + properties: + commandLine: + description: "The actual command-line string \n + Special variables that can be used: \n - `$PROJECTS_ROOT`: + A path where projects sources are mounted as defined + by container component's sourceMapping. \n - + `$PROJECT_SOURCE`: A path to a project source + ($PROJECTS_ROOT/). If there are + multiple projects, this will point to the directory + of the first one." + type: string + component: + description: Describes component to which given + action relates + type: string + env: + description: Optional list of environment variables + that have to be set before running the command + items: + properties: + name: + type: string + value: + type: string + required: + - name + type: object + type: array + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command is part + of + enum: + - build + - run + - test + - debug + - deploy + type: string + type: object + hotReloadCapable: + description: "Whether the command is capable to + reload itself when source code changes. If set + to `true` the command won't be restarted and it + is expected to handle file changes on its own. + \n Default value is `false`" + type: boolean + label: + description: Optional label that provides a label + for this command to be used in Editor UI menus + for example + type: string + workingDir: + description: "Working directory where the command + should be executed \n Special variables that can + be used: \n - `$PROJECTS_ROOT`: A path where + projects sources are mounted as defined by container + component's sourceMapping. \n - `$PROJECT_SOURCE`: + A path to a project source ($PROJECTS_ROOT/). + If there are multiple projects, this will point + to the directory of the first one." + type: string + type: object + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + required: + - id + type: object + type: array + components: + description: Overrides of components encapsulated in a parent + devfile or a plugin. Overriding is done according to K8S + strategic merge patch standard rules. + items: + oneOf: + - required: + - container + - required: + - kubernetes + - required: + - openshift + - required: + - volume + - required: + - image + - required: + - plugin + properties: + attributes: + description: Map of implementation-dependant free-form + YAML attributes. + type: object + x-kubernetes-preserve-unknown-fields: true + componentType: + description: Type of component + enum: + - Container + - Kubernetes + - Openshift + - Volume + - Image + - Plugin + type: string + container: + description: Allows adding and configuring devworkspace-related + containers + properties: + annotation: + description: Annotations that should be added to + specific resources for this container + properties: + deployment: + additionalProperties: + type: string + description: Annotations to be added to deployment + type: object + service: + additionalProperties: + type: string + description: Annotations to be added to service + type: object + type: object + args: + description: "The arguments to supply to the command + running the dockerimage component. The arguments + are supplied either to the default command provided + in the image or to the overridden command. \n + Defaults to an empty array, meaning use whatever + is defined in the image." + items: + type: string + type: array + command: + description: "The command to run in the dockerimage + component instead of the default one provided + in the image. \n Defaults to an empty array, meaning + use whatever is defined in the image." + items: + type: string + type: array + cpuLimit: + type: string + cpuRequest: + type: string + dedicatedPod: + description: "Specify if a container should run + in its own separated pod, instead of running as + part of the main development environment pod. + \n Default value is `false`" + type: boolean + endpoints: + items: + properties: + annotation: + additionalProperties: + type: string + description: Annotations to be added to Kubernetes + Ingress or Openshift Route + type: object + attributes: + description: "Map of implementation-dependant + string-based free-form attributes. \n Examples + of Che-specific attributes: \n - cookiesAuthEnabled: + \"true\" / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + x-kubernetes-preserve-unknown-fields: true + exposure: + description: "Describes how the endpoint should + be exposed on the network. \n - `public` + means that the endpoint will be exposed + on the public network, typically through + a K8S ingress or an OpenShift route. \n + - `internal` means that the endpoint will + be exposed internally outside of the main + devworkspace POD, typically by K8S services, + to be consumed by other elements running + on the same cloud internal network. \n - + `none` means that the endpoint will not + be exposed and will only be accessible inside + the main devworkspace POD, on a local address. + \n Default value is `public`" + enum: + - public + - internal + - none + type: string + name: + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application and + transport protocols of the traffic that + will go through this endpoint. \n - `http`: + Endpoint will have `http` traffic, typically + on a TCP connection. It will be automaticaly + promoted to `https` when the `secure` field + is set to `true`. \n - `https`: Endpoint + will have `https` traffic, typically on + a TCP connection. \n - `ws`: Endpoint will + have `ws` traffic, typically on a TCP connection. + It will be automaticaly promoted to `wss` + when the `secure` field is set to `true`. + \n - `wss`: Endpoint will have `wss` traffic, + typically on a TCP connection. \n - `tcp`: + Endpoint will have traffic on a TCP connection, + without specifying an application protocol. + \n - `udp`: Endpoint will have traffic on + an UDP connection, without specifying an + application protocol. \n Default value is + `http`" + enum: + - http + - https + - ws + - wss + - tcp + - udp + type: string + secure: + description: Describes whether the endpoint + should be secured and protected by some + authentication process. This requires a + protocol of `https` or `wss`. + type: boolean + targetPort: + description: The port number should be unique. + type: integer + required: + - name + type: object + type: array + env: + description: "Environment variables used in this + container. \n The following variables are reserved + and cannot be overridden via env: \n - `$PROJECTS_ROOT` + \n - `$PROJECT_SOURCE`" + items: + properties: + name: + type: string + value: + type: string + required: + - name + type: object + type: array + image: + type: string + memoryLimit: + type: string + memoryRequest: + type: string + mountSources: + description: "Toggles whether or not the project + source code should be mounted in the component. + \n Defaults to true for all component types except + plugins and components that set `dedicatedPod` + to true." + type: boolean + sourceMapping: + description: Optional specification of the path + in the container where project sources should + be transferred/mounted when `mountSources` is + `true`. When omitted, the default value of /projects + is used. + type: string + volumeMounts: + description: List of volumes mounts that should + be mounted is this container. + items: + description: Volume that should be mounted to + a component container + properties: + name: + description: The volume mount name is the + name of an existing `Volume` component. + If several containers mount the same volume + name then they will reuse the same volume + and will be able to access to the same files. + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + path: + description: The path in the component container + where the volume should be mounted. If not + path is mentioned, default path is the is + `/`. + type: string + required: + - name + type: object + type: array + type: object + image: + description: Allows specifying the definition of an + image for outer loop builds + oneOf: + - required: + - dockerfile + - required: + - autoBuild + properties: + autoBuild: + description: "Defines if the image should be built + during startup. \n Default value is `false`" + type: boolean + dockerfile: + description: Allows specifying dockerfile type build + oneOf: + - required: + - uri + - required: + - devfileRegistry + - required: + - git + properties: + args: + description: The arguments to supply to the + dockerfile build. + items: + type: string + type: array + buildContext: + description: Path of source directory to establish + build context. Defaults to ${PROJECT_ROOT} + in the container + type: string + devfileRegistry: + description: Dockerfile's Devfile Registry source + properties: + id: + description: Id in a devfile registry that + contains a Dockerfile. The src in the + OCI registry required for the Dockerfile + build will be downloaded for building + the image. + type: string + registryUrl: + description: Devfile Registry URL to pull + the Dockerfile from when using the Devfile + Registry as Dockerfile src. To ensure + the Dockerfile gets resolved consistently + in different environments, it is recommended + to always specify the `devfileRegistryUrl` + when `Id` is used. + type: string + type: object + git: + description: Dockerfile's Git source + properties: + checkoutFrom: + description: Defines from what the project + should be checked out. Required if there + are more than one remote configured + properties: + remote: + description: The remote name should + be used as init. Required if there + are more than one remote configured + type: string + revision: + description: The revision to checkout + from. Should be branch name, tag or + commit id. Default branch is used + if missing or specified revision is + not found. + type: string + type: object + fileLocation: + description: Location of the Dockerfile + in the Git repository when using git as + Dockerfile src. Defaults to Dockerfile. + type: string + remotes: + additionalProperties: + type: string + description: The remotes map which should + be initialized in the git project. Projects + must have at least one remote configured + while StarterProjects & Image Component's + Git source can only have at most one remote + configured. type: object - args: - description: "The arguments to supply to - the command running the dockerimage component. - The arguments are supplied either to the - default command provided in the image - or to the overridden command. \n Defaults - to an empty array, meaning use whatever - is defined in the image." - items: - type: string - type: array - command: - description: "The command to run in the - dockerimage component instead of the default - one provided in the image. \n Defaults - to an empty array, meaning use whatever - is defined in the image." - items: - type: string - type: array - cpuLimit: + type: object + rootRequired: + description: "Specify if a privileged builder + pod is required. \n Default value is `false`" + type: boolean + srcType: + description: Type of Dockerfile src + enum: + - Uri + - DevfileRegistry + - Git + type: string + uri: + description: URI Reference of a Dockerfile. + It can be a full URL or a relative URI from + the current devfile as the base URI. + type: string + type: object + imageName: + description: Name of the image for the resulting + outerloop build + type: string + imageType: + description: Type of image + enum: + - Dockerfile + - AutoBuild + type: string + type: object + kubernetes: + description: Allows importing into the devworkspace + the Kubernetes resources defined in a given manifest. + For example this allows reusing the Kubernetes definitions + used to deploy some runtime components in production. + oneOf: + - required: + - uri + - required: + - inlined + properties: + deployByDefault: + description: "Defines if the component should be + deployed during startup. \n Default value is `false`" + type: boolean + endpoints: + items: + properties: + annotation: + additionalProperties: type: string - cpuRequest: + description: Annotations to be added to Kubernetes + Ingress or Openshift Route + type: object + attributes: + description: "Map of implementation-dependant + string-based free-form attributes. \n Examples + of Che-specific attributes: \n - cookiesAuthEnabled: + \"true\" / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + x-kubernetes-preserve-unknown-fields: true + exposure: + description: "Describes how the endpoint should + be exposed on the network. \n - `public` + means that the endpoint will be exposed + on the public network, typically through + a K8S ingress or an OpenShift route. \n + - `internal` means that the endpoint will + be exposed internally outside of the main + devworkspace POD, typically by K8S services, + to be consumed by other elements running + on the same cloud internal network. \n - + `none` means that the endpoint will not + be exposed and will only be accessible inside + the main devworkspace POD, on a local address. + \n Default value is `public`" + enum: + - public + - internal + - none + type: string + name: + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application and + transport protocols of the traffic that + will go through this endpoint. \n - `http`: + Endpoint will have `http` traffic, typically + on a TCP connection. It will be automaticaly + promoted to `https` when the `secure` field + is set to `true`. \n - `https`: Endpoint + will have `https` traffic, typically on + a TCP connection. \n - `ws`: Endpoint will + have `ws` traffic, typically on a TCP connection. + It will be automaticaly promoted to `wss` + when the `secure` field is set to `true`. + \n - `wss`: Endpoint will have `wss` traffic, + typically on a TCP connection. \n - `tcp`: + Endpoint will have traffic on a TCP connection, + without specifying an application protocol. + \n - `udp`: Endpoint will have traffic on + an UDP connection, without specifying an + application protocol. \n Default value is + `http`" + enum: + - http + - https + - ws + - wss + - tcp + - udp + type: string + secure: + description: Describes whether the endpoint + should be secured and protected by some + authentication process. This requires a + protocol of `https` or `wss`. + type: boolean + targetPort: + description: The port number should be unique. + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + uri: + description: Location in a file fetched from a uri. + type: string + type: object + name: + description: 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. + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + openshift: + description: Allows importing into the devworkspace + the OpenShift resources defined in a given manifest. + For example this allows reusing the OpenShift definitions + used to deploy some runtime components in production. + oneOf: + - required: + - uri + - required: + - inlined + properties: + deployByDefault: + description: "Defines if the component should be + deployed during startup. \n Default value is `false`" + type: boolean + endpoints: + items: + properties: + annotation: + additionalProperties: type: string - dedicatedPod: - description: "Specify if a container should - run in its own separated pod, instead - of running as part of the main development - environment pod. \n Default value is `false`" - type: boolean - endpoints: - items: + description: Annotations to be added to Kubernetes + Ingress or Openshift Route + type: object + attributes: + description: "Map of implementation-dependant + string-based free-form attributes. \n Examples + of Che-specific attributes: \n - cookiesAuthEnabled: + \"true\" / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + x-kubernetes-preserve-unknown-fields: true + exposure: + description: "Describes how the endpoint should + be exposed on the network. \n - `public` + means that the endpoint will be exposed + on the public network, typically through + a K8S ingress or an OpenShift route. \n + - `internal` means that the endpoint will + be exposed internally outside of the main + devworkspace POD, typically by K8S services, + to be consumed by other elements running + on the same cloud internal network. \n - + `none` means that the endpoint will not + be exposed and will only be accessible inside + the main devworkspace POD, on a local address. + \n Default value is `public`" + enum: + - public + - internal + - none + type: string + name: + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application and + transport protocols of the traffic that + will go through this endpoint. \n - `http`: + Endpoint will have `http` traffic, typically + on a TCP connection. It will be automaticaly + promoted to `https` when the `secure` field + is set to `true`. \n - `https`: Endpoint + will have `https` traffic, typically on + a TCP connection. \n - `ws`: Endpoint will + have `ws` traffic, typically on a TCP connection. + It will be automaticaly promoted to `wss` + when the `secure` field is set to `true`. + \n - `wss`: Endpoint will have `wss` traffic, + typically on a TCP connection. \n - `tcp`: + Endpoint will have traffic on a TCP connection, + without specifying an application protocol. + \n - `udp`: Endpoint will have traffic on + an UDP connection, without specifying an + application protocol. \n Default value is + `http`" + enum: + - http + - https + - ws + - wss + - tcp + - udp + type: string + secure: + description: Describes whether the endpoint + should be secured and protected by some + authentication process. This requires a + protocol of `https` or `wss`. + type: boolean + targetPort: + description: The port number should be unique. + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + uri: + description: Location in a file fetched from a uri. + type: string + type: object + plugin: + description: "Allows importing a plugin. \n Plugins + are mainly imported devfiles that contribute components, + commands and events as a consistent single unit. They + are defined in either YAML files following the devfile + syntax, or as `DevWorkspaceTemplate` Kubernetes Custom + Resources" + oneOf: + - required: + - uri + - required: + - id + - required: + - kubernetes + properties: + commands: + description: Overrides of commands encapsulated + in a parent devfile or a plugin. Overriding is + done according to K8S strategic merge patch standard + rules. + items: + oneOf: + - required: + - exec + - required: + - apply + - required: + - composite + properties: + apply: + description: "Command that consists in applying + a given component definition, typically + bound to a devworkspace event. \n For example, + when an `apply` command is bound to a `preStart` + event, and references a `container` component, + it will start the container as a K8S initContainer + in the devworkspace POD, unless the component + has its `dedicatedPod` field set to `true`. + \n When no `apply` command exist for a given + component, it is assumed the component will + be applied at devworkspace start by default, + unless `deployByDefault` for that component + is set to false." + properties: + component: + description: Describes component that + will be applied + type: string + group: + description: Defines the group this command + is part of properties: - annotation: - additionalProperties: - type: string - description: Annotations to be added - to Kubernetes Ingress or Openshift - Route - type: object - attributes: - description: "Map of implementation-dependant - string-based free-form attributes. - \n Examples of Che-specific attributes: - \n - cookiesAuthEnabled: \"true\" - / \"false\", \n - type: \"terminal\" - / \"ide\" / \"ide-dev\"," - type: object - x-kubernetes-preserve-unknown-fields: true - exposure: - description: "Describes how the endpoint - should be exposed on the network. - \n - `public` means that the endpoint - will be exposed on the public network, - typically through a K8S ingress - or an OpenShift route. \n - `internal` - means that the endpoint will be - exposed internally outside of the - main devworkspace POD, typically - by K8S services, to be consumed - by other elements running on the - same cloud internal network. \n - - `none` means that the endpoint - will not be exposed and will only - be accessible inside the main devworkspace - POD, on a local address. \n Default - value is `public`" + isDefault: + description: Identifies the default + command for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of enum: - - public - - internal - - none - type: string - name: - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - path: - description: Path of the endpoint - URL + - build + - run + - test + - debug + - deploy type: string - protocol: - description: "Describes the application - and transport protocols of the traffic - that will go through this endpoint. - \n - `http`: Endpoint will have - `http` traffic, typically on a TCP - connection. It will be automaticaly - promoted to `https` when the `secure` - field is set to `true`. \n - `https`: - Endpoint will have `https` traffic, - typically on a TCP connection. \n - - `ws`: Endpoint will have `ws` - traffic, typically on a TCP connection. - It will be automaticaly promoted - to `wss` when the `secure` field - is set to `true`. \n - `wss`: Endpoint - will have `wss` traffic, typically - on a TCP connection. \n - `tcp`: - Endpoint will have traffic on a - TCP connection, without specifying - an application protocol. \n - `udp`: - Endpoint will have traffic on an - UDP connection, without specifying - an application protocol. \n Default - value is `http`" + type: object + label: + description: Optional label that provides + a label for this command to be used + in Editor UI menus for example + type: string + type: object + attributes: + description: Map of implementation-dependant + free-form YAML attributes. + type: object + x-kubernetes-preserve-unknown-fields: true + commandType: + description: Type of devworkspace command + enum: + - Exec + - Apply + - Composite + type: string + composite: + description: Composite command that allows + executing several sub-commands either sequentially + or concurrently + properties: + commands: + description: The commands that comprise + this composite command + items: + type: string + type: array + group: + description: Defines the group this command + is part of + properties: + isDefault: + description: Identifies the default + command for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of enum: - - http - - https - - ws - - wss - - tcp - - udp + - build + - run + - test + - debug + - deploy type: string - secure: - description: Describes whether the - endpoint should be secured and protected - by some authentication process. - This requires a protocol of `https` - or `wss`. - type: boolean - targetPort: - description: The port number should - be unique. - type: integer - required: - - name type: object - type: array - env: - description: "Environment variables used - in this container. \n The following variables - are reserved and cannot be overridden - via env: \n - `$PROJECTS_ROOT` \n - - `$PROJECT_SOURCE`" - items: + label: + description: Optional label that provides + a label for this command to be used + in Editor UI menus for example + type: string + parallel: + description: Indicates if the sub-commands + should be executed concurrently + type: boolean + type: object + exec: + description: CLI Command executed in an existing + component container + properties: + commandLine: + description: "The actual command-line + string \n Special variables that can + be used: \n - `$PROJECTS_ROOT`: A path + where projects sources are mounted as + defined by container component's sourceMapping. + \n - `$PROJECT_SOURCE`: A path to a + project source ($PROJECTS_ROOT/). + If there are multiple projects, this + will point to the directory of the first + one." + type: string + component: + description: Describes component to which + given action relates + type: string + env: + description: Optional list of environment + variables that have to be set before + running the command + items: + properties: + name: + type: string + value: + type: string + required: + - name + type: object + type: array + group: + description: Defines the group this command + is part of properties: - name: - type: string - value: + isDefault: + description: Identifies the default + command for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug + - deploy type: string - required: - - name type: object - type: array - image: - type: string - memoryLimit: - type: string - memoryRequest: - type: string - mountSources: - description: "Toggles whether or not the - project source code should be mounted - in the component. \n Defaults to true - for all component types except plugins - and components that set `dedicatedPod` - to true." - type: boolean - sourceMapping: - description: Optional specification of the - path in the container where project sources - should be transferred/mounted when `mountSources` - is `true`. When omitted, the default value - of /projects is used. - type: string - volumeMounts: - description: List of volumes mounts that - should be mounted is this container. - items: - description: Volume that should be mounted - to a component container + hotReloadCapable: + description: "Whether the command is capable + to reload itself when source code changes. + If set to `true` the command won't be + restarted and it is expected to handle + file changes on its own. \n Default + value is `false`" + type: boolean + label: + description: Optional label that provides + a label for this command to be used + in Editor UI menus for example + type: string + workingDir: + description: "Working directory where + the command should be executed \n Special + variables that can be used: \n - `$PROJECTS_ROOT`: + A path where projects sources are mounted + as defined by container component's + sourceMapping. \n - `$PROJECT_SOURCE`: + A path to a project source ($PROJECTS_ROOT/). + If there are multiple projects, this + will point to the directory of the first + one." + type: string + type: object + id: + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + required: + - id + type: object + type: array + components: + description: Overrides of components encapsulated + in a parent devfile or a plugin. Overriding is + done according to K8S strategic merge patch standard + rules. + items: + oneOf: + - required: + - container + - required: + - kubernetes + - required: + - openshift + - required: + - volume + - required: + - image + properties: + attributes: + description: Map of implementation-dependant + free-form YAML attributes. + type: object + x-kubernetes-preserve-unknown-fields: true + componentType: + description: Type of component + enum: + - Container + - Kubernetes + - Openshift + - Volume + - Image + type: string + container: + description: Allows adding and configuring + devworkspace-related containers + properties: + annotation: + description: Annotations that should be + added to specific resources for this + container properties: - name: - description: The volume mount name - is the name of an existing `Volume` - component. If several containers - mount the same volume name then - they will reuse the same volume - and will be able to access to the - same files. - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - path: - description: The path in the component - container where the volume should - be mounted. If not path is mentioned, - default path is the is `/`. - type: string - required: - - name + deployment: + additionalProperties: + type: string + description: Annotations to be added + to deployment + type: object + service: + additionalProperties: + type: string + description: Annotations to be added + to service + type: object type: object - type: array - type: object - image: - description: Allows specifying the definition - of an image for outer loop builds - oneOf: - - required: - - dockerfile - - required: - - autoBuild - properties: - autoBuild: - description: "Defines if the image should - be built during startup. \n Default value - is `false`" - type: boolean - dockerfile: - description: Allows specifying dockerfile - type build - oneOf: - - required: - - uri - - required: - - devfileRegistry - - required: - - git - properties: - args: - description: The arguments to supply - to the dockerfile build. - items: - type: string - type: array - buildContext: - description: Path of source directory - to establish build context. Defaults - to ${PROJECT_ROOT} in the container + args: + description: "The arguments to supply + to the command running the dockerimage + component. The arguments are supplied + either to the default command provided + in the image or to the overridden command. + \n Defaults to an empty array, meaning + use whatever is defined in the image." + items: type: string - devfileRegistry: - description: Dockerfile's Devfile Registry - source + type: array + command: + description: "The command to run in the + dockerimage component instead of the + default one provided in the image. \n + Defaults to an empty array, meaning + use whatever is defined in the image." + items: + type: string + type: array + cpuLimit: + type: string + cpuRequest: + type: string + dedicatedPod: + description: "Specify if a container should + run in its own separated pod, instead + of running as part of the main development + environment pod. \n Default value is + `false`" + type: boolean + endpoints: + items: properties: - id: - description: Id in a devfile registry - that contains a Dockerfile. The - src in the OCI registry required - for the Dockerfile build will - be downloaded for building the - image. + annotation: + additionalProperties: + type: string + description: Annotations to be added + to Kubernetes Ingress or Openshift + Route + type: object + attributes: + description: "Map of implementation-dependant + string-based free-form attributes. + \n Examples of Che-specific attributes: + \n - cookiesAuthEnabled: \"true\" + / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + x-kubernetes-preserve-unknown-fields: true + exposure: + description: "Describes how the + endpoint should be exposed on + the network. \n - `public` means + that the endpoint will be exposed + on the public network, typically + through a K8S ingress or an OpenShift + route. \n - `internal` means that + the endpoint will be exposed internally + outside of the main devworkspace + POD, typically by K8S services, + to be consumed by other elements + running on the same cloud internal + network. \n - `none` means that + the endpoint will not be exposed + and will only be accessible inside + the main devworkspace POD, on + a local address. \n Default value + is `public`" + enum: + - public + - internal + - none type: string - registryUrl: - description: Devfile Registry URL - to pull the Dockerfile from when - using the Devfile Registry as - Dockerfile src. To ensure the - Dockerfile gets resolved consistently - in different environments, it - is recommended to always specify - the `devfileRegistryUrl` when - `Id` is used. + name: + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string + path: + description: Path of the endpoint + URL + type: string + protocol: + description: "Describes the application + and transport protocols of the + traffic that will go through this + endpoint. \n - `http`: Endpoint + will have `http` traffic, typically + on a TCP connection. It will be + automaticaly promoted to `https` + when the `secure` field is set + to `true`. \n - `https`: Endpoint + will have `https` traffic, typically + on a TCP connection. \n - `ws`: + Endpoint will have `ws` traffic, + typically on a TCP connection. + It will be automaticaly promoted + to `wss` when the `secure` field + is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, + typically on a TCP connection. + \n - `tcp`: Endpoint will have + traffic on a TCP connection, without + specifying an application protocol. + \n - `udp`: Endpoint will have + traffic on an UDP connection, + without specifying an application + protocol. \n Default value is + `http`" + enum: + - http + - https + - ws + - wss + - tcp + - udp + type: string + secure: + description: Describes whether the + endpoint should be secured and + protected by some authentication + process. This requires a protocol + of `https` or `wss`. + type: boolean + targetPort: + description: The port number should + be unique. + type: integer + required: + - name type: object - git: - description: Dockerfile's Git source + type: array + env: + description: "Environment variables used + in this container. \n The following + variables are reserved and cannot be + overridden via env: \n - `$PROJECTS_ROOT` + \n - `$PROJECT_SOURCE`" + items: properties: - checkoutFrom: - description: Defines from what the - project should be checked out. - Required if there are more than - one remote configured - properties: - remote: - description: The remote name - should be used as init. Required - if there are more than one - remote configured - type: string - revision: - description: The revision to - checkout from. Should be branch - name, tag or commit id. Default - branch is used if missing - or specified revision is not - found. - type: string - type: object - fileLocation: - description: Location of the Dockerfile - in the Git repository when using - git as Dockerfile src. Defaults - to Dockerfile. + name: type: string - remotes: - additionalProperties: - type: string - description: The remotes map which - should be initialized in the git - project. Projects must have at - least one remote configured while - StarterProjects & Image Component's - Git source can only have at most - one remote configured. - type: object + value: + type: string + required: + - name type: object - rootRequired: - description: "Specify if a privileged - builder pod is required. \n Default - value is `false`" - type: boolean - srcType: - description: Type of Dockerfile src - enum: - - Uri - - DevfileRegistry - - Git - type: string - uri: - description: URI Reference of a Dockerfile. - It can be a full URL or a relative - URI from the current devfile as the - base URI. - type: string - type: object - imageName: - description: Name of the image for the resulting - outerloop build - type: string - imageType: - description: Type of image - enum: - - Dockerfile - - AutoBuild - type: string - type: object - kubernetes: - description: Allows importing into the devworkspace - the Kubernetes resources defined in a given - manifest. For example this allows reusing - the Kubernetes definitions used to deploy - some runtime components in production. - oneOf: - - required: - - uri - - required: - - inlined - properties: - deployByDefault: - description: "Defines if the component should - be deployed during startup. \n Default - value is `false`" - type: boolean - endpoints: - items: - properties: - annotation: - additionalProperties: + type: array + image: + type: string + memoryLimit: + type: string + memoryRequest: + type: string + mountSources: + description: "Toggles whether or not the + project source code should be mounted + in the component. \n Defaults to true + for all component types except plugins + and components that set `dedicatedPod` + to true." + type: boolean + sourceMapping: + description: Optional specification of + the path in the container where project + sources should be transferred/mounted + when `mountSources` is `true`. When + omitted, the default value of /projects + is used. + type: string + volumeMounts: + description: List of volumes mounts that + should be mounted is this container. + items: + description: Volume that should be mounted + to a component container + properties: + name: + description: The volume mount name + is the name of an existing `Volume` + component. If several containers + mount the same volume name then + they will reuse the same volume + and will be able to access to + the same files. + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string - description: Annotations to be added - to Kubernetes Ingress or Openshift - Route - type: object - attributes: - description: "Map of implementation-dependant - string-based free-form attributes. - \n Examples of Che-specific attributes: - \n - cookiesAuthEnabled: \"true\" - / \"false\", \n - type: \"terminal\" - / \"ide\" / \"ide-dev\"," - type: object - x-kubernetes-preserve-unknown-fields: true - exposure: - description: "Describes how the endpoint - should be exposed on the network. - \n - `public` means that the endpoint - will be exposed on the public network, - typically through a K8S ingress - or an OpenShift route. \n - `internal` - means that the endpoint will be - exposed internally outside of the - main devworkspace POD, typically - by K8S services, to be consumed - by other elements running on the - same cloud internal network. \n - - `none` means that the endpoint - will not be exposed and will only - be accessible inside the main devworkspace - POD, on a local address. \n Default - value is `public`" - enum: - - public - - internal - - none - type: string - name: - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - path: - description: Path of the endpoint - URL - type: string - protocol: - description: "Describes the application - and transport protocols of the traffic - that will go through this endpoint. - \n - `http`: Endpoint will have - `http` traffic, typically on a TCP - connection. It will be automaticaly - promoted to `https` when the `secure` - field is set to `true`. \n - `https`: - Endpoint will have `https` traffic, - typically on a TCP connection. \n - - `ws`: Endpoint will have `ws` - traffic, typically on a TCP connection. - It will be automaticaly promoted - to `wss` when the `secure` field - is set to `true`. \n - `wss`: Endpoint - will have `wss` traffic, typically - on a TCP connection. \n - `tcp`: - Endpoint will have traffic on a - TCP connection, without specifying - an application protocol. \n - `udp`: - Endpoint will have traffic on an - UDP connection, without specifying - an application protocol. \n Default - value is `http`" - enum: - - http - - https - - ws - - wss - - tcp - - udp - type: string - secure: - description: Describes whether the - endpoint should be secured and protected - by some authentication process. - This requires a protocol of `https` - or `wss`. - type: boolean - targetPort: - description: The port number should - be unique. - type: integer - required: - - name - type: object - type: array - inlined: - description: Inlined manifest - type: string - locationType: - description: Type of Kubernetes-like location - enum: - - Uri - - Inlined - type: string - uri: - description: Location in a file fetched - from a uri. - type: string - type: object - name: - description: 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. - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - openshift: - description: Allows importing into the devworkspace - the OpenShift resources defined in a given - manifest. For example this allows reusing - the OpenShift definitions used to deploy some - runtime components in production. - oneOf: - - required: - - uri - - required: - - inlined - properties: - deployByDefault: - description: "Defines if the component should - be deployed during startup. \n Default - value is `false`" - type: boolean - endpoints: - items: + path: + description: The path in the component + container where the volume should + be mounted. If not path is mentioned, + default path is the is `/`. + type: string + required: + - name + type: object + type: array + type: object + image: + description: Allows specifying the definition + of an image for outer loop builds + oneOf: + - required: + - dockerfile + - required: + - autoBuild + properties: + autoBuild: + description: "Defines if the image should + be built during startup. \n Default + value is `false`" + type: boolean + dockerfile: + description: Allows specifying dockerfile + type build + oneOf: + - required: + - uri + - required: + - devfileRegistry + - required: + - git properties: - annotation: - additionalProperties: + args: + description: The arguments to supply + to the dockerfile build. + items: type: string - description: Annotations to be added - to Kubernetes Ingress or Openshift - Route + type: array + buildContext: + description: Path of source directory + to establish build context. Defaults + to ${PROJECT_ROOT} in the container + type: string + devfileRegistry: + description: Dockerfile's Devfile + Registry source + properties: + id: + description: Id in a devfile registry + that contains a Dockerfile. + The src in the OCI registry + required for the Dockerfile + build will be downloaded for + building the image. + type: string + registryUrl: + description: Devfile Registry + URL to pull the Dockerfile from + when using the Devfile Registry + as Dockerfile src. To ensure + the Dockerfile gets resolved + consistently in different environments, + it is recommended to always + specify the `devfileRegistryUrl` + when `Id` is used. + type: string type: object - attributes: - description: "Map of implementation-dependant - string-based free-form attributes. - \n Examples of Che-specific attributes: - \n - cookiesAuthEnabled: \"true\" - / \"false\", \n - type: \"terminal\" - / \"ide\" / \"ide-dev\"," + git: + description: Dockerfile's Git source + properties: + checkoutFrom: + description: Defines from what + the project should be checked + out. Required if there are more + than one remote configured + properties: + remote: + description: The remote name + should be used as init. + Required if there are more + than one remote configured + type: string + revision: + description: The revision + to checkout from. Should + be branch name, tag or commit + id. Default branch is used + if missing or specified + revision is not found. + type: string + type: object + fileLocation: + description: Location of the Dockerfile + in the Git repository when using + git as Dockerfile src. Defaults + to Dockerfile. + type: string + remotes: + additionalProperties: + type: string + description: The remotes map which + should be initialized in the + git project. Projects must have + at least one remote configured + while StarterProjects & Image + Component's Git source can only + have at most one remote configured. + type: object type: object - x-kubernetes-preserve-unknown-fields: true - exposure: - description: "Describes how the endpoint - should be exposed on the network. - \n - `public` means that the endpoint - will be exposed on the public network, - typically through a K8S ingress - or an OpenShift route. \n - `internal` - means that the endpoint will be - exposed internally outside of the - main devworkspace POD, typically - by K8S services, to be consumed - by other elements running on the - same cloud internal network. \n - - `none` means that the endpoint - will not be exposed and will only - be accessible inside the main devworkspace - POD, on a local address. \n Default - value is `public`" + rootRequired: + description: "Specify if a privileged + builder pod is required. \n Default + value is `false`" + type: boolean + srcType: + description: Type of Dockerfile src enum: - - public - - internal - - none - type: string - name: - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - path: - description: Path of the endpoint - URL + - Uri + - DevfileRegistry + - Git type: string - protocol: - description: "Describes the application - and transport protocols of the traffic - that will go through this endpoint. - \n - `http`: Endpoint will have - `http` traffic, typically on a TCP - connection. It will be automaticaly - promoted to `https` when the `secure` - field is set to `true`. \n - `https`: - Endpoint will have `https` traffic, - typically on a TCP connection. \n - - `ws`: Endpoint will have `ws` - traffic, typically on a TCP connection. - It will be automaticaly promoted - to `wss` when the `secure` field - is set to `true`. \n - `wss`: Endpoint - will have `wss` traffic, typically - on a TCP connection. \n - `tcp`: - Endpoint will have traffic on a - TCP connection, without specifying - an application protocol. \n - `udp`: - Endpoint will have traffic on an - UDP connection, without specifying - an application protocol. \n Default - value is `http`" - enum: - - http - - https - - ws - - wss - - tcp - - udp + uri: + description: URI Reference of a Dockerfile. + It can be a full URL or a relative + URI from the current devfile as + the base URI. type: string - secure: - description: Describes whether the - endpoint should be secured and protected - by some authentication process. - This requires a protocol of `https` - or `wss`. - type: boolean - targetPort: - description: The port number should - be unique. - type: integer - required: - - name type: object - type: array - inlined: - description: Inlined manifest - type: string - locationType: - description: Type of Kubernetes-like location - enum: - - Uri - - Inlined - type: string - uri: - description: Location in a file fetched - from a uri. - type: string - type: object - volume: - description: Allows specifying the definition - of a volume shared by several other components - properties: - ephemeral: - description: Ephemeral volumes are not stored - persistently across restarts. Defaults - to false - type: boolean - size: - description: Size of the volume - type: string - type: object - required: - - name + imageName: + description: Name of the image for the + resulting outerloop build + type: string + imageType: + description: Type of image + enum: + - Dockerfile + - AutoBuild + type: string + type: object + kubernetes: + description: Allows importing into the devworkspace + the Kubernetes resources defined in a given + manifest. For example this allows reusing + the Kubernetes definitions used to deploy + some runtime components in production. + oneOf: + - required: + - uri + - required: + - inlined + properties: + deployByDefault: + description: "Defines if the component + should be deployed during startup. \n + Default value is `false`" + type: boolean + endpoints: + items: + properties: + annotation: + additionalProperties: + type: string + description: Annotations to be added + to Kubernetes Ingress or Openshift + Route + type: object + attributes: + description: "Map of implementation-dependant + string-based free-form attributes. + \n Examples of Che-specific attributes: + \n - cookiesAuthEnabled: \"true\" + / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + x-kubernetes-preserve-unknown-fields: true + exposure: + description: "Describes how the + endpoint should be exposed on + the network. \n - `public` means + that the endpoint will be exposed + on the public network, typically + through a K8S ingress or an OpenShift + route. \n - `internal` means that + the endpoint will be exposed internally + outside of the main devworkspace + POD, typically by K8S services, + to be consumed by other elements + running on the same cloud internal + network. \n - `none` means that + the endpoint will not be exposed + and will only be accessible inside + the main devworkspace POD, on + a local address. \n Default value + is `public`" + enum: + - public + - internal + - none + type: string + name: + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + path: + description: Path of the endpoint + URL + type: string + protocol: + description: "Describes the application + and transport protocols of the + traffic that will go through this + endpoint. \n - `http`: Endpoint + will have `http` traffic, typically + on a TCP connection. It will be + automaticaly promoted to `https` + when the `secure` field is set + to `true`. \n - `https`: Endpoint + will have `https` traffic, typically + on a TCP connection. \n - `ws`: + Endpoint will have `ws` traffic, + typically on a TCP connection. + It will be automaticaly promoted + to `wss` when the `secure` field + is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, + typically on a TCP connection. + \n - `tcp`: Endpoint will have + traffic on a TCP connection, without + specifying an application protocol. + \n - `udp`: Endpoint will have + traffic on an UDP connection, + without specifying an application + protocol. \n Default value is + `http`" + enum: + - http + - https + - ws + - wss + - tcp + - udp + type: string + secure: + description: Describes whether the + endpoint should be secured and + protected by some authentication + process. This requires a protocol + of `https` or `wss`. + type: boolean + targetPort: + description: The port number should + be unique. + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + uri: + description: Location in a file fetched + from a uri. + type: string + type: object + name: + description: 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. + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + openshift: + description: Allows importing into the devworkspace + the OpenShift resources defined in a given + manifest. For example this allows reusing + the OpenShift definitions used to deploy + some runtime components in production. + oneOf: + - required: + - uri + - required: + - inlined + properties: + deployByDefault: + description: "Defines if the component + should be deployed during startup. \n + Default value is `false`" + type: boolean + endpoints: + items: + properties: + annotation: + additionalProperties: + type: string + description: Annotations to be added + to Kubernetes Ingress or Openshift + Route + type: object + attributes: + description: "Map of implementation-dependant + string-based free-form attributes. + \n Examples of Che-specific attributes: + \n - cookiesAuthEnabled: \"true\" + / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + x-kubernetes-preserve-unknown-fields: true + exposure: + description: "Describes how the + endpoint should be exposed on + the network. \n - `public` means + that the endpoint will be exposed + on the public network, typically + through a K8S ingress or an OpenShift + route. \n - `internal` means that + the endpoint will be exposed internally + outside of the main devworkspace + POD, typically by K8S services, + to be consumed by other elements + running on the same cloud internal + network. \n - `none` means that + the endpoint will not be exposed + and will only be accessible inside + the main devworkspace POD, on + a local address. \n Default value + is `public`" + enum: + - public + - internal + - none + type: string + name: + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + path: + description: Path of the endpoint + URL + type: string + protocol: + description: "Describes the application + and transport protocols of the + traffic that will go through this + endpoint. \n - `http`: Endpoint + will have `http` traffic, typically + on a TCP connection. It will be + automaticaly promoted to `https` + when the `secure` field is set + to `true`. \n - `https`: Endpoint + will have `https` traffic, typically + on a TCP connection. \n - `ws`: + Endpoint will have `ws` traffic, + typically on a TCP connection. + It will be automaticaly promoted + to `wss` when the `secure` field + is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, + typically on a TCP connection. + \n - `tcp`: Endpoint will have + traffic on a TCP connection, without + specifying an application protocol. + \n - `udp`: Endpoint will have + traffic on an UDP connection, + without specifying an application + protocol. \n Default value is + `http`" + enum: + - http + - https + - ws + - wss + - tcp + - udp + type: string + secure: + description: Describes whether the + endpoint should be secured and + protected by some authentication + process. This requires a protocol + of `https` or `wss`. + type: boolean + targetPort: + description: The port number should + be unique. + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + uri: + description: Location in a file fetched + from a uri. + type: string + type: object + volume: + description: Allows specifying the definition + of a volume shared by several other components + properties: + ephemeral: + description: Ephemeral volumes are not + stored persistently across restarts. + Defaults to false + type: boolean + size: + description: Size of the volume + type: string + type: object + required: + - name + type: object + type: array + id: + description: Id in a registry that contains a Devfile + yaml file + type: string + importReferenceType: + description: type of location from where the referenced + template structure should be retrieved + enum: + - Uri + - Id + - Kubernetes + type: string + kubernetes: + description: Reference to a Kubernetes CRD of type + DevWorkspaceTemplate + properties: + name: + type: string + namespace: + type: string type: object - type: array - id: - description: Id in a registry that contains a Devfile - yaml file - type: string - importReferenceType: - description: type of location from where the referenced - template structure should be retrieved - enum: - - Uri - - Id - - Kubernetes - type: string - kubernetes: - description: Reference to a Kubernetes CRD of type - DevWorkspaceTemplate - properties: - name: - type: string - namespace: - type: string - type: object - registryUrl: - description: Registry URL to pull the parent devfile - from when using id in the parent reference. To ensure - the parent devfile gets resolved consistently in - different environments, it is recommended to always - specify the `registryUrl` when `id` is used. - type: string - uri: - description: URI Reference of a parent devfile YAML - file. It can be a full URL or a relative URI with - the current devfile as the base URI. - type: string - type: object - volume: - description: Allows specifying the definition of a volume - shared by several other components - properties: - ephemeral: - description: Ephemeral volumes are not stored persistently - across restarts. Defaults to false - type: boolean - size: - description: Size of the volume - type: string - type: object - required: - - name - type: object - type: array - id: - description: Id in a registry that contains a Devfile yaml file - type: string - importReferenceType: - description: type of location from where the referenced template - structure should be retrieved - enum: - - Uri - - Id - - Kubernetes - type: string - kubernetes: - description: Reference to a Kubernetes CRD of type DevWorkspaceTemplate - properties: - name: - type: string - namespace: - type: string - required: - - name - type: object - projects: - description: Overrides of projects encapsulated in a parent - devfile. Overriding is done according to K8S strategic merge - patch standard rules. - items: - oneOf: - - required: - - git - - required: - - zip + registryUrl: + description: Registry URL to pull the parent devfile + from when using id in the parent reference. To + ensure the parent devfile gets resolved consistently + in different environments, it is recommended to + always specify the `registryUrl` when `id` is + used. + type: string + uri: + description: URI Reference of a parent devfile YAML + file. It can be a full URL or a relative URI with + the current devfile as the base URI. + type: string + type: object + volume: + description: Allows specifying the definition of a volume + shared by several other components + properties: + ephemeral: + description: Ephemeral volumes are not stored persistently + across restarts. Defaults to false + type: boolean + size: + description: Size of the volume + type: string + type: object + required: + - name + type: object + type: array + id: + description: Id in a registry that contains a Devfile yaml + file + type: string + importReferenceType: + description: type of location from where the referenced template + structure should be retrieved + enum: + - Uri + - Id + - Kubernetes + type: string + kubernetes: + description: Reference to a Kubernetes CRD of type DevWorkspaceTemplate properties: - attributes: - description: Map of implementation-dependant free-form - YAML attributes. - type: object - x-kubernetes-preserve-unknown-fields: true - clonePath: - description: Path relative to the root of the projects - to which this project should be cloned into. This is - a unix-style relative path (i.e. uses forward slashes). - The path is invalid if it is absolute or tries to escape - the project root through the usage of '..'. If not specified, - defaults to the project name. - type: string - git: - description: Project's Git source - properties: - checkoutFrom: - description: Defines from what the project should - be checked out. Required if there are more than - one remote configured - properties: - remote: - description: The remote name should be used as - init. Required if there are more than one remote - configured - type: string - revision: - description: The revision to checkout from. Should - be branch name, tag or commit id. Default branch - is used if missing or specified revision is - not found. - type: string - type: object - remotes: - additionalProperties: - type: string - description: The remotes map which should be initialized - in the git project. Projects must have at least - one remote configured while StarterProjects & Image - Component's Git source can only have at most one - remote configured. - type: object - type: object name: - description: Project name - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string - sourceType: - description: Type of project source - enum: - - Git - - Zip + namespace: type: string - zip: - description: Project's Zip source - properties: - location: - description: Zip project's source location address. - Should be file path of the archive, e.g. file://$FILE_PATH - type: string - type: object required: - name type: object - type: array - registryUrl: - description: Registry URL to pull the parent devfile from when - using id in the parent reference. To ensure the parent devfile - gets resolved consistently in different environments, it is - recommended to always specify the `registryUrl` when `id` - is used. - type: string - starterProjects: - description: Overrides of starterProjects encapsulated in a - parent devfile. Overriding is done according to K8S strategic - merge patch standard rules. - items: - oneOf: - - required: - - git - - required: - - zip - properties: - attributes: - description: Map of implementation-dependant free-form - YAML attributes. - type: object - x-kubernetes-preserve-unknown-fields: true - description: - description: Description of a starter project - type: string - git: - description: Project's Git source - properties: - checkoutFrom: - description: Defines from what the project should - be checked out. Required if there are more than - one remote configured - properties: - remote: - description: The remote name should be used as - init. Required if there are more than one remote - configured - type: string - revision: - description: The revision to checkout from. Should - be branch name, tag or commit id. Default branch - is used if missing or specified revision is - not found. + projects: + description: Overrides of projects encapsulated in a parent + devfile. Overriding is done according to K8S strategic merge + patch standard rules. + items: + oneOf: + - required: + - git + - required: + - zip + properties: + attributes: + description: Map of implementation-dependant free-form + YAML attributes. + type: object + x-kubernetes-preserve-unknown-fields: true + clonePath: + description: Path relative to the root of the projects + to which this project should be cloned into. This + is a unix-style relative path (i.e. uses forward slashes). + The path is invalid if it is absolute or tries to + escape the project root through the usage of '..'. + If not specified, defaults to the project name. + type: string + git: + description: Project's Git source + properties: + checkoutFrom: + description: Defines from what the project should + be checked out. Required if there are more than + one remote configured + properties: + remote: + description: The remote name should be used + as init. Required if there are more than one + remote configured + type: string + revision: + description: The revision to checkout from. + Should be branch name, tag or commit id. Default + branch is used if missing or specified revision + is not found. + type: string + type: object + remotes: + additionalProperties: type: string - type: object - remotes: - additionalProperties: - type: string - description: The remotes map which should be initialized - in the git project. Projects must have at least - one remote configured while StarterProjects & Image - Component's Git source can only have at most one - remote configured. - type: object - type: object - name: - description: Project name - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - sourceType: - description: Type of project source - enum: - - Git - - Zip - type: string - subDir: - description: Sub-directory from a starter project to be - used as root for starter project. - type: string - zip: - description: Project's Zip source - properties: - location: - description: Zip project's source location address. - Should be file path of the archive, e.g. file://$FILE_PATH - type: string - type: object - required: - - name - type: object - type: array - uri: - description: URI Reference of a parent devfile YAML file. It - can be a full URL or a relative URI with the current devfile - as the base URI. - type: string - variables: - additionalProperties: - type: string - description: Overrides of variables encapsulated in a parent - devfile. Overriding is done according to K8S strategic merge - patch standard rules. - type: object - type: object - projects: - description: Projects worked on in the devworkspace, containing - names and sources locations - items: - oneOf: - - required: - - git - - required: - - zip - - required: - - custom - properties: - attributes: - description: Map of implementation-dependant free-form YAML - attributes. - type: object - x-kubernetes-preserve-unknown-fields: true - clonePath: - description: Path relative to the root of the projects to - which this project should be cloned into. This is a unix-style - relative path (i.e. uses forward slashes). The path is invalid - if it is absolute or tries to escape the project root through - the usage of '..'. If not specified, defaults to the project - name. - type: string - custom: - description: Project's Custom source - properties: - embeddedResource: - type: object - x-kubernetes-embedded-resource: true - x-kubernetes-preserve-unknown-fields: true - projectSourceClass: - type: string - required: - - embeddedResource - - projectSourceClass - type: object - git: - description: Project's Git source - properties: - checkoutFrom: - description: Defines from what the project should be checked - out. Required if there are more than one remote configured - properties: - remote: - description: The remote name should be used as init. - Required if there are more than one remote configured - type: string - revision: - description: The revision to checkout from. Should - be branch name, tag or commit id. Default branch - is used if missing or specified revision is not - found. - type: string - type: object - remotes: - additionalProperties: - type: string - description: The remotes map which should be initialized - in the git project. Projects must have at least one - remote configured while StarterProjects & Image Component's - Git source can only have at most one remote configured. - type: object - required: - - remotes - type: object - name: - description: Project name - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + description: The remotes map which should be initialized + in the git project. Projects must have at least + one remote configured while StarterProjects & + Image Component's Git source can only have at + most one remote configured. + type: object + type: object + name: + description: Project name + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + sourceType: + description: Type of project source + enum: + - Git + - Zip + type: string + zip: + description: Project's Zip source + properties: + location: + description: Zip project's source location address. + Should be file path of the archive, e.g. file://$FILE_PATH + type: string + type: object + required: + - name + type: object + type: array + registryUrl: + description: Registry URL to pull the parent devfile from + when using id in the parent reference. To ensure the parent + devfile gets resolved consistently in different environments, + it is recommended to always specify the `registryUrl` when + `id` is used. type: string - sourceType: - description: Type of project source - enum: - - Git - - Zip - - Custom + starterProjects: + description: Overrides of starterProjects encapsulated in + a parent devfile. Overriding is done according to K8S strategic + merge patch standard rules. + items: + oneOf: + - required: + - git + - required: + - zip + properties: + attributes: + description: Map of implementation-dependant free-form + YAML attributes. + type: object + x-kubernetes-preserve-unknown-fields: true + description: + description: Description of a starter project + type: string + git: + description: Project's Git source + properties: + checkoutFrom: + description: Defines from what the project should + be checked out. Required if there are more than + one remote configured + properties: + remote: + description: The remote name should be used + as init. Required if there are more than one + remote configured + type: string + revision: + description: The revision to checkout from. + Should be branch name, tag or commit id. Default + branch is used if missing or specified revision + is not found. + type: string + type: object + remotes: + additionalProperties: + type: string + description: The remotes map which should be initialized + in the git project. Projects must have at least + one remote configured while StarterProjects & + Image Component's Git source can only have at + most one remote configured. + type: object + type: object + name: + description: Project name + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + sourceType: + description: Type of project source + enum: + - Git + - Zip + type: string + subDir: + description: Sub-directory from a starter project to + be used as root for starter project. + type: string + zip: + description: Project's Zip source + properties: + location: + description: Zip project's source location address. + Should be file path of the archive, e.g. file://$FILE_PATH + type: string + type: object + required: + - name + type: object + type: array + uri: + description: URI Reference of a parent devfile YAML file. + It can be a full URL or a relative URI with the current + devfile as the base URI. type: string - zip: - description: Project's Zip source - properties: - location: - description: Zip project's source location address. Should - be file path of the archive, e.g. file://$FILE_PATH - type: string + variables: + additionalProperties: + type: string + description: Overrides of variables encapsulated in a parent + devfile. Overriding is done according to K8S strategic merge + patch standard rules. type: object - required: - - name type: object - type: array - starterProjects: - description: StarterProjects is a project that can be used as a - starting point when bootstrapping new projects - items: - oneOf: - - required: - - git - - required: - - zip - - required: - - custom - properties: - attributes: - description: Map of implementation-dependant free-form YAML - attributes. - type: object - x-kubernetes-preserve-unknown-fields: true - custom: - description: Project's Custom source - properties: - embeddedResource: - type: object - x-kubernetes-embedded-resource: true - x-kubernetes-preserve-unknown-fields: true - projectSourceClass: - type: string - required: - - embeddedResource - - projectSourceClass - type: object - description: - description: Description of a starter project - type: string - git: - description: Project's Git source - properties: - checkoutFrom: - description: Defines from what the project should be checked - out. Required if there are more than one remote configured - properties: - remote: - description: The remote name should be used as init. - Required if there are more than one remote configured + projects: + description: Projects worked on in the devworkspace, containing + names and sources locations + items: + oneOf: + - required: + - git + - required: + - zip + - required: + - custom + properties: + attributes: + description: Map of implementation-dependant free-form YAML + attributes. + type: object + x-kubernetes-preserve-unknown-fields: true + clonePath: + description: Path relative to the root of the projects to + which this project should be cloned into. This is a unix-style + relative path (i.e. uses forward slashes). The path is + invalid if it is absolute or tries to escape the project + root through the usage of '..'. If not specified, defaults + to the project name. + type: string + custom: + description: Project's Custom source + properties: + embeddedResource: + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + projectSourceClass: + type: string + required: + - embeddedResource + - projectSourceClass + type: object + git: + description: Project's Git source + properties: + checkoutFrom: + description: Defines from what the project should be + checked out. Required if there are more than one remote + configured + properties: + remote: + description: The remote name should be used as init. + Required if there are more than one remote configured + type: string + revision: + description: The revision to checkout from. Should + be branch name, tag or commit id. Default branch + is used if missing or specified revision is not + found. + type: string + type: object + remotes: + additionalProperties: type: string - revision: - description: The revision to checkout from. Should - be branch name, tag or commit id. Default branch - is used if missing or specified revision is not - found. + description: The remotes map which should be initialized + in the git project. Projects must have at least one + remote configured while StarterProjects & Image Component's + Git source can only have at most one remote configured. + type: object + required: + - remotes + type: object + name: + description: Project name + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + sourceType: + description: Type of project source + enum: + - Git + - Zip + - Custom + type: string + zip: + description: Project's Zip source + properties: + location: + description: Zip project's source location address. + Should be file path of the archive, e.g. file://$FILE_PATH + type: string + type: object + required: + - name + type: object + type: array + starterProjects: + description: StarterProjects is a project that can be used as + a starting point when bootstrapping new projects + items: + oneOf: + - required: + - git + - required: + - zip + - required: + - custom + properties: + attributes: + description: Map of implementation-dependant free-form YAML + attributes. + type: object + x-kubernetes-preserve-unknown-fields: true + custom: + description: Project's Custom source + properties: + embeddedResource: + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + projectSourceClass: + type: string + required: + - embeddedResource + - projectSourceClass + type: object + description: + description: Description of a starter project + type: string + git: + description: Project's Git source + properties: + checkoutFrom: + description: Defines from what the project should be + checked out. Required if there are more than one remote + configured + properties: + remote: + description: The remote name should be used as init. + Required if there are more than one remote configured + type: string + revision: + description: The revision to checkout from. Should + be branch name, tag or commit id. Default branch + is used if missing or specified revision is not + found. + type: string + type: object + remotes: + additionalProperties: type: string - type: object - remotes: - additionalProperties: - type: string - description: The remotes map which should be initialized - in the git project. Projects must have at least one - remote configured while StarterProjects & Image Component's - Git source can only have at most one remote configured. - type: object - required: - - remotes - type: object - name: - description: Project name - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - sourceType: - description: Type of project source - enum: - - Git - - Zip - - Custom - type: string - subDir: - description: Sub-directory from a starter project to be used - as root for starter project. - type: string - zip: - description: Project's Zip source - properties: - location: - description: Zip project's source location address. Should - be file path of the archive, e.g. file://$FILE_PATH - type: string - type: object - required: - - name + description: The remotes map which should be initialized + in the git project. Projects must have at least one + remote configured while StarterProjects & Image Component's + Git source can only have at most one remote configured. + type: object + required: + - remotes + type: object + name: + description: Project name + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + sourceType: + description: Type of project source + enum: + - Git + - Zip + - Custom + type: string + subDir: + description: Sub-directory from a starter project to be + used as root for starter project. + type: string + zip: + description: Project's Zip source + properties: + location: + description: Zip project's source location address. + Should be file path of the archive, e.g. file://$FILE_PATH + type: string + type: object + required: + - name + type: object + type: array + variables: + additionalProperties: + type: string + description: "Map of key-value variables used for string replacement + in the devfile. Values can be referenced via {{variable-key}} + to replace the corresponding value in string fields in the devfile. + Replacement cannot be used for \n - schemaVersion, metadata, + parent source \n - element identifiers, e.g. command id, component + name, endpoint name, project name \n - references to identifiers, + e.g. in events, a command's component, container's volume mount + name \n - string enums, e.g. command group kind, endpoint exposure" type: object - type: array - variables: - additionalProperties: - type: string - description: "Map of key-value variables used for string replacement - in the devfile. Values can be referenced via {{variable-key}} - to replace the corresponding value in string fields in the devfile. - Replacement cannot be used for \n - schemaVersion, metadata, - parent source \n - element identifiers, e.g. command id, component - name, endpoint name, project name \n - references to identifiers, - e.g. in events, a command's component, container's volume mount - name \n - string enums, e.g. command group kind, endpoint exposure" - type: object - type: object - required: - - started - type: object - status: - description: DevWorkspaceStatus defines the observed state of DevWorkspace - properties: - conditions: - description: Conditions represent the latest available observations - of an object's state - items: - description: DevWorkspaceCondition contains details for the current - condition of this devworkspace. - properties: - lastTransitionTime: - description: Last time the condition transitioned from one status - to another. - format: date-time - type: string - message: - description: Human-readable message indicating details about last - transition. - type: string - reason: - description: Unique, one-word, CamelCase reason for the condition's - last transition. - type: string - status: - description: Phase is the status of the condition. Can be True, - False, Unknown. - type: string - type: - description: Type is the type of the condition. - type: string - required: - - status - - type type: object - type: array - devworkspaceId: - description: Id of the DevWorkspace - type: string - mainUrl: - description: Main URL for this DevWorkspace - type: string - message: - description: Message is a short user-readable message giving additional - information about an object's state - type: string - phase: - type: string - required: - - devworkspaceId - type: object - type: object - version: v1alpha2 - versions: - - name: v1alpha2 + required: + - started + type: object + status: + description: DevWorkspaceStatus defines the observed state of DevWorkspace + properties: + conditions: + description: Conditions represent the latest available observations + of an object's state + items: + description: DevWorkspaceCondition contains details for the current + condition of this devworkspace. + properties: + lastTransitionTime: + description: Last time the condition transitioned from one status + to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about + last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's + last transition. + type: string + status: + description: Phase is the status of the condition. Can be True, + False, Unknown. + type: string + type: + description: Type is the type of the condition. + type: string + required: + - status + - type + type: object + type: array + devworkspaceId: + description: Id of the DevWorkspace + type: string + mainUrl: + description: Main URL for this DevWorkspace + type: string + message: + description: Message is a short user-readable message giving additional + information about an object's state + type: string + phase: + type: string + required: + - devworkspaceId + type: object + type: object served: true storage: true status: diff --git a/crds/workspace.devfile.io_devworkspaces.yaml b/crds/workspace.devfile.io_devworkspaces.yaml index 8e3c0603b..198d91922 100644 --- a/crds/workspace.devfile.io_devworkspaces.yaml +++ b/crds/workspace.devfile.io_devworkspaces.yaml @@ -16,6 +16,4088 @@ spec: singular: devworkspace scope: Namespaced versions: + - additionalPrinterColumns: + - description: The workspace's unique id + jsonPath: .status.workspaceId + name: Workspace ID + type: string + - description: The current workspace startup phase + jsonPath: .status.phase + name: Phase + type: string + - description: Url endpoint for accessing workspace + jsonPath: .status.ideUrl + name: URL + type: string + deprecated: true + name: v1alpha1 + schema: + openAPIV3Schema: + description: DevWorkspace is the Schema for the devworkspaces API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: DevWorkspaceSpec defines the desired state of DevWorkspace + properties: + routingClass: + type: string + started: + type: boolean + template: + description: Structure of the workspace. This is also the specification + of a workspace template. + properties: + commands: + description: Predefined, ready-to-use, workspace-related commands + items: + oneOf: + - required: + - exec + - required: + - apply + - required: + - vscodeTask + - required: + - vscodeLaunch + - required: + - composite + - required: + - custom + properties: + apply: + description: "Command that consists in applying a given + component definition, typically bound to a workspace event. + \n For example, when an `apply` command is bound to a + `preStart` event, and references a `container` component, + it will start the container as a K8S initContainer in + the workspace POD, unless the component has its `dedicatedPod` + field set to `true`. \n When no `apply` command exist + for a given component, it is assumed the component will + be applied at workspace start by default." + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional command + attributes + type: object + component: + description: Describes component that will be applied + type: string + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command for + a given group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + type: string + label: + description: Optional label that provides a label for + this command to be used in Editor UI menus for example + type: string + required: + - id + type: object + commandType: + description: Type of workspace command + enum: + - Exec + - Apply + - VscodeTask + - VscodeLaunch + - Composite + - Custom + type: string + composite: + description: Composite command that allows executing several + sub-commands either sequentially or concurrently + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional command + attributes + type: object + commands: + description: The commands that comprise this composite + command + items: + type: string + type: array + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command for + a given group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + type: string + label: + description: Optional label that provides a label for + this command to be used in Editor UI menus for example + type: string + parallel: + description: Indicates if the sub-commands should be + executed concurrently + type: boolean + required: + - id + type: object + custom: + description: Custom command whose logic is implementation-dependant + and should be provided by the user possibly through some + dedicated plugin + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional command + attributes + type: object + commandClass: + description: Class of command that the associated implementation + component should use to process this command with + the appropriate logic + type: string + embeddedResource: + description: Additional free-form configuration for + this custom command that the implementation component + will know how to use + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command for + a given group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + type: string + label: + description: Optional label that provides a label for + this command to be used in Editor UI menus for example + type: string + required: + - commandClass + - embeddedResource + - id + type: object + exec: + description: CLI Command executed in an existing component + container + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional command + attributes + type: object + commandLine: + description: "The actual command-line string \n Special + variables that can be used: \n - `$PROJECTS_ROOT`: + A path where projects sources are mounted \n - `$PROJECT_SOURCE`: + A path to a project source ($PROJECTS_ROOT/). + If there are multiple projects, this will point to + the directory of the first one." + type: string + component: + description: Describes component to which given action + relates + type: string + env: + description: Optional list of environment variables + that have to be set before running the command + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command for + a given group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + hotReloadCapable: + description: "Whether the command is capable to reload + itself when source code changes. If set to `true` + the command won't be restarted and it is expected + to handle file changes on its own. \n Default value + is `false`" + type: boolean + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + type: string + label: + description: Optional label that provides a label for + this command to be used in Editor UI menus for example + type: string + workingDir: + description: "Working directory where the command should + be executed \n Special variables that can be used: + \n - `${PROJECTS_ROOT}`: A path where projects sources + are mounted \n - `${PROJECT_SOURCE}`: A path to a + project source (${PROJECTS_ROOT}/). + If there are multiple projects, this will point to + the directory of the first one." + type: string + required: + - id + type: object + vscodeLaunch: + description: "Command providing the definition of a VsCode + launch action \n Deprecated; removed in v1alpha2" + oneOf: + - required: + - uri + - required: + - inlined + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional command + attributes + type: object + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command for + a given group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + type: string + inlined: + description: Inlined content of the VsCode configuration + type: string + locationType: + description: Type of Vscode configuration command location + enum: + - Uri + - Inlined + type: string + uri: + description: Location as an absolute of relative URI + the VsCode configuration will be fetched from + type: string + required: + - id + type: object + vscodeTask: + description: "Command providing the definition of a VsCode + Task \n Deprecated; removed in v1alpha2" + oneOf: + - required: + - uri + - required: + - inlined + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional command + attributes + type: object + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command for + a given group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + type: string + inlined: + description: Inlined content of the VsCode configuration + type: string + locationType: + description: Type of Vscode configuration command location + enum: + - Uri + - Inlined + type: string + uri: + description: Location as an absolute of relative URI + the VsCode configuration will be fetched from + type: string + required: + - id + type: object + type: object + type: array + components: + description: List of the workspace components, such as editor + and plugins, user-provided containers, or other types of components + items: + oneOf: + - required: + - container + - required: + - kubernetes + - required: + - openshift + - required: + - volume + - required: + - plugin + - required: + - custom + properties: + componentType: + description: Type of component + enum: + - Container + - Kubernetes + - Openshift + - Volume + - Plugin + - Custom + type: string + container: + description: Allows adding and configuring workspace-related + containers + properties: + args: + description: "The arguments to supply to the command + running the dockerimage component. The arguments are + supplied either to the default command provided in + the image or to the overridden command. \n Defaults + to an empty array, meaning use whatever is defined + in the image." + items: + type: string + type: array + command: + description: "The command to run in the dockerimage + component instead of the default one provided in the + image. \n Defaults to an empty array, meaning use + whatever is defined in the image." + items: + type: string + type: array + dedicatedPod: + description: "Specify if a container should run in its + own separated pod, instead of running as part of the + main development environment pod. \n Default value + is `false`" + type: boolean + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant + string-based free-form attributes. \n Examples + of Che-specific attributes: \n - cookiesAuthEnabled: + \"true\" / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint should + be exposed on the network. \n - `public` means + that the endpoint will be exposed on the public + network, typically through a K8S ingress or + an OpenShift route. \n - `internal` means that + the endpoint will be exposed internally outside + of the main workspace POD, typically by K8S + services, to be consumed by other elements running + on the same cloud internal network. \n - `none` + means that the endpoint will not be exposed + and will only be accessible inside the main + workspace POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application and transport + protocols of the traffic that will go through + this endpoint. \n - `http`: Endpoint will have + `http` traffic, typically on a TCP connection. + It will be automaticaly promoted to `https` + when the `secure` field is set to `true`. \n + - `https`: Endpoint will have `https` traffic, + typically on a TCP connection. \n - `ws`: Endpoint + will have `ws` traffic, typically on a TCP connection. + It will be automaticaly promoted to `wss` when + the `secure` field is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, typically + on a TCP connection. \n - `tcp`: Endpoint will + have traffic on a TCP connection, without specifying + an application protocol. \n - `udp`: Endpoint + will have traffic on an UDP connection, without + specifying an application protocol. \n Default + value is `http`" + type: string + secure: + description: Describes whether the endpoint should + be secured and protected by some authentication + process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + env: + description: Environment variables used in this container + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + image: + type: string + memoryLimit: + type: string + mountSources: + type: boolean + name: + type: string + sourceMapping: + description: Optional specification of the path in the + container where project sources should be transferred/mounted + when `mountSources` is `true`. When omitted, the value + of the `PROJECTS_ROOT` environment variable is used. + type: string + volumeMounts: + description: List of volumes mounts that should be mounted + is this container. + items: + description: Volume that should be mounted to a component + container + properties: + name: + description: The volume mount name is the name + of an existing `Volume` component. If several + containers mount the same volume name then they + will reuse the same volume and will be able + to access to the same files. + type: string + path: + description: The path in the component container + where the volume should be mounted. If not path + is mentioned, default path is the is `/`. + type: string + required: + - name + type: object + type: array + required: + - name + type: object + custom: + description: Custom component whose logic is implementation-dependant + and should be provided by the user possibly through some + dedicated controller + properties: + componentClass: + description: Class of component that the associated + implementation controller should use to process this + command with the appropriate logic + type: string + embeddedResource: + description: Additional free-form configuration for + this custom component that the implementation controller + will know how to use + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + name: + description: Mandatory name that allows referencing + the component in commands, or inside a parent + type: string + required: + - componentClass + - embeddedResource + - name + type: object + kubernetes: + description: Allows importing into the workspace the Kubernetes + resources defined in a given manifest. For example this + allows reusing the Kubernetes definitions used to deploy + some runtime components in production. + oneOf: + - required: + - uri + - required: + - inlined + properties: + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant + string-based free-form attributes. \n Examples + of Che-specific attributes: \n - cookiesAuthEnabled: + \"true\" / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint should + be exposed on the network. \n - `public` means + that the endpoint will be exposed on the public + network, typically through a K8S ingress or + an OpenShift route. \n - `internal` means that + the endpoint will be exposed internally outside + of the main workspace POD, typically by K8S + services, to be consumed by other elements running + on the same cloud internal network. \n - `none` + means that the endpoint will not be exposed + and will only be accessible inside the main + workspace POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application and transport + protocols of the traffic that will go through + this endpoint. \n - `http`: Endpoint will have + `http` traffic, typically on a TCP connection. + It will be automaticaly promoted to `https` + when the `secure` field is set to `true`. \n + - `https`: Endpoint will have `https` traffic, + typically on a TCP connection. \n - `ws`: Endpoint + will have `ws` traffic, typically on a TCP connection. + It will be automaticaly promoted to `wss` when + the `secure` field is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, typically + on a TCP connection. \n - `tcp`: Endpoint will + have traffic on a TCP connection, without specifying + an application protocol. \n - `udp`: Endpoint + will have traffic on an UDP connection, without + specifying an application protocol. \n Default + value is `http`" + type: string + secure: + description: Describes whether the endpoint should + be secured and protected by some authentication + process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + name: + description: Mandatory name that allows referencing + the component in commands, or inside a parent + type: string + uri: + description: Location in a file fetched from a uri. + type: string + required: + - name + type: object + openshift: + description: Allows importing into the workspace the OpenShift + resources defined in a given manifest. For example this + allows reusing the OpenShift definitions used to deploy + some runtime components in production. + oneOf: + - required: + - uri + - required: + - inlined + properties: + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant + string-based free-form attributes. \n Examples + of Che-specific attributes: \n - cookiesAuthEnabled: + \"true\" / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint should + be exposed on the network. \n - `public` means + that the endpoint will be exposed on the public + network, typically through a K8S ingress or + an OpenShift route. \n - `internal` means that + the endpoint will be exposed internally outside + of the main workspace POD, typically by K8S + services, to be consumed by other elements running + on the same cloud internal network. \n - `none` + means that the endpoint will not be exposed + and will only be accessible inside the main + workspace POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application and transport + protocols of the traffic that will go through + this endpoint. \n - `http`: Endpoint will have + `http` traffic, typically on a TCP connection. + It will be automaticaly promoted to `https` + when the `secure` field is set to `true`. \n + - `https`: Endpoint will have `https` traffic, + typically on a TCP connection. \n - `ws`: Endpoint + will have `ws` traffic, typically on a TCP connection. + It will be automaticaly promoted to `wss` when + the `secure` field is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, typically + on a TCP connection. \n - `tcp`: Endpoint will + have traffic on a TCP connection, without specifying + an application protocol. \n - `udp`: Endpoint + will have traffic on an UDP connection, without + specifying an application protocol. \n Default + value is `http`" + type: string + secure: + description: Describes whether the endpoint should + be secured and protected by some authentication + process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + name: + description: Mandatory name that allows referencing + the component in commands, or inside a parent + type: string + uri: + description: Location in a file fetched from a uri. + type: string + required: + - name + type: object + plugin: + description: "Allows importing a plugin. \n Plugins are + mainly imported devfiles that contribute components, commands + and events as a consistent single unit. They are defined + in either YAML files following the devfile syntax, or + as `DevWorkspaceTemplate` Kubernetes Custom Resources" + oneOf: + - required: + - uri + - required: + - id + - required: + - kubernetes + properties: + commands: + description: Overrides of commands encapsulated in a + parent devfile or a plugin. Overriding is done using + a strategic merge patch + items: + oneOf: + - required: + - exec + - required: + - apply + - required: + - vscodeTask + - required: + - vscodeLaunch + - required: + - composite + - required: + - custom + properties: + apply: + description: "Command that consists in applying + a given component definition, typically bound + to a workspace event. \n For example, when an + `apply` command is bound to a `preStart` event, + and references a `container` component, it will + start the container as a K8S initContainer in + the workspace POD, unless the component has + its `dedicatedPod` field set to `true`. \n When + no `apply` command exist for a given component, + it is assumed the component will be applied + at workspace start by default." + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + component: + description: Describes component that will + be applied + type: string + group: + description: Defines the group this command + is part of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. + type: string + label: + description: Optional label that provides + a label for this command to be used in Editor + UI menus for example + type: string + required: + - id + type: object + commandType: + description: Type of workspace command + enum: + - Exec + - Apply + - VscodeTask + - VscodeLaunch + - Composite + - Custom + type: string + composite: + description: Composite command that allows executing + several sub-commands either sequentially or + concurrently + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + commands: + description: The commands that comprise this + composite command + items: + type: string + type: array + group: + description: Defines the group this command + is part of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. + type: string + label: + description: Optional label that provides + a label for this command to be used in Editor + UI menus for example + type: string + parallel: + description: Indicates if the sub-commands + should be executed concurrently + type: boolean + required: + - id + type: object + custom: + description: Custom command whose logic is implementation-dependant + and should be provided by the user possibly + through some dedicated plugin + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + commandClass: + description: Class of command that the associated + implementation component should use to process + this command with the appropriate logic + type: string + embeddedResource: + description: Additional free-form configuration + for this custom command that the implementation + component will know how to use + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + group: + description: Defines the group this command + is part of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. + type: string + label: + description: Optional label that provides + a label for this command to be used in Editor + UI menus for example + type: string + required: + - commandClass + - embeddedResource + - id + type: object + exec: + description: CLI Command executed in an existing + component container + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + commandLine: + description: "The actual command-line string + \n Special variables that can be used: \n + \ - `$PROJECTS_ROOT`: A path where projects + sources are mounted \n - `$PROJECT_SOURCE`: + A path to a project source ($PROJECTS_ROOT/). + If there are multiple projects, this will + point to the directory of the first one." + type: string + component: + description: Describes component to which + given action relates + type: string + env: + description: Optional list of environment + variables that have to be set before running + the command + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + group: + description: Defines the group this command + is part of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + hotReloadCapable: + description: "Whether the command is capable + to reload itself when source code changes. + If set to `true` the command won't be restarted + and it is expected to handle file changes + on its own. \n Default value is `false`" + type: boolean + id: + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. + type: string + label: + description: Optional label that provides + a label for this command to be used in Editor + UI menus for example + type: string + workingDir: + description: "Working directory where the + command should be executed \n Special variables + that can be used: \n - `${PROJECTS_ROOT}`: + A path where projects sources are mounted + \n - `${PROJECT_SOURCE}`: A path to a project + source (${PROJECTS_ROOT}/). + If there are multiple projects, this will + point to the directory of the first one." + type: string + required: + - id + type: object + vscodeLaunch: + description: "Command providing the definition + of a VsCode launch action \n Deprecated; removed + in v1alpha2" + oneOf: + - required: + - uri + - required: + - inlined + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + group: + description: Defines the group this command + is part of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. + type: string + inlined: + description: Inlined content of the VsCode + configuration + type: string + locationType: + description: Type of Vscode configuration + command location + enum: + - Uri + - Inlined + type: string + uri: + description: Location as an absolute of relative + URI the VsCode configuration will be fetched + from + type: string + required: + - id + type: object + vscodeTask: + description: "Command providing the definition + of a VsCode Task \n Deprecated; removed in v1alpha2" + oneOf: + - required: + - uri + - required: + - inlined + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + group: + description: Defines the group this command + is part of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. + type: string + inlined: + description: Inlined content of the VsCode + configuration + type: string + locationType: + description: Type of Vscode configuration + command location + enum: + - Uri + - Inlined + type: string + uri: + description: Location as an absolute of relative + URI the VsCode configuration will be fetched + from + type: string + required: + - id + type: object + type: object + type: array + components: + description: Overrides of components encapsulated in + a plugin. Overriding is done using a strategic merge + patch. A plugin cannot override embedded plugin components. + items: + oneOf: + - required: + - container + - required: + - kubernetes + - required: + - openshift + - required: + - volume + properties: + componentType: + description: Type of component override for a + plugin + enum: + - Container + - Kubernetes + - Openshift + - Volume + type: string + container: + description: Configuration overriding for a Container + component in a plugin + properties: + args: + description: "The arguments to supply to the + command running the dockerimage component. + The arguments are supplied either to the + default command provided in the image or + to the overridden command. \n Defaults to + an empty array, meaning use whatever is + defined in the image." + items: + type: string + type: array + command: + description: "The command to run in the dockerimage + component instead of the default one provided + in the image. \n Defaults to an empty array, + meaning use whatever is defined in the image." + items: + type: string + type: array + dedicatedPod: + description: "Specify if a container should + run in its own separated pod, instead of + running as part of the main development + environment pod. \n Default value is `false`" + type: boolean + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant + string-based free-form attributes. + \n Examples of Che-specific attributes: + \n - cookiesAuthEnabled: \"true\" + / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint + should be exposed on the network. + \n - `public` means that the endpoint + will be exposed on the public network, + typically through a K8S ingress or + an OpenShift route. \n - `internal` + means that the endpoint will be exposed + internally outside of the main workspace + POD, typically by K8S services, to + be consumed by other elements running + on the same cloud internal network. + \n - `none` means that the endpoint + will not be exposed and will only + be accessible inside the main workspace + POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application + and transport protocols of the traffic + that will go through this endpoint. + \n - `http`: Endpoint will have `http` + traffic, typically on a TCP connection. + It will be automaticaly promoted to + `https` when the `secure` field is + set to `true`. \n - `https`: Endpoint + will have `https` traffic, typically + on a TCP connection. \n - `ws`: Endpoint + will have `ws` traffic, typically + on a TCP connection. It will be automaticaly + promoted to `wss` when the `secure` + field is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, + typically on a TCP connection. \n + - `tcp`: Endpoint will have traffic + on a TCP connection, without specifying + an application protocol. \n - `udp`: + Endpoint will have traffic on an UDP + connection, without specifying an + application protocol. \n Default value + is `http`" + type: string + secure: + description: Describes whether the endpoint + should be secured and protected by + some authentication process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + env: + description: Environment variables used in + this container + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + image: + type: string + memoryLimit: + type: string + mountSources: + type: boolean + name: + type: string + sourceMapping: + description: Optional specification of the + path in the container where project sources + should be transferred/mounted when `mountSources` + is `true`. When omitted, the value of the + `PROJECTS_ROOT` environment variable is + used. + type: string + volumeMounts: + description: List of volumes mounts that should + be mounted is this container. + items: + description: Volume that should be mounted + to a component container + properties: + name: + description: The volume mount name is + the name of an existing `Volume` component. + If several containers mount the same + volume name then they will reuse the + same volume and will be able to access + to the same files. + type: string + path: + description: The path in the component + container where the volume should + be mounted. If not path is mentioned, + default path is the is `/`. + type: string + required: + - name + type: object + type: array + required: + - name + type: object + kubernetes: + description: Configuration overriding for a Kubernetes + component in a plugin + oneOf: + - required: + - uri + - required: + - inlined + properties: + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant + string-based free-form attributes. + \n Examples of Che-specific attributes: + \n - cookiesAuthEnabled: \"true\" + / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint + should be exposed on the network. + \n - `public` means that the endpoint + will be exposed on the public network, + typically through a K8S ingress or + an OpenShift route. \n - `internal` + means that the endpoint will be exposed + internally outside of the main workspace + POD, typically by K8S services, to + be consumed by other elements running + on the same cloud internal network. + \n - `none` means that the endpoint + will not be exposed and will only + be accessible inside the main workspace + POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application + and transport protocols of the traffic + that will go through this endpoint. + \n - `http`: Endpoint will have `http` + traffic, typically on a TCP connection. + It will be automaticaly promoted to + `https` when the `secure` field is + set to `true`. \n - `https`: Endpoint + will have `https` traffic, typically + on a TCP connection. \n - `ws`: Endpoint + will have `ws` traffic, typically + on a TCP connection. It will be automaticaly + promoted to `wss` when the `secure` + field is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, + typically on a TCP connection. \n + - `tcp`: Endpoint will have traffic + on a TCP connection, without specifying + an application protocol. \n - `udp`: + Endpoint will have traffic on an UDP + connection, without specifying an + application protocol. \n Default value + is `http`" + type: string + secure: + description: Describes whether the endpoint + should be secured and protected by + some authentication process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + name: + description: Mandatory name that allows referencing + the component in commands, or inside a parent + type: string + uri: + description: Location in a file fetched from + a uri. + type: string + required: + - name + type: object + openshift: + description: Configuration overriding for an OpenShift + component in a plugin + oneOf: + - required: + - uri + - required: + - inlined + properties: + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant + string-based free-form attributes. + \n Examples of Che-specific attributes: + \n - cookiesAuthEnabled: \"true\" + / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint + should be exposed on the network. + \n - `public` means that the endpoint + will be exposed on the public network, + typically through a K8S ingress or + an OpenShift route. \n - `internal` + means that the endpoint will be exposed + internally outside of the main workspace + POD, typically by K8S services, to + be consumed by other elements running + on the same cloud internal network. + \n - `none` means that the endpoint + will not be exposed and will only + be accessible inside the main workspace + POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application + and transport protocols of the traffic + that will go through this endpoint. + \n - `http`: Endpoint will have `http` + traffic, typically on a TCP connection. + It will be automaticaly promoted to + `https` when the `secure` field is + set to `true`. \n - `https`: Endpoint + will have `https` traffic, typically + on a TCP connection. \n - `ws`: Endpoint + will have `ws` traffic, typically + on a TCP connection. It will be automaticaly + promoted to `wss` when the `secure` + field is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, + typically on a TCP connection. \n + - `tcp`: Endpoint will have traffic + on a TCP connection, without specifying + an application protocol. \n - `udp`: + Endpoint will have traffic on an UDP + connection, without specifying an + application protocol. \n Default value + is `http`" + type: string + secure: + description: Describes whether the endpoint + should be secured and protected by + some authentication process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + name: + description: Mandatory name that allows referencing + the component in commands, or inside a parent + type: string + uri: + description: Location in a file fetched from + a uri. + type: string + required: + - name + type: object + volume: + description: Configuration overriding for a Volume + component in a plugin + properties: + ephemeral: + description: Ephemeral volumes are not stored + persistently across restarts. Defaults to + false + type: boolean + name: + description: Mandatory name that allows referencing + the Volume component in Container volume + mounts or inside a parent + type: string + size: + description: Size of the volume + type: string + required: + - name + type: object + type: object + type: array + id: + description: Id in a registry that contains a Devfile + yaml file + type: string + importReferenceType: + description: type of location from where the referenced + template structure should be retrieved + enum: + - Uri + - Id + - Kubernetes + type: string + kubernetes: + description: Reference to a Kubernetes CRD of type DevWorkspaceTemplate + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object + name: + description: Optional name that allows referencing the + component in commands, or inside a parent If omitted + it will be infered from the location (uri or registryEntry) + type: string + registryUrl: + type: string + uri: + description: Uri of a Devfile yaml file + type: string + type: object + volume: + description: Allows specifying the definition of a volume + shared by several other components + properties: + ephemeral: + description: Ephemeral volumes are not stored persistently + across restarts. Defaults to false + type: boolean + name: + description: Mandatory name that allows referencing + the Volume component in Container volume mounts or + inside a parent + type: string + size: + description: Size of the volume + type: string + required: + - name + type: object + type: object + type: array + events: + description: Bindings of commands to events. Each command is referred-to + by its name. + properties: + postStart: + description: Names of commands that should be executed after + the workspace is completely started. In the case of Che-Theia, + these commands should be executed after all plugins and + extensions have started, including project cloning. This + means that those commands are not triggered until the user + opens the IDE in his browser. + items: + type: string + type: array + postStop: + description: Names of commands that should be executed after + stopping the workspace. + items: + type: string + type: array + preStart: + description: Names of commands that should be executed before + the workspace start. Kubernetes-wise, these commands would + typically be executed in init containers of the workspace + POD. + items: + type: string + type: array + preStop: + description: Names of commands that should be executed before + stopping the workspace. + items: + type: string + type: array + type: object + parent: + description: Parent workspace template + oneOf: + - required: + - uri + - required: + - id + - required: + - kubernetes + properties: + commands: + description: Overrides of commands encapsulated in a parent + devfile or a plugin. Overriding is done using a strategic + merge patch + items: + oneOf: + - required: + - exec + - required: + - apply + - required: + - vscodeTask + - required: + - vscodeLaunch + - required: + - composite + - required: + - custom + properties: + apply: + description: "Command that consists in applying a given + component definition, typically bound to a workspace + event. \n For example, when an `apply` command is + bound to a `preStart` event, and references a `container` + component, it will start the container as a K8S initContainer + in the workspace POD, unless the component has its + `dedicatedPod` field set to `true`. \n When no `apply` + command exist for a given component, it is assumed + the component will be applied at workspace start by + default." + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + component: + description: Describes component that will be applied + type: string + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command is part + of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + type: string + label: + description: Optional label that provides a label + for this command to be used in Editor UI menus + for example + type: string + required: + - id + type: object + commandType: + description: Type of workspace command + enum: + - Exec + - Apply + - VscodeTask + - VscodeLaunch + - Composite + - Custom + type: string + composite: + description: Composite command that allows executing + several sub-commands either sequentially or concurrently + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + commands: + description: The commands that comprise this composite + command + items: + type: string + type: array + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command is part + of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + type: string + label: + description: Optional label that provides a label + for this command to be used in Editor UI menus + for example + type: string + parallel: + description: Indicates if the sub-commands should + be executed concurrently + type: boolean + required: + - id + type: object + custom: + description: Custom command whose logic is implementation-dependant + and should be provided by the user possibly through + some dedicated plugin + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + commandClass: + description: Class of command that the associated + implementation component should use to process + this command with the appropriate logic + type: string + embeddedResource: + description: Additional free-form configuration + for this custom command that the implementation + component will know how to use + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command is part + of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + type: string + label: + description: Optional label that provides a label + for this command to be used in Editor UI menus + for example + type: string + required: + - commandClass + - embeddedResource + - id + type: object + exec: + description: CLI Command executed in an existing component + container + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + commandLine: + description: "The actual command-line string \n + Special variables that can be used: \n - `$PROJECTS_ROOT`: + A path where projects sources are mounted \n - + `$PROJECT_SOURCE`: A path to a project source + ($PROJECTS_ROOT/). If there are + multiple projects, this will point to the directory + of the first one." + type: string + component: + description: Describes component to which given + action relates + type: string + env: + description: Optional list of environment variables + that have to be set before running the command + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command is part + of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + hotReloadCapable: + description: "Whether the command is capable to + reload itself when source code changes. If set + to `true` the command won't be restarted and it + is expected to handle file changes on its own. + \n Default value is `false`" + type: boolean + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + type: string + label: + description: Optional label that provides a label + for this command to be used in Editor UI menus + for example + type: string + workingDir: + description: "Working directory where the command + should be executed \n Special variables that can + be used: \n - `${PROJECTS_ROOT}`: A path where + projects sources are mounted \n - `${PROJECT_SOURCE}`: + A path to a project source (${PROJECTS_ROOT}/). + If there are multiple projects, this will point + to the directory of the first one." + type: string + required: + - id + type: object + vscodeLaunch: + description: "Command providing the definition of a + VsCode launch action \n Deprecated; removed in v1alpha2" + oneOf: + - required: + - uri + - required: + - inlined + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command is part + of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + type: string + inlined: + description: Inlined content of the VsCode configuration + type: string + locationType: + description: Type of Vscode configuration command + location + enum: + - Uri + - Inlined + type: string + uri: + description: Location as an absolute of relative + URI the VsCode configuration will be fetched from + type: string + required: + - id + type: object + vscodeTask: + description: "Command providing the definition of a + VsCode Task \n Deprecated; removed in v1alpha2" + oneOf: + - required: + - uri + - required: + - inlined + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command is part + of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + type: string + inlined: + description: Inlined content of the VsCode configuration + type: string + locationType: + description: Type of Vscode configuration command + location + enum: + - Uri + - Inlined + type: string + uri: + description: Location as an absolute of relative + URI the VsCode configuration will be fetched from + type: string + required: + - id + type: object + type: object + type: array + components: + description: Overrides of components encapsulated in a parent + devfile. Overriding is done using a strategic merge patch + items: + oneOf: + - required: + - container + - required: + - kubernetes + - required: + - openshift + - required: + - volume + - required: + - plugin + - required: + - custom + properties: + componentType: + description: Type of component + enum: + - Container + - Kubernetes + - Openshift + - Volume + - Plugin + - Custom + type: string + container: + description: Allows adding and configuring workspace-related + containers + properties: + args: + description: "The arguments to supply to the command + running the dockerimage component. The arguments + are supplied either to the default command provided + in the image or to the overridden command. \n + Defaults to an empty array, meaning use whatever + is defined in the image." + items: + type: string + type: array + command: + description: "The command to run in the dockerimage + component instead of the default one provided + in the image. \n Defaults to an empty array, meaning + use whatever is defined in the image." + items: + type: string + type: array + dedicatedPod: + description: "Specify if a container should run + in its own separated pod, instead of running as + part of the main development environment pod. + \n Default value is `false`" + type: boolean + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant + string-based free-form attributes. \n Examples + of Che-specific attributes: \n - cookiesAuthEnabled: + \"true\" / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint should + be exposed on the network. \n - `public` + means that the endpoint will be exposed + on the public network, typically through + a K8S ingress or an OpenShift route. \n + - `internal` means that the endpoint will + be exposed internally outside of the main + workspace POD, typically by K8S services, + to be consumed by other elements running + on the same cloud internal network. \n - + `none` means that the endpoint will not + be exposed and will only be accessible inside + the main workspace POD, on a local address. + \n Default value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application and + transport protocols of the traffic that + will go through this endpoint. \n - `http`: + Endpoint will have `http` traffic, typically + on a TCP connection. It will be automaticaly + promoted to `https` when the `secure` field + is set to `true`. \n - `https`: Endpoint + will have `https` traffic, typically on + a TCP connection. \n - `ws`: Endpoint will + have `ws` traffic, typically on a TCP connection. + It will be automaticaly promoted to `wss` + when the `secure` field is set to `true`. + \n - `wss`: Endpoint will have `wss` traffic, + typically on a TCP connection. \n - `tcp`: + Endpoint will have traffic on a TCP connection, + without specifying an application protocol. + \n - `udp`: Endpoint will have traffic on + an UDP connection, without specifying an + application protocol. \n Default value is + `http`" + type: string + secure: + description: Describes whether the endpoint + should be secured and protected by some + authentication process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + env: + description: Environment variables used in this + container + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + image: + type: string + memoryLimit: + type: string + mountSources: + type: boolean + name: + type: string + sourceMapping: + description: Optional specification of the path + in the container where project sources should + be transferred/mounted when `mountSources` is + `true`. When omitted, the value of the `PROJECTS_ROOT` + environment variable is used. + type: string + volumeMounts: + description: List of volumes mounts that should + be mounted is this container. + items: + description: Volume that should be mounted to + a component container + properties: + name: + description: The volume mount name is the + name of an existing `Volume` component. + If several containers mount the same volume + name then they will reuse the same volume + and will be able to access to the same files. + type: string + path: + description: The path in the component container + where the volume should be mounted. If not + path is mentioned, default path is the is + `/`. + type: string + required: + - name + type: object + type: array + required: + - name + type: object + custom: + description: Custom component whose logic is implementation-dependant + and should be provided by the user possibly through + some dedicated controller + properties: + componentClass: + description: Class of component that the associated + implementation controller should use to process + this command with the appropriate logic + type: string + embeddedResource: + description: Additional free-form configuration + for this custom component that the implementation + controller will know how to use + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + name: + description: Mandatory name that allows referencing + the component in commands, or inside a parent + type: string + required: + - componentClass + - embeddedResource + - name + type: object + kubernetes: + description: Allows importing into the workspace the + Kubernetes resources defined in a given manifest. + For example this allows reusing the Kubernetes definitions + used to deploy some runtime components in production. + oneOf: + - required: + - uri + - required: + - inlined + properties: + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant + string-based free-form attributes. \n Examples + of Che-specific attributes: \n - cookiesAuthEnabled: + \"true\" / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint should + be exposed on the network. \n - `public` + means that the endpoint will be exposed + on the public network, typically through + a K8S ingress or an OpenShift route. \n + - `internal` means that the endpoint will + be exposed internally outside of the main + workspace POD, typically by K8S services, + to be consumed by other elements running + on the same cloud internal network. \n - + `none` means that the endpoint will not + be exposed and will only be accessible inside + the main workspace POD, on a local address. + \n Default value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application and + transport protocols of the traffic that + will go through this endpoint. \n - `http`: + Endpoint will have `http` traffic, typically + on a TCP connection. It will be automaticaly + promoted to `https` when the `secure` field + is set to `true`. \n - `https`: Endpoint + will have `https` traffic, typically on + a TCP connection. \n - `ws`: Endpoint will + have `ws` traffic, typically on a TCP connection. + It will be automaticaly promoted to `wss` + when the `secure` field is set to `true`. + \n - `wss`: Endpoint will have `wss` traffic, + typically on a TCP connection. \n - `tcp`: + Endpoint will have traffic on a TCP connection, + without specifying an application protocol. + \n - `udp`: Endpoint will have traffic on + an UDP connection, without specifying an + application protocol. \n Default value is + `http`" + type: string + secure: + description: Describes whether the endpoint + should be secured and protected by some + authentication process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + name: + description: Mandatory name that allows referencing + the component in commands, or inside a parent + type: string + uri: + description: Location in a file fetched from a uri. + type: string + required: + - name + type: object + openshift: + description: Allows importing into the workspace the + OpenShift resources defined in a given manifest. For + example this allows reusing the OpenShift definitions + used to deploy some runtime components in production. + oneOf: + - required: + - uri + - required: + - inlined + properties: + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant + string-based free-form attributes. \n Examples + of Che-specific attributes: \n - cookiesAuthEnabled: + \"true\" / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint should + be exposed on the network. \n - `public` + means that the endpoint will be exposed + on the public network, typically through + a K8S ingress or an OpenShift route. \n + - `internal` means that the endpoint will + be exposed internally outside of the main + workspace POD, typically by K8S services, + to be consumed by other elements running + on the same cloud internal network. \n - + `none` means that the endpoint will not + be exposed and will only be accessible inside + the main workspace POD, on a local address. + \n Default value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application and + transport protocols of the traffic that + will go through this endpoint. \n - `http`: + Endpoint will have `http` traffic, typically + on a TCP connection. It will be automaticaly + promoted to `https` when the `secure` field + is set to `true`. \n - `https`: Endpoint + will have `https` traffic, typically on + a TCP connection. \n - `ws`: Endpoint will + have `ws` traffic, typically on a TCP connection. + It will be automaticaly promoted to `wss` + when the `secure` field is set to `true`. + \n - `wss`: Endpoint will have `wss` traffic, + typically on a TCP connection. \n - `tcp`: + Endpoint will have traffic on a TCP connection, + without specifying an application protocol. + \n - `udp`: Endpoint will have traffic on + an UDP connection, without specifying an + application protocol. \n Default value is + `http`" + type: string + secure: + description: Describes whether the endpoint + should be secured and protected by some + authentication process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + name: + description: Mandatory name that allows referencing + the component in commands, or inside a parent + type: string + uri: + description: Location in a file fetched from a uri. + type: string + required: + - name + type: object + plugin: + description: "Allows importing a plugin. \n Plugins + are mainly imported devfiles that contribute components, + commands and events as a consistent single unit. They + are defined in either YAML files following the devfile + syntax, or as `DevWorkspaceTemplate` Kubernetes Custom + Resources" + oneOf: + - required: + - uri + - required: + - id + - required: + - kubernetes + properties: + commands: + description: Overrides of commands encapsulated + in a parent devfile or a plugin. Overriding is + done using a strategic merge patch + items: + oneOf: + - required: + - exec + - required: + - apply + - required: + - vscodeTask + - required: + - vscodeLaunch + - required: + - composite + - required: + - custom + properties: + apply: + description: "Command that consists in applying + a given component definition, typically + bound to a workspace event. \n For example, + when an `apply` command is bound to a `preStart` + event, and references a `container` component, + it will start the container as a K8S initContainer + in the workspace POD, unless the component + has its `dedicatedPod` field set to `true`. + \n When no `apply` command exist for a given + component, it is assumed the component will + be applied at workspace start by default." + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form + additional command attributes + type: object + component: + description: Describes component that + will be applied + type: string + group: + description: Defines the group this command + is part of + properties: + isDefault: + description: Identifies the default + command for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that + allows referencing this command in composite + commands, from a parent, or in events. + type: string + label: + description: Optional label that provides + a label for this command to be used + in Editor UI menus for example + type: string + required: + - id + type: object + commandType: + description: Type of workspace command + enum: + - Exec + - Apply + - VscodeTask + - VscodeLaunch + - Composite + - Custom + type: string + composite: + description: Composite command that allows + executing several sub-commands either sequentially + or concurrently + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form + additional command attributes + type: object + commands: + description: The commands that comprise + this composite command + items: + type: string + type: array + group: + description: Defines the group this command + is part of + properties: + isDefault: + description: Identifies the default + command for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that + allows referencing this command in composite + commands, from a parent, or in events. + type: string + label: + description: Optional label that provides + a label for this command to be used + in Editor UI menus for example + type: string + parallel: + description: Indicates if the sub-commands + should be executed concurrently + type: boolean + required: + - id + type: object + custom: + description: Custom command whose logic is + implementation-dependant and should be provided + by the user possibly through some dedicated + plugin + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form + additional command attributes + type: object + commandClass: + description: Class of command that the + associated implementation component + should use to process this command with + the appropriate logic + type: string + embeddedResource: + description: Additional free-form configuration + for this custom command that the implementation + component will know how to use + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + group: + description: Defines the group this command + is part of + properties: + isDefault: + description: Identifies the default + command for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that + allows referencing this command in composite + commands, from a parent, or in events. + type: string + label: + description: Optional label that provides + a label for this command to be used + in Editor UI menus for example + type: string + required: + - commandClass + - embeddedResource + - id + type: object + exec: + description: CLI Command executed in an existing + component container + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form + additional command attributes + type: object + commandLine: + description: "The actual command-line + string \n Special variables that can + be used: \n - `$PROJECTS_ROOT`: A path + where projects sources are mounted \n + \ - `$PROJECT_SOURCE`: A path to a project + source ($PROJECTS_ROOT/). + If there are multiple projects, this + will point to the directory of the first + one." + type: string + component: + description: Describes component to which + given action relates + type: string + env: + description: Optional list of environment + variables that have to be set before + running the command + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + group: + description: Defines the group this command + is part of + properties: + isDefault: + description: Identifies the default + command for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + hotReloadCapable: + description: "Whether the command is capable + to reload itself when source code changes. + If set to `true` the command won't be + restarted and it is expected to handle + file changes on its own. \n Default + value is `false`" + type: boolean + id: + description: Mandatory identifier that + allows referencing this command in composite + commands, from a parent, or in events. + type: string + label: + description: Optional label that provides + a label for this command to be used + in Editor UI menus for example + type: string + workingDir: + description: "Working directory where + the command should be executed \n Special + variables that can be used: \n - `${PROJECTS_ROOT}`: + A path where projects sources are mounted + \n - `${PROJECT_SOURCE}`: A path to + a project source (${PROJECTS_ROOT}/). + If there are multiple projects, this + will point to the directory of the first + one." + type: string + required: + - id + type: object + vscodeLaunch: + description: "Command providing the definition + of a VsCode launch action \n Deprecated; + removed in v1alpha2" + oneOf: + - required: + - uri + - required: + - inlined + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form + additional command attributes + type: object + group: + description: Defines the group this command + is part of + properties: + isDefault: + description: Identifies the default + command for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that + allows referencing this command in composite + commands, from a parent, or in events. + type: string + inlined: + description: Inlined content of the VsCode + configuration + type: string + locationType: + description: Type of Vscode configuration + command location + enum: + - Uri + - Inlined + type: string + uri: + description: Location as an absolute of + relative URI the VsCode configuration + will be fetched from + type: string + required: + - id + type: object + vscodeTask: + description: "Command providing the definition + of a VsCode Task \n Deprecated; removed + in v1alpha2" + oneOf: + - required: + - uri + - required: + - inlined + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form + additional command attributes + type: object + group: + description: Defines the group this command + is part of + properties: + isDefault: + description: Identifies the default + command for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that + allows referencing this command in composite + commands, from a parent, or in events. + type: string + inlined: + description: Inlined content of the VsCode + configuration + type: string + locationType: + description: Type of Vscode configuration + command location + enum: + - Uri + - Inlined + type: string + uri: + description: Location as an absolute of + relative URI the VsCode configuration + will be fetched from + type: string + required: + - id + type: object + type: object + type: array + components: + description: Overrides of components encapsulated + in a plugin. Overriding is done using a strategic + merge patch. A plugin cannot override embedded + plugin components. + items: + oneOf: + - required: + - container + - required: + - kubernetes + - required: + - openshift + - required: + - volume + properties: + componentType: + description: Type of component override for + a plugin + enum: + - Container + - Kubernetes + - Openshift + - Volume + type: string + container: + description: Configuration overriding for + a Container component in a plugin + properties: + args: + description: "The arguments to supply + to the command running the dockerimage + component. The arguments are supplied + either to the default command provided + in the image or to the overridden command. + \n Defaults to an empty array, meaning + use whatever is defined in the image." + items: + type: string + type: array + command: + description: "The command to run in the + dockerimage component instead of the + default one provided in the image. \n + Defaults to an empty array, meaning + use whatever is defined in the image." + items: + type: string + type: array + dedicatedPod: + description: "Specify if a container should + run in its own separated pod, instead + of running as part of the main development + environment pod. \n Default value is + `false`" + type: boolean + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant + string-based free-form attributes. + \n Examples of Che-specific attributes: + \n - cookiesAuthEnabled: \"true\" + / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the + endpoint should be exposed on + the network. \n - `public` means + that the endpoint will be exposed + on the public network, typically + through a K8S ingress or an OpenShift + route. \n - `internal` means that + the endpoint will be exposed internally + outside of the main workspace + POD, typically by K8S services, + to be consumed by other elements + running on the same cloud internal + network. \n - `none` means that + the endpoint will not be exposed + and will only be accessible inside + the main workspace POD, on a local + address. \n Default value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint + URL + type: string + protocol: + description: "Describes the application + and transport protocols of the + traffic that will go through this + endpoint. \n - `http`: Endpoint + will have `http` traffic, typically + on a TCP connection. It will be + automaticaly promoted to `https` + when the `secure` field is set + to `true`. \n - `https`: Endpoint + will have `https` traffic, typically + on a TCP connection. \n - `ws`: + Endpoint will have `ws` traffic, + typically on a TCP connection. + It will be automaticaly promoted + to `wss` when the `secure` field + is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, + typically on a TCP connection. + \n - `tcp`: Endpoint will have + traffic on a TCP connection, without + specifying an application protocol. + \n - `udp`: Endpoint will have + traffic on an UDP connection, + without specifying an application + protocol. \n Default value is + `http`" + type: string + secure: + description: Describes whether the + endpoint should be secured and + protected by some authentication + process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + env: + description: Environment variables used + in this container + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + image: + type: string + memoryLimit: + type: string + mountSources: + type: boolean + name: + type: string + sourceMapping: + description: Optional specification of + the path in the container where project + sources should be transferred/mounted + when `mountSources` is `true`. When + omitted, the value of the `PROJECTS_ROOT` + environment variable is used. + type: string + volumeMounts: + description: List of volumes mounts that + should be mounted is this container. + items: + description: Volume that should be mounted + to a component container + properties: + name: + description: The volume mount name + is the name of an existing `Volume` + component. If several containers + mount the same volume name then + they will reuse the same volume + and will be able to access to + the same files. + type: string + path: + description: The path in the component + container where the volume should + be mounted. If not path is mentioned, + default path is the is `/`. + type: string + required: + - name + type: object + type: array + required: + - name + type: object + kubernetes: + description: Configuration overriding for + a Kubernetes component in a plugin + oneOf: + - required: + - uri + - required: + - inlined + properties: + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant + string-based free-form attributes. + \n Examples of Che-specific attributes: + \n - cookiesAuthEnabled: \"true\" + / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the + endpoint should be exposed on + the network. \n - `public` means + that the endpoint will be exposed + on the public network, typically + through a K8S ingress or an OpenShift + route. \n - `internal` means that + the endpoint will be exposed internally + outside of the main workspace + POD, typically by K8S services, + to be consumed by other elements + running on the same cloud internal + network. \n - `none` means that + the endpoint will not be exposed + and will only be accessible inside + the main workspace POD, on a local + address. \n Default value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint + URL + type: string + protocol: + description: "Describes the application + and transport protocols of the + traffic that will go through this + endpoint. \n - `http`: Endpoint + will have `http` traffic, typically + on a TCP connection. It will be + automaticaly promoted to `https` + when the `secure` field is set + to `true`. \n - `https`: Endpoint + will have `https` traffic, typically + on a TCP connection. \n - `ws`: + Endpoint will have `ws` traffic, + typically on a TCP connection. + It will be automaticaly promoted + to `wss` when the `secure` field + is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, + typically on a TCP connection. + \n - `tcp`: Endpoint will have + traffic on a TCP connection, without + specifying an application protocol. + \n - `udp`: Endpoint will have + traffic on an UDP connection, + without specifying an application + protocol. \n Default value is + `http`" + type: string + secure: + description: Describes whether the + endpoint should be secured and + protected by some authentication + process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + name: + description: Mandatory name that allows + referencing the component in commands, + or inside a parent + type: string + uri: + description: Location in a file fetched + from a uri. + type: string + required: + - name + type: object + openshift: + description: Configuration overriding for + an OpenShift component in a plugin + oneOf: + - required: + - uri + - required: + - inlined + properties: + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant + string-based free-form attributes. + \n Examples of Che-specific attributes: + \n - cookiesAuthEnabled: \"true\" + / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the + endpoint should be exposed on + the network. \n - `public` means + that the endpoint will be exposed + on the public network, typically + through a K8S ingress or an OpenShift + route. \n - `internal` means that + the endpoint will be exposed internally + outside of the main workspace + POD, typically by K8S services, + to be consumed by other elements + running on the same cloud internal + network. \n - `none` means that + the endpoint will not be exposed + and will only be accessible inside + the main workspace POD, on a local + address. \n Default value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint + URL + type: string + protocol: + description: "Describes the application + and transport protocols of the + traffic that will go through this + endpoint. \n - `http`: Endpoint + will have `http` traffic, typically + on a TCP connection. It will be + automaticaly promoted to `https` + when the `secure` field is set + to `true`. \n - `https`: Endpoint + will have `https` traffic, typically + on a TCP connection. \n - `ws`: + Endpoint will have `ws` traffic, + typically on a TCP connection. + It will be automaticaly promoted + to `wss` when the `secure` field + is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, + typically on a TCP connection. + \n - `tcp`: Endpoint will have + traffic on a TCP connection, without + specifying an application protocol. + \n - `udp`: Endpoint will have + traffic on an UDP connection, + without specifying an application + protocol. \n Default value is + `http`" + type: string + secure: + description: Describes whether the + endpoint should be secured and + protected by some authentication + process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + name: + description: Mandatory name that allows + referencing the component in commands, + or inside a parent + type: string + uri: + description: Location in a file fetched + from a uri. + type: string + required: + - name + type: object + volume: + description: Configuration overriding for + a Volume component in a plugin + properties: + ephemeral: + description: Ephemeral volumes are not + stored persistently across restarts. + Defaults to false + type: boolean + name: + description: Mandatory name that allows + referencing the Volume component in + Container volume mounts or inside a + parent + type: string + size: + description: Size of the volume + type: string + required: + - name + type: object + type: object + type: array + id: + description: Id in a registry that contains a Devfile + yaml file + type: string + importReferenceType: + description: type of location from where the referenced + template structure should be retrieved + enum: + - Uri + - Id + - Kubernetes + type: string + kubernetes: + description: Reference to a Kubernetes CRD of type + DevWorkspaceTemplate + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object + name: + description: Optional name that allows referencing + the component in commands, or inside a parent + If omitted it will be infered from the location + (uri or registryEntry) + type: string + registryUrl: + type: string + uri: + description: Uri of a Devfile yaml file + type: string + type: object + volume: + description: Allows specifying the definition of a volume + shared by several other components + properties: + ephemeral: + description: Ephemeral volumes are not stored persistently + across restarts. Defaults to false + type: boolean + name: + description: Mandatory name that allows referencing + the Volume component in Container volume mounts + or inside a parent + type: string + size: + description: Size of the volume + type: string + required: + - name + type: object + type: object + type: array + id: + description: Id in a registry that contains a Devfile yaml + file + type: string + importReferenceType: + description: type of location from where the referenced template + structure should be retrieved + enum: + - Uri + - Id + - Kubernetes + type: string + kubernetes: + description: Reference to a Kubernetes CRD of type DevWorkspaceTemplate + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object + projects: + description: Overrides of projects encapsulated in a parent + devfile. Overriding is done using a strategic merge patch. + items: + oneOf: + - required: + - git + - required: + - github + - required: + - zip + - required: + - custom + properties: + clonePath: + description: Path relative to the root of the projects + to which this project should be cloned into. This + is a unix-style relative path (i.e. uses forward slashes). + The path is invalid if it is absolute or tries to + escape the project root through the usage of '..'. + If not specified, defaults to the project name. + type: string + custom: + description: Project's Custom source + properties: + embeddedResource: + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + projectSourceClass: + type: string + required: + - embeddedResource + - projectSourceClass + type: object + git: + description: Project's Git source + properties: + checkoutFrom: + description: Defines from what the project should + be checked out. Required if there are more than + one remote configured + properties: + remote: + description: The remote name should be used + as init. Required if there are more than one + remote configured + type: string + revision: + description: The revision to checkout from. + Should be branch name, tag or commit id. Default + branch is used if missing or specified revision + is not found. + type: string + type: object + remotes: + additionalProperties: + type: string + description: The remotes map which should be initialized + in the git project. Must have at least one remote + configured + type: object + sparseCheckoutDir: + description: Part of project to populate in the + working directory. + type: string + type: object + github: + description: Project's GitHub source + properties: + checkoutFrom: + description: Defines from what the project should + be checked out. Required if there are more than + one remote configured + properties: + remote: + description: The remote name should be used + as init. Required if there are more than one + remote configured + type: string + revision: + description: The revision to checkout from. + Should be branch name, tag or commit id. Default + branch is used if missing or specified revision + is not found. + type: string + type: object + remotes: + additionalProperties: + type: string + description: The remotes map which should be initialized + in the git project. Must have at least one remote + configured + type: object + sparseCheckoutDir: + description: Part of project to populate in the + working directory. + type: string + type: object + name: + description: Project name + type: string + sourceType: + description: Type of project source + enum: + - Git + - Github + - Zip + - Custom + type: string + zip: + description: Project's Zip source + properties: + location: + description: Zip project's source location address. + Should be file path of the archive, e.g. file://$FILE_PATH + type: string + sparseCheckoutDir: + description: Part of project to populate in the + working directory. + type: string + type: object + required: + - name + type: object + type: array + registryUrl: + type: string + starterProjects: + description: Overrides of starter projects encapsulated in + a parent devfile Overriding is done using a strategic merge + patch. + items: + oneOf: + - required: + - git + - required: + - github + - required: + - zip + - required: + - custom + properties: + clonePath: + description: Path relative to the root of the projects + to which this project should be cloned into. This + is a unix-style relative path (i.e. uses forward slashes). + The path is invalid if it is absolute or tries to + escape the project root through the usage of '..'. + If not specified, defaults to the project name. + type: string + custom: + description: Project's Custom source + properties: + embeddedResource: + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + projectSourceClass: + type: string + required: + - embeddedResource + - projectSourceClass + type: object + description: + description: Description of a starter project + type: string + git: + description: Project's Git source + properties: + checkoutFrom: + description: Defines from what the project should + be checked out. Required if there are more than + one remote configured + properties: + remote: + description: The remote name should be used + as init. Required if there are more than one + remote configured + type: string + revision: + description: The revision to checkout from. + Should be branch name, tag or commit id. Default + branch is used if missing or specified revision + is not found. + type: string + type: object + remotes: + additionalProperties: + type: string + description: The remotes map which should be initialized + in the git project. Must have at least one remote + configured + type: object + sparseCheckoutDir: + description: Part of project to populate in the + working directory. + type: string + type: object + github: + description: Project's GitHub source + properties: + checkoutFrom: + description: Defines from what the project should + be checked out. Required if there are more than + one remote configured + properties: + remote: + description: The remote name should be used + as init. Required if there are more than one + remote configured + type: string + revision: + description: The revision to checkout from. + Should be branch name, tag or commit id. Default + branch is used if missing or specified revision + is not found. + type: string + type: object + remotes: + additionalProperties: + type: string + description: The remotes map which should be initialized + in the git project. Must have at least one remote + configured + type: object + sparseCheckoutDir: + description: Part of project to populate in the + working directory. + type: string + type: object + name: + description: Project name + type: string + sourceType: + description: Type of project source + enum: + - Git + - Github + - Zip + - Custom + type: string + zip: + description: Project's Zip source + properties: + location: + description: Zip project's source location address. + Should be file path of the archive, e.g. file://$FILE_PATH + type: string + sparseCheckoutDir: + description: Part of project to populate in the + working directory. + type: string + type: object + required: + - name + type: object + type: array + uri: + description: Uri of a Devfile yaml file + type: string + type: object + projects: + description: Projects worked on in the workspace, containing names + and sources locations + items: + oneOf: + - required: + - git + - required: + - github + - required: + - zip + - required: + - custom + properties: + clonePath: + description: Path relative to the root of the projects to + which this project should be cloned into. This is a unix-style + relative path (i.e. uses forward slashes). The path is + invalid if it is absolute or tries to escape the project + root through the usage of '..'. If not specified, defaults + to the project name. + type: string + custom: + description: Project's Custom source + properties: + embeddedResource: + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + projectSourceClass: + type: string + required: + - embeddedResource + - projectSourceClass + type: object + git: + description: Project's Git source + properties: + checkoutFrom: + description: Defines from what the project should be + checked out. Required if there are more than one remote + configured + properties: + remote: + description: The remote name should be used as init. + Required if there are more than one remote configured + type: string + revision: + description: The revision to checkout from. Should + be branch name, tag or commit id. Default branch + is used if missing or specified revision is not + found. + type: string + type: object + remotes: + additionalProperties: + type: string + description: The remotes map which should be initialized + in the git project. Must have at least one remote + configured + type: object + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + github: + description: Project's GitHub source + properties: + checkoutFrom: + description: Defines from what the project should be + checked out. Required if there are more than one remote + configured + properties: + remote: + description: The remote name should be used as init. + Required if there are more than one remote configured + type: string + revision: + description: The revision to checkout from. Should + be branch name, tag or commit id. Default branch + is used if missing or specified revision is not + found. + type: string + type: object + remotes: + additionalProperties: + type: string + description: The remotes map which should be initialized + in the git project. Must have at least one remote + configured + type: object + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + name: + description: Project name + type: string + sourceType: + description: Type of project source + enum: + - Git + - Github + - Zip + - Custom + type: string + zip: + description: Project's Zip source + properties: + location: + description: Zip project's source location address. + Should be file path of the archive, e.g. file://$FILE_PATH + type: string + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + required: + - name + type: object + type: array + starterProjects: + description: StarterProjects is a project that can be used as + a starting point when bootstrapping new projects + items: + oneOf: + - required: + - git + - required: + - github + - required: + - zip + - required: + - custom + properties: + clonePath: + description: Path relative to the root of the projects to + which this project should be cloned into. This is a unix-style + relative path (i.e. uses forward slashes). The path is + invalid if it is absolute or tries to escape the project + root through the usage of '..'. If not specified, defaults + to the project name. + type: string + custom: + description: Project's Custom source + properties: + embeddedResource: + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + projectSourceClass: + type: string + required: + - embeddedResource + - projectSourceClass + type: object + description: + description: Description of a starter project + type: string + git: + description: Project's Git source + properties: + checkoutFrom: + description: Defines from what the project should be + checked out. Required if there are more than one remote + configured + properties: + remote: + description: The remote name should be used as init. + Required if there are more than one remote configured + type: string + revision: + description: The revision to checkout from. Should + be branch name, tag or commit id. Default branch + is used if missing or specified revision is not + found. + type: string + type: object + remotes: + additionalProperties: + type: string + description: The remotes map which should be initialized + in the git project. Must have at least one remote + configured + type: object + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + github: + description: Project's GitHub source + properties: + checkoutFrom: + description: Defines from what the project should be + checked out. Required if there are more than one remote + configured + properties: + remote: + description: The remote name should be used as init. + Required if there are more than one remote configured + type: string + revision: + description: The revision to checkout from. Should + be branch name, tag or commit id. Default branch + is used if missing or specified revision is not + found. + type: string + type: object + remotes: + additionalProperties: + type: string + description: The remotes map which should be initialized + in the git project. Must have at least one remote + configured + type: object + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + name: + description: Project name + type: string + sourceType: + description: Type of project source + enum: + - Git + - Github + - Zip + - Custom + type: string + zip: + description: Project's Zip source + properties: + location: + description: Zip project's source location address. + Should be file path of the archive, e.g. file://$FILE_PATH + type: string + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + required: + - name + type: object + type: array + type: object + required: + - started + type: object + status: + description: DevWorkspaceStatus defines the observed state of DevWorkspace + properties: + conditions: + description: Conditions represent the latest available observations + of an object's state + items: + description: WorkspaceCondition contains details for the current + condition of this workspace. + properties: + lastTransitionTime: + description: Last time the condition transitioned from one status + to another. + format: date-time + type: string + message: + description: Human-readable message indicating details about + last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's + last transition. + type: string + status: + description: Phase is the status of the condition. Can be True, + False, Unknown. + type: string + type: + description: Type is the type of the condition. + type: string + required: + - status + - type + type: object + type: array + ideUrl: + description: URL at which the Worksace Editor can be joined + type: string + message: + description: Message is a short user-readable message giving additional + information about an object's state + type: string + phase: + type: string + workspaceId: + description: Id of the workspace + type: string + required: + - workspaceId + type: object + type: object + served: false + storage: false + subresources: + status: {} - additionalPrinterColumns: - description: The devworkspace's unique id jsonPath: .status.devworkspaceId diff --git a/crds/workspace.devfile.io_devworkspacetemplates.v1beta1.yaml b/crds/workspace.devfile.io_devworkspacetemplates.v1beta1.yaml index d3b017f0d..4a6609e0a 100644 --- a/crds/workspace.devfile.io_devworkspacetemplates.v1beta1.yaml +++ b/crds/workspace.devfile.io_devworkspacetemplates.v1beta1.yaml @@ -16,3738 +16,7669 @@ spec: singular: devworkspacetemplate preserveUnknownFields: false scope: Namespaced - validation: - openAPIV3Schema: - description: DevWorkspaceTemplate is the Schema for the devworkspacetemplates - API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: Structure of the devworkspace. This is also the specification - of a devworkspace template. - properties: - attributes: - description: Map of implementation-dependant free-form YAML attributes. - type: object - x-kubernetes-preserve-unknown-fields: true - commands: - description: Predefined, ready-to-use, devworkspace-related commands - items: - oneOf: - - required: - - exec - - required: - - apply - - required: - - composite - - required: - - custom - properties: - apply: - description: "Command that consists in applying a given component - definition, typically bound to a devworkspace event. \n For - example, when an `apply` command is bound to a `preStart` event, - and references a `container` component, it will start the container - as a K8S initContainer in the devworkspace POD, unless the component - has its `dedicatedPod` field set to `true`. \n When no `apply` - command exist for a given component, it is assumed the component - will be applied at devworkspace start by default, unless `deployByDefault` - for that component is set to false." - properties: - component: - description: Describes component that will be applied - type: string - group: - description: Defines the group this command is part of - properties: - isDefault: - description: Identifies the default command for a given - group kind - type: boolean - kind: - description: Kind of group the command is part of - enum: - - build - - run - - test - - debug - - deploy - type: string - required: - - kind - type: object - label: - description: Optional label that provides a label for this - command to be used in Editor UI menus for example - type: string - required: - - component - type: object - attributes: - description: Map of implementation-dependant free-form YAML attributes. - type: object - x-kubernetes-preserve-unknown-fields: true - commandType: - description: Type of devworkspace command - enum: - - Exec - - Apply - - Composite - - Custom - type: string - composite: - description: Composite command that allows executing several sub-commands - either sequentially or concurrently - properties: - commands: - description: The commands that comprise this composite command - items: - type: string - type: array - group: - description: Defines the group this command is part of - properties: - isDefault: - description: Identifies the default command for a given - group kind - type: boolean - kind: - description: Kind of group the command is part of - enum: - - build - - run - - test - - debug - - deploy - type: string - required: - - kind - type: object - label: - description: Optional label that provides a label for this - command to be used in Editor UI menus for example - type: string - parallel: - description: Indicates if the sub-commands should be executed - concurrently - type: boolean - type: object - custom: - description: Custom command whose logic is implementation-dependant - and should be provided by the user possibly through some dedicated - plugin - properties: - commandClass: - description: Class of command that the associated implementation - component should use to process this command with the appropriate - logic - type: string - embeddedResource: - description: Additional free-form configuration for this custom - command that the implementation component will know how - to use - type: object - x-kubernetes-embedded-resource: true - x-kubernetes-preserve-unknown-fields: true - group: - description: Defines the group this command is part of - properties: - isDefault: - description: Identifies the default command for a given - group kind - type: boolean - kind: - description: Kind of group the command is part of - enum: - - build - - run - - test - - debug - - deploy + version: v1alpha1 + versions: + - deprecated: true + name: v1alpha1 + schema: + openAPIV3Schema: + description: DevWorkspaceTemplate is the Schema for the devworkspacetemplates + API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: Structure of the workspace. This is also the specification + of a workspace template. + properties: + commands: + description: Predefined, ready-to-use, workspace-related commands + items: + oneOf: + - required: + - exec + - required: + - apply + - required: + - vscodeTask + - required: + - vscodeLaunch + - required: + - composite + - required: + - custom + properties: + apply: + description: "Command that consists in applying a given component + definition, typically bound to a workspace event. \n For example, + when an `apply` command is bound to a `preStart` event, and + references a `container` component, it will start the container + as a K8S initContainer in the workspace POD, unless the component + has its `dedicatedPod` field set to `true`. \n When no `apply` + command exist for a given component, it is assumed the component + will be applied at workspace start by default." + properties: + attributes: + additionalProperties: type: string - required: - - kind - type: object - label: - description: Optional label that provides a label for this - command to be used in Editor UI menus for example - type: string - required: - - commandClass - - embeddedResource - type: object - exec: - description: CLI Command executed in an existing component container - properties: - commandLine: - description: "The actual command-line string \n Special variables - that can be used: \n - `$PROJECTS_ROOT`: A path where projects - sources are mounted as defined by container component's - sourceMapping. \n - `$PROJECT_SOURCE`: A path to a project - source ($PROJECTS_ROOT/). If there are multiple - projects, this will point to the directory of the first - one." - type: string - component: - description: Describes component to which given action relates - type: string - env: - description: Optional list of environment variables that have - to be set before running the command - items: + description: Optional map of free-form additional command + attributes + type: object + component: + description: Describes component that will be applied + type: string + group: + description: Defines the group this command is part of properties: - name: - type: string - value: + isDefault: + description: Identifies the default command for a given + group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug type: string required: - - name - - value - type: object - type: array - group: - description: Defines the group this command is part of - properties: - isDefault: - description: Identifies the default command for a given - group kind - type: boolean - kind: - description: Kind of group the command is part of - enum: - - build - - run - - test - - debug - - deploy + - kind + type: object + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, or + in events. + type: string + label: + description: Optional label that provides a label for this + command to be used in Editor UI menus for example + type: string + required: + - id + type: object + commandType: + description: Type of workspace command + enum: + - Exec + - Apply + - VscodeTask + - VscodeLaunch + - Composite + - Custom + type: string + composite: + description: Composite command that allows executing several + sub-commands either sequentially or concurrently + properties: + attributes: + additionalProperties: type: string - required: - - kind - type: object - hotReloadCapable: - description: "Whether the command is capable to reload itself - when source code changes. If set to `true` the command won't - be restarted and it is expected to handle file changes on - its own. \n Default value is `false`" - type: boolean - label: - description: Optional label that provides a label for this - command to be used in Editor UI menus for example - type: string - workingDir: - description: "Working directory where the command should be - executed \n Special variables that can be used: \n - `$PROJECTS_ROOT`: - A path where projects sources are mounted as defined by - container component's sourceMapping. \n - `$PROJECT_SOURCE`: - A path to a project source ($PROJECTS_ROOT/). - If there are multiple projects, this will point to the directory - of the first one." - type: string - required: - - commandLine - - component - type: object - id: - description: Mandatory identifier that allows referencing this - command in composite commands, from a parent, or in events. - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - required: - - id - type: object - type: array - components: - description: List of the devworkspace components, such as editor and - plugins, user-provided containers, or other types of components - items: - oneOf: - - required: - - container - - required: - - kubernetes - - required: - - openshift - - required: - - volume - - required: - - image - - required: - - plugin - - required: - - custom - properties: - attributes: - description: Map of implementation-dependant free-form YAML attributes. - type: object - x-kubernetes-preserve-unknown-fields: true - componentType: - description: Type of component - enum: - - Container - - Kubernetes - - Openshift - - Volume - - Image - - Plugin - - Custom - type: string - container: - description: Allows adding and configuring devworkspace-related - containers - properties: - annotation: - description: Annotations that should be added to specific - resources for this container - properties: - deployment: - additionalProperties: - type: string - description: Annotations to be added to deployment - type: object - service: - additionalProperties: - type: string - description: Annotations to be added to service - type: object - type: object - args: - description: "The arguments to supply to the command running - the dockerimage component. The arguments are supplied either - to the default command provided in the image or to the overridden - command. \n Defaults to an empty array, meaning use whatever - is defined in the image." - items: - type: string - type: array - command: - description: "The command to run in the dockerimage component - instead of the default one provided in the image. \n Defaults - to an empty array, meaning use whatever is defined in the - image." - items: - type: string - type: array - cpuLimit: - type: string - cpuRequest: - type: string - dedicatedPod: - description: "Specify if a container should run in its own - separated pod, instead of running as part of the main development - environment pod. \n Default value is `false`" - type: boolean - endpoints: - items: + description: Optional map of free-form additional command + attributes + type: object + commands: + description: The commands that comprise this composite command + items: + type: string + type: array + group: + description: Defines the group this command is part of properties: - annotation: - additionalProperties: - type: string - description: Annotations to be added to Kubernetes Ingress - or Openshift Route - type: object - attributes: - description: "Map of implementation-dependant string-based - free-form attributes. \n Examples of Che-specific - attributes: \n - cookiesAuthEnabled: \"true\" / \"false\", - \n - type: \"terminal\" / \"ide\" / \"ide-dev\"," - type: object - x-kubernetes-preserve-unknown-fields: true - exposure: - description: "Describes how the endpoint should be exposed - on the network. \n - `public` means that the endpoint - will be exposed on the public network, typically through - a K8S ingress or an OpenShift route. \n - `internal` - means that the endpoint will be exposed internally - outside of the main devworkspace POD, typically by - K8S services, to be consumed by other elements running - on the same cloud internal network. \n - `none` means - that the endpoint will not be exposed and will only - be accessible inside the main devworkspace POD, on - a local address. \n Default value is `public`" - enum: - - public - - internal - - none - type: string - name: - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - path: - description: Path of the endpoint URL - type: string - protocol: - description: "Describes the application and transport - protocols of the traffic that will go through this - endpoint. \n - `http`: Endpoint will have `http` traffic, - typically on a TCP connection. It will be automaticaly - promoted to `https` when the `secure` field is set - to `true`. \n - `https`: Endpoint will have `https` - traffic, typically on a TCP connection. \n - `ws`: - Endpoint will have `ws` traffic, typically on a TCP - connection. It will be automaticaly promoted to `wss` - when the `secure` field is set to `true`. \n - `wss`: - Endpoint will have `wss` traffic, typically on a TCP - connection. \n - `tcp`: Endpoint will have traffic - on a TCP connection, without specifying an application - protocol. \n - `udp`: Endpoint will have traffic on - an UDP connection, without specifying an application - protocol. \n Default value is `http`" - enum: - - http - - https - - ws - - wss - - tcp - - udp - type: string - secure: - description: Describes whether the endpoint should be - secured and protected by some authentication process. - This requires a protocol of `https` or `wss`. + isDefault: + description: Identifies the default command for a given + group kind type: boolean - targetPort: - description: The port number should be unique. - type: integer - required: - - name - - targetPort - type: object - type: array - env: - description: "Environment variables used in this container. - \n The following variables are reserved and cannot be overridden - via env: \n - `$PROJECTS_ROOT` \n - `$PROJECT_SOURCE`" - items: - properties: - name: - type: string - value: + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug type: string required: - - name - - value + - kind type: object - type: array - image: - type: string - memoryLimit: - type: string - memoryRequest: - type: string - mountSources: - description: "Toggles whether or not the project source code - should be mounted in the component. \n Defaults to true - for all component types except plugins and components that - set `dedicatedPod` to true." - type: boolean - sourceMapping: - description: Optional specification of the path in the container - where project sources should be transferred/mounted when - `mountSources` is `true`. When omitted, the default value - of /projects is used. - type: string - volumeMounts: - description: List of volumes mounts that should be mounted - is this container. - items: - description: Volume that should be mounted to a component - container + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, or + in events. + type: string + label: + description: Optional label that provides a label for this + command to be used in Editor UI menus for example + type: string + parallel: + description: Indicates if the sub-commands should be executed + concurrently + type: boolean + required: + - id + type: object + custom: + description: Custom command whose logic is implementation-dependant + and should be provided by the user possibly through some dedicated + plugin + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional command + attributes + type: object + commandClass: + description: Class of command that the associated implementation + component should use to process this command with the + appropriate logic + type: string + embeddedResource: + description: Additional free-form configuration for this + custom command that the implementation component will + know how to use + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + group: + description: Defines the group this command is part of properties: - name: - description: The volume mount name is the name of an - existing `Volume` component. If several containers - mount the same volume name then they will reuse the - same volume and will be able to access to the same - files. - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - path: - description: The path in the component container where - the volume should be mounted. If not path is mentioned, - default path is the is `/`. + isDefault: + description: Identifies the default command for a given + group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug type: string required: - - name + - kind type: object - type: array - required: - - image - type: object - custom: - description: Custom component whose logic is implementation-dependant - and should be provided by the user possibly through some dedicated - controller - properties: - componentClass: - description: Class of component that the associated implementation - controller should use to process this command with the appropriate - logic - type: string - embeddedResource: - description: Additional free-form configuration for this custom - component that the implementation controller will know how - to use - type: object - x-kubernetes-embedded-resource: true - x-kubernetes-preserve-unknown-fields: true - required: - - componentClass - - embeddedResource - type: object - image: - description: Allows specifying the definition of an image for - outer loop builds - oneOf: - - required: - - dockerfile - properties: - autoBuild: - description: "Defines if the image should be built during - startup. \n Default value is `false`" - type: boolean - dockerfile: - description: Allows specifying dockerfile type build - oneOf: - - required: - - uri - - required: - - devfileRegistry - - required: - - git - properties: - args: - description: The arguments to supply to the dockerfile - build. - items: - type: string - type: array - buildContext: - description: Path of source directory to establish build - context. Defaults to ${PROJECT_ROOT} in the container + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, or + in events. + type: string + label: + description: Optional label that provides a label for this + command to be used in Editor UI menus for example + type: string + required: + - commandClass + - embeddedResource + - id + type: object + exec: + description: CLI Command executed in an existing component container + properties: + attributes: + additionalProperties: type: string - devfileRegistry: - description: Dockerfile's Devfile Registry source + description: Optional map of free-form additional command + attributes + type: object + commandLine: + description: "The actual command-line string \n Special + variables that can be used: \n - `$PROJECTS_ROOT`: A + path where projects sources are mounted \n - `$PROJECT_SOURCE`: + A path to a project source ($PROJECTS_ROOT/). + If there are multiple projects, this will point to the + directory of the first one." + type: string + component: + description: Describes component to which given action relates + type: string + env: + description: Optional list of environment variables that + have to be set before running the command + items: properties: - id: - description: Id in a devfile registry that contains - a Dockerfile. The src in the OCI registry required - for the Dockerfile build will be downloaded for - building the image. - type: string - registryUrl: - description: Devfile Registry URL to pull the Dockerfile - from when using the Devfile Registry as Dockerfile - src. To ensure the Dockerfile gets resolved consistently - in different environments, it is recommended to - always specify the `devfileRegistryUrl` when `Id` - is used. + name: type: string - required: - - id - type: object - git: - description: Dockerfile's Git source - properties: - checkoutFrom: - description: Defines from what the project should - be checked out. Required if there are more than - one remote configured - properties: - remote: - description: The remote name should be used as - init. Required if there are more than one remote - configured - type: string - revision: - description: The revision to checkout from. Should - be branch name, tag or commit id. Default branch - is used if missing or specified revision is - not found. - type: string - type: object - fileLocation: - description: Location of the Dockerfile in the Git - repository when using git as Dockerfile src. Defaults - to Dockerfile. + value: type: string - remotes: - additionalProperties: - type: string - description: The remotes map which should be initialized - in the git project. Projects must have at least - one remote configured while StarterProjects & Image - Component's Git source can only have at most one - remote configured. - type: object required: - - remotes + - name + - value type: object - rootRequired: - description: "Specify if a privileged builder pod is required. - \n Default value is `false`" - type: boolean - srcType: - description: Type of Dockerfile src - enum: - - Uri - - DevfileRegistry - - Git - type: string - uri: - description: URI Reference of a Dockerfile. It can be - a full URL or a relative URI from the current devfile - as the base URI. - type: string - type: object - imageName: - description: Name of the image for the resulting outerloop - build - type: string - imageType: - description: Type of image - enum: - - Dockerfile - type: string - required: - - imageName - type: object - kubernetes: - description: Allows importing into the devworkspace the Kubernetes - resources defined in a given manifest. For example this allows - reusing the Kubernetes definitions used to deploy some runtime - components in production. - oneOf: - - required: - - uri - - required: - - inlined - properties: - deployByDefault: - description: "Defines if the component should be deployed - during startup. \n Default value is `false`" - type: boolean - endpoints: - items: + type: array + group: + description: Defines the group this command is part of properties: - annotation: - additionalProperties: - type: string - description: Annotations to be added to Kubernetes Ingress - or Openshift Route - type: object - attributes: - description: "Map of implementation-dependant string-based - free-form attributes. \n Examples of Che-specific - attributes: \n - cookiesAuthEnabled: \"true\" / \"false\", - \n - type: \"terminal\" / \"ide\" / \"ide-dev\"," - type: object - x-kubernetes-preserve-unknown-fields: true - exposure: - description: "Describes how the endpoint should be exposed - on the network. \n - `public` means that the endpoint - will be exposed on the public network, typically through - a K8S ingress or an OpenShift route. \n - `internal` - means that the endpoint will be exposed internally - outside of the main devworkspace POD, typically by - K8S services, to be consumed by other elements running - on the same cloud internal network. \n - `none` means - that the endpoint will not be exposed and will only - be accessible inside the main devworkspace POD, on - a local address. \n Default value is `public`" + isDefault: + description: Identifies the default command for a given + group kind + type: boolean + kind: + description: Kind of group the command is part of enum: - - public - - internal - - none + - build + - run + - test + - debug type: string - name: - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - path: - description: Path of the endpoint URL - type: string - protocol: - description: "Describes the application and transport - protocols of the traffic that will go through this - endpoint. \n - `http`: Endpoint will have `http` traffic, - typically on a TCP connection. It will be automaticaly - promoted to `https` when the `secure` field is set - to `true`. \n - `https`: Endpoint will have `https` - traffic, typically on a TCP connection. \n - `ws`: - Endpoint will have `ws` traffic, typically on a TCP - connection. It will be automaticaly promoted to `wss` - when the `secure` field is set to `true`. \n - `wss`: - Endpoint will have `wss` traffic, typically on a TCP - connection. \n - `tcp`: Endpoint will have traffic - on a TCP connection, without specifying an application - protocol. \n - `udp`: Endpoint will have traffic on - an UDP connection, without specifying an application - protocol. \n Default value is `http`" - enum: - - http - - https - - ws - - wss - - tcp - - udp - type: string - secure: - description: Describes whether the endpoint should be - secured and protected by some authentication process. - This requires a protocol of `https` or `wss`. - type: boolean - targetPort: - description: The port number should be unique. - type: integer required: - - name - - targetPort + - kind type: object - type: array - inlined: - description: Inlined manifest - type: string - locationType: - description: Type of Kubernetes-like location - enum: - - Uri - - Inlined - type: string - uri: - description: Location in a file fetched from a uri. - type: string - type: object - name: - description: 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. - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - openshift: - description: Allows importing into the devworkspace the OpenShift - resources defined in a given manifest. For example this allows - reusing the OpenShift definitions used to deploy some runtime - components in production. - oneOf: - - required: - - uri - - required: - - inlined - properties: - deployByDefault: - description: "Defines if the component should be deployed - during startup. \n Default value is `false`" - type: boolean - endpoints: - items: + hotReloadCapable: + description: "Whether the command is capable to reload itself + when source code changes. If set to `true` the command + won't be restarted and it is expected to handle file changes + on its own. \n Default value is `false`" + type: boolean + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, or + in events. + type: string + label: + description: Optional label that provides a label for this + command to be used in Editor UI menus for example + type: string + workingDir: + description: "Working directory where the command should + be executed \n Special variables that can be used: \n + \ - `${PROJECTS_ROOT}`: A path where projects sources + are mounted \n - `${PROJECT_SOURCE}`: A path to a project + source (${PROJECTS_ROOT}/). If there are + multiple projects, this will point to the directory of + the first one." + type: string + required: + - id + type: object + vscodeLaunch: + description: "Command providing the definition of a VsCode launch + action \n Deprecated; removed in v1alpha2" + oneOf: + - required: + - uri + - required: + - inlined + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional command + attributes + type: object + group: + description: Defines the group this command is part of properties: - annotation: - additionalProperties: - type: string - description: Annotations to be added to Kubernetes Ingress - or Openshift Route - type: object - attributes: - description: "Map of implementation-dependant string-based - free-form attributes. \n Examples of Che-specific - attributes: \n - cookiesAuthEnabled: \"true\" / \"false\", - \n - type: \"terminal\" / \"ide\" / \"ide-dev\"," - type: object - x-kubernetes-preserve-unknown-fields: true - exposure: - description: "Describes how the endpoint should be exposed - on the network. \n - `public` means that the endpoint - will be exposed on the public network, typically through - a K8S ingress or an OpenShift route. \n - `internal` - means that the endpoint will be exposed internally - outside of the main devworkspace POD, typically by - K8S services, to be consumed by other elements running - on the same cloud internal network. \n - `none` means - that the endpoint will not be exposed and will only - be accessible inside the main devworkspace POD, on - a local address. \n Default value is `public`" + isDefault: + description: Identifies the default command for a given + group kind + type: boolean + kind: + description: Kind of group the command is part of enum: - - public - - internal - - none + - build + - run + - test + - debug type: string - name: - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - path: - description: Path of the endpoint URL - type: string - protocol: - description: "Describes the application and transport - protocols of the traffic that will go through this - endpoint. \n - `http`: Endpoint will have `http` traffic, - typically on a TCP connection. It will be automaticaly - promoted to `https` when the `secure` field is set - to `true`. \n - `https`: Endpoint will have `https` - traffic, typically on a TCP connection. \n - `ws`: - Endpoint will have `ws` traffic, typically on a TCP - connection. It will be automaticaly promoted to `wss` - when the `secure` field is set to `true`. \n - `wss`: - Endpoint will have `wss` traffic, typically on a TCP - connection. \n - `tcp`: Endpoint will have traffic - on a TCP connection, without specifying an application - protocol. \n - `udp`: Endpoint will have traffic on - an UDP connection, without specifying an application - protocol. \n Default value is `http`" - enum: - - http - - https - - ws - - wss - - tcp - - udp - type: string - secure: - description: Describes whether the endpoint should be - secured and protected by some authentication process. - This requires a protocol of `https` or `wss`. - type: boolean - targetPort: - description: The port number should be unique. - type: integer required: - - name - - targetPort + - kind type: object - type: array - inlined: - description: Inlined manifest - type: string - locationType: - description: Type of Kubernetes-like location - enum: - - Uri - - Inlined - type: string - uri: - description: Location in a file fetched from a uri. - type: string - type: object - plugin: - description: "Allows importing a plugin. \n Plugins are mainly - imported devfiles that contribute components, commands and events - as a consistent single unit. They are defined in either YAML - files following the devfile syntax, or as `DevWorkspaceTemplate` - Kubernetes Custom Resources" - oneOf: - - required: - - uri - - required: + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, or + in events. + type: string + inlined: + description: Inlined content of the VsCode configuration + type: string + locationType: + description: Type of Vscode configuration command location + enum: + - Uri + - Inlined + type: string + uri: + description: Location as an absolute of relative URI the + VsCode configuration will be fetched from + type: string + required: - id - - required: - - kubernetes - properties: - commands: - description: Overrides of commands encapsulated in a parent - devfile or a plugin. Overriding is done according to K8S - strategic merge patch standard rules. - items: - oneOf: - - required: - - exec - - required: - - apply - - required: - - composite + type: object + vscodeTask: + description: "Command providing the definition of a VsCode Task + \n Deprecated; removed in v1alpha2" + oneOf: + - required: + - uri + - required: + - inlined + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional command + attributes + type: object + group: + description: Defines the group this command is part of properties: - apply: - description: "Command that consists in applying a given - component definition, typically bound to a devworkspace - event. \n For example, when an `apply` command is - bound to a `preStart` event, and references a `container` - component, it will start the container as a K8S initContainer - in the devworkspace POD, unless the component has - its `dedicatedPod` field set to `true`. \n When no - `apply` command exist for a given component, it is - assumed the component will be applied at devworkspace - start by default, unless `deployByDefault` for that - component is set to false." - properties: - component: - description: Describes component that will be applied - type: string - group: - description: Defines the group this command is part - of - properties: - isDefault: - description: Identifies the default command - for a given group kind - type: boolean - kind: - description: Kind of group the command is part - of - enum: - - build - - run - - test - - debug - - deploy - type: string - type: object - label: - description: Optional label that provides a label - for this command to be used in Editor UI menus - for example - type: string - type: object - attributes: - description: Map of implementation-dependant free-form - YAML attributes. - type: object - x-kubernetes-preserve-unknown-fields: true - commandType: - description: Type of devworkspace command + isDefault: + description: Identifies the default command for a given + group kind + type: boolean + kind: + description: Kind of group the command is part of enum: - - Exec - - Apply - - Composite - type: string - composite: - description: Composite command that allows executing - several sub-commands either sequentially or concurrently - properties: - commands: - description: The commands that comprise this composite - command - items: - type: string - type: array - group: - description: Defines the group this command is part - of - properties: - isDefault: - description: Identifies the default command - for a given group kind - type: boolean - kind: - description: Kind of group the command is part - of - enum: - - build - - run - - test - - debug - - deploy - type: string - type: object - label: - description: Optional label that provides a label - for this command to be used in Editor UI menus - for example - type: string - parallel: - description: Indicates if the sub-commands should - be executed concurrently - type: boolean - type: object - exec: - description: CLI Command executed in an existing component - container - properties: - commandLine: - description: "The actual command-line string \n - Special variables that can be used: \n - `$PROJECTS_ROOT`: - A path where projects sources are mounted as defined - by container component's sourceMapping. \n - - `$PROJECT_SOURCE`: A path to a project source - ($PROJECTS_ROOT/). If there are - multiple projects, this will point to the directory - of the first one." - type: string - component: - description: Describes component to which given - action relates - type: string - env: - description: Optional list of environment variables - that have to be set before running the command - items: - properties: - name: - type: string - value: - type: string - required: - - name - type: object - type: array - group: - description: Defines the group this command is part - of - properties: - isDefault: - description: Identifies the default command - for a given group kind - type: boolean - kind: - description: Kind of group the command is part - of - enum: - - build - - run - - test - - debug - - deploy - type: string - type: object - hotReloadCapable: - description: "Whether the command is capable to - reload itself when source code changes. If set - to `true` the command won't be restarted and it - is expected to handle file changes on its own. - \n Default value is `false`" - type: boolean - label: - description: Optional label that provides a label - for this command to be used in Editor UI menus - for example - type: string - workingDir: - description: "Working directory where the command - should be executed \n Special variables that can - be used: \n - `$PROJECTS_ROOT`: A path where - projects sources are mounted as defined by container - component's sourceMapping. \n - `$PROJECT_SOURCE`: - A path to a project source ($PROJECTS_ROOT/). - If there are multiple projects, this will point - to the directory of the first one." - type: string - type: object - id: - description: Mandatory identifier that allows referencing - this command in composite commands, from a parent, - or in events. - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + - build + - run + - test + - debug type: string required: - - id + - kind type: object - type: array - components: - description: Overrides of components encapsulated in a parent - devfile or a plugin. Overriding is done according to K8S - strategic merge patch standard rules. - items: - oneOf: - - required: - - container - - required: - - kubernetes - - required: - - openshift - - required: - - volume - - required: - - image - properties: - attributes: - description: Map of implementation-dependant free-form - YAML attributes. - type: object - x-kubernetes-preserve-unknown-fields: true - componentType: - description: Type of component - enum: - - Container - - Kubernetes - - Openshift - - Volume - - Image - type: string - container: - description: Allows adding and configuring devworkspace-related - containers - properties: - annotation: - description: Annotations that should be added to - specific resources for this container - properties: - deployment: - additionalProperties: - type: string - description: Annotations to be added to deployment - type: object - service: - additionalProperties: - type: string - description: Annotations to be added to service - type: object - type: object - args: - description: "The arguments to supply to the command - running the dockerimage component. The arguments - are supplied either to the default command provided - in the image or to the overridden command. \n - Defaults to an empty array, meaning use whatever - is defined in the image." - items: - type: string - type: array - command: - description: "The command to run in the dockerimage - component instead of the default one provided - in the image. \n Defaults to an empty array, meaning - use whatever is defined in the image." - items: - type: string - type: array - cpuLimit: + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, or + in events. + type: string + inlined: + description: Inlined content of the VsCode configuration + type: string + locationType: + description: Type of Vscode configuration command location + enum: + - Uri + - Inlined + type: string + uri: + description: Location as an absolute of relative URI the + VsCode configuration will be fetched from + type: string + required: + - id + type: object + type: object + type: array + components: + description: List of the workspace components, such as editor and + plugins, user-provided containers, or other types of components + items: + oneOf: + - required: + - container + - required: + - kubernetes + - required: + - openshift + - required: + - volume + - required: + - plugin + - required: + - custom + properties: + componentType: + description: Type of component + enum: + - Container + - Kubernetes + - Openshift + - Volume + - Plugin + - Custom + type: string + container: + description: Allows adding and configuring workspace-related + containers + properties: + args: + description: "The arguments to supply to the command running + the dockerimage component. The arguments are supplied + either to the default command provided in the image or + to the overridden command. \n Defaults to an empty array, + meaning use whatever is defined in the image." + items: + type: string + type: array + command: + description: "The command to run in the dockerimage component + instead of the default one provided in the image. \n Defaults + to an empty array, meaning use whatever is defined in + the image." + items: + type: string + type: array + dedicatedPod: + description: "Specify if a container should run in its own + separated pod, instead of running as part of the main + development environment pod. \n Default value is `false`" + type: boolean + endpoints: + items: + properties: + attributes: + additionalProperties: type: string - cpuRequest: + description: "Map of implementation-dependant string-based + free-form attributes. \n Examples of Che-specific + attributes: \n - cookiesAuthEnabled: \"true\" / + \"false\", \n - type: \"terminal\" / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint should be + exposed on the network. \n - `public` means that + the endpoint will be exposed on the public network, + typically through a K8S ingress or an OpenShift + route. \n - `internal` means that the endpoint will + be exposed internally outside of the main workspace + POD, typically by K8S services, to be consumed by + other elements running on the same cloud internal + network. \n - `none` means that the endpoint will + not be exposed and will only be accessible inside + the main workspace POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application and transport + protocols of the traffic that will go through this + endpoint. \n - `http`: Endpoint will have `http` + traffic, typically on a TCP connection. It will + be automaticaly promoted to `https` when the `secure` + field is set to `true`. \n - `https`: Endpoint will + have `https` traffic, typically on a TCP connection. + \n - `ws`: Endpoint will have `ws` traffic, typically + on a TCP connection. It will be automaticaly promoted + to `wss` when the `secure` field is set to `true`. + \n - `wss`: Endpoint will have `wss` traffic, typically + on a TCP connection. \n - `tcp`: Endpoint will have + traffic on a TCP connection, without specifying + an application protocol. \n - `udp`: Endpoint will + have traffic on an UDP connection, without specifying + an application protocol. \n Default value is `http`" + type: string + secure: + description: Describes whether the endpoint should + be secured and protected by some authentication + process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + env: + description: Environment variables used in this container + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + image: + type: string + memoryLimit: + type: string + mountSources: + type: boolean + name: + type: string + sourceMapping: + description: Optional specification of the path in the container + where project sources should be transferred/mounted when + `mountSources` is `true`. When omitted, the value of the + `PROJECTS_ROOT` environment variable is used. + type: string + volumeMounts: + description: List of volumes mounts that should be mounted + is this container. + items: + description: Volume that should be mounted to a component + container + properties: + name: + description: The volume mount name is the name of + an existing `Volume` component. If several containers + mount the same volume name then they will reuse + the same volume and will be able to access to the + same files. + type: string + path: + description: The path in the component container where + the volume should be mounted. If not path is mentioned, + default path is the is `/`. + type: string + required: + - name + type: object + type: array + required: + - name + type: object + custom: + description: Custom component whose logic is implementation-dependant + and should be provided by the user possibly through some dedicated + controller + properties: + componentClass: + description: Class of component that the associated implementation + controller should use to process this command with the + appropriate logic + type: string + embeddedResource: + description: Additional free-form configuration for this + custom component that the implementation controller will + know how to use + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + name: + description: Mandatory name that allows referencing the + component in commands, or inside a parent + type: string + required: + - componentClass + - embeddedResource + - name + type: object + kubernetes: + description: Allows importing into the workspace the Kubernetes + resources defined in a given manifest. For example this allows + reusing the Kubernetes definitions used to deploy some runtime + components in production. + oneOf: + - required: + - uri + - required: + - inlined + properties: + endpoints: + items: + properties: + attributes: + additionalProperties: type: string - dedicatedPod: - description: "Specify if a container should run - in its own separated pod, instead of running as - part of the main development environment pod. - \n Default value is `false`" - type: boolean - endpoints: - items: + description: "Map of implementation-dependant string-based + free-form attributes. \n Examples of Che-specific + attributes: \n - cookiesAuthEnabled: \"true\" / + \"false\", \n - type: \"terminal\" / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint should be + exposed on the network. \n - `public` means that + the endpoint will be exposed on the public network, + typically through a K8S ingress or an OpenShift + route. \n - `internal` means that the endpoint will + be exposed internally outside of the main workspace + POD, typically by K8S services, to be consumed by + other elements running on the same cloud internal + network. \n - `none` means that the endpoint will + not be exposed and will only be accessible inside + the main workspace POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application and transport + protocols of the traffic that will go through this + endpoint. \n - `http`: Endpoint will have `http` + traffic, typically on a TCP connection. It will + be automaticaly promoted to `https` when the `secure` + field is set to `true`. \n - `https`: Endpoint will + have `https` traffic, typically on a TCP connection. + \n - `ws`: Endpoint will have `ws` traffic, typically + on a TCP connection. It will be automaticaly promoted + to `wss` when the `secure` field is set to `true`. + \n - `wss`: Endpoint will have `wss` traffic, typically + on a TCP connection. \n - `tcp`: Endpoint will have + traffic on a TCP connection, without specifying + an application protocol. \n - `udp`: Endpoint will + have traffic on an UDP connection, without specifying + an application protocol. \n Default value is `http`" + type: string + secure: + description: Describes whether the endpoint should + be secured and protected by some authentication + process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + name: + description: Mandatory name that allows referencing the + component in commands, or inside a parent + type: string + uri: + description: Location in a file fetched from a uri. + type: string + required: + - name + type: object + openshift: + description: Allows importing into the workspace the OpenShift + resources defined in a given manifest. For example this allows + reusing the OpenShift definitions used to deploy some runtime + components in production. + oneOf: + - required: + - uri + - required: + - inlined + properties: + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant string-based + free-form attributes. \n Examples of Che-specific + attributes: \n - cookiesAuthEnabled: \"true\" / + \"false\", \n - type: \"terminal\" / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint should be + exposed on the network. \n - `public` means that + the endpoint will be exposed on the public network, + typically through a K8S ingress or an OpenShift + route. \n - `internal` means that the endpoint will + be exposed internally outside of the main workspace + POD, typically by K8S services, to be consumed by + other elements running on the same cloud internal + network. \n - `none` means that the endpoint will + not be exposed and will only be accessible inside + the main workspace POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application and transport + protocols of the traffic that will go through this + endpoint. \n - `http`: Endpoint will have `http` + traffic, typically on a TCP connection. It will + be automaticaly promoted to `https` when the `secure` + field is set to `true`. \n - `https`: Endpoint will + have `https` traffic, typically on a TCP connection. + \n - `ws`: Endpoint will have `ws` traffic, typically + on a TCP connection. It will be automaticaly promoted + to `wss` when the `secure` field is set to `true`. + \n - `wss`: Endpoint will have `wss` traffic, typically + on a TCP connection. \n - `tcp`: Endpoint will have + traffic on a TCP connection, without specifying + an application protocol. \n - `udp`: Endpoint will + have traffic on an UDP connection, without specifying + an application protocol. \n Default value is `http`" + type: string + secure: + description: Describes whether the endpoint should + be secured and protected by some authentication + process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + name: + description: Mandatory name that allows referencing the + component in commands, or inside a parent + type: string + uri: + description: Location in a file fetched from a uri. + type: string + required: + - name + type: object + plugin: + description: "Allows importing a plugin. \n Plugins are mainly + imported devfiles that contribute components, commands and + events as a consistent single unit. They are defined in either + YAML files following the devfile syntax, or as `DevWorkspaceTemplate` + Kubernetes Custom Resources" + oneOf: + - required: + - uri + - required: + - id + - required: + - kubernetes + properties: + commands: + description: Overrides of commands encapsulated in a parent + devfile or a plugin. Overriding is done using a strategic + merge patch + items: + oneOf: + - required: + - exec + - required: + - apply + - required: + - vscodeTask + - required: + - vscodeLaunch + - required: + - composite + - required: + - custom + properties: + apply: + description: "Command that consists in applying a + given component definition, typically bound to a + workspace event. \n For example, when an `apply` + command is bound to a `preStart` event, and references + a `container` component, it will start the container + as a K8S initContainer in the workspace POD, unless + the component has its `dedicatedPod` field set to + `true`. \n When no `apply` command exist for a given + component, it is assumed the component will be applied + at workspace start by default." + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + component: + description: Describes component that will be + applied + type: string + group: + description: Defines the group this command is + part of properties: - annotation: - additionalProperties: - type: string - description: Annotations to be added to Kubernetes - Ingress or Openshift Route - type: object - attributes: - description: "Map of implementation-dependant - string-based free-form attributes. \n Examples - of Che-specific attributes: \n - cookiesAuthEnabled: - \"true\" / \"false\", \n - type: \"terminal\" - / \"ide\" / \"ide-dev\"," - type: object - x-kubernetes-preserve-unknown-fields: true - exposure: - description: "Describes how the endpoint should - be exposed on the network. \n - `public` - means that the endpoint will be exposed - on the public network, typically through - a K8S ingress or an OpenShift route. \n - - `internal` means that the endpoint will - be exposed internally outside of the main - devworkspace POD, typically by K8S services, - to be consumed by other elements running - on the same cloud internal network. \n - - `none` means that the endpoint will not - be exposed and will only be accessible inside - the main devworkspace POD, on a local address. - \n Default value is `public`" + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command is + part of enum: - - public - - internal - - none + - build + - run + - test + - debug type: string - name: - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - path: - description: Path of the endpoint URL - type: string - protocol: - description: "Describes the application and - transport protocols of the traffic that - will go through this endpoint. \n - `http`: - Endpoint will have `http` traffic, typically - on a TCP connection. It will be automaticaly - promoted to `https` when the `secure` field - is set to `true`. \n - `https`: Endpoint - will have `https` traffic, typically on - a TCP connection. \n - `ws`: Endpoint will - have `ws` traffic, typically on a TCP connection. - It will be automaticaly promoted to `wss` - when the `secure` field is set to `true`. - \n - `wss`: Endpoint will have `wss` traffic, - typically on a TCP connection. \n - `tcp`: - Endpoint will have traffic on a TCP connection, - without specifying an application protocol. - \n - `udp`: Endpoint will have traffic on - an UDP connection, without specifying an - application protocol. \n Default value is - `http`" - enum: - - http - - https - - ws - - wss - - tcp - - udp - type: string - secure: - description: Describes whether the endpoint - should be secured and protected by some - authentication process. This requires a - protocol of `https` or `wss`. - type: boolean - targetPort: - description: The port number should be unique. - type: integer required: - - name + - kind type: object - type: array - env: - description: "Environment variables used in this - container. \n The following variables are reserved - and cannot be overridden via env: \n - `$PROJECTS_ROOT` - \n - `$PROJECT_SOURCE`" - items: + id: + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. + type: string + label: + description: Optional label that provides a label + for this command to be used in Editor UI menus + for example + type: string + required: + - id + type: object + commandType: + description: Type of workspace command + enum: + - Exec + - Apply + - VscodeTask + - VscodeLaunch + - Composite + - Custom + type: string + composite: + description: Composite command that allows executing + several sub-commands either sequentially or concurrently + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + commands: + description: The commands that comprise this composite + command + items: + type: string + type: array + group: + description: Defines the group this command is + part of properties: - name: - type: string - value: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command is + part of + enum: + - build + - run + - test + - debug type: string required: - - name + - kind type: object - type: array - image: - type: string - memoryLimit: - type: string - memoryRequest: - type: string - mountSources: - description: "Toggles whether or not the project - source code should be mounted in the component. - \n Defaults to true for all component types except - plugins and components that set `dedicatedPod` - to true." - type: boolean - sourceMapping: - description: Optional specification of the path - in the container where project sources should - be transferred/mounted when `mountSources` is - `true`. When omitted, the default value of /projects - is used. - type: string - volumeMounts: - description: List of volumes mounts that should - be mounted is this container. - items: - description: Volume that should be mounted to - a component container + id: + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. + type: string + label: + description: Optional label that provides a label + for this command to be used in Editor UI menus + for example + type: string + parallel: + description: Indicates if the sub-commands should + be executed concurrently + type: boolean + required: + - id + type: object + custom: + description: Custom command whose logic is implementation-dependant + and should be provided by the user possibly through + some dedicated plugin + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + commandClass: + description: Class of command that the associated + implementation component should use to process + this command with the appropriate logic + type: string + embeddedResource: + description: Additional free-form configuration + for this custom command that the implementation + component will know how to use + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + group: + description: Defines the group this command is + part of properties: - name: - description: The volume mount name is the - name of an existing `Volume` component. - If several containers mount the same volume - name then they will reuse the same volume - and will be able to access to the same files. - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - path: - description: The path in the component container - where the volume should be mounted. If not - path is mentioned, default path is the is - `/`. + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command is + part of + enum: + - build + - run + - test + - debug type: string required: - - name + - kind type: object - type: array - type: object - image: - description: Allows specifying the definition of an - image for outer loop builds - oneOf: - - required: - - dockerfile - - required: - - autoBuild - properties: - autoBuild: - description: "Defines if the image should be built - during startup. \n Default value is `false`" - type: boolean - dockerfile: - description: Allows specifying dockerfile type build - oneOf: - - required: - - uri - - required: - - devfileRegistry - - required: - - git - properties: - args: - description: The arguments to supply to the - dockerfile build. - items: - type: string - type: array - buildContext: - description: Path of source directory to establish - build context. Defaults to ${PROJECT_ROOT} - in the container + id: + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. + type: string + label: + description: Optional label that provides a label + for this command to be used in Editor UI menus + for example + type: string + required: + - commandClass + - embeddedResource + - id + type: object + exec: + description: CLI Command executed in an existing component + container + properties: + attributes: + additionalProperties: type: string - devfileRegistry: - description: Dockerfile's Devfile Registry source + description: Optional map of free-form additional + command attributes + type: object + commandLine: + description: "The actual command-line string \n + Special variables that can be used: \n - `$PROJECTS_ROOT`: + A path where projects sources are mounted \n + \ - `$PROJECT_SOURCE`: A path to a project source + ($PROJECTS_ROOT/). If there are + multiple projects, this will point to the directory + of the first one." + type: string + component: + description: Describes component to which given + action relates + type: string + env: + description: Optional list of environment variables + that have to be set before running the command + items: properties: - id: - description: Id in a devfile registry that - contains a Dockerfile. The src in the - OCI registry required for the Dockerfile - build will be downloaded for building - the image. - type: string - registryUrl: - description: Devfile Registry URL to pull - the Dockerfile from when using the Devfile - Registry as Dockerfile src. To ensure - the Dockerfile gets resolved consistently - in different environments, it is recommended - to always specify the `devfileRegistryUrl` - when `Id` is used. + name: type: string - type: object - git: - description: Dockerfile's Git source - properties: - checkoutFrom: - description: Defines from what the project - should be checked out. Required if there - are more than one remote configured - properties: - remote: - description: The remote name should - be used as init. Required if there - are more than one remote configured - type: string - revision: - description: The revision to checkout - from. Should be branch name, tag or - commit id. Default branch is used - if missing or specified revision is - not found. - type: string - type: object - fileLocation: - description: Location of the Dockerfile - in the Git repository when using git as - Dockerfile src. Defaults to Dockerfile. + value: type: string - remotes: - additionalProperties: - type: string - description: The remotes map which should - be initialized in the git project. Projects - must have at least one remote configured - while StarterProjects & Image Component's - Git source can only have at most one remote - configured. - type: object + required: + - name + - value type: object - rootRequired: - description: "Specify if a privileged builder - pod is required. \n Default value is `false`" - type: boolean - srcType: - description: Type of Dockerfile src - enum: - - Uri - - DevfileRegistry - - Git - type: string - uri: - description: URI Reference of a Dockerfile. - It can be a full URL or a relative URI from - the current devfile as the base URI. - type: string - type: object - imageName: - description: Name of the image for the resulting - outerloop build - type: string - imageType: - description: Type of image - enum: - - Dockerfile - - AutoBuild - type: string - type: object - kubernetes: - description: Allows importing into the devworkspace - the Kubernetes resources defined in a given manifest. - For example this allows reusing the Kubernetes definitions - used to deploy some runtime components in production. - oneOf: - - required: - - uri - - required: - - inlined - properties: - deployByDefault: - description: "Defines if the component should be - deployed during startup. \n Default value is `false`" - type: boolean - endpoints: - items: + type: array + group: + description: Defines the group this command is + part of properties: - annotation: - additionalProperties: - type: string - description: Annotations to be added to Kubernetes - Ingress or Openshift Route - type: object - attributes: - description: "Map of implementation-dependant - string-based free-form attributes. \n Examples - of Che-specific attributes: \n - cookiesAuthEnabled: - \"true\" / \"false\", \n - type: \"terminal\" - / \"ide\" / \"ide-dev\"," - type: object - x-kubernetes-preserve-unknown-fields: true - exposure: - description: "Describes how the endpoint should - be exposed on the network. \n - `public` - means that the endpoint will be exposed - on the public network, typically through - a K8S ingress or an OpenShift route. \n - - `internal` means that the endpoint will - be exposed internally outside of the main - devworkspace POD, typically by K8S services, - to be consumed by other elements running - on the same cloud internal network. \n - - `none` means that the endpoint will not - be exposed and will only be accessible inside - the main devworkspace POD, on a local address. - \n Default value is `public`" + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command is + part of enum: - - public - - internal - - none + - build + - run + - test + - debug type: string - name: - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - path: - description: Path of the endpoint URL - type: string - protocol: - description: "Describes the application and - transport protocols of the traffic that - will go through this endpoint. \n - `http`: - Endpoint will have `http` traffic, typically - on a TCP connection. It will be automaticaly - promoted to `https` when the `secure` field - is set to `true`. \n - `https`: Endpoint - will have `https` traffic, typically on - a TCP connection. \n - `ws`: Endpoint will - have `ws` traffic, typically on a TCP connection. - It will be automaticaly promoted to `wss` - when the `secure` field is set to `true`. - \n - `wss`: Endpoint will have `wss` traffic, - typically on a TCP connection. \n - `tcp`: - Endpoint will have traffic on a TCP connection, - without specifying an application protocol. - \n - `udp`: Endpoint will have traffic on - an UDP connection, without specifying an - application protocol. \n Default value is - `http`" - enum: - - http - - https - - ws - - wss - - tcp - - udp - type: string - secure: - description: Describes whether the endpoint - should be secured and protected by some - authentication process. This requires a - protocol of `https` or `wss`. - type: boolean - targetPort: - description: The port number should be unique. - type: integer required: - - name + - kind type: object - type: array - inlined: - description: Inlined manifest - type: string - locationType: - description: Type of Kubernetes-like location - enum: - - Uri - - Inlined - type: string - uri: - description: Location in a file fetched from a uri. - type: string - type: object - name: - description: 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. - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - openshift: - description: Allows importing into the devworkspace - the OpenShift resources defined in a given manifest. - For example this allows reusing the OpenShift definitions - used to deploy some runtime components in production. - oneOf: - - required: - - uri - - required: - - inlined - properties: - deployByDefault: - description: "Defines if the component should be - deployed during startup. \n Default value is `false`" - type: boolean - endpoints: - items: + hotReloadCapable: + description: "Whether the command is capable to + reload itself when source code changes. If set + to `true` the command won't be restarted and + it is expected to handle file changes on its + own. \n Default value is `false`" + type: boolean + id: + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. + type: string + label: + description: Optional label that provides a label + for this command to be used in Editor UI menus + for example + type: string + workingDir: + description: "Working directory where the command + should be executed \n Special variables that + can be used: \n - `${PROJECTS_ROOT}`: A path + where projects sources are mounted \n - `${PROJECT_SOURCE}`: + A path to a project source (${PROJECTS_ROOT}/). + If there are multiple projects, this will point + to the directory of the first one." + type: string + required: + - id + type: object + vscodeLaunch: + description: "Command providing the definition of + a VsCode launch action \n Deprecated; removed in + v1alpha2" + oneOf: + - required: + - uri + - required: + - inlined + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + group: + description: Defines the group this command is + part of properties: - annotation: - additionalProperties: - type: string - description: Annotations to be added to Kubernetes - Ingress or Openshift Route - type: object - attributes: - description: "Map of implementation-dependant - string-based free-form attributes. \n Examples - of Che-specific attributes: \n - cookiesAuthEnabled: - \"true\" / \"false\", \n - type: \"terminal\" - / \"ide\" / \"ide-dev\"," - type: object - x-kubernetes-preserve-unknown-fields: true - exposure: - description: "Describes how the endpoint should - be exposed on the network. \n - `public` - means that the endpoint will be exposed - on the public network, typically through - a K8S ingress or an OpenShift route. \n - - `internal` means that the endpoint will - be exposed internally outside of the main - devworkspace POD, typically by K8S services, - to be consumed by other elements running - on the same cloud internal network. \n - - `none` means that the endpoint will not - be exposed and will only be accessible inside - the main devworkspace POD, on a local address. - \n Default value is `public`" + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command is + part of enum: - - public - - internal - - none + - build + - run + - test + - debug type: string - name: - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - path: - description: Path of the endpoint URL - type: string - protocol: - description: "Describes the application and - transport protocols of the traffic that - will go through this endpoint. \n - `http`: - Endpoint will have `http` traffic, typically - on a TCP connection. It will be automaticaly - promoted to `https` when the `secure` field - is set to `true`. \n - `https`: Endpoint - will have `https` traffic, typically on - a TCP connection. \n - `ws`: Endpoint will - have `ws` traffic, typically on a TCP connection. - It will be automaticaly promoted to `wss` - when the `secure` field is set to `true`. - \n - `wss`: Endpoint will have `wss` traffic, - typically on a TCP connection. \n - `tcp`: - Endpoint will have traffic on a TCP connection, - without specifying an application protocol. - \n - `udp`: Endpoint will have traffic on - an UDP connection, without specifying an - application protocol. \n Default value is - `http`" - enum: - - http - - https - - ws - - wss - - tcp - - udp - type: string - secure: - description: Describes whether the endpoint - should be secured and protected by some - authentication process. This requires a - protocol of `https` or `wss`. - type: boolean - targetPort: - description: The port number should be unique. - type: integer required: - - name + - kind type: object - type: array - inlined: - description: Inlined manifest - type: string - locationType: - description: Type of Kubernetes-like location - enum: - - Uri - - Inlined - type: string - uri: - description: Location in a file fetched from a uri. - type: string - type: object - volume: - description: Allows specifying the definition of a volume - shared by several other components - properties: - ephemeral: - description: Ephemeral volumes are not stored persistently - across restarts. Defaults to false - type: boolean - size: - description: Size of the volume - type: string - type: object - required: - - name - type: object - type: array - id: - description: Id in a registry that contains a Devfile yaml - file - type: string - importReferenceType: - description: type of location from where the referenced template - structure should be retrieved - enum: - - Uri - - Id - - Kubernetes - type: string - kubernetes: - description: Reference to a Kubernetes CRD of type DevWorkspaceTemplate - properties: - name: - type: string - namespace: - type: string - required: - - name - type: object - registryUrl: - description: Registry URL to pull the parent devfile from - when using id in the parent reference. To ensure the parent - devfile gets resolved consistently in different environments, - it is recommended to always specify the `registryUrl` when - `id` is used. - type: string - uri: - description: URI Reference of a parent devfile YAML file. - It can be a full URL or a relative URI with the current - devfile as the base URI. - type: string - type: object - volume: - description: Allows specifying the definition of a volume shared - by several other components - properties: - ephemeral: - description: Ephemeral volumes are not stored persistently - across restarts. Defaults to false - type: boolean - size: - description: Size of the volume - type: string - type: object - required: - - name - type: object - type: array - events: - description: Bindings of commands to events. Each command is referred-to - by its name. - properties: - postStart: - description: IDs of commands that should be executed after the devworkspace - is completely started. In the case of Che-Theia, these commands - should be executed after all plugins and extensions have started, - including project cloning. This means that those commands are - not triggered until the user opens the IDE in his browser. - items: - type: string - type: array - postStop: - description: IDs of commands that should be executed after stopping - the devworkspace. - items: - type: string - type: array - preStart: - description: IDs of commands that should be executed before the - devworkspace start. Kubernetes-wise, these commands would typically - be executed in init containers of the devworkspace POD. - items: - type: string - type: array - preStop: - description: IDs of commands that should be executed before stopping - the devworkspace. - items: - type: string - type: array - type: object - parent: - description: Parent devworkspace template - oneOf: - - required: - - uri - - required: - - id - - required: - - kubernetes - properties: - attributes: - description: Overrides of attributes encapsulated in a parent devfile. - Overriding is done according to K8S strategic merge patch standard - rules. - type: object - x-kubernetes-preserve-unknown-fields: true - commands: - description: Overrides of commands encapsulated in a parent devfile - or a plugin. Overriding is done according to K8S strategic merge - patch standard rules. - items: - oneOf: - - required: - - exec - - required: - - apply - - required: - - composite - properties: - apply: - description: "Command that consists in applying a given component - definition, typically bound to a devworkspace event. \n - For example, when an `apply` command is bound to a `preStart` - event, and references a `container` component, it will start - the container as a K8S initContainer in the devworkspace - POD, unless the component has its `dedicatedPod` field set - to `true`. \n When no `apply` command exist for a given - component, it is assumed the component will be applied at - devworkspace start by default, unless `deployByDefault` - for that component is set to false." - properties: - component: - description: Describes component that will be applied - type: string - group: - description: Defines the group this command is part of - properties: - isDefault: - description: Identifies the default command for a - given group kind - type: boolean - kind: - description: Kind of group the command is part of - enum: - - build - - run - - test - - debug - - deploy - type: string - type: object - label: - description: Optional label that provides a label for - this command to be used in Editor UI menus for example - type: string - type: object - attributes: - description: Map of implementation-dependant free-form YAML - attributes. - type: object - x-kubernetes-preserve-unknown-fields: true - commandType: - description: Type of devworkspace command - enum: - - Exec - - Apply - - Composite - type: string - composite: - description: Composite command that allows executing several - sub-commands either sequentially or concurrently - properties: - commands: - description: The commands that comprise this composite - command - items: - type: string - type: array - group: - description: Defines the group this command is part of - properties: - isDefault: - description: Identifies the default command for a - given group kind - type: boolean - kind: - description: Kind of group the command is part of - enum: - - build - - run - - test - - debug - - deploy - type: string - type: object - label: - description: Optional label that provides a label for - this command to be used in Editor UI menus for example - type: string - parallel: - description: Indicates if the sub-commands should be executed - concurrently - type: boolean - type: object - exec: - description: CLI Command executed in an existing component - container - properties: - commandLine: - description: "The actual command-line string \n Special - variables that can be used: \n - `$PROJECTS_ROOT`: - A path where projects sources are mounted as defined - by container component's sourceMapping. \n - `$PROJECT_SOURCE`: - A path to a project source ($PROJECTS_ROOT/). - If there are multiple projects, this will point to the - directory of the first one." - type: string - component: - description: Describes component to which given action - relates - type: string - env: - description: Optional list of environment variables that - have to be set before running the command - items: - properties: - name: - type: string - value: - type: string - required: - - name - type: object - type: array - group: - description: Defines the group this command is part of - properties: - isDefault: - description: Identifies the default command for a - given group kind - type: boolean - kind: - description: Kind of group the command is part of - enum: - - build - - run - - test - - debug - - deploy - type: string - type: object - hotReloadCapable: - description: "Whether the command is capable to reload - itself when source code changes. If set to `true` the - command won't be restarted and it is expected to handle - file changes on its own. \n Default value is `false`" - type: boolean - label: - description: Optional label that provides a label for - this command to be used in Editor UI menus for example - type: string - workingDir: - description: "Working directory where the command should - be executed \n Special variables that can be used: \n - \ - `$PROJECTS_ROOT`: A path where projects sources - are mounted as defined by container component's sourceMapping. - \n - `$PROJECT_SOURCE`: A path to a project source - ($PROJECTS_ROOT/). If there are multiple - projects, this will point to the directory of the first - one." - type: string - type: object - id: - description: Mandatory identifier that allows referencing - this command in composite commands, from a parent, or in - events. - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - required: - - id - type: object - type: array - components: - description: Overrides of components encapsulated in a parent devfile - or a plugin. Overriding is done according to K8S strategic merge - patch standard rules. - items: - oneOf: - - required: - - container - - required: - - kubernetes - - required: - - openshift - - required: - - volume - - required: - - image - - required: - - plugin - properties: - attributes: - description: Map of implementation-dependant free-form YAML - attributes. - type: object - x-kubernetes-preserve-unknown-fields: true - componentType: - description: Type of component - enum: - - Container - - Kubernetes - - Openshift - - Volume - - Image - - Plugin - type: string - container: - description: Allows adding and configuring devworkspace-related - containers - properties: - annotation: - description: Annotations that should be added to specific - resources for this container - properties: - deployment: - additionalProperties: - type: string - description: Annotations to be added to deployment - type: object - service: - additionalProperties: - type: string - description: Annotations to be added to service - type: object - type: object - args: - description: "The arguments to supply to the command running - the dockerimage component. The arguments are supplied - either to the default command provided in the image - or to the overridden command. \n Defaults to an empty - array, meaning use whatever is defined in the image." - items: - type: string - type: array - command: - description: "The command to run in the dockerimage component - instead of the default one provided in the image. \n - Defaults to an empty array, meaning use whatever is - defined in the image." - items: - type: string - type: array - cpuLimit: - type: string - cpuRequest: - type: string - dedicatedPod: - description: "Specify if a container should run in its - own separated pod, instead of running as part of the - main development environment pod. \n Default value is - `false`" - type: boolean - endpoints: - items: - properties: - annotation: - additionalProperties: - type: string - description: Annotations to be added to Kubernetes - Ingress or Openshift Route - type: object - attributes: - description: "Map of implementation-dependant string-based - free-form attributes. \n Examples of Che-specific - attributes: \n - cookiesAuthEnabled: \"true\" - / \"false\", \n - type: \"terminal\" / \"ide\" - / \"ide-dev\"," - type: object - x-kubernetes-preserve-unknown-fields: true - exposure: - description: "Describes how the endpoint should - be exposed on the network. \n - `public` means - that the endpoint will be exposed on the public - network, typically through a K8S ingress or an - OpenShift route. \n - `internal` means that the - endpoint will be exposed internally outside of - the main devworkspace POD, typically by K8S services, - to be consumed by other elements running on the - same cloud internal network. \n - `none` means - that the endpoint will not be exposed and will - only be accessible inside the main devworkspace - POD, on a local address. \n Default value is `public`" - enum: - - public - - internal - - none - type: string - name: - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - path: - description: Path of the endpoint URL - type: string - protocol: - description: "Describes the application and transport - protocols of the traffic that will go through - this endpoint. \n - `http`: Endpoint will have - `http` traffic, typically on a TCP connection. - It will be automaticaly promoted to `https` when - the `secure` field is set to `true`. \n - `https`: - Endpoint will have `https` traffic, typically - on a TCP connection. \n - `ws`: Endpoint will - have `ws` traffic, typically on a TCP connection. - It will be automaticaly promoted to `wss` when - the `secure` field is set to `true`. \n - `wss`: - Endpoint will have `wss` traffic, typically on - a TCP connection. \n - `tcp`: Endpoint will have - traffic on a TCP connection, without specifying - an application protocol. \n - `udp`: Endpoint - will have traffic on an UDP connection, without - specifying an application protocol. \n Default - value is `http`" - enum: - - http - - https - - ws - - wss - - tcp - - udp - type: string - secure: - description: Describes whether the endpoint should - be secured and protected by some authentication - process. This requires a protocol of `https` or - `wss`. - type: boolean - targetPort: - description: The port number should be unique. - type: integer - required: - - name - type: object - type: array - env: - description: "Environment variables used in this container. - \n The following variables are reserved and cannot be - overridden via env: \n - `$PROJECTS_ROOT` \n - `$PROJECT_SOURCE`" - items: - properties: - name: - type: string - value: - type: string - required: - - name - type: object - type: array - image: - type: string - memoryLimit: - type: string - memoryRequest: - type: string - mountSources: - description: "Toggles whether or not the project source - code should be mounted in the component. \n Defaults - to true for all component types except plugins and components - that set `dedicatedPod` to true." - type: boolean - sourceMapping: - description: Optional specification of the path in the - container where project sources should be transferred/mounted - when `mountSources` is `true`. When omitted, the default - value of /projects is used. - type: string - volumeMounts: - description: List of volumes mounts that should be mounted - is this container. - items: - description: Volume that should be mounted to a component - container - properties: - name: - description: The volume mount name is the name of - an existing `Volume` component. If several containers - mount the same volume name then they will reuse - the same volume and will be able to access to - the same files. - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - path: - description: The path in the component container - where the volume should be mounted. If not path - is mentioned, default path is the is `/`. - type: string - required: - - name - type: object - type: array - type: object - image: - description: Allows specifying the definition of an image - for outer loop builds - oneOf: - - required: - - dockerfile - - required: - - autoBuild - properties: - autoBuild: - description: "Defines if the image should be built during - startup. \n Default value is `false`" - type: boolean - dockerfile: - description: Allows specifying dockerfile type build - oneOf: - - required: - - uri - - required: - - devfileRegistry - - required: - - git - properties: - args: - description: The arguments to supply to the dockerfile - build. - items: - type: string - type: array - buildContext: - description: Path of source directory to establish - build context. Defaults to ${PROJECT_ROOT} in the - container - type: string - devfileRegistry: - description: Dockerfile's Devfile Registry source - properties: id: - description: Id in a devfile registry that contains - a Dockerfile. The src in the OCI registry required - for the Dockerfile build will be downloaded - for building the image. - type: string - registryUrl: - description: Devfile Registry URL to pull the - Dockerfile from when using the Devfile Registry - as Dockerfile src. To ensure the Dockerfile - gets resolved consistently in different environments, - it is recommended to always specify the `devfileRegistryUrl` - when `Id` is used. + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. + type: string + inlined: + description: Inlined content of the VsCode configuration type: string + locationType: + description: Type of Vscode configuration command + location + enum: + - Uri + - Inlined + type: string + uri: + description: Location as an absolute of relative + URI the VsCode configuration will be fetched + from + type: string + required: + - id type: object - git: - description: Dockerfile's Git source + vscodeTask: + description: "Command providing the definition of + a VsCode Task \n Deprecated; removed in v1alpha2" + oneOf: + - required: + - uri + - required: + - inlined properties: - checkoutFrom: - description: Defines from what the project should - be checked out. Required if there are more than - one remote configured + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + group: + description: Defines the group this command is + part of properties: - remote: - description: The remote name should be used - as init. Required if there are more than - one remote configured - type: string - revision: - description: The revision to checkout from. - Should be branch name, tag or commit id. - Default branch is used if missing or specified - revision is not found. + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command is + part of + enum: + - build + - run + - test + - debug type: string + required: + - kind type: object - fileLocation: - description: Location of the Dockerfile in the - Git repository when using git as Dockerfile - src. Defaults to Dockerfile. + id: + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. type: string - remotes: - additionalProperties: - type: string - description: The remotes map which should be initialized - in the git project. Projects must have at least - one remote configured while StarterProjects - & Image Component's Git source can only have - at most one remote configured. - type: object + inlined: + description: Inlined content of the VsCode configuration + type: string + locationType: + description: Type of Vscode configuration command + location + enum: + - Uri + - Inlined + type: string + uri: + description: Location as an absolute of relative + URI the VsCode configuration will be fetched + from + type: string + required: + - id type: object - rootRequired: - description: "Specify if a privileged builder pod - is required. \n Default value is `false`" - type: boolean - srcType: - description: Type of Dockerfile src + type: object + type: array + components: + description: Overrides of components encapsulated in a plugin. + Overriding is done using a strategic merge patch. A plugin + cannot override embedded plugin components. + items: + oneOf: + - required: + - container + - required: + - kubernetes + - required: + - openshift + - required: + - volume + properties: + componentType: + description: Type of component override for a plugin enum: - - Uri - - DevfileRegistry - - Git + - Container + - Kubernetes + - Openshift + - Volume type: string - uri: - description: URI Reference of a Dockerfile. It can - be a full URL or a relative URI from the current - devfile as the base URI. - type: string - type: object - imageName: - description: Name of the image for the resulting outerloop - build - type: string - imageType: - description: Type of image - enum: - - Dockerfile - - AutoBuild - type: string - type: object - kubernetes: - description: Allows importing into the devworkspace the Kubernetes - resources defined in a given manifest. For example this - allows reusing the Kubernetes definitions used to deploy - some runtime components in production. - oneOf: - - required: - - uri - - required: - - inlined - properties: - deployByDefault: - description: "Defines if the component should be deployed - during startup. \n Default value is `false`" - type: boolean - endpoints: - items: - properties: - annotation: - additionalProperties: - type: string - description: Annotations to be added to Kubernetes - Ingress or Openshift Route - type: object - attributes: - description: "Map of implementation-dependant string-based - free-form attributes. \n Examples of Che-specific - attributes: \n - cookiesAuthEnabled: \"true\" - / \"false\", \n - type: \"terminal\" / \"ide\" - / \"ide-dev\"," - type: object - x-kubernetes-preserve-unknown-fields: true - exposure: - description: "Describes how the endpoint should - be exposed on the network. \n - `public` means - that the endpoint will be exposed on the public - network, typically through a K8S ingress or an - OpenShift route. \n - `internal` means that the - endpoint will be exposed internally outside of - the main devworkspace POD, typically by K8S services, - to be consumed by other elements running on the - same cloud internal network. \n - `none` means - that the endpoint will not be exposed and will - only be accessible inside the main devworkspace - POD, on a local address. \n Default value is `public`" - enum: - - public - - internal - - none - type: string - name: - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - path: - description: Path of the endpoint URL - type: string - protocol: - description: "Describes the application and transport - protocols of the traffic that will go through - this endpoint. \n - `http`: Endpoint will have - `http` traffic, typically on a TCP connection. - It will be automaticaly promoted to `https` when - the `secure` field is set to `true`. \n - `https`: - Endpoint will have `https` traffic, typically - on a TCP connection. \n - `ws`: Endpoint will - have `ws` traffic, typically on a TCP connection. - It will be automaticaly promoted to `wss` when - the `secure` field is set to `true`. \n - `wss`: - Endpoint will have `wss` traffic, typically on - a TCP connection. \n - `tcp`: Endpoint will have - traffic on a TCP connection, without specifying - an application protocol. \n - `udp`: Endpoint - will have traffic on an UDP connection, without - specifying an application protocol. \n Default - value is `http`" - enum: - - http - - https - - ws - - wss - - tcp - - udp - type: string - secure: - description: Describes whether the endpoint should - be secured and protected by some authentication - process. This requires a protocol of `https` or - `wss`. - type: boolean - targetPort: - description: The port number should be unique. - type: integer - required: - - name - type: object - type: array - inlined: - description: Inlined manifest - type: string - locationType: - description: Type of Kubernetes-like location - enum: - - Uri - - Inlined - type: string - uri: - description: Location in a file fetched from a uri. - type: string - type: object - name: - description: 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. - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - openshift: - description: Allows importing into the devworkspace the OpenShift - resources defined in a given manifest. For example this - allows reusing the OpenShift definitions used to deploy - some runtime components in production. - oneOf: - - required: - - uri - - required: - - inlined - properties: - deployByDefault: - description: "Defines if the component should be deployed - during startup. \n Default value is `false`" - type: boolean - endpoints: - items: - properties: - annotation: - additionalProperties: - type: string - description: Annotations to be added to Kubernetes - Ingress or Openshift Route - type: object - attributes: - description: "Map of implementation-dependant string-based - free-form attributes. \n Examples of Che-specific - attributes: \n - cookiesAuthEnabled: \"true\" - / \"false\", \n - type: \"terminal\" / \"ide\" - / \"ide-dev\"," - type: object - x-kubernetes-preserve-unknown-fields: true - exposure: - description: "Describes how the endpoint should - be exposed on the network. \n - `public` means - that the endpoint will be exposed on the public - network, typically through a K8S ingress or an - OpenShift route. \n - `internal` means that the - endpoint will be exposed internally outside of - the main devworkspace POD, typically by K8S services, - to be consumed by other elements running on the - same cloud internal network. \n - `none` means - that the endpoint will not be exposed and will - only be accessible inside the main devworkspace - POD, on a local address. \n Default value is `public`" - enum: - - public - - internal - - none - type: string - name: - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - path: - description: Path of the endpoint URL - type: string - protocol: - description: "Describes the application and transport - protocols of the traffic that will go through - this endpoint. \n - `http`: Endpoint will have - `http` traffic, typically on a TCP connection. - It will be automaticaly promoted to `https` when - the `secure` field is set to `true`. \n - `https`: - Endpoint will have `https` traffic, typically - on a TCP connection. \n - `ws`: Endpoint will - have `ws` traffic, typically on a TCP connection. - It will be automaticaly promoted to `wss` when - the `secure` field is set to `true`. \n - `wss`: - Endpoint will have `wss` traffic, typically on - a TCP connection. \n - `tcp`: Endpoint will have - traffic on a TCP connection, without specifying - an application protocol. \n - `udp`: Endpoint - will have traffic on an UDP connection, without - specifying an application protocol. \n Default - value is `http`" - enum: - - http - - https - - ws - - wss - - tcp - - udp - type: string - secure: - description: Describes whether the endpoint should - be secured and protected by some authentication - process. This requires a protocol of `https` or - `wss`. - type: boolean - targetPort: - description: The port number should be unique. - type: integer - required: - - name - type: object - type: array - inlined: - description: Inlined manifest - type: string - locationType: - description: Type of Kubernetes-like location - enum: - - Uri - - Inlined - type: string - uri: - description: Location in a file fetched from a uri. - type: string - type: object - plugin: - description: "Allows importing a plugin. \n Plugins are mainly - imported devfiles that contribute components, commands and - events as a consistent single unit. They are defined in - either YAML files following the devfile syntax, or as `DevWorkspaceTemplate` - Kubernetes Custom Resources" - oneOf: - - required: - - uri - - required: - - id - - required: - - kubernetes - properties: - commands: - description: Overrides of commands encapsulated in a parent - devfile or a plugin. Overriding is done according to - K8S strategic merge patch standard rules. - items: - oneOf: - - required: - - exec - - required: - - apply - - required: - - composite - properties: - apply: - description: "Command that consists in applying - a given component definition, typically bound - to a devworkspace event. \n For example, when - an `apply` command is bound to a `preStart` event, - and references a `container` component, it will - start the container as a K8S initContainer in - the devworkspace POD, unless the component has - its `dedicatedPod` field set to `true`. \n When - no `apply` command exist for a given component, - it is assumed the component will be applied at - devworkspace start by default, unless `deployByDefault` - for that component is set to false." - properties: - component: - description: Describes component that will be - applied + container: + description: Configuration overriding for a Container + component in a plugin + properties: + args: + description: "The arguments to supply to the command + running the dockerimage component. The arguments + are supplied either to the default command provided + in the image or to the overridden command. \n + Defaults to an empty array, meaning use whatever + is defined in the image." + items: type: string - group: - description: Defines the group this command - is part of + type: array + command: + description: "The command to run in the dockerimage + component instead of the default one provided + in the image. \n Defaults to an empty array, + meaning use whatever is defined in the image." + items: + type: string + type: array + dedicatedPod: + description: "Specify if a container should run + in its own separated pod, instead of running + as part of the main development environment + pod. \n Default value is `false`" + type: boolean + endpoints: + items: properties: - isDefault: - description: Identifies the default command - for a given group kind - type: boolean - kind: - description: Kind of group the command is - part of + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant + string-based free-form attributes. \n + Examples of Che-specific attributes: \n + - cookiesAuthEnabled: \"true\" / \"false\", + \n - type: \"terminal\" / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint + should be exposed on the network. \n - + `public` means that the endpoint will + be exposed on the public network, typically + through a K8S ingress or an OpenShift + route. \n - `internal` means that the + endpoint will be exposed internally outside + of the main workspace POD, typically by + K8S services, to be consumed by other + elements running on the same cloud internal + network. \n - `none` means that the endpoint + will not be exposed and will only be accessible + inside the main workspace POD, on a local + address. \n Default value is `public`" enum: - - build - - run - - test - - debug - - deploy + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application + and transport protocols of the traffic + that will go through this endpoint. \n + - `http`: Endpoint will have `http` traffic, + typically on a TCP connection. It will + be automaticaly promoted to `https` when + the `secure` field is set to `true`. \n + - `https`: Endpoint will have `https` + traffic, typically on a TCP connection. + \n - `ws`: Endpoint will have `ws` traffic, + typically on a TCP connection. It will + be automaticaly promoted to `wss` when + the `secure` field is set to `true`. \n + - `wss`: Endpoint will have `wss` traffic, + typically on a TCP connection. \n - `tcp`: + Endpoint will have traffic on a TCP connection, + without specifying an application protocol. + \n - `udp`: Endpoint will have traffic + on an UDP connection, without specifying + an application protocol. \n Default value + is `http`" type: string + secure: + description: Describes whether the endpoint + should be secured and protected by some + authentication process + type: boolean + targetPort: + type: integer + required: + - name type: object - label: - description: Optional label that provides a - label for this command to be used in Editor - UI menus for example - type: string - type: object - attributes: - description: Map of implementation-dependant free-form - YAML attributes. - type: object - x-kubernetes-preserve-unknown-fields: true - commandType: - description: Type of devworkspace command - enum: - - Exec - - Apply - - Composite - type: string - composite: - description: Composite command that allows executing - several sub-commands either sequentially or concurrently - properties: - commands: - description: The commands that comprise this - composite command - items: - type: string - type: array - group: - description: Defines the group this command - is part of + type: array + env: + description: Environment variables used in this + container + items: properties: - isDefault: - description: Identifies the default command - for a given group kind - type: boolean - kind: - description: Kind of group the command is - part of - enum: - - build - - run - - test - - debug - - deploy + name: + type: string + value: type: string + required: + - name + - value type: object - label: - description: Optional label that provides a - label for this command to be used in Editor - UI menus for example - type: string - parallel: - description: Indicates if the sub-commands should - be executed concurrently - type: boolean - type: object - exec: - description: CLI Command executed in an existing - component container - properties: - commandLine: - description: "The actual command-line string - \n Special variables that can be used: \n - \ - `$PROJECTS_ROOT`: A path where projects - sources are mounted as defined by container - component's sourceMapping. \n - `$PROJECT_SOURCE`: - A path to a project source ($PROJECTS_ROOT/). - If there are multiple projects, this will - point to the directory of the first one." - type: string - component: - description: Describes component to which given - action relates - type: string - env: - description: Optional list of environment variables - that have to be set before running the command - items: - properties: - name: - type: string - value: - type: string - required: - - name - type: object - type: array - group: - description: Defines the group this command - is part of + type: array + image: + type: string + memoryLimit: + type: string + mountSources: + type: boolean + name: + type: string + sourceMapping: + description: Optional specification of the path + in the container where project sources should + be transferred/mounted when `mountSources` is + `true`. When omitted, the value of the `PROJECTS_ROOT` + environment variable is used. + type: string + volumeMounts: + description: List of volumes mounts that should + be mounted is this container. + items: + description: Volume that should be mounted to + a component container properties: - isDefault: - description: Identifies the default command - for a given group kind - type: boolean - kind: - description: Kind of group the command is - part of - enum: - - build - - run - - test - - debug - - deploy + name: + description: The volume mount name is the + name of an existing `Volume` component. + If several containers mount the same volume + name then they will reuse the same volume + and will be able to access to the same + files. type: string + path: + description: The path in the component container + where the volume should be mounted. If + not path is mentioned, default path is + the is `/`. + type: string + required: + - name type: object - hotReloadCapable: - description: "Whether the command is capable - to reload itself when source code changes. - If set to `true` the command won't be restarted - and it is expected to handle file changes - on its own. \n Default value is `false`" - type: boolean - label: - description: Optional label that provides a - label for this command to be used in Editor - UI menus for example - type: string - workingDir: - description: "Working directory where the command - should be executed \n Special variables that - can be used: \n - `$PROJECTS_ROOT`: A path - where projects sources are mounted as defined - by container component's sourceMapping. \n - \ - `$PROJECT_SOURCE`: A path to a project - source ($PROJECTS_ROOT/). If - there are multiple projects, this will point - to the directory of the first one." - type: string - type: object - id: - description: Mandatory identifier that allows referencing - this command in composite commands, from a parent, - or in events. - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - required: - - id - type: object - type: array - components: - description: Overrides of components encapsulated in a - parent devfile or a plugin. Overriding is done according - to K8S strategic merge patch standard rules. - items: - oneOf: - - required: - - container - - required: - - kubernetes - - required: - - openshift - - required: - - volume - - required: - - image - properties: - attributes: - description: Map of implementation-dependant free-form - YAML attributes. - type: object - x-kubernetes-preserve-unknown-fields: true - componentType: - description: Type of component - enum: - - Container - - Kubernetes - - Openshift - - Volume - - Image - type: string - container: - description: Allows adding and configuring devworkspace-related - containers - properties: - annotation: - description: Annotations that should be added - to specific resources for this container + type: array + required: + - name + type: object + kubernetes: + description: Configuration overriding for a Kubernetes + component in a plugin + oneOf: + - required: + - uri + - required: + - inlined + properties: + endpoints: + items: properties: - deployment: + attributes: additionalProperties: type: string - description: Annotations to be added to - deployment - type: object - service: - additionalProperties: - type: string - description: Annotations to be added to - service + description: "Map of implementation-dependant + string-based free-form attributes. \n + Examples of Che-specific attributes: \n + - cookiesAuthEnabled: \"true\" / \"false\", + \n - type: \"terminal\" / \"ide\" / \"ide-dev\"," type: object - type: object - args: - description: "The arguments to supply to the - command running the dockerimage component. - The arguments are supplied either to the default - command provided in the image or to the overridden - command. \n Defaults to an empty array, meaning - use whatever is defined in the image." - items: - type: string - type: array - command: - description: "The command to run in the dockerimage - component instead of the default one provided - in the image. \n Defaults to an empty array, - meaning use whatever is defined in the image." - items: - type: string - type: array - cpuLimit: - type: string - cpuRequest: - type: string - dedicatedPod: - description: "Specify if a container should - run in its own separated pod, instead of running - as part of the main development environment - pod. \n Default value is `false`" - type: boolean - endpoints: - items: - properties: - annotation: - additionalProperties: - type: string - description: Annotations to be added to - Kubernetes Ingress or Openshift Route - type: object - attributes: - description: "Map of implementation-dependant - string-based free-form attributes. \n - Examples of Che-specific attributes: - \n - cookiesAuthEnabled: \"true\" / - \"false\", \n - type: \"terminal\" / - \"ide\" / \"ide-dev\"," - type: object - x-kubernetes-preserve-unknown-fields: true - exposure: - description: "Describes how the endpoint - should be exposed on the network. \n - - `public` means that the endpoint will - be exposed on the public network, typically - through a K8S ingress or an OpenShift - route. \n - `internal` means that the - endpoint will be exposed internally - outside of the main devworkspace POD, - typically by K8S services, to be consumed - by other elements running on the same - cloud internal network. \n - `none` - means that the endpoint will not be - exposed and will only be accessible - inside the main devworkspace POD, on - a local address. \n Default value is - `public`" - enum: - - public - - internal - - none + exposure: + description: "Describes how the endpoint + should be exposed on the network. \n - + `public` means that the endpoint will + be exposed on the public network, typically + through a K8S ingress or an OpenShift + route. \n - `internal` means that the + endpoint will be exposed internally outside + of the main workspace POD, typically by + K8S services, to be consumed by other + elements running on the same cloud internal + network. \n - `none` means that the endpoint + will not be exposed and will only be accessible + inside the main workspace POD, on a local + address. \n Default value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application + and transport protocols of the traffic + that will go through this endpoint. \n + - `http`: Endpoint will have `http` traffic, + typically on a TCP connection. It will + be automaticaly promoted to `https` when + the `secure` field is set to `true`. \n + - `https`: Endpoint will have `https` + traffic, typically on a TCP connection. + \n - `ws`: Endpoint will have `ws` traffic, + typically on a TCP connection. It will + be automaticaly promoted to `wss` when + the `secure` field is set to `true`. \n + - `wss`: Endpoint will have `wss` traffic, + typically on a TCP connection. \n - `tcp`: + Endpoint will have traffic on a TCP connection, + without specifying an application protocol. + \n - `udp`: Endpoint will have traffic + on an UDP connection, without specifying + an application protocol. \n Default value + is `http`" + type: string + secure: + description: Describes whether the endpoint + should be secured and protected by some + authentication process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + name: + description: Mandatory name that allows referencing + the component in commands, or inside a parent + type: string + uri: + description: Location in a file fetched from a + uri. + type: string + required: + - name + type: object + openshift: + description: Configuration overriding for an OpenShift + component in a plugin + oneOf: + - required: + - uri + - required: + - inlined + properties: + endpoints: + items: + properties: + attributes: + additionalProperties: type: string - name: - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + description: "Map of implementation-dependant + string-based free-form attributes. \n + Examples of Che-specific attributes: \n + - cookiesAuthEnabled: \"true\" / \"false\", + \n - type: \"terminal\" / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint + should be exposed on the network. \n - + `public` means that the endpoint will + be exposed on the public network, typically + through a K8S ingress or an OpenShift + route. \n - `internal` means that the + endpoint will be exposed internally outside + of the main workspace POD, typically by + K8S services, to be consumed by other + elements running on the same cloud internal + network. \n - `none` means that the endpoint + will not be exposed and will only be accessible + inside the main workspace POD, on a local + address. \n Default value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application + and transport protocols of the traffic + that will go through this endpoint. \n + - `http`: Endpoint will have `http` traffic, + typically on a TCP connection. It will + be automaticaly promoted to `https` when + the `secure` field is set to `true`. \n + - `https`: Endpoint will have `https` + traffic, typically on a TCP connection. + \n - `ws`: Endpoint will have `ws` traffic, + typically on a TCP connection. It will + be automaticaly promoted to `wss` when + the `secure` field is set to `true`. \n + - `wss`: Endpoint will have `wss` traffic, + typically on a TCP connection. \n - `tcp`: + Endpoint will have traffic on a TCP connection, + without specifying an application protocol. + \n - `udp`: Endpoint will have traffic + on an UDP connection, without specifying + an application protocol. \n Default value + is `http`" + type: string + secure: + description: Describes whether the endpoint + should be secured and protected by some + authentication process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + name: + description: Mandatory name that allows referencing + the component in commands, or inside a parent + type: string + uri: + description: Location in a file fetched from a + uri. + type: string + required: + - name + type: object + volume: + description: Configuration overriding for a Volume + component in a plugin + properties: + ephemeral: + description: Ephemeral volumes are not stored + persistently across restarts. Defaults to false + type: boolean + name: + description: Mandatory name that allows referencing + the Volume component in Container volume mounts + or inside a parent + type: string + size: + description: Size of the volume + type: string + required: + - name + type: object + type: object + type: array + id: + description: Id in a registry that contains a Devfile yaml + file + type: string + importReferenceType: + description: type of location from where the referenced + template structure should be retrieved + enum: + - Uri + - Id + - Kubernetes + type: string + kubernetes: + description: Reference to a Kubernetes CRD of type DevWorkspaceTemplate + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object + name: + description: Optional name that allows referencing the component + in commands, or inside a parent If omitted it will be + infered from the location (uri or registryEntry) + type: string + registryUrl: + type: string + uri: + description: Uri of a Devfile yaml file + type: string + type: object + volume: + description: Allows specifying the definition of a volume shared + by several other components + properties: + ephemeral: + description: Ephemeral volumes are not stored persistently + across restarts. Defaults to false + type: boolean + name: + description: Mandatory name that allows referencing the + Volume component in Container volume mounts or inside + a parent + type: string + size: + description: Size of the volume + type: string + required: + - name + type: object + type: object + type: array + events: + description: Bindings of commands to events. Each command is referred-to + by its name. + properties: + postStart: + description: Names of commands that should be executed after the + workspace is completely started. In the case of Che-Theia, these + commands should be executed after all plugins and extensions + have started, including project cloning. This means that those + commands are not triggered until the user opens the IDE in his + browser. + items: + type: string + type: array + postStop: + description: Names of commands that should be executed after stopping + the workspace. + items: + type: string + type: array + preStart: + description: Names of commands that should be executed before + the workspace start. Kubernetes-wise, these commands would typically + be executed in init containers of the workspace POD. + items: + type: string + type: array + preStop: + description: Names of commands that should be executed before + stopping the workspace. + items: + type: string + type: array + type: object + parent: + description: Parent workspace template + oneOf: + - required: + - uri + - required: + - id + - required: + - kubernetes + properties: + commands: + description: Overrides of commands encapsulated in a parent devfile + or a plugin. Overriding is done using a strategic merge patch + items: + oneOf: + - required: + - exec + - required: + - apply + - required: + - vscodeTask + - required: + - vscodeLaunch + - required: + - composite + - required: + - custom + properties: + apply: + description: "Command that consists in applying a given + component definition, typically bound to a workspace event. + \n For example, when an `apply` command is bound to a + `preStart` event, and references a `container` component, + it will start the container as a K8S initContainer in + the workspace POD, unless the component has its `dedicatedPod` + field set to `true`. \n When no `apply` command exist + for a given component, it is assumed the component will + be applied at workspace start by default." + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional command + attributes + type: object + component: + description: Describes component that will be applied + type: string + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command for + a given group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + type: string + label: + description: Optional label that provides a label for + this command to be used in Editor UI menus for example + type: string + required: + - id + type: object + commandType: + description: Type of workspace command + enum: + - Exec + - Apply + - VscodeTask + - VscodeLaunch + - Composite + - Custom + type: string + composite: + description: Composite command that allows executing several + sub-commands either sequentially or concurrently + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional command + attributes + type: object + commands: + description: The commands that comprise this composite + command + items: + type: string + type: array + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command for + a given group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + type: string + label: + description: Optional label that provides a label for + this command to be used in Editor UI menus for example + type: string + parallel: + description: Indicates if the sub-commands should be + executed concurrently + type: boolean + required: + - id + type: object + custom: + description: Custom command whose logic is implementation-dependant + and should be provided by the user possibly through some + dedicated plugin + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional command + attributes + type: object + commandClass: + description: Class of command that the associated implementation + component should use to process this command with + the appropriate logic + type: string + embeddedResource: + description: Additional free-form configuration for + this custom command that the implementation component + will know how to use + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command for + a given group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + type: string + label: + description: Optional label that provides a label for + this command to be used in Editor UI menus for example + type: string + required: + - commandClass + - embeddedResource + - id + type: object + exec: + description: CLI Command executed in an existing component + container + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional command + attributes + type: object + commandLine: + description: "The actual command-line string \n Special + variables that can be used: \n - `$PROJECTS_ROOT`: + A path where projects sources are mounted \n - `$PROJECT_SOURCE`: + A path to a project source ($PROJECTS_ROOT/). + If there are multiple projects, this will point to + the directory of the first one." + type: string + component: + description: Describes component to which given action + relates + type: string + env: + description: Optional list of environment variables + that have to be set before running the command + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command for + a given group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + hotReloadCapable: + description: "Whether the command is capable to reload + itself when source code changes. If set to `true` + the command won't be restarted and it is expected + to handle file changes on its own. \n Default value + is `false`" + type: boolean + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + type: string + label: + description: Optional label that provides a label for + this command to be used in Editor UI menus for example + type: string + workingDir: + description: "Working directory where the command should + be executed \n Special variables that can be used: + \n - `${PROJECTS_ROOT}`: A path where projects sources + are mounted \n - `${PROJECT_SOURCE}`: A path to a + project source (${PROJECTS_ROOT}/). + If there are multiple projects, this will point to + the directory of the first one." + type: string + required: + - id + type: object + vscodeLaunch: + description: "Command providing the definition of a VsCode + launch action \n Deprecated; removed in v1alpha2" + oneOf: + - required: + - uri + - required: + - inlined + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional command + attributes + type: object + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command for + a given group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + type: string + inlined: + description: Inlined content of the VsCode configuration + type: string + locationType: + description: Type of Vscode configuration command location + enum: + - Uri + - Inlined + type: string + uri: + description: Location as an absolute of relative URI + the VsCode configuration will be fetched from + type: string + required: + - id + type: object + vscodeTask: + description: "Command providing the definition of a VsCode + Task \n Deprecated; removed in v1alpha2" + oneOf: + - required: + - uri + - required: + - inlined + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional command + attributes + type: object + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command for + a given group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + type: string + inlined: + description: Inlined content of the VsCode configuration + type: string + locationType: + description: Type of Vscode configuration command location + enum: + - Uri + - Inlined + type: string + uri: + description: Location as an absolute of relative URI + the VsCode configuration will be fetched from + type: string + required: + - id + type: object + type: object + type: array + components: + description: Overrides of components encapsulated in a parent + devfile. Overriding is done using a strategic merge patch + items: + oneOf: + - required: + - container + - required: + - kubernetes + - required: + - openshift + - required: + - volume + - required: + - plugin + - required: + - custom + properties: + componentType: + description: Type of component + enum: + - Container + - Kubernetes + - Openshift + - Volume + - Plugin + - Custom + type: string + container: + description: Allows adding and configuring workspace-related + containers + properties: + args: + description: "The arguments to supply to the command + running the dockerimage component. The arguments are + supplied either to the default command provided in + the image or to the overridden command. \n Defaults + to an empty array, meaning use whatever is defined + in the image." + items: + type: string + type: array + command: + description: "The command to run in the dockerimage + component instead of the default one provided in the + image. \n Defaults to an empty array, meaning use + whatever is defined in the image." + items: + type: string + type: array + dedicatedPod: + description: "Specify if a container should run in its + own separated pod, instead of running as part of the + main development environment pod. \n Default value + is `false`" + type: boolean + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant + string-based free-form attributes. \n Examples + of Che-specific attributes: \n - cookiesAuthEnabled: + \"true\" / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint should + be exposed on the network. \n - `public` means + that the endpoint will be exposed on the public + network, typically through a K8S ingress or + an OpenShift route. \n - `internal` means that + the endpoint will be exposed internally outside + of the main workspace POD, typically by K8S + services, to be consumed by other elements running + on the same cloud internal network. \n - `none` + means that the endpoint will not be exposed + and will only be accessible inside the main + workspace POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application and transport + protocols of the traffic that will go through + this endpoint. \n - `http`: Endpoint will have + `http` traffic, typically on a TCP connection. + It will be automaticaly promoted to `https` + when the `secure` field is set to `true`. \n + - `https`: Endpoint will have `https` traffic, + typically on a TCP connection. \n - `ws`: Endpoint + will have `ws` traffic, typically on a TCP connection. + It will be automaticaly promoted to `wss` when + the `secure` field is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, typically + on a TCP connection. \n - `tcp`: Endpoint will + have traffic on a TCP connection, without specifying + an application protocol. \n - `udp`: Endpoint + will have traffic on an UDP connection, without + specifying an application protocol. \n Default + value is `http`" + type: string + secure: + description: Describes whether the endpoint should + be secured and protected by some authentication + process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + env: + description: Environment variables used in this container + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + image: + type: string + memoryLimit: + type: string + mountSources: + type: boolean + name: + type: string + sourceMapping: + description: Optional specification of the path in the + container where project sources should be transferred/mounted + when `mountSources` is `true`. When omitted, the value + of the `PROJECTS_ROOT` environment variable is used. + type: string + volumeMounts: + description: List of volumes mounts that should be mounted + is this container. + items: + description: Volume that should be mounted to a component + container + properties: + name: + description: The volume mount name is the name + of an existing `Volume` component. If several + containers mount the same volume name then they + will reuse the same volume and will be able + to access to the same files. + type: string + path: + description: The path in the component container + where the volume should be mounted. If not path + is mentioned, default path is the is `/`. + type: string + required: + - name + type: object + type: array + required: + - name + type: object + custom: + description: Custom component whose logic is implementation-dependant + and should be provided by the user possibly through some + dedicated controller + properties: + componentClass: + description: Class of component that the associated + implementation controller should use to process this + command with the appropriate logic + type: string + embeddedResource: + description: Additional free-form configuration for + this custom component that the implementation controller + will know how to use + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + name: + description: Mandatory name that allows referencing + the component in commands, or inside a parent + type: string + required: + - componentClass + - embeddedResource + - name + type: object + kubernetes: + description: Allows importing into the workspace the Kubernetes + resources defined in a given manifest. For example this + allows reusing the Kubernetes definitions used to deploy + some runtime components in production. + oneOf: + - required: + - uri + - required: + - inlined + properties: + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant + string-based free-form attributes. \n Examples + of Che-specific attributes: \n - cookiesAuthEnabled: + \"true\" / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint should + be exposed on the network. \n - `public` means + that the endpoint will be exposed on the public + network, typically through a K8S ingress or + an OpenShift route. \n - `internal` means that + the endpoint will be exposed internally outside + of the main workspace POD, typically by K8S + services, to be consumed by other elements running + on the same cloud internal network. \n - `none` + means that the endpoint will not be exposed + and will only be accessible inside the main + workspace POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application and transport + protocols of the traffic that will go through + this endpoint. \n - `http`: Endpoint will have + `http` traffic, typically on a TCP connection. + It will be automaticaly promoted to `https` + when the `secure` field is set to `true`. \n + - `https`: Endpoint will have `https` traffic, + typically on a TCP connection. \n - `ws`: Endpoint + will have `ws` traffic, typically on a TCP connection. + It will be automaticaly promoted to `wss` when + the `secure` field is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, typically + on a TCP connection. \n - `tcp`: Endpoint will + have traffic on a TCP connection, without specifying + an application protocol. \n - `udp`: Endpoint + will have traffic on an UDP connection, without + specifying an application protocol. \n Default + value is `http`" + type: string + secure: + description: Describes whether the endpoint should + be secured and protected by some authentication + process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + name: + description: Mandatory name that allows referencing + the component in commands, or inside a parent + type: string + uri: + description: Location in a file fetched from a uri. + type: string + required: + - name + type: object + openshift: + description: Allows importing into the workspace the OpenShift + resources defined in a given manifest. For example this + allows reusing the OpenShift definitions used to deploy + some runtime components in production. + oneOf: + - required: + - uri + - required: + - inlined + properties: + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant + string-based free-form attributes. \n Examples + of Che-specific attributes: \n - cookiesAuthEnabled: + \"true\" / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint should + be exposed on the network. \n - `public` means + that the endpoint will be exposed on the public + network, typically through a K8S ingress or + an OpenShift route. \n - `internal` means that + the endpoint will be exposed internally outside + of the main workspace POD, typically by K8S + services, to be consumed by other elements running + on the same cloud internal network. \n - `none` + means that the endpoint will not be exposed + and will only be accessible inside the main + workspace POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application and transport + protocols of the traffic that will go through + this endpoint. \n - `http`: Endpoint will have + `http` traffic, typically on a TCP connection. + It will be automaticaly promoted to `https` + when the `secure` field is set to `true`. \n + - `https`: Endpoint will have `https` traffic, + typically on a TCP connection. \n - `ws`: Endpoint + will have `ws` traffic, typically on a TCP connection. + It will be automaticaly promoted to `wss` when + the `secure` field is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, typically + on a TCP connection. \n - `tcp`: Endpoint will + have traffic on a TCP connection, without specifying + an application protocol. \n - `udp`: Endpoint + will have traffic on an UDP connection, without + specifying an application protocol. \n Default + value is `http`" + type: string + secure: + description: Describes whether the endpoint should + be secured and protected by some authentication + process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + name: + description: Mandatory name that allows referencing + the component in commands, or inside a parent + type: string + uri: + description: Location in a file fetched from a uri. + type: string + required: + - name + type: object + plugin: + description: "Allows importing a plugin. \n Plugins are + mainly imported devfiles that contribute components, commands + and events as a consistent single unit. They are defined + in either YAML files following the devfile syntax, or + as `DevWorkspaceTemplate` Kubernetes Custom Resources" + oneOf: + - required: + - uri + - required: + - id + - required: + - kubernetes + properties: + commands: + description: Overrides of commands encapsulated in a + parent devfile or a plugin. Overriding is done using + a strategic merge patch + items: + oneOf: + - required: + - exec + - required: + - apply + - required: + - vscodeTask + - required: + - vscodeLaunch + - required: + - composite + - required: + - custom + properties: + apply: + description: "Command that consists in applying + a given component definition, typically bound + to a workspace event. \n For example, when an + `apply` command is bound to a `preStart` event, + and references a `container` component, it will + start the container as a K8S initContainer in + the workspace POD, unless the component has + its `dedicatedPod` field set to `true`. \n When + no `apply` command exist for a given component, + it is assumed the component will be applied + at workspace start by default." + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + component: + description: Describes component that will + be applied + type: string + group: + description: Defines the group this command + is part of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. + type: string + label: + description: Optional label that provides + a label for this command to be used in Editor + UI menus for example + type: string + required: + - id + type: object + commandType: + description: Type of workspace command + enum: + - Exec + - Apply + - VscodeTask + - VscodeLaunch + - Composite + - Custom + type: string + composite: + description: Composite command that allows executing + several sub-commands either sequentially or + concurrently + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + commands: + description: The commands that comprise this + composite command + items: + type: string + type: array + group: + description: Defines the group this command + is part of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. + type: string + label: + description: Optional label that provides + a label for this command to be used in Editor + UI menus for example + type: string + parallel: + description: Indicates if the sub-commands + should be executed concurrently + type: boolean + required: + - id + type: object + custom: + description: Custom command whose logic is implementation-dependant + and should be provided by the user possibly + through some dedicated plugin + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + commandClass: + description: Class of command that the associated + implementation component should use to process + this command with the appropriate logic + type: string + embeddedResource: + description: Additional free-form configuration + for this custom command that the implementation + component will know how to use + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + group: + description: Defines the group this command + is part of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. + type: string + label: + description: Optional label that provides + a label for this command to be used in Editor + UI menus for example + type: string + required: + - commandClass + - embeddedResource + - id + type: object + exec: + description: CLI Command executed in an existing + component container + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + commandLine: + description: "The actual command-line string + \n Special variables that can be used: \n + \ - `$PROJECTS_ROOT`: A path where projects + sources are mounted \n - `$PROJECT_SOURCE`: + A path to a project source ($PROJECTS_ROOT/). + If there are multiple projects, this will + point to the directory of the first one." + type: string + component: + description: Describes component to which + given action relates + type: string + env: + description: Optional list of environment + variables that have to be set before running + the command + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + group: + description: Defines the group this command + is part of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + hotReloadCapable: + description: "Whether the command is capable + to reload itself when source code changes. + If set to `true` the command won't be restarted + and it is expected to handle file changes + on its own. \n Default value is `false`" + type: boolean + id: + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. + type: string + label: + description: Optional label that provides + a label for this command to be used in Editor + UI menus for example + type: string + workingDir: + description: "Working directory where the + command should be executed \n Special variables + that can be used: \n - `${PROJECTS_ROOT}`: + A path where projects sources are mounted + \n - `${PROJECT_SOURCE}`: A path to a project + source (${PROJECTS_ROOT}/). + If there are multiple projects, this will + point to the directory of the first one." + type: string + required: + - id + type: object + vscodeLaunch: + description: "Command providing the definition + of a VsCode launch action \n Deprecated; removed + in v1alpha2" + oneOf: + - required: + - uri + - required: + - inlined + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + group: + description: Defines the group this command + is part of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. + type: string + inlined: + description: Inlined content of the VsCode + configuration + type: string + locationType: + description: Type of Vscode configuration + command location + enum: + - Uri + - Inlined + type: string + uri: + description: Location as an absolute of relative + URI the VsCode configuration will be fetched + from + type: string + required: + - id + type: object + vscodeTask: + description: "Command providing the definition + of a VsCode Task \n Deprecated; removed in v1alpha2" + oneOf: + - required: + - uri + - required: + - inlined + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + group: + description: Defines the group this command + is part of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. + type: string + inlined: + description: Inlined content of the VsCode + configuration + type: string + locationType: + description: Type of Vscode configuration + command location + enum: + - Uri + - Inlined + type: string + uri: + description: Location as an absolute of relative + URI the VsCode configuration will be fetched + from + type: string + required: + - id + type: object + type: object + type: array + components: + description: Overrides of components encapsulated in + a plugin. Overriding is done using a strategic merge + patch. A plugin cannot override embedded plugin components. + items: + oneOf: + - required: + - container + - required: + - kubernetes + - required: + - openshift + - required: + - volume + properties: + componentType: + description: Type of component override for a + plugin + enum: + - Container + - Kubernetes + - Openshift + - Volume + type: string + container: + description: Configuration overriding for a Container + component in a plugin + properties: + args: + description: "The arguments to supply to the + command running the dockerimage component. + The arguments are supplied either to the + default command provided in the image or + to the overridden command. \n Defaults to + an empty array, meaning use whatever is + defined in the image." + items: + type: string + type: array + command: + description: "The command to run in the dockerimage + component instead of the default one provided + in the image. \n Defaults to an empty array, + meaning use whatever is defined in the image." + items: + type: string + type: array + dedicatedPod: + description: "Specify if a container should + run in its own separated pod, instead of + running as part of the main development + environment pod. \n Default value is `false`" + type: boolean + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant + string-based free-form attributes. + \n Examples of Che-specific attributes: + \n - cookiesAuthEnabled: \"true\" + / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint + should be exposed on the network. + \n - `public` means that the endpoint + will be exposed on the public network, + typically through a K8S ingress or + an OpenShift route. \n - `internal` + means that the endpoint will be exposed + internally outside of the main workspace + POD, typically by K8S services, to + be consumed by other elements running + on the same cloud internal network. + \n - `none` means that the endpoint + will not be exposed and will only + be accessible inside the main workspace + POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application + and transport protocols of the traffic + that will go through this endpoint. + \n - `http`: Endpoint will have `http` + traffic, typically on a TCP connection. + It will be automaticaly promoted to + `https` when the `secure` field is + set to `true`. \n - `https`: Endpoint + will have `https` traffic, typically + on a TCP connection. \n - `ws`: Endpoint + will have `ws` traffic, typically + on a TCP connection. It will be automaticaly + promoted to `wss` when the `secure` + field is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, + typically on a TCP connection. \n + - `tcp`: Endpoint will have traffic + on a TCP connection, without specifying + an application protocol. \n - `udp`: + Endpoint will have traffic on an UDP + connection, without specifying an + application protocol. \n Default value + is `http`" + type: string + secure: + description: Describes whether the endpoint + should be secured and protected by + some authentication process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + env: + description: Environment variables used in + this container + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + image: + type: string + memoryLimit: + type: string + mountSources: + type: boolean + name: + type: string + sourceMapping: + description: Optional specification of the + path in the container where project sources + should be transferred/mounted when `mountSources` + is `true`. When omitted, the value of the + `PROJECTS_ROOT` environment variable is + used. + type: string + volumeMounts: + description: List of volumes mounts that should + be mounted is this container. + items: + description: Volume that should be mounted + to a component container + properties: + name: + description: The volume mount name is + the name of an existing `Volume` component. + If several containers mount the same + volume name then they will reuse the + same volume and will be able to access + to the same files. + type: string + path: + description: The path in the component + container where the volume should + be mounted. If not path is mentioned, + default path is the is `/`. + type: string + required: + - name + type: object + type: array + required: + - name + type: object + kubernetes: + description: Configuration overriding for a Kubernetes + component in a plugin + oneOf: + - required: + - uri + - required: + - inlined + properties: + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant + string-based free-form attributes. + \n Examples of Che-specific attributes: + \n - cookiesAuthEnabled: \"true\" + / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint + should be exposed on the network. + \n - `public` means that the endpoint + will be exposed on the public network, + typically through a K8S ingress or + an OpenShift route. \n - `internal` + means that the endpoint will be exposed + internally outside of the main workspace + POD, typically by K8S services, to + be consumed by other elements running + on the same cloud internal network. + \n - `none` means that the endpoint + will not be exposed and will only + be accessible inside the main workspace + POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application + and transport protocols of the traffic + that will go through this endpoint. + \n - `http`: Endpoint will have `http` + traffic, typically on a TCP connection. + It will be automaticaly promoted to + `https` when the `secure` field is + set to `true`. \n - `https`: Endpoint + will have `https` traffic, typically + on a TCP connection. \n - `ws`: Endpoint + will have `ws` traffic, typically + on a TCP connection. It will be automaticaly + promoted to `wss` when the `secure` + field is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, + typically on a TCP connection. \n + - `tcp`: Endpoint will have traffic + on a TCP connection, without specifying + an application protocol. \n - `udp`: + Endpoint will have traffic on an UDP + connection, without specifying an + application protocol. \n Default value + is `http`" + type: string + secure: + description: Describes whether the endpoint + should be secured and protected by + some authentication process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + name: + description: Mandatory name that allows referencing + the component in commands, or inside a parent + type: string + uri: + description: Location in a file fetched from + a uri. + type: string + required: + - name + type: object + openshift: + description: Configuration overriding for an OpenShift + component in a plugin + oneOf: + - required: + - uri + - required: + - inlined + properties: + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant + string-based free-form attributes. + \n Examples of Che-specific attributes: + \n - cookiesAuthEnabled: \"true\" + / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint + should be exposed on the network. + \n - `public` means that the endpoint + will be exposed on the public network, + typically through a K8S ingress or + an OpenShift route. \n - `internal` + means that the endpoint will be exposed + internally outside of the main workspace + POD, typically by K8S services, to + be consumed by other elements running + on the same cloud internal network. + \n - `none` means that the endpoint + will not be exposed and will only + be accessible inside the main workspace + POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application + and transport protocols of the traffic + that will go through this endpoint. + \n - `http`: Endpoint will have `http` + traffic, typically on a TCP connection. + It will be automaticaly promoted to + `https` when the `secure` field is + set to `true`. \n - `https`: Endpoint + will have `https` traffic, typically + on a TCP connection. \n - `ws`: Endpoint + will have `ws` traffic, typically + on a TCP connection. It will be automaticaly + promoted to `wss` when the `secure` + field is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, + typically on a TCP connection. \n + - `tcp`: Endpoint will have traffic + on a TCP connection, without specifying + an application protocol. \n - `udp`: + Endpoint will have traffic on an UDP + connection, without specifying an + application protocol. \n Default value + is `http`" + type: string + secure: + description: Describes whether the endpoint + should be secured and protected by + some authentication process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + name: + description: Mandatory name that allows referencing + the component in commands, or inside a parent + type: string + uri: + description: Location in a file fetched from + a uri. + type: string + required: + - name + type: object + volume: + description: Configuration overriding for a Volume + component in a plugin + properties: + ephemeral: + description: Ephemeral volumes are not stored + persistently across restarts. Defaults to + false + type: boolean + name: + description: Mandatory name that allows referencing + the Volume component in Container volume + mounts or inside a parent + type: string + size: + description: Size of the volume + type: string + required: + - name + type: object + type: object + type: array + id: + description: Id in a registry that contains a Devfile + yaml file + type: string + importReferenceType: + description: type of location from where the referenced + template structure should be retrieved + enum: + - Uri + - Id + - Kubernetes + type: string + kubernetes: + description: Reference to a Kubernetes CRD of type DevWorkspaceTemplate + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object + name: + description: Optional name that allows referencing the + component in commands, or inside a parent If omitted + it will be infered from the location (uri or registryEntry) + type: string + registryUrl: + type: string + uri: + description: Uri of a Devfile yaml file + type: string + type: object + volume: + description: Allows specifying the definition of a volume + shared by several other components + properties: + ephemeral: + description: Ephemeral volumes are not stored persistently + across restarts. Defaults to false + type: boolean + name: + description: Mandatory name that allows referencing + the Volume component in Container volume mounts or + inside a parent + type: string + size: + description: Size of the volume + type: string + required: + - name + type: object + type: object + type: array + id: + description: Id in a registry that contains a Devfile yaml file + type: string + importReferenceType: + description: type of location from where the referenced template + structure should be retrieved + enum: + - Uri + - Id + - Kubernetes + type: string + kubernetes: + description: Reference to a Kubernetes CRD of type DevWorkspaceTemplate + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object + projects: + description: Overrides of projects encapsulated in a parent devfile. + Overriding is done using a strategic merge patch. + items: + oneOf: + - required: + - git + - required: + - github + - required: + - zip + - required: + - custom + properties: + clonePath: + description: Path relative to the root of the projects to + which this project should be cloned into. This is a unix-style + relative path (i.e. uses forward slashes). The path is + invalid if it is absolute or tries to escape the project + root through the usage of '..'. If not specified, defaults + to the project name. + type: string + custom: + description: Project's Custom source + properties: + embeddedResource: + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + projectSourceClass: + type: string + required: + - embeddedResource + - projectSourceClass + type: object + git: + description: Project's Git source + properties: + checkoutFrom: + description: Defines from what the project should be + checked out. Required if there are more than one remote + configured + properties: + remote: + description: The remote name should be used as init. + Required if there are more than one remote configured + type: string + revision: + description: The revision to checkout from. Should + be branch name, tag or commit id. Default branch + is used if missing or specified revision is not + found. + type: string + type: object + remotes: + additionalProperties: + type: string + description: The remotes map which should be initialized + in the git project. Must have at least one remote + configured + type: object + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + github: + description: Project's GitHub source + properties: + checkoutFrom: + description: Defines from what the project should be + checked out. Required if there are more than one remote + configured + properties: + remote: + description: The remote name should be used as init. + Required if there are more than one remote configured + type: string + revision: + description: The revision to checkout from. Should + be branch name, tag or commit id. Default branch + is used if missing or specified revision is not + found. + type: string + type: object + remotes: + additionalProperties: + type: string + description: The remotes map which should be initialized + in the git project. Must have at least one remote + configured + type: object + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + name: + description: Project name + type: string + sourceType: + description: Type of project source + enum: + - Git + - Github + - Zip + - Custom + type: string + zip: + description: Project's Zip source + properties: + location: + description: Zip project's source location address. + Should be file path of the archive, e.g. file://$FILE_PATH + type: string + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + required: + - name + type: object + type: array + registryUrl: + type: string + starterProjects: + description: Overrides of starter projects encapsulated in a parent + devfile Overriding is done using a strategic merge patch. + items: + oneOf: + - required: + - git + - required: + - github + - required: + - zip + - required: + - custom + properties: + clonePath: + description: Path relative to the root of the projects to + which this project should be cloned into. This is a unix-style + relative path (i.e. uses forward slashes). The path is + invalid if it is absolute or tries to escape the project + root through the usage of '..'. If not specified, defaults + to the project name. + type: string + custom: + description: Project's Custom source + properties: + embeddedResource: + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + projectSourceClass: + type: string + required: + - embeddedResource + - projectSourceClass + type: object + description: + description: Description of a starter project + type: string + git: + description: Project's Git source + properties: + checkoutFrom: + description: Defines from what the project should be + checked out. Required if there are more than one remote + configured + properties: + remote: + description: The remote name should be used as init. + Required if there are more than one remote configured + type: string + revision: + description: The revision to checkout from. Should + be branch name, tag or commit id. Default branch + is used if missing or specified revision is not + found. + type: string + type: object + remotes: + additionalProperties: + type: string + description: The remotes map which should be initialized + in the git project. Must have at least one remote + configured + type: object + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + github: + description: Project's GitHub source + properties: + checkoutFrom: + description: Defines from what the project should be + checked out. Required if there are more than one remote + configured + properties: + remote: + description: The remote name should be used as init. + Required if there are more than one remote configured + type: string + revision: + description: The revision to checkout from. Should + be branch name, tag or commit id. Default branch + is used if missing or specified revision is not + found. + type: string + type: object + remotes: + additionalProperties: + type: string + description: The remotes map which should be initialized + in the git project. Must have at least one remote + configured + type: object + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + name: + description: Project name + type: string + sourceType: + description: Type of project source + enum: + - Git + - Github + - Zip + - Custom + type: string + zip: + description: Project's Zip source + properties: + location: + description: Zip project's source location address. + Should be file path of the archive, e.g. file://$FILE_PATH + type: string + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + required: + - name + type: object + type: array + uri: + description: Uri of a Devfile yaml file + type: string + type: object + projects: + description: Projects worked on in the workspace, containing names + and sources locations + items: + oneOf: + - required: + - git + - required: + - github + - required: + - zip + - required: + - custom + properties: + clonePath: + description: Path relative to the root of the projects to which + this project should be cloned into. This is a unix-style relative + path (i.e. uses forward slashes). The path is invalid if it + is absolute or tries to escape the project root through the + usage of '..'. If not specified, defaults to the project name. + type: string + custom: + description: Project's Custom source + properties: + embeddedResource: + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + projectSourceClass: + type: string + required: + - embeddedResource + - projectSourceClass + type: object + git: + description: Project's Git source + properties: + checkoutFrom: + description: Defines from what the project should be checked + out. Required if there are more than one remote configured + properties: + remote: + description: The remote name should be used as init. + Required if there are more than one remote configured + type: string + revision: + description: The revision to checkout from. Should be + branch name, tag or commit id. Default branch is used + if missing or specified revision is not found. + type: string + type: object + remotes: + additionalProperties: + type: string + description: The remotes map which should be initialized + in the git project. Must have at least one remote configured + type: object + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + github: + description: Project's GitHub source + properties: + checkoutFrom: + description: Defines from what the project should be checked + out. Required if there are more than one remote configured + properties: + remote: + description: The remote name should be used as init. + Required if there are more than one remote configured + type: string + revision: + description: The revision to checkout from. Should be + branch name, tag or commit id. Default branch is used + if missing or specified revision is not found. + type: string + type: object + remotes: + additionalProperties: + type: string + description: The remotes map which should be initialized + in the git project. Must have at least one remote configured + type: object + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + name: + description: Project name + type: string + sourceType: + description: Type of project source + enum: + - Git + - Github + - Zip + - Custom + type: string + zip: + description: Project's Zip source + properties: + location: + description: Zip project's source location address. Should + be file path of the archive, e.g. file://$FILE_PATH + type: string + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + required: + - name + type: object + type: array + starterProjects: + description: StarterProjects is a project that can be used as a starting + point when bootstrapping new projects + items: + oneOf: + - required: + - git + - required: + - github + - required: + - zip + - required: + - custom + properties: + clonePath: + description: Path relative to the root of the projects to which + this project should be cloned into. This is a unix-style relative + path (i.e. uses forward slashes). The path is invalid if it + is absolute or tries to escape the project root through the + usage of '..'. If not specified, defaults to the project name. + type: string + custom: + description: Project's Custom source + properties: + embeddedResource: + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + projectSourceClass: + type: string + required: + - embeddedResource + - projectSourceClass + type: object + description: + description: Description of a starter project + type: string + git: + description: Project's Git source + properties: + checkoutFrom: + description: Defines from what the project should be checked + out. Required if there are more than one remote configured + properties: + remote: + description: The remote name should be used as init. + Required if there are more than one remote configured + type: string + revision: + description: The revision to checkout from. Should be + branch name, tag or commit id. Default branch is used + if missing or specified revision is not found. + type: string + type: object + remotes: + additionalProperties: + type: string + description: The remotes map which should be initialized + in the git project. Must have at least one remote configured + type: object + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + github: + description: Project's GitHub source + properties: + checkoutFrom: + description: Defines from what the project should be checked + out. Required if there are more than one remote configured + properties: + remote: + description: The remote name should be used as init. + Required if there are more than one remote configured + type: string + revision: + description: The revision to checkout from. Should be + branch name, tag or commit id. Default branch is used + if missing or specified revision is not found. + type: string + type: object + remotes: + additionalProperties: + type: string + description: The remotes map which should be initialized + in the git project. Must have at least one remote configured + type: object + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + name: + description: Project name + type: string + sourceType: + description: Type of project source + enum: + - Git + - Github + - Zip + - Custom + type: string + zip: + description: Project's Zip source + properties: + location: + description: Zip project's source location address. Should + be file path of the archive, e.g. file://$FILE_PATH + type: string + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + required: + - name + type: object + type: array + type: object + type: object + served: false + storage: false + - name: v1alpha2 + schema: + openAPIV3Schema: + description: DevWorkspaceTemplate is the Schema for the devworkspacetemplates + API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: Structure of the devworkspace. This is also the specification + of a devworkspace template. + properties: + attributes: + description: Map of implementation-dependant free-form YAML attributes. + type: object + x-kubernetes-preserve-unknown-fields: true + commands: + description: Predefined, ready-to-use, devworkspace-related commands + items: + oneOf: + - required: + - exec + - required: + - apply + - required: + - composite + - required: + - custom + properties: + apply: + description: "Command that consists in applying a given component + definition, typically bound to a devworkspace event. \n For + example, when an `apply` command is bound to a `preStart` + event, and references a `container` component, it will start + the container as a K8S initContainer in the devworkspace POD, + unless the component has its `dedicatedPod` field set to `true`. + \n When no `apply` command exist for a given component, it + is assumed the component will be applied at devworkspace start + by default, unless `deployByDefault` for that component is + set to false." + properties: + component: + description: Describes component that will be applied + type: string + group: + description: Defines the group this command is part of + properties: + isDefault: + description: Identifies the default command for a given + group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug + - deploy + type: string + required: + - kind + type: object + label: + description: Optional label that provides a label for this + command to be used in Editor UI menus for example + type: string + required: + - component + type: object + attributes: + description: Map of implementation-dependant free-form YAML + attributes. + type: object + x-kubernetes-preserve-unknown-fields: true + commandType: + description: Type of devworkspace command + enum: + - Exec + - Apply + - Composite + - Custom + type: string + composite: + description: Composite command that allows executing several + sub-commands either sequentially or concurrently + properties: + commands: + description: The commands that comprise this composite command + items: + type: string + type: array + group: + description: Defines the group this command is part of + properties: + isDefault: + description: Identifies the default command for a given + group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug + - deploy + type: string + required: + - kind + type: object + label: + description: Optional label that provides a label for this + command to be used in Editor UI menus for example + type: string + parallel: + description: Indicates if the sub-commands should be executed + concurrently + type: boolean + type: object + custom: + description: Custom command whose logic is implementation-dependant + and should be provided by the user possibly through some dedicated + plugin + properties: + commandClass: + description: Class of command that the associated implementation + component should use to process this command with the + appropriate logic + type: string + embeddedResource: + description: Additional free-form configuration for this + custom command that the implementation component will + know how to use + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + group: + description: Defines the group this command is part of + properties: + isDefault: + description: Identifies the default command for a given + group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug + - deploy + type: string + required: + - kind + type: object + label: + description: Optional label that provides a label for this + command to be used in Editor UI menus for example + type: string + required: + - commandClass + - embeddedResource + type: object + exec: + description: CLI Command executed in an existing component container + properties: + commandLine: + description: "The actual command-line string \n Special + variables that can be used: \n - `$PROJECTS_ROOT`: A + path where projects sources are mounted as defined by + container component's sourceMapping. \n - `$PROJECT_SOURCE`: + A path to a project source ($PROJECTS_ROOT/). + If there are multiple projects, this will point to the + directory of the first one." + type: string + component: + description: Describes component to which given action relates + type: string + env: + description: Optional list of environment variables that + have to be set before running the command + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + group: + description: Defines the group this command is part of + properties: + isDefault: + description: Identifies the default command for a given + group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug + - deploy + type: string + required: + - kind + type: object + hotReloadCapable: + description: "Whether the command is capable to reload itself + when source code changes. If set to `true` the command + won't be restarted and it is expected to handle file changes + on its own. \n Default value is `false`" + type: boolean + label: + description: Optional label that provides a label for this + command to be used in Editor UI menus for example + type: string + workingDir: + description: "Working directory where the command should + be executed \n Special variables that can be used: \n + \ - `$PROJECTS_ROOT`: A path where projects sources are + mounted as defined by container component's sourceMapping. + \n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/). + If there are multiple projects, this will point to the + directory of the first one." + type: string + required: + - commandLine + - component + type: object + id: + description: Mandatory identifier that allows referencing this + command in composite commands, from a parent, or in events. + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + required: + - id + type: object + type: array + components: + description: List of the devworkspace components, such as editor and + plugins, user-provided containers, or other types of components + items: + oneOf: + - required: + - container + - required: + - kubernetes + - required: + - openshift + - required: + - volume + - required: + - image + - required: + - plugin + - required: + - custom + properties: + attributes: + description: Map of implementation-dependant free-form YAML + attributes. + type: object + x-kubernetes-preserve-unknown-fields: true + componentType: + description: Type of component + enum: + - Container + - Kubernetes + - Openshift + - Volume + - Image + - Plugin + - Custom + type: string + container: + description: Allows adding and configuring devworkspace-related + containers + properties: + annotation: + description: Annotations that should be added to specific + resources for this container + properties: + deployment: + additionalProperties: + type: string + description: Annotations to be added to deployment + type: object + service: + additionalProperties: + type: string + description: Annotations to be added to service + type: object + type: object + args: + description: "The arguments to supply to the command running + the dockerimage component. The arguments are supplied + either to the default command provided in the image or + to the overridden command. \n Defaults to an empty array, + meaning use whatever is defined in the image." + items: + type: string + type: array + command: + description: "The command to run in the dockerimage component + instead of the default one provided in the image. \n Defaults + to an empty array, meaning use whatever is defined in + the image." + items: + type: string + type: array + cpuLimit: + type: string + cpuRequest: + type: string + dedicatedPod: + description: "Specify if a container should run in its own + separated pod, instead of running as part of the main + development environment pod. \n Default value is `false`" + type: boolean + endpoints: + items: + properties: + annotation: + additionalProperties: + type: string + description: Annotations to be added to Kubernetes + Ingress or Openshift Route + type: object + attributes: + description: "Map of implementation-dependant string-based + free-form attributes. \n Examples of Che-specific + attributes: \n - cookiesAuthEnabled: \"true\" / + \"false\", \n - type: \"terminal\" / \"ide\" / \"ide-dev\"," + type: object + x-kubernetes-preserve-unknown-fields: true + exposure: + description: "Describes how the endpoint should be + exposed on the network. \n - `public` means that + the endpoint will be exposed on the public network, + typically through a K8S ingress or an OpenShift + route. \n - `internal` means that the endpoint will + be exposed internally outside of the main devworkspace + POD, typically by K8S services, to be consumed by + other elements running on the same cloud internal + network. \n - `none` means that the endpoint will + not be exposed and will only be accessible inside + the main devworkspace POD, on a local address. \n + Default value is `public`" + enum: + - public + - internal + - none + type: string + name: + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application and transport + protocols of the traffic that will go through this + endpoint. \n - `http`: Endpoint will have `http` + traffic, typically on a TCP connection. It will + be automaticaly promoted to `https` when the `secure` + field is set to `true`. \n - `https`: Endpoint will + have `https` traffic, typically on a TCP connection. + \n - `ws`: Endpoint will have `ws` traffic, typically + on a TCP connection. It will be automaticaly promoted + to `wss` when the `secure` field is set to `true`. + \n - `wss`: Endpoint will have `wss` traffic, typically + on a TCP connection. \n - `tcp`: Endpoint will have + traffic on a TCP connection, without specifying + an application protocol. \n - `udp`: Endpoint will + have traffic on an UDP connection, without specifying + an application protocol. \n Default value is `http`" + enum: + - http + - https + - ws + - wss + - tcp + - udp + type: string + secure: + description: Describes whether the endpoint should + be secured and protected by some authentication + process. This requires a protocol of `https` or + `wss`. + type: boolean + targetPort: + description: The port number should be unique. + type: integer + required: + - name + - targetPort + type: object + type: array + env: + description: "Environment variables used in this container. + \n The following variables are reserved and cannot be + overridden via env: \n - `$PROJECTS_ROOT` \n - `$PROJECT_SOURCE`" + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + image: + type: string + memoryLimit: + type: string + memoryRequest: + type: string + mountSources: + description: "Toggles whether or not the project source + code should be mounted in the component. \n Defaults to + true for all component types except plugins and components + that set `dedicatedPod` to true." + type: boolean + sourceMapping: + description: Optional specification of the path in the container + where project sources should be transferred/mounted when + `mountSources` is `true`. When omitted, the default value + of /projects is used. + type: string + volumeMounts: + description: List of volumes mounts that should be mounted + is this container. + items: + description: Volume that should be mounted to a component + container + properties: + name: + description: The volume mount name is the name of + an existing `Volume` component. If several containers + mount the same volume name then they will reuse + the same volume and will be able to access to the + same files. + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + path: + description: The path in the component container where + the volume should be mounted. If not path is mentioned, + default path is the is `/`. + type: string + required: + - name + type: object + type: array + required: + - image + type: object + custom: + description: Custom component whose logic is implementation-dependant + and should be provided by the user possibly through some dedicated + controller + properties: + componentClass: + description: Class of component that the associated implementation + controller should use to process this command with the + appropriate logic + type: string + embeddedResource: + description: Additional free-form configuration for this + custom component that the implementation controller will + know how to use + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + required: + - componentClass + - embeddedResource + type: object + image: + description: Allows specifying the definition of an image for + outer loop builds + oneOf: + - required: + - dockerfile + properties: + autoBuild: + description: "Defines if the image should be built during + startup. \n Default value is `false`" + type: boolean + dockerfile: + description: Allows specifying dockerfile type build + oneOf: + - required: + - uri + - required: + - devfileRegistry + - required: + - git + properties: + args: + description: The arguments to supply to the dockerfile + build. + items: + type: string + type: array + buildContext: + description: Path of source directory to establish build + context. Defaults to ${PROJECT_ROOT} in the container + type: string + devfileRegistry: + description: Dockerfile's Devfile Registry source + properties: + id: + description: Id in a devfile registry that contains + a Dockerfile. The src in the OCI registry required + for the Dockerfile build will be downloaded for + building the image. + type: string + registryUrl: + description: Devfile Registry URL to pull the Dockerfile + from when using the Devfile Registry as Dockerfile + src. To ensure the Dockerfile gets resolved consistently + in different environments, it is recommended to + always specify the `devfileRegistryUrl` when `Id` + is used. + type: string + required: + - id + type: object + git: + description: Dockerfile's Git source + properties: + checkoutFrom: + description: Defines from what the project should + be checked out. Required if there are more than + one remote configured + properties: + remote: + description: The remote name should be used + as init. Required if there are more than one + remote configured + type: string + revision: + description: The revision to checkout from. + Should be branch name, tag or commit id. Default + branch is used if missing or specified revision + is not found. + type: string + type: object + fileLocation: + description: Location of the Dockerfile in the Git + repository when using git as Dockerfile src. Defaults + to Dockerfile. + type: string + remotes: + additionalProperties: + type: string + description: The remotes map which should be initialized + in the git project. Projects must have at least + one remote configured while StarterProjects & + Image Component's Git source can only have at + most one remote configured. + type: object + required: + - remotes + type: object + rootRequired: + description: "Specify if a privileged builder pod is + required. \n Default value is `false`" + type: boolean + srcType: + description: Type of Dockerfile src + enum: + - Uri + - DevfileRegistry + - Git + type: string + uri: + description: URI Reference of a Dockerfile. It can be + a full URL or a relative URI from the current devfile + as the base URI. + type: string + type: object + imageName: + description: Name of the image for the resulting outerloop + build + type: string + imageType: + description: Type of image + enum: + - Dockerfile + type: string + required: + - imageName + type: object + kubernetes: + description: Allows importing into the devworkspace the Kubernetes + resources defined in a given manifest. For example this allows + reusing the Kubernetes definitions used to deploy some runtime + components in production. + oneOf: + - required: + - uri + - required: + - inlined + properties: + deployByDefault: + description: "Defines if the component should be deployed + during startup. \n Default value is `false`" + type: boolean + endpoints: + items: + properties: + annotation: + additionalProperties: + type: string + description: Annotations to be added to Kubernetes + Ingress or Openshift Route + type: object + attributes: + description: "Map of implementation-dependant string-based + free-form attributes. \n Examples of Che-specific + attributes: \n - cookiesAuthEnabled: \"true\" / + \"false\", \n - type: \"terminal\" / \"ide\" / \"ide-dev\"," + type: object + x-kubernetes-preserve-unknown-fields: true + exposure: + description: "Describes how the endpoint should be + exposed on the network. \n - `public` means that + the endpoint will be exposed on the public network, + typically through a K8S ingress or an OpenShift + route. \n - `internal` means that the endpoint will + be exposed internally outside of the main devworkspace + POD, typically by K8S services, to be consumed by + other elements running on the same cloud internal + network. \n - `none` means that the endpoint will + not be exposed and will only be accessible inside + the main devworkspace POD, on a local address. \n + Default value is `public`" + enum: + - public + - internal + - none + type: string + name: + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application and transport + protocols of the traffic that will go through this + endpoint. \n - `http`: Endpoint will have `http` + traffic, typically on a TCP connection. It will + be automaticaly promoted to `https` when the `secure` + field is set to `true`. \n - `https`: Endpoint will + have `https` traffic, typically on a TCP connection. + \n - `ws`: Endpoint will have `ws` traffic, typically + on a TCP connection. It will be automaticaly promoted + to `wss` when the `secure` field is set to `true`. + \n - `wss`: Endpoint will have `wss` traffic, typically + on a TCP connection. \n - `tcp`: Endpoint will have + traffic on a TCP connection, without specifying + an application protocol. \n - `udp`: Endpoint will + have traffic on an UDP connection, without specifying + an application protocol. \n Default value is `http`" + enum: + - http + - https + - ws + - wss + - tcp + - udp + type: string + secure: + description: Describes whether the endpoint should + be secured and protected by some authentication + process. This requires a protocol of `https` or + `wss`. + type: boolean + targetPort: + description: The port number should be unique. + type: integer + required: + - name + - targetPort + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + uri: + description: Location in a file fetched from a uri. + type: string + type: object + name: + description: 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. + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + openshift: + description: Allows importing into the devworkspace the OpenShift + resources defined in a given manifest. For example this allows + reusing the OpenShift definitions used to deploy some runtime + components in production. + oneOf: + - required: + - uri + - required: + - inlined + properties: + deployByDefault: + description: "Defines if the component should be deployed + during startup. \n Default value is `false`" + type: boolean + endpoints: + items: + properties: + annotation: + additionalProperties: + type: string + description: Annotations to be added to Kubernetes + Ingress or Openshift Route + type: object + attributes: + description: "Map of implementation-dependant string-based + free-form attributes. \n Examples of Che-specific + attributes: \n - cookiesAuthEnabled: \"true\" / + \"false\", \n - type: \"terminal\" / \"ide\" / \"ide-dev\"," + type: object + x-kubernetes-preserve-unknown-fields: true + exposure: + description: "Describes how the endpoint should be + exposed on the network. \n - `public` means that + the endpoint will be exposed on the public network, + typically through a K8S ingress or an OpenShift + route. \n - `internal` means that the endpoint will + be exposed internally outside of the main devworkspace + POD, typically by K8S services, to be consumed by + other elements running on the same cloud internal + network. \n - `none` means that the endpoint will + not be exposed and will only be accessible inside + the main devworkspace POD, on a local address. \n + Default value is `public`" + enum: + - public + - internal + - none + type: string + name: + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application and transport + protocols of the traffic that will go through this + endpoint. \n - `http`: Endpoint will have `http` + traffic, typically on a TCP connection. It will + be automaticaly promoted to `https` when the `secure` + field is set to `true`. \n - `https`: Endpoint will + have `https` traffic, typically on a TCP connection. + \n - `ws`: Endpoint will have `ws` traffic, typically + on a TCP connection. It will be automaticaly promoted + to `wss` when the `secure` field is set to `true`. + \n - `wss`: Endpoint will have `wss` traffic, typically + on a TCP connection. \n - `tcp`: Endpoint will have + traffic on a TCP connection, without specifying + an application protocol. \n - `udp`: Endpoint will + have traffic on an UDP connection, without specifying + an application protocol. \n Default value is `http`" + enum: + - http + - https + - ws + - wss + - tcp + - udp + type: string + secure: + description: Describes whether the endpoint should + be secured and protected by some authentication + process. This requires a protocol of `https` or + `wss`. + type: boolean + targetPort: + description: The port number should be unique. + type: integer + required: + - name + - targetPort + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + uri: + description: Location in a file fetched from a uri. + type: string + type: object + plugin: + description: "Allows importing a plugin. \n Plugins are mainly + imported devfiles that contribute components, commands and + events as a consistent single unit. They are defined in either + YAML files following the devfile syntax, or as `DevWorkspaceTemplate` + Kubernetes Custom Resources" + oneOf: + - required: + - uri + - required: + - id + - required: + - kubernetes + properties: + commands: + description: Overrides of commands encapsulated in a parent + devfile or a plugin. Overriding is done according to K8S + strategic merge patch standard rules. + items: + oneOf: + - required: + - exec + - required: + - apply + - required: + - composite + properties: + apply: + description: "Command that consists in applying a + given component definition, typically bound to a + devworkspace event. \n For example, when an `apply` + command is bound to a `preStart` event, and references + a `container` component, it will start the container + as a K8S initContainer in the devworkspace POD, + unless the component has its `dedicatedPod` field + set to `true`. \n When no `apply` command exist + for a given component, it is assumed the component + will be applied at devworkspace start by default, + unless `deployByDefault` for that component is set + to false." + properties: + component: + description: Describes component that will be + applied + type: string + group: + description: Defines the group this command is + part of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command is + part of + enum: + - build + - run + - test + - debug + - deploy + type: string + type: object + label: + description: Optional label that provides a label + for this command to be used in Editor UI menus + for example + type: string + type: object + attributes: + description: Map of implementation-dependant free-form + YAML attributes. + type: object + x-kubernetes-preserve-unknown-fields: true + commandType: + description: Type of devworkspace command + enum: + - Exec + - Apply + - Composite + type: string + composite: + description: Composite command that allows executing + several sub-commands either sequentially or concurrently + properties: + commands: + description: The commands that comprise this composite + command + items: + type: string + type: array + group: + description: Defines the group this command is + part of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command is + part of + enum: + - build + - run + - test + - debug + - deploy + type: string + type: object + label: + description: Optional label that provides a label + for this command to be used in Editor UI menus + for example + type: string + parallel: + description: Indicates if the sub-commands should + be executed concurrently + type: boolean + type: object + exec: + description: CLI Command executed in an existing component + container + properties: + commandLine: + description: "The actual command-line string \n + Special variables that can be used: \n - `$PROJECTS_ROOT`: + A path where projects sources are mounted as + defined by container component's sourceMapping. + \n - `$PROJECT_SOURCE`: A path to a project + source ($PROJECTS_ROOT/). If there + are multiple projects, this will point to the + directory of the first one." + type: string + component: + description: Describes component to which given + action relates + type: string + env: + description: Optional list of environment variables + that have to be set before running the command + items: + properties: + name: + type: string + value: + type: string + required: + - name + type: object + type: array + group: + description: Defines the group this command is + part of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command is + part of + enum: + - build + - run + - test + - debug + - deploy + type: string + type: object + hotReloadCapable: + description: "Whether the command is capable to + reload itself when source code changes. If set + to `true` the command won't be restarted and + it is expected to handle file changes on its + own. \n Default value is `false`" + type: boolean + label: + description: Optional label that provides a label + for this command to be used in Editor UI menus + for example + type: string + workingDir: + description: "Working directory where the command + should be executed \n Special variables that + can be used: \n - `$PROJECTS_ROOT`: A path + where projects sources are mounted as defined + by container component's sourceMapping. \n - + `$PROJECT_SOURCE`: A path to a project source + ($PROJECTS_ROOT/). If there are + multiple projects, this will point to the directory + of the first one." + type: string + type: object + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + required: + - id + type: object + type: array + components: + description: Overrides of components encapsulated in a parent + devfile or a plugin. Overriding is done according to K8S + strategic merge patch standard rules. + items: + oneOf: + - required: + - container + - required: + - kubernetes + - required: + - openshift + - required: + - volume + - required: + - image + properties: + attributes: + description: Map of implementation-dependant free-form + YAML attributes. + type: object + x-kubernetes-preserve-unknown-fields: true + componentType: + description: Type of component + enum: + - Container + - Kubernetes + - Openshift + - Volume + - Image + type: string + container: + description: Allows adding and configuring devworkspace-related + containers + properties: + annotation: + description: Annotations that should be added + to specific resources for this container + properties: + deployment: + additionalProperties: + type: string + description: Annotations to be added to deployment + type: object + service: + additionalProperties: + type: string + description: Annotations to be added to service + type: object + type: object + args: + description: "The arguments to supply to the command + running the dockerimage component. The arguments + are supplied either to the default command provided + in the image or to the overridden command. \n + Defaults to an empty array, meaning use whatever + is defined in the image." + items: + type: string + type: array + command: + description: "The command to run in the dockerimage + component instead of the default one provided + in the image. \n Defaults to an empty array, + meaning use whatever is defined in the image." + items: + type: string + type: array + cpuLimit: + type: string + cpuRequest: + type: string + dedicatedPod: + description: "Specify if a container should run + in its own separated pod, instead of running + as part of the main development environment + pod. \n Default value is `false`" + type: boolean + endpoints: + items: + properties: + annotation: + additionalProperties: type: string - path: - description: Path of the endpoint URL + description: Annotations to be added to + Kubernetes Ingress or Openshift Route + type: object + attributes: + description: "Map of implementation-dependant + string-based free-form attributes. \n + Examples of Che-specific attributes: \n + - cookiesAuthEnabled: \"true\" / \"false\", + \n - type: \"terminal\" / \"ide\" / \"ide-dev\"," + type: object + x-kubernetes-preserve-unknown-fields: true + exposure: + description: "Describes how the endpoint + should be exposed on the network. \n - + `public` means that the endpoint will + be exposed on the public network, typically + through a K8S ingress or an OpenShift + route. \n - `internal` means that the + endpoint will be exposed internally outside + of the main devworkspace POD, typically + by K8S services, to be consumed by other + elements running on the same cloud internal + network. \n - `none` means that the endpoint + will not be exposed and will only be accessible + inside the main devworkspace POD, on a + local address. \n Default value is `public`" + enum: + - public + - internal + - none + type: string + name: + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application + and transport protocols of the traffic + that will go through this endpoint. \n + - `http`: Endpoint will have `http` traffic, + typically on a TCP connection. It will + be automaticaly promoted to `https` when + the `secure` field is set to `true`. \n + - `https`: Endpoint will have `https` + traffic, typically on a TCP connection. + \n - `ws`: Endpoint will have `ws` traffic, + typically on a TCP connection. It will + be automaticaly promoted to `wss` when + the `secure` field is set to `true`. \n + - `wss`: Endpoint will have `wss` traffic, + typically on a TCP connection. \n - `tcp`: + Endpoint will have traffic on a TCP connection, + without specifying an application protocol. + \n - `udp`: Endpoint will have traffic + on an UDP connection, without specifying + an application protocol. \n Default value + is `http`" + enum: + - http + - https + - ws + - wss + - tcp + - udp + type: string + secure: + description: Describes whether the endpoint + should be secured and protected by some + authentication process. This requires + a protocol of `https` or `wss`. + type: boolean + targetPort: + description: The port number should be unique. + type: integer + required: + - name + type: object + type: array + env: + description: "Environment variables used in this + container. \n The following variables are reserved + and cannot be overridden via env: \n - `$PROJECTS_ROOT` + \n - `$PROJECT_SOURCE`" + items: + properties: + name: + type: string + value: + type: string + required: + - name + type: object + type: array + image: + type: string + memoryLimit: + type: string + memoryRequest: + type: string + mountSources: + description: "Toggles whether or not the project + source code should be mounted in the component. + \n Defaults to true for all component types + except plugins and components that set `dedicatedPod` + to true." + type: boolean + sourceMapping: + description: Optional specification of the path + in the container where project sources should + be transferred/mounted when `mountSources` is + `true`. When omitted, the default value of /projects + is used. + type: string + volumeMounts: + description: List of volumes mounts that should + be mounted is this container. + items: + description: Volume that should be mounted to + a component container + properties: + name: + description: The volume mount name is the + name of an existing `Volume` component. + If several containers mount the same volume + name then they will reuse the same volume + and will be able to access to the same + files. + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + path: + description: The path in the component container + where the volume should be mounted. If + not path is mentioned, default path is + the is `/`. + type: string + required: + - name + type: object + type: array + type: object + image: + description: Allows specifying the definition of an + image for outer loop builds + oneOf: + - required: + - dockerfile + - required: + - autoBuild + properties: + autoBuild: + description: "Defines if the image should be built + during startup. \n Default value is `false`" + type: boolean + dockerfile: + description: Allows specifying dockerfile type + build + oneOf: + - required: + - uri + - required: + - devfileRegistry + - required: + - git + properties: + args: + description: The arguments to supply to the + dockerfile build. + items: + type: string + type: array + buildContext: + description: Path of source directory to establish + build context. Defaults to ${PROJECT_ROOT} + in the container + type: string + devfileRegistry: + description: Dockerfile's Devfile Registry + source + properties: + id: + description: Id in a devfile registry + that contains a Dockerfile. The src + in the OCI registry required for the + Dockerfile build will be downloaded + for building the image. type: string - protocol: - description: "Describes the application - and transport protocols of the traffic - that will go through this endpoint. - \n - `http`: Endpoint will have `http` - traffic, typically on a TCP connection. - It will be automaticaly promoted to - `https` when the `secure` field is set - to `true`. \n - `https`: Endpoint will - have `https` traffic, typically on a - TCP connection. \n - `ws`: Endpoint - will have `ws` traffic, typically on - a TCP connection. It will be automaticaly - promoted to `wss` when the `secure` - field is set to `true`. \n - `wss`: - Endpoint will have `wss` traffic, typically - on a TCP connection. \n - `tcp`: Endpoint - will have traffic on a TCP connection, - without specifying an application protocol. - \n - `udp`: Endpoint will have traffic - on an UDP connection, without specifying - an application protocol. \n Default - value is `http`" - enum: - - http - - https - - ws - - wss - - tcp - - udp + registryUrl: + description: Devfile Registry URL to pull + the Dockerfile from when using the Devfile + Registry as Dockerfile src. To ensure + the Dockerfile gets resolved consistently + in different environments, it is recommended + to always specify the `devfileRegistryUrl` + when `Id` is used. type: string - secure: - description: Describes whether the endpoint - should be secured and protected by some - authentication process. This requires - a protocol of `https` or `wss`. - type: boolean - targetPort: - description: The port number should be - unique. - type: integer - required: - - name type: object - type: array - env: - description: "Environment variables used in - this container. \n The following variables - are reserved and cannot be overridden via - env: \n - `$PROJECTS_ROOT` \n - `$PROJECT_SOURCE`" - items: + git: + description: Dockerfile's Git source properties: - name: - type: string - value: + checkoutFrom: + description: Defines from what the project + should be checked out. Required if there + are more than one remote configured + properties: + remote: + description: The remote name should + be used as init. Required if there + are more than one remote configured + type: string + revision: + description: The revision to checkout + from. Should be branch name, tag + or commit id. Default branch is + used if missing or specified revision + is not found. + type: string + type: object + fileLocation: + description: Location of the Dockerfile + in the Git repository when using git + as Dockerfile src. Defaults to Dockerfile. type: string - required: - - name + remotes: + additionalProperties: + type: string + description: The remotes map which should + be initialized in the git project. Projects + must have at least one remote configured + while StarterProjects & Image Component's + Git source can only have at most one + remote configured. + type: object type: object - type: array - image: - type: string - memoryLimit: + rootRequired: + description: "Specify if a privileged builder + pod is required. \n Default value is `false`" + type: boolean + srcType: + description: Type of Dockerfile src + enum: + - Uri + - DevfileRegistry + - Git + type: string + uri: + description: URI Reference of a Dockerfile. + It can be a full URL or a relative URI from + the current devfile as the base URI. + type: string + type: object + imageName: + description: Name of the image for the resulting + outerloop build + type: string + imageType: + description: Type of image + enum: + - Dockerfile + - AutoBuild + type: string + type: object + kubernetes: + description: Allows importing into the devworkspace + the Kubernetes resources defined in a given manifest. + For example this allows reusing the Kubernetes definitions + used to deploy some runtime components in production. + oneOf: + - required: + - uri + - required: + - inlined + properties: + deployByDefault: + description: "Defines if the component should + be deployed during startup. \n Default value + is `false`" + type: boolean + endpoints: + items: + properties: + annotation: + additionalProperties: + type: string + description: Annotations to be added to + Kubernetes Ingress or Openshift Route + type: object + attributes: + description: "Map of implementation-dependant + string-based free-form attributes. \n + Examples of Che-specific attributes: \n + - cookiesAuthEnabled: \"true\" / \"false\", + \n - type: \"terminal\" / \"ide\" / \"ide-dev\"," + type: object + x-kubernetes-preserve-unknown-fields: true + exposure: + description: "Describes how the endpoint + should be exposed on the network. \n - + `public` means that the endpoint will + be exposed on the public network, typically + through a K8S ingress or an OpenShift + route. \n - `internal` means that the + endpoint will be exposed internally outside + of the main devworkspace POD, typically + by K8S services, to be consumed by other + elements running on the same cloud internal + network. \n - `none` means that the endpoint + will not be exposed and will only be accessible + inside the main devworkspace POD, on a + local address. \n Default value is `public`" + enum: + - public + - internal + - none + type: string + name: + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application + and transport protocols of the traffic + that will go through this endpoint. \n + - `http`: Endpoint will have `http` traffic, + typically on a TCP connection. It will + be automaticaly promoted to `https` when + the `secure` field is set to `true`. \n + - `https`: Endpoint will have `https` + traffic, typically on a TCP connection. + \n - `ws`: Endpoint will have `ws` traffic, + typically on a TCP connection. It will + be automaticaly promoted to `wss` when + the `secure` field is set to `true`. \n + - `wss`: Endpoint will have `wss` traffic, + typically on a TCP connection. \n - `tcp`: + Endpoint will have traffic on a TCP connection, + without specifying an application protocol. + \n - `udp`: Endpoint will have traffic + on an UDP connection, without specifying + an application protocol. \n Default value + is `http`" + enum: + - http + - https + - ws + - wss + - tcp + - udp + type: string + secure: + description: Describes whether the endpoint + should be secured and protected by some + authentication process. This requires + a protocol of `https` or `wss`. + type: boolean + targetPort: + description: The port number should be unique. + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + uri: + description: Location in a file fetched from a + uri. + type: string + type: object + name: + description: 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. + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + openshift: + description: Allows importing into the devworkspace + the OpenShift resources defined in a given manifest. + For example this allows reusing the OpenShift definitions + used to deploy some runtime components in production. + oneOf: + - required: + - uri + - required: + - inlined + properties: + deployByDefault: + description: "Defines if the component should + be deployed during startup. \n Default value + is `false`" + type: boolean + endpoints: + items: + properties: + annotation: + additionalProperties: + type: string + description: Annotations to be added to + Kubernetes Ingress or Openshift Route + type: object + attributes: + description: "Map of implementation-dependant + string-based free-form attributes. \n + Examples of Che-specific attributes: \n + - cookiesAuthEnabled: \"true\" / \"false\", + \n - type: \"terminal\" / \"ide\" / \"ide-dev\"," + type: object + x-kubernetes-preserve-unknown-fields: true + exposure: + description: "Describes how the endpoint + should be exposed on the network. \n - + `public` means that the endpoint will + be exposed on the public network, typically + through a K8S ingress or an OpenShift + route. \n - `internal` means that the + endpoint will be exposed internally outside + of the main devworkspace POD, typically + by K8S services, to be consumed by other + elements running on the same cloud internal + network. \n - `none` means that the endpoint + will not be exposed and will only be accessible + inside the main devworkspace POD, on a + local address. \n Default value is `public`" + enum: + - public + - internal + - none + type: string + name: + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application + and transport protocols of the traffic + that will go through this endpoint. \n + - `http`: Endpoint will have `http` traffic, + typically on a TCP connection. It will + be automaticaly promoted to `https` when + the `secure` field is set to `true`. \n + - `https`: Endpoint will have `https` + traffic, typically on a TCP connection. + \n - `ws`: Endpoint will have `ws` traffic, + typically on a TCP connection. It will + be automaticaly promoted to `wss` when + the `secure` field is set to `true`. \n + - `wss`: Endpoint will have `wss` traffic, + typically on a TCP connection. \n - `tcp`: + Endpoint will have traffic on a TCP connection, + without specifying an application protocol. + \n - `udp`: Endpoint will have traffic + on an UDP connection, without specifying + an application protocol. \n Default value + is `http`" + enum: + - http + - https + - ws + - wss + - tcp + - udp + type: string + secure: + description: Describes whether the endpoint + should be secured and protected by some + authentication process. This requires + a protocol of `https` or `wss`. + type: boolean + targetPort: + description: The port number should be unique. + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + uri: + description: Location in a file fetched from a + uri. + type: string + type: object + volume: + description: Allows specifying the definition of a + volume shared by several other components + properties: + ephemeral: + description: Ephemeral volumes are not stored + persistently across restarts. Defaults to false + type: boolean + size: + description: Size of the volume + type: string + type: object + required: + - name + type: object + type: array + id: + description: Id in a registry that contains a Devfile yaml + file + type: string + importReferenceType: + description: type of location from where the referenced + template structure should be retrieved + enum: + - Uri + - Id + - Kubernetes + type: string + kubernetes: + description: Reference to a Kubernetes CRD of type DevWorkspaceTemplate + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object + registryUrl: + description: Registry URL to pull the parent devfile from + when using id in the parent reference. To ensure the parent + devfile gets resolved consistently in different environments, + it is recommended to always specify the `registryUrl` + when `id` is used. + type: string + uri: + description: URI Reference of a parent devfile YAML file. + It can be a full URL or a relative URI with the current + devfile as the base URI. + type: string + type: object + volume: + description: Allows specifying the definition of a volume shared + by several other components + properties: + ephemeral: + description: Ephemeral volumes are not stored persistently + across restarts. Defaults to false + type: boolean + size: + description: Size of the volume + type: string + type: object + required: + - name + type: object + type: array + events: + description: Bindings of commands to events. Each command is referred-to + by its name. + properties: + postStart: + description: IDs of commands that should be executed after the + devworkspace is completely started. In the case of Che-Theia, + these commands should be executed after all plugins and extensions + have started, including project cloning. This means that those + commands are not triggered until the user opens the IDE in his + browser. + items: + type: string + type: array + postStop: + description: IDs of commands that should be executed after stopping + the devworkspace. + items: + type: string + type: array + preStart: + description: IDs of commands that should be executed before the + devworkspace start. Kubernetes-wise, these commands would typically + be executed in init containers of the devworkspace POD. + items: + type: string + type: array + preStop: + description: IDs of commands that should be executed before stopping + the devworkspace. + items: + type: string + type: array + type: object + parent: + description: Parent devworkspace template + oneOf: + - required: + - uri + - required: + - id + - required: + - kubernetes + properties: + attributes: + description: Overrides of attributes encapsulated in a parent + devfile. Overriding is done according to K8S strategic merge + patch standard rules. + type: object + x-kubernetes-preserve-unknown-fields: true + commands: + description: Overrides of commands encapsulated in a parent devfile + or a plugin. Overriding is done according to K8S strategic merge + patch standard rules. + items: + oneOf: + - required: + - exec + - required: + - apply + - required: + - composite + properties: + apply: + description: "Command that consists in applying a given + component definition, typically bound to a devworkspace + event. \n For example, when an `apply` command is bound + to a `preStart` event, and references a `container` component, + it will start the container as a K8S initContainer in + the devworkspace POD, unless the component has its `dedicatedPod` + field set to `true`. \n When no `apply` command exist + for a given component, it is assumed the component will + be applied at devworkspace start by default, unless `deployByDefault` + for that component is set to false." + properties: + component: + description: Describes component that will be applied + type: string + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command for + a given group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug + - deploy + type: string + type: object + label: + description: Optional label that provides a label for + this command to be used in Editor UI menus for example + type: string + type: object + attributes: + description: Map of implementation-dependant free-form YAML + attributes. + type: object + x-kubernetes-preserve-unknown-fields: true + commandType: + description: Type of devworkspace command + enum: + - Exec + - Apply + - Composite + type: string + composite: + description: Composite command that allows executing several + sub-commands either sequentially or concurrently + properties: + commands: + description: The commands that comprise this composite + command + items: + type: string + type: array + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command for + a given group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug + - deploy + type: string + type: object + label: + description: Optional label that provides a label for + this command to be used in Editor UI menus for example + type: string + parallel: + description: Indicates if the sub-commands should be + executed concurrently + type: boolean + type: object + exec: + description: CLI Command executed in an existing component + container + properties: + commandLine: + description: "The actual command-line string \n Special + variables that can be used: \n - `$PROJECTS_ROOT`: + A path where projects sources are mounted as defined + by container component's sourceMapping. \n - `$PROJECT_SOURCE`: + A path to a project source ($PROJECTS_ROOT/). + If there are multiple projects, this will point to + the directory of the first one." + type: string + component: + description: Describes component to which given action + relates + type: string + env: + description: Optional list of environment variables + that have to be set before running the command + items: + properties: + name: + type: string + value: + type: string + required: + - name + type: object + type: array + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command for + a given group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug + - deploy + type: string + type: object + hotReloadCapable: + description: "Whether the command is capable to reload + itself when source code changes. If set to `true` + the command won't be restarted and it is expected + to handle file changes on its own. \n Default value + is `false`" + type: boolean + label: + description: Optional label that provides a label for + this command to be used in Editor UI menus for example + type: string + workingDir: + description: "Working directory where the command should + be executed \n Special variables that can be used: + \n - `$PROJECTS_ROOT`: A path where projects sources + are mounted as defined by container component's sourceMapping. + \n - `$PROJECT_SOURCE`: A path to a project source + ($PROJECTS_ROOT/). If there are multiple + projects, this will point to the directory of the + first one." + type: string + type: object + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, or + in events. + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + required: + - id + type: object + type: array + components: + description: Overrides of components encapsulated in a parent + devfile or a plugin. Overriding is done according to K8S strategic + merge patch standard rules. + items: + oneOf: + - required: + - container + - required: + - kubernetes + - required: + - openshift + - required: + - volume + - required: + - image + - required: + - plugin + properties: + attributes: + description: Map of implementation-dependant free-form YAML + attributes. + type: object + x-kubernetes-preserve-unknown-fields: true + componentType: + description: Type of component + enum: + - Container + - Kubernetes + - Openshift + - Volume + - Image + - Plugin + type: string + container: + description: Allows adding and configuring devworkspace-related + containers + properties: + annotation: + description: Annotations that should be added to specific + resources for this container + properties: + deployment: + additionalProperties: + type: string + description: Annotations to be added to deployment + type: object + service: + additionalProperties: + type: string + description: Annotations to be added to service + type: object + type: object + args: + description: "The arguments to supply to the command + running the dockerimage component. The arguments are + supplied either to the default command provided in + the image or to the overridden command. \n Defaults + to an empty array, meaning use whatever is defined + in the image." + items: + type: string + type: array + command: + description: "The command to run in the dockerimage + component instead of the default one provided in the + image. \n Defaults to an empty array, meaning use + whatever is defined in the image." + items: + type: string + type: array + cpuLimit: + type: string + cpuRequest: + type: string + dedicatedPod: + description: "Specify if a container should run in its + own separated pod, instead of running as part of the + main development environment pod. \n Default value + is `false`" + type: boolean + endpoints: + items: + properties: + annotation: + additionalProperties: type: string - memoryRequest: + description: Annotations to be added to Kubernetes + Ingress or Openshift Route + type: object + attributes: + description: "Map of implementation-dependant + string-based free-form attributes. \n Examples + of Che-specific attributes: \n - cookiesAuthEnabled: + \"true\" / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + x-kubernetes-preserve-unknown-fields: true + exposure: + description: "Describes how the endpoint should + be exposed on the network. \n - `public` means + that the endpoint will be exposed on the public + network, typically through a K8S ingress or + an OpenShift route. \n - `internal` means that + the endpoint will be exposed internally outside + of the main devworkspace POD, typically by K8S + services, to be consumed by other elements running + on the same cloud internal network. \n - `none` + means that the endpoint will not be exposed + and will only be accessible inside the main + devworkspace POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application and transport + protocols of the traffic that will go through + this endpoint. \n - `http`: Endpoint will have + `http` traffic, typically on a TCP connection. + It will be automaticaly promoted to `https` + when the `secure` field is set to `true`. \n + - `https`: Endpoint will have `https` traffic, + typically on a TCP connection. \n - `ws`: Endpoint + will have `ws` traffic, typically on a TCP connection. + It will be automaticaly promoted to `wss` when + the `secure` field is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, typically + on a TCP connection. \n - `tcp`: Endpoint will + have traffic on a TCP connection, without specifying + an application protocol. \n - `udp`: Endpoint + will have traffic on an UDP connection, without + specifying an application protocol. \n Default + value is `http`" + enum: + - http + - https + - ws + - wss + - tcp + - udp + type: string + secure: + description: Describes whether the endpoint should + be secured and protected by some authentication + process. This requires a protocol of `https` + or `wss`. + type: boolean + targetPort: + description: The port number should be unique. + type: integer + required: + - name + type: object + type: array + env: + description: "Environment variables used in this container. + \n The following variables are reserved and cannot + be overridden via env: \n - `$PROJECTS_ROOT` \n - + `$PROJECT_SOURCE`" + items: + properties: + name: + type: string + value: + type: string + required: + - name + type: object + type: array + image: + type: string + memoryLimit: + type: string + memoryRequest: + type: string + mountSources: + description: "Toggles whether or not the project source + code should be mounted in the component. \n Defaults + to true for all component types except plugins and + components that set `dedicatedPod` to true." + type: boolean + sourceMapping: + description: Optional specification of the path in the + container where project sources should be transferred/mounted + when `mountSources` is `true`. When omitted, the default + value of /projects is used. + type: string + volumeMounts: + description: List of volumes mounts that should be mounted + is this container. + items: + description: Volume that should be mounted to a component + container + properties: + name: + description: The volume mount name is the name + of an existing `Volume` component. If several + containers mount the same volume name then they + will reuse the same volume and will be able + to access to the same files. + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + path: + description: The path in the component container + where the volume should be mounted. If not path + is mentioned, default path is the is `/`. + type: string + required: + - name + type: object + type: array + type: object + image: + description: Allows specifying the definition of an image + for outer loop builds + oneOf: + - required: + - dockerfile + - required: + - autoBuild + properties: + autoBuild: + description: "Defines if the image should be built during + startup. \n Default value is `false`" + type: boolean + dockerfile: + description: Allows specifying dockerfile type build + oneOf: + - required: + - uri + - required: + - devfileRegistry + - required: + - git + properties: + args: + description: The arguments to supply to the dockerfile + build. + items: + type: string + type: array + buildContext: + description: Path of source directory to establish + build context. Defaults to ${PROJECT_ROOT} in + the container + type: string + devfileRegistry: + description: Dockerfile's Devfile Registry source + properties: + id: + description: Id in a devfile registry that contains + a Dockerfile. The src in the OCI registry + required for the Dockerfile build will be + downloaded for building the image. type: string - mountSources: - description: "Toggles whether or not the project - source code should be mounted in the component. - \n Defaults to true for all component types - except plugins and components that set `dedicatedPod` - to true." - type: boolean - sourceMapping: - description: Optional specification of the path - in the container where project sources should - be transferred/mounted when `mountSources` - is `true`. When omitted, the default value - of /projects is used. + registryUrl: + description: Devfile Registry URL to pull the + Dockerfile from when using the Devfile Registry + as Dockerfile src. To ensure the Dockerfile + gets resolved consistently in different environments, + it is recommended to always specify the `devfileRegistryUrl` + when `Id` is used. type: string - volumeMounts: - description: List of volumes mounts that should - be mounted is this container. - items: - description: Volume that should be mounted - to a component container - properties: - name: - description: The volume mount name is - the name of an existing `Volume` component. - If several containers mount the same - volume name then they will reuse the - same volume and will be able to access - to the same files. - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - path: - description: The path in the component - container where the volume should be - mounted. If not path is mentioned, default - path is the is `/`. - type: string - required: - - name - type: object - type: array type: object - image: - description: Allows specifying the definition of - an image for outer loop builds - oneOf: - - required: - - dockerfile - - required: - - autoBuild + git: + description: Dockerfile's Git source properties: - autoBuild: - description: "Defines if the image should be - built during startup. \n Default value is - `false`" - type: boolean - dockerfile: - description: Allows specifying dockerfile type - build - oneOf: - - required: - - uri - - required: - - devfileRegistry - - required: - - git + checkoutFrom: + description: Defines from what the project should + be checked out. Required if there are more + than one remote configured properties: - args: - description: The arguments to supply to - the dockerfile build. - items: + remote: + description: The remote name should be used + as init. Required if there are more than + one remote configured + type: string + revision: + description: The revision to checkout from. + Should be branch name, tag or commit id. + Default branch is used if missing or specified + revision is not found. + type: string + type: object + fileLocation: + description: Location of the Dockerfile in the + Git repository when using git as Dockerfile + src. Defaults to Dockerfile. + type: string + remotes: + additionalProperties: + type: string + description: The remotes map which should be + initialized in the git project. Projects must + have at least one remote configured while + StarterProjects & Image Component's Git source + can only have at most one remote configured. + type: object + type: object + rootRequired: + description: "Specify if a privileged builder pod + is required. \n Default value is `false`" + type: boolean + srcType: + description: Type of Dockerfile src + enum: + - Uri + - DevfileRegistry + - Git + type: string + uri: + description: URI Reference of a Dockerfile. It can + be a full URL or a relative URI from the current + devfile as the base URI. + type: string + type: object + imageName: + description: Name of the image for the resulting outerloop + build + type: string + imageType: + description: Type of image + enum: + - Dockerfile + - AutoBuild + type: string + type: object + kubernetes: + description: Allows importing into the devworkspace the + Kubernetes resources defined in a given manifest. For + example this allows reusing the Kubernetes definitions + used to deploy some runtime components in production. + oneOf: + - required: + - uri + - required: + - inlined + properties: + deployByDefault: + description: "Defines if the component should be deployed + during startup. \n Default value is `false`" + type: boolean + endpoints: + items: + properties: + annotation: + additionalProperties: + type: string + description: Annotations to be added to Kubernetes + Ingress or Openshift Route + type: object + attributes: + description: "Map of implementation-dependant + string-based free-form attributes. \n Examples + of Che-specific attributes: \n - cookiesAuthEnabled: + \"true\" / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + x-kubernetes-preserve-unknown-fields: true + exposure: + description: "Describes how the endpoint should + be exposed on the network. \n - `public` means + that the endpoint will be exposed on the public + network, typically through a K8S ingress or + an OpenShift route. \n - `internal` means that + the endpoint will be exposed internally outside + of the main devworkspace POD, typically by K8S + services, to be consumed by other elements running + on the same cloud internal network. \n - `none` + means that the endpoint will not be exposed + and will only be accessible inside the main + devworkspace POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application and transport + protocols of the traffic that will go through + this endpoint. \n - `http`: Endpoint will have + `http` traffic, typically on a TCP connection. + It will be automaticaly promoted to `https` + when the `secure` field is set to `true`. \n + - `https`: Endpoint will have `https` traffic, + typically on a TCP connection. \n - `ws`: Endpoint + will have `ws` traffic, typically on a TCP connection. + It will be automaticaly promoted to `wss` when + the `secure` field is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, typically + on a TCP connection. \n - `tcp`: Endpoint will + have traffic on a TCP connection, without specifying + an application protocol. \n - `udp`: Endpoint + will have traffic on an UDP connection, without + specifying an application protocol. \n Default + value is `http`" + enum: + - http + - https + - ws + - wss + - tcp + - udp + type: string + secure: + description: Describes whether the endpoint should + be secured and protected by some authentication + process. This requires a protocol of `https` + or `wss`. + type: boolean + targetPort: + description: The port number should be unique. + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + uri: + description: Location in a file fetched from a uri. + type: string + type: object + name: + description: 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. + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + openshift: + description: Allows importing into the devworkspace the + OpenShift resources defined in a given manifest. For example + this allows reusing the OpenShift definitions used to + deploy some runtime components in production. + oneOf: + - required: + - uri + - required: + - inlined + properties: + deployByDefault: + description: "Defines if the component should be deployed + during startup. \n Default value is `false`" + type: boolean + endpoints: + items: + properties: + annotation: + additionalProperties: + type: string + description: Annotations to be added to Kubernetes + Ingress or Openshift Route + type: object + attributes: + description: "Map of implementation-dependant + string-based free-form attributes. \n Examples + of Che-specific attributes: \n - cookiesAuthEnabled: + \"true\" / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + x-kubernetes-preserve-unknown-fields: true + exposure: + description: "Describes how the endpoint should + be exposed on the network. \n - `public` means + that the endpoint will be exposed on the public + network, typically through a K8S ingress or + an OpenShift route. \n - `internal` means that + the endpoint will be exposed internally outside + of the main devworkspace POD, typically by K8S + services, to be consumed by other elements running + on the same cloud internal network. \n - `none` + means that the endpoint will not be exposed + and will only be accessible inside the main + devworkspace POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application and transport + protocols of the traffic that will go through + this endpoint. \n - `http`: Endpoint will have + `http` traffic, typically on a TCP connection. + It will be automaticaly promoted to `https` + when the `secure` field is set to `true`. \n + - `https`: Endpoint will have `https` traffic, + typically on a TCP connection. \n - `ws`: Endpoint + will have `ws` traffic, typically on a TCP connection. + It will be automaticaly promoted to `wss` when + the `secure` field is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, typically + on a TCP connection. \n - `tcp`: Endpoint will + have traffic on a TCP connection, without specifying + an application protocol. \n - `udp`: Endpoint + will have traffic on an UDP connection, without + specifying an application protocol. \n Default + value is `http`" + enum: + - http + - https + - ws + - wss + - tcp + - udp + type: string + secure: + description: Describes whether the endpoint should + be secured and protected by some authentication + process. This requires a protocol of `https` + or `wss`. + type: boolean + targetPort: + description: The port number should be unique. + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + uri: + description: Location in a file fetched from a uri. + type: string + type: object + plugin: + description: "Allows importing a plugin. \n Plugins are + mainly imported devfiles that contribute components, commands + and events as a consistent single unit. They are defined + in either YAML files following the devfile syntax, or + as `DevWorkspaceTemplate` Kubernetes Custom Resources" + oneOf: + - required: + - uri + - required: + - id + - required: + - kubernetes + properties: + commands: + description: Overrides of commands encapsulated in a + parent devfile or a plugin. Overriding is done according + to K8S strategic merge patch standard rules. + items: + oneOf: + - required: + - exec + - required: + - apply + - required: + - composite + properties: + apply: + description: "Command that consists in applying + a given component definition, typically bound + to a devworkspace event. \n For example, when + an `apply` command is bound to a `preStart` + event, and references a `container` component, + it will start the container as a K8S initContainer + in the devworkspace POD, unless the component + has its `dedicatedPod` field set to `true`. + \n When no `apply` command exist for a given + component, it is assumed the component will + be applied at devworkspace start by default, + unless `deployByDefault` for that component + is set to false." + properties: + component: + description: Describes component that will + be applied + type: string + group: + description: Defines the group this command + is part of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug + - deploy type: string - type: array - buildContext: - description: Path of source directory to - establish build context. Defaults to ${PROJECT_ROOT} - in the container + type: object + label: + description: Optional label that provides + a label for this command to be used in Editor + UI menus for example + type: string + type: object + attributes: + description: Map of implementation-dependant free-form + YAML attributes. + type: object + x-kubernetes-preserve-unknown-fields: true + commandType: + description: Type of devworkspace command + enum: + - Exec + - Apply + - Composite + type: string + composite: + description: Composite command that allows executing + several sub-commands either sequentially or + concurrently + properties: + commands: + description: The commands that comprise this + composite command + items: type: string - devfileRegistry: - description: Dockerfile's Devfile Registry - source + type: array + group: + description: Defines the group this command + is part of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug + - deploy + type: string + type: object + label: + description: Optional label that provides + a label for this command to be used in Editor + UI menus for example + type: string + parallel: + description: Indicates if the sub-commands + should be executed concurrently + type: boolean + type: object + exec: + description: CLI Command executed in an existing + component container + properties: + commandLine: + description: "The actual command-line string + \n Special variables that can be used: \n + \ - `$PROJECTS_ROOT`: A path where projects + sources are mounted as defined by container + component's sourceMapping. \n - `$PROJECT_SOURCE`: + A path to a project source ($PROJECTS_ROOT/). + If there are multiple projects, this will + point to the directory of the first one." + type: string + component: + description: Describes component to which + given action relates + type: string + env: + description: Optional list of environment + variables that have to be set before running + the command + items: properties: - id: - description: Id in a devfile registry - that contains a Dockerfile. The src - in the OCI registry required for the - Dockerfile build will be downloaded - for building the image. - type: string - registryUrl: - description: Devfile Registry URL to - pull the Dockerfile from when using - the Devfile Registry as Dockerfile - src. To ensure the Dockerfile gets - resolved consistently in different - environments, it is recommended to - always specify the `devfileRegistryUrl` - when `Id` is used. + name: type: string - type: object - git: - description: Dockerfile's Git source - properties: - checkoutFrom: - description: Defines from what the project - should be checked out. Required if - there are more than one remote configured - properties: - remote: - description: The remote name should - be used as init. Required if there - are more than one remote configured - type: string - revision: - description: The revision to checkout - from. Should be branch name, tag - or commit id. Default branch is - used if missing or specified revision - is not found. - type: string - type: object - fileLocation: - description: Location of the Dockerfile - in the Git repository when using git - as Dockerfile src. Defaults to Dockerfile. + value: type: string - remotes: - additionalProperties: - type: string - description: The remotes map which should - be initialized in the git project. - Projects must have at least one remote - configured while StarterProjects & - Image Component's Git source can only - have at most one remote configured. - type: object + required: + - name type: object - rootRequired: - description: "Specify if a privileged builder - pod is required. \n Default value is `false`" - type: boolean - srcType: - description: Type of Dockerfile src - enum: - - Uri - - DevfileRegistry - - Git - type: string - uri: - description: URI Reference of a Dockerfile. - It can be a full URL or a relative URI - from the current devfile as the base URI. - type: string - type: object - imageName: - description: Name of the image for the resulting - outerloop build - type: string - imageType: - description: Type of image - enum: - - Dockerfile - - AutoBuild - type: string - type: object - kubernetes: - description: Allows importing into the devworkspace - the Kubernetes resources defined in a given manifest. - For example this allows reusing the Kubernetes - definitions used to deploy some runtime components - in production. - oneOf: - - required: - - uri - - required: - - inlined - properties: - deployByDefault: - description: "Defines if the component should - be deployed during startup. \n Default value - is `false`" - type: boolean - endpoints: - items: + type: array + group: + description: Defines the group this command + is part of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug + - deploy + type: string + type: object + hotReloadCapable: + description: "Whether the command is capable + to reload itself when source code changes. + If set to `true` the command won't be restarted + and it is expected to handle file changes + on its own. \n Default value is `false`" + type: boolean + label: + description: Optional label that provides + a label for this command to be used in Editor + UI menus for example + type: string + workingDir: + description: "Working directory where the + command should be executed \n Special variables + that can be used: \n - `$PROJECTS_ROOT`: + A path where projects sources are mounted + as defined by container component's sourceMapping. + \n - `$PROJECT_SOURCE`: A path to a project + source ($PROJECTS_ROOT/). + If there are multiple projects, this will + point to the directory of the first one." + type: string + type: object + id: + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + required: + - id + type: object + type: array + components: + description: Overrides of components encapsulated in + a parent devfile or a plugin. Overriding is done according + to K8S strategic merge patch standard rules. + items: + oneOf: + - required: + - container + - required: + - kubernetes + - required: + - openshift + - required: + - volume + - required: + - image + properties: + attributes: + description: Map of implementation-dependant free-form + YAML attributes. + type: object + x-kubernetes-preserve-unknown-fields: true + componentType: + description: Type of component + enum: + - Container + - Kubernetes + - Openshift + - Volume + - Image + type: string + container: + description: Allows adding and configuring devworkspace-related + containers + properties: + annotation: + description: Annotations that should be added + to specific resources for this container properties: - annotation: + deployment: additionalProperties: type: string description: Annotations to be added to - Kubernetes Ingress or Openshift Route + deployment type: object - attributes: - description: "Map of implementation-dependant - string-based free-form attributes. \n - Examples of Che-specific attributes: - \n - cookiesAuthEnabled: \"true\" / - \"false\", \n - type: \"terminal\" / - \"ide\" / \"ide-dev\"," + service: + additionalProperties: + type: string + description: Annotations to be added to + service type: object - x-kubernetes-preserve-unknown-fields: true - exposure: - description: "Describes how the endpoint - should be exposed on the network. \n - - `public` means that the endpoint will - be exposed on the public network, typically - through a K8S ingress or an OpenShift - route. \n - `internal` means that the - endpoint will be exposed internally - outside of the main devworkspace POD, - typically by K8S services, to be consumed - by other elements running on the same - cloud internal network. \n - `none` - means that the endpoint will not be - exposed and will only be accessible - inside the main devworkspace POD, on - a local address. \n Default value is - `public`" - enum: - - public - - internal - - none - type: string - name: - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - path: - description: Path of the endpoint URL - type: string - protocol: - description: "Describes the application - and transport protocols of the traffic - that will go through this endpoint. - \n - `http`: Endpoint will have `http` - traffic, typically on a TCP connection. - It will be automaticaly promoted to - `https` when the `secure` field is set - to `true`. \n - `https`: Endpoint will - have `https` traffic, typically on a - TCP connection. \n - `ws`: Endpoint - will have `ws` traffic, typically on - a TCP connection. It will be automaticaly - promoted to `wss` when the `secure` - field is set to `true`. \n - `wss`: - Endpoint will have `wss` traffic, typically - on a TCP connection. \n - `tcp`: Endpoint - will have traffic on a TCP connection, - without specifying an application protocol. - \n - `udp`: Endpoint will have traffic - on an UDP connection, without specifying - an application protocol. \n Default - value is `http`" - enum: - - http - - https - - ws - - wss - - tcp - - udp - type: string - secure: - description: Describes whether the endpoint - should be secured and protected by some - authentication process. This requires - a protocol of `https` or `wss`. - type: boolean - targetPort: - description: The port number should be - unique. - type: integer - required: - - name type: object - type: array - inlined: - description: Inlined manifest - type: string - locationType: - description: Type of Kubernetes-like location - enum: - - Uri - - Inlined - type: string - uri: - description: Location in a file fetched from - a uri. - type: string - type: object - name: - description: 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. - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - openshift: - description: Allows importing into the devworkspace - the OpenShift resources defined in a given manifest. - For example this allows reusing the OpenShift - definitions used to deploy some runtime components - in production. - oneOf: - - required: - - uri - - required: - - inlined - properties: - deployByDefault: - description: "Defines if the component should - be deployed during startup. \n Default value - is `false`" - type: boolean - endpoints: - items: + args: + description: "The arguments to supply to the + command running the dockerimage component. + The arguments are supplied either to the + default command provided in the image or + to the overridden command. \n Defaults to + an empty array, meaning use whatever is + defined in the image." + items: + type: string + type: array + command: + description: "The command to run in the dockerimage + component instead of the default one provided + in the image. \n Defaults to an empty array, + meaning use whatever is defined in the image." + items: + type: string + type: array + cpuLimit: + type: string + cpuRequest: + type: string + dedicatedPod: + description: "Specify if a container should + run in its own separated pod, instead of + running as part of the main development + environment pod. \n Default value is `false`" + type: boolean + endpoints: + items: + properties: + annotation: + additionalProperties: + type: string + description: Annotations to be added + to Kubernetes Ingress or Openshift + Route + type: object + attributes: + description: "Map of implementation-dependant + string-based free-form attributes. + \n Examples of Che-specific attributes: + \n - cookiesAuthEnabled: \"true\" + / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + x-kubernetes-preserve-unknown-fields: true + exposure: + description: "Describes how the endpoint + should be exposed on the network. + \n - `public` means that the endpoint + will be exposed on the public network, + typically through a K8S ingress or + an OpenShift route. \n - `internal` + means that the endpoint will be exposed + internally outside of the main devworkspace + POD, typically by K8S services, to + be consumed by other elements running + on the same cloud internal network. + \n - `none` means that the endpoint + will not be exposed and will only + be accessible inside the main devworkspace + POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application + and transport protocols of the traffic + that will go through this endpoint. + \n - `http`: Endpoint will have `http` + traffic, typically on a TCP connection. + It will be automaticaly promoted to + `https` when the `secure` field is + set to `true`. \n - `https`: Endpoint + will have `https` traffic, typically + on a TCP connection. \n - `ws`: Endpoint + will have `ws` traffic, typically + on a TCP connection. It will be automaticaly + promoted to `wss` when the `secure` + field is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, + typically on a TCP connection. \n + - `tcp`: Endpoint will have traffic + on a TCP connection, without specifying + an application protocol. \n - `udp`: + Endpoint will have traffic on an UDP + connection, without specifying an + application protocol. \n Default value + is `http`" + enum: + - http + - https + - ws + - wss + - tcp + - udp + type: string + secure: + description: Describes whether the endpoint + should be secured and protected by + some authentication process. This + requires a protocol of `https` or + `wss`. + type: boolean + targetPort: + description: The port number should + be unique. + type: integer + required: + - name + type: object + type: array + env: + description: "Environment variables used in + this container. \n The following variables + are reserved and cannot be overridden via + env: \n - `$PROJECTS_ROOT` \n - `$PROJECT_SOURCE`" + items: + properties: + name: + type: string + value: + type: string + required: + - name + type: object + type: array + image: + type: string + memoryLimit: + type: string + memoryRequest: + type: string + mountSources: + description: "Toggles whether or not the project + source code should be mounted in the component. + \n Defaults to true for all component types + except plugins and components that set `dedicatedPod` + to true." + type: boolean + sourceMapping: + description: Optional specification of the + path in the container where project sources + should be transferred/mounted when `mountSources` + is `true`. When omitted, the default value + of /projects is used. + type: string + volumeMounts: + description: List of volumes mounts that should + be mounted is this container. + items: + description: Volume that should be mounted + to a component container + properties: + name: + description: The volume mount name is + the name of an existing `Volume` component. + If several containers mount the same + volume name then they will reuse the + same volume and will be able to access + to the same files. + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + path: + description: The path in the component + container where the volume should + be mounted. If not path is mentioned, + default path is the is `/`. + type: string + required: + - name + type: object + type: array + type: object + image: + description: Allows specifying the definition + of an image for outer loop builds + oneOf: + - required: + - dockerfile + - required: + - autoBuild + properties: + autoBuild: + description: "Defines if the image should + be built during startup. \n Default value + is `false`" + type: boolean + dockerfile: + description: Allows specifying dockerfile + type build + oneOf: + - required: + - uri + - required: + - devfileRegistry + - required: + - git properties: - annotation: - additionalProperties: + args: + description: The arguments to supply to + the dockerfile build. + items: type: string - description: Annotations to be added to - Kubernetes Ingress or Openshift Route + type: array + buildContext: + description: Path of source directory + to establish build context. Defaults + to ${PROJECT_ROOT} in the container + type: string + devfileRegistry: + description: Dockerfile's Devfile Registry + source + properties: + id: + description: Id in a devfile registry + that contains a Dockerfile. The + src in the OCI registry required + for the Dockerfile build will be + downloaded for building the image. + type: string + registryUrl: + description: Devfile Registry URL + to pull the Dockerfile from when + using the Devfile Registry as Dockerfile + src. To ensure the Dockerfile gets + resolved consistently in different + environments, it is recommended + to always specify the `devfileRegistryUrl` + when `Id` is used. + type: string type: object - attributes: - description: "Map of implementation-dependant - string-based free-form attributes. \n - Examples of Che-specific attributes: - \n - cookiesAuthEnabled: \"true\" / - \"false\", \n - type: \"terminal\" / - \"ide\" / \"ide-dev\"," + git: + description: Dockerfile's Git source + properties: + checkoutFrom: + description: Defines from what the + project should be checked out. Required + if there are more than one remote + configured + properties: + remote: + description: The remote name should + be used as init. Required if + there are more than one remote + configured + type: string + revision: + description: The revision to checkout + from. Should be branch name, + tag or commit id. Default branch + is used if missing or specified + revision is not found. + type: string + type: object + fileLocation: + description: Location of the Dockerfile + in the Git repository when using + git as Dockerfile src. Defaults + to Dockerfile. + type: string + remotes: + additionalProperties: + type: string + description: The remotes map which + should be initialized in the git + project. Projects must have at least + one remote configured while StarterProjects + & Image Component's Git source can + only have at most one remote configured. + type: object type: object - x-kubernetes-preserve-unknown-fields: true - exposure: - description: "Describes how the endpoint - should be exposed on the network. \n - - `public` means that the endpoint will - be exposed on the public network, typically - through a K8S ingress or an OpenShift - route. \n - `internal` means that the - endpoint will be exposed internally - outside of the main devworkspace POD, - typically by K8S services, to be consumed - by other elements running on the same - cloud internal network. \n - `none` - means that the endpoint will not be - exposed and will only be accessible - inside the main devworkspace POD, on - a local address. \n Default value is - `public`" + rootRequired: + description: "Specify if a privileged + builder pod is required. \n Default + value is `false`" + type: boolean + srcType: + description: Type of Dockerfile src enum: - - public - - internal - - none - type: string - name: - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + - Uri + - DevfileRegistry + - Git type: string - path: - description: Path of the endpoint URL + uri: + description: URI Reference of a Dockerfile. + It can be a full URL or a relative URI + from the current devfile as the base + URI. type: string - protocol: - description: "Describes the application - and transport protocols of the traffic - that will go through this endpoint. - \n - `http`: Endpoint will have `http` - traffic, typically on a TCP connection. - It will be automaticaly promoted to - `https` when the `secure` field is set - to `true`. \n - `https`: Endpoint will - have `https` traffic, typically on a - TCP connection. \n - `ws`: Endpoint - will have `ws` traffic, typically on - a TCP connection. It will be automaticaly - promoted to `wss` when the `secure` - field is set to `true`. \n - `wss`: - Endpoint will have `wss` traffic, typically - on a TCP connection. \n - `tcp`: Endpoint - will have traffic on a TCP connection, - without specifying an application protocol. - \n - `udp`: Endpoint will have traffic - on an UDP connection, without specifying - an application protocol. \n Default - value is `http`" - enum: - - http - - https - - ws - - wss - - tcp - - udp - type: string - secure: - description: Describes whether the endpoint - should be secured and protected by some - authentication process. This requires - a protocol of `https` or `wss`. - type: boolean - targetPort: - description: The port number should be - unique. - type: integer - required: - - name type: object - type: array - inlined: - description: Inlined manifest - type: string - locationType: - description: Type of Kubernetes-like location - enum: - - Uri - - Inlined - type: string - uri: - description: Location in a file fetched from - a uri. - type: string - type: object - volume: - description: Allows specifying the definition of - a volume shared by several other components - properties: - ephemeral: - description: Ephemeral volumes are not stored - persistently across restarts. Defaults to - false - type: boolean - size: - description: Size of the volume - type: string - type: object - required: - - name + imageName: + description: Name of the image for the resulting + outerloop build + type: string + imageType: + description: Type of image + enum: + - Dockerfile + - AutoBuild + type: string + type: object + kubernetes: + description: Allows importing into the devworkspace + the Kubernetes resources defined in a given + manifest. For example this allows reusing the + Kubernetes definitions used to deploy some runtime + components in production. + oneOf: + - required: + - uri + - required: + - inlined + properties: + deployByDefault: + description: "Defines if the component should + be deployed during startup. \n Default value + is `false`" + type: boolean + endpoints: + items: + properties: + annotation: + additionalProperties: + type: string + description: Annotations to be added + to Kubernetes Ingress or Openshift + Route + type: object + attributes: + description: "Map of implementation-dependant + string-based free-form attributes. + \n Examples of Che-specific attributes: + \n - cookiesAuthEnabled: \"true\" + / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + x-kubernetes-preserve-unknown-fields: true + exposure: + description: "Describes how the endpoint + should be exposed on the network. + \n - `public` means that the endpoint + will be exposed on the public network, + typically through a K8S ingress or + an OpenShift route. \n - `internal` + means that the endpoint will be exposed + internally outside of the main devworkspace + POD, typically by K8S services, to + be consumed by other elements running + on the same cloud internal network. + \n - `none` means that the endpoint + will not be exposed and will only + be accessible inside the main devworkspace + POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application + and transport protocols of the traffic + that will go through this endpoint. + \n - `http`: Endpoint will have `http` + traffic, typically on a TCP connection. + It will be automaticaly promoted to + `https` when the `secure` field is + set to `true`. \n - `https`: Endpoint + will have `https` traffic, typically + on a TCP connection. \n - `ws`: Endpoint + will have `ws` traffic, typically + on a TCP connection. It will be automaticaly + promoted to `wss` when the `secure` + field is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, + typically on a TCP connection. \n + - `tcp`: Endpoint will have traffic + on a TCP connection, without specifying + an application protocol. \n - `udp`: + Endpoint will have traffic on an UDP + connection, without specifying an + application protocol. \n Default value + is `http`" + enum: + - http + - https + - ws + - wss + - tcp + - udp + type: string + secure: + description: Describes whether the endpoint + should be secured and protected by + some authentication process. This + requires a protocol of `https` or + `wss`. + type: boolean + targetPort: + description: The port number should + be unique. + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + uri: + description: Location in a file fetched from + a uri. + type: string + type: object + name: + description: 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. + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + openshift: + description: Allows importing into the devworkspace + the OpenShift resources defined in a given manifest. + For example this allows reusing the OpenShift + definitions used to deploy some runtime components + in production. + oneOf: + - required: + - uri + - required: + - inlined + properties: + deployByDefault: + description: "Defines if the component should + be deployed during startup. \n Default value + is `false`" + type: boolean + endpoints: + items: + properties: + annotation: + additionalProperties: + type: string + description: Annotations to be added + to Kubernetes Ingress or Openshift + Route + type: object + attributes: + description: "Map of implementation-dependant + string-based free-form attributes. + \n Examples of Che-specific attributes: + \n - cookiesAuthEnabled: \"true\" + / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + x-kubernetes-preserve-unknown-fields: true + exposure: + description: "Describes how the endpoint + should be exposed on the network. + \n - `public` means that the endpoint + will be exposed on the public network, + typically through a K8S ingress or + an OpenShift route. \n - `internal` + means that the endpoint will be exposed + internally outside of the main devworkspace + POD, typically by K8S services, to + be consumed by other elements running + on the same cloud internal network. + \n - `none` means that the endpoint + will not be exposed and will only + be accessible inside the main devworkspace + POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application + and transport protocols of the traffic + that will go through this endpoint. + \n - `http`: Endpoint will have `http` + traffic, typically on a TCP connection. + It will be automaticaly promoted to + `https` when the `secure` field is + set to `true`. \n - `https`: Endpoint + will have `https` traffic, typically + on a TCP connection. \n - `ws`: Endpoint + will have `ws` traffic, typically + on a TCP connection. It will be automaticaly + promoted to `wss` when the `secure` + field is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, + typically on a TCP connection. \n + - `tcp`: Endpoint will have traffic + on a TCP connection, without specifying + an application protocol. \n - `udp`: + Endpoint will have traffic on an UDP + connection, without specifying an + application protocol. \n Default value + is `http`" + enum: + - http + - https + - ws + - wss + - tcp + - udp + type: string + secure: + description: Describes whether the endpoint + should be secured and protected by + some authentication process. This + requires a protocol of `https` or + `wss`. + type: boolean + targetPort: + description: The port number should + be unique. + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + uri: + description: Location in a file fetched from + a uri. + type: string + type: object + volume: + description: Allows specifying the definition + of a volume shared by several other components + properties: + ephemeral: + description: Ephemeral volumes are not stored + persistently across restarts. Defaults to + false + type: boolean + size: + description: Size of the volume + type: string + type: object + required: + - name + type: object + type: array + id: + description: Id in a registry that contains a Devfile + yaml file + type: string + importReferenceType: + description: type of location from where the referenced + template structure should be retrieved + enum: + - Uri + - Id + - Kubernetes + type: string + kubernetes: + description: Reference to a Kubernetes CRD of type DevWorkspaceTemplate + properties: + name: + type: string + namespace: + type: string type: object - type: array - id: - description: Id in a registry that contains a Devfile - yaml file - type: string - importReferenceType: - description: type of location from where the referenced - template structure should be retrieved - enum: - - Uri - - Id - - Kubernetes - type: string - kubernetes: - description: Reference to a Kubernetes CRD of type DevWorkspaceTemplate - properties: - name: - type: string - namespace: - type: string - type: object - registryUrl: - description: Registry URL to pull the parent devfile from - when using id in the parent reference. To ensure the - parent devfile gets resolved consistently in different - environments, it is recommended to always specify the - `registryUrl` when `id` is used. - type: string - uri: - description: URI Reference of a parent devfile YAML file. - It can be a full URL or a relative URI with the current - devfile as the base URI. - type: string - type: object - volume: - description: Allows specifying the definition of a volume - shared by several other components - properties: - ephemeral: - description: Ephemeral volumes are not stored persistently - across restarts. Defaults to false - type: boolean - size: - description: Size of the volume - type: string - type: object - required: - - name - type: object - type: array - id: - description: Id in a registry that contains a Devfile yaml file - type: string - importReferenceType: - description: type of location from where the referenced template - structure should be retrieved - enum: - - Uri - - Id - - Kubernetes - type: string - kubernetes: - description: Reference to a Kubernetes CRD of type DevWorkspaceTemplate - properties: - name: - type: string - namespace: - type: string - required: - - name - type: object - projects: - description: Overrides of projects encapsulated in a parent devfile. - Overriding is done according to K8S strategic merge patch standard - rules. - items: - oneOf: - - required: - - git - - required: - - zip - properties: - attributes: - description: Map of implementation-dependant free-form YAML - attributes. - type: object - x-kubernetes-preserve-unknown-fields: true - clonePath: - description: Path relative to the root of the projects to - which this project should be cloned into. This is a unix-style - relative path (i.e. uses forward slashes). The path is invalid - if it is absolute or tries to escape the project root through - the usage of '..'. If not specified, defaults to the project - name. - type: string - git: - description: Project's Git source - properties: - checkoutFrom: - description: Defines from what the project should be checked - out. Required if there are more than one remote configured - properties: - remote: - description: The remote name should be used as init. - Required if there are more than one remote configured - type: string - revision: - description: The revision to checkout from. Should - be branch name, tag or commit id. Default branch - is used if missing or specified revision is not - found. - type: string - type: object - remotes: - additionalProperties: + registryUrl: + description: Registry URL to pull the parent devfile + from when using id in the parent reference. To ensure + the parent devfile gets resolved consistently in different + environments, it is recommended to always specify + the `registryUrl` when `id` is used. type: string - description: The remotes map which should be initialized - in the git project. Projects must have at least one - remote configured while StarterProjects & Image Component's - Git source can only have at most one remote configured. - type: object - type: object + uri: + description: URI Reference of a parent devfile YAML + file. It can be a full URL or a relative URI with + the current devfile as the base URI. + type: string + type: object + volume: + description: Allows specifying the definition of a volume + shared by several other components + properties: + ephemeral: + description: Ephemeral volumes are not stored persistently + across restarts. Defaults to false + type: boolean + size: + description: Size of the volume + type: string + type: object + required: + - name + type: object + type: array + id: + description: Id in a registry that contains a Devfile yaml file + type: string + importReferenceType: + description: type of location from where the referenced template + structure should be retrieved + enum: + - Uri + - Id + - Kubernetes + type: string + kubernetes: + description: Reference to a Kubernetes CRD of type DevWorkspaceTemplate + properties: name: - description: Project name - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string - sourceType: - description: Type of project source - enum: - - Git - - Zip + namespace: type: string - zip: - description: Project's Zip source - properties: - location: - description: Zip project's source location address. Should - be file path of the archive, e.g. file://$FILE_PATH - type: string - type: object required: - name type: object - type: array - registryUrl: - description: Registry URL to pull the parent devfile from when using - id in the parent reference. To ensure the parent devfile gets - resolved consistently in different environments, it is recommended - to always specify the `registryUrl` when `id` is used. - type: string - starterProjects: - description: Overrides of starterProjects encapsulated in a parent - devfile. Overriding is done according to K8S strategic merge patch - standard rules. - items: - oneOf: - - required: - - git - - required: - - zip - properties: - attributes: - description: Map of implementation-dependant free-form YAML - attributes. - type: object - x-kubernetes-preserve-unknown-fields: true - description: - description: Description of a starter project - type: string - git: - description: Project's Git source - properties: - checkoutFrom: - description: Defines from what the project should be checked - out. Required if there are more than one remote configured - properties: - remote: - description: The remote name should be used as init. - Required if there are more than one remote configured - type: string - revision: - description: The revision to checkout from. Should - be branch name, tag or commit id. Default branch - is used if missing or specified revision is not - found. + projects: + description: Overrides of projects encapsulated in a parent devfile. + Overriding is done according to K8S strategic merge patch standard + rules. + items: + oneOf: + - required: + - git + - required: + - zip + properties: + attributes: + description: Map of implementation-dependant free-form YAML + attributes. + type: object + x-kubernetes-preserve-unknown-fields: true + clonePath: + description: Path relative to the root of the projects to + which this project should be cloned into. This is a unix-style + relative path (i.e. uses forward slashes). The path is + invalid if it is absolute or tries to escape the project + root through the usage of '..'. If not specified, defaults + to the project name. + type: string + git: + description: Project's Git source + properties: + checkoutFrom: + description: Defines from what the project should be + checked out. Required if there are more than one remote + configured + properties: + remote: + description: The remote name should be used as init. + Required if there are more than one remote configured + type: string + revision: + description: The revision to checkout from. Should + be branch name, tag or commit id. Default branch + is used if missing or specified revision is not + found. + type: string + type: object + remotes: + additionalProperties: type: string - type: object - remotes: - additionalProperties: + description: The remotes map which should be initialized + in the git project. Projects must have at least one + remote configured while StarterProjects & Image Component's + Git source can only have at most one remote configured. + type: object + type: object + name: + description: Project name + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + sourceType: + description: Type of project source + enum: + - Git + - Zip + type: string + zip: + description: Project's Zip source + properties: + location: + description: Zip project's source location address. + Should be file path of the archive, e.g. file://$FILE_PATH type: string - description: The remotes map which should be initialized - in the git project. Projects must have at least one - remote configured while StarterProjects & Image Component's - Git source can only have at most one remote configured. - type: object - type: object - name: - description: Project name - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - sourceType: - description: Type of project source - enum: - - Git - - Zip - type: string - subDir: - description: Sub-directory from a starter project to be used - as root for starter project. - type: string - zip: - description: Project's Zip source - properties: - location: - description: Zip project's source location address. Should - be file path of the archive, e.g. file://$FILE_PATH - type: string - type: object - required: - - name - type: object - type: array - uri: - description: URI Reference of a parent devfile YAML file. It can - be a full URL or a relative URI with the current devfile as the - base URI. - type: string - variables: - additionalProperties: - type: string - description: Overrides of variables encapsulated in a parent devfile. - Overriding is done according to K8S strategic merge patch standard - rules. - type: object - type: object - projects: - description: Projects worked on in the devworkspace, containing names - and sources locations - items: - oneOf: - - required: - - git - - required: - - zip - - required: - - custom - properties: - attributes: - description: Map of implementation-dependant free-form YAML attributes. - type: object - x-kubernetes-preserve-unknown-fields: true - clonePath: - description: Path relative to the root of the projects to which - this project should be cloned into. This is a unix-style relative - path (i.e. uses forward slashes). The path is invalid if it - is absolute or tries to escape the project root through the - usage of '..'. If not specified, defaults to the project name. - type: string - custom: - description: Project's Custom source - properties: - embeddedResource: - type: object - x-kubernetes-embedded-resource: true - x-kubernetes-preserve-unknown-fields: true - projectSourceClass: - type: string - required: - - embeddedResource - - projectSourceClass - type: object - git: - description: Project's Git source - properties: - checkoutFrom: - description: Defines from what the project should be checked - out. Required if there are more than one remote configured - properties: - remote: - description: The remote name should be used as init. Required - if there are more than one remote configured - type: string - revision: - description: The revision to checkout from. Should be - branch name, tag or commit id. Default branch is used - if missing or specified revision is not found. - type: string - type: object - remotes: - additionalProperties: - type: string - description: The remotes map which should be initialized in - the git project. Projects must have at least one remote - configured while StarterProjects & Image Component's Git - source can only have at most one remote configured. - type: object - required: - - remotes - type: object - name: - description: Project name - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: object + required: + - name + type: object + type: array + registryUrl: + description: Registry URL to pull the parent devfile from when + using id in the parent reference. To ensure the parent devfile + gets resolved consistently in different environments, it is + recommended to always specify the `registryUrl` when `id` is + used. type: string - sourceType: - description: Type of project source - enum: - - Git - - Zip - - Custom + starterProjects: + description: Overrides of starterProjects encapsulated in a parent + devfile. Overriding is done according to K8S strategic merge + patch standard rules. + items: + oneOf: + - required: + - git + - required: + - zip + properties: + attributes: + description: Map of implementation-dependant free-form YAML + attributes. + type: object + x-kubernetes-preserve-unknown-fields: true + description: + description: Description of a starter project + type: string + git: + description: Project's Git source + properties: + checkoutFrom: + description: Defines from what the project should be + checked out. Required if there are more than one remote + configured + properties: + remote: + description: The remote name should be used as init. + Required if there are more than one remote configured + type: string + revision: + description: The revision to checkout from. Should + be branch name, tag or commit id. Default branch + is used if missing or specified revision is not + found. + type: string + type: object + remotes: + additionalProperties: + type: string + description: The remotes map which should be initialized + in the git project. Projects must have at least one + remote configured while StarterProjects & Image Component's + Git source can only have at most one remote configured. + type: object + type: object + name: + description: Project name + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + sourceType: + description: Type of project source + enum: + - Git + - Zip + type: string + subDir: + description: Sub-directory from a starter project to be + used as root for starter project. + type: string + zip: + description: Project's Zip source + properties: + location: + description: Zip project's source location address. + Should be file path of the archive, e.g. file://$FILE_PATH + type: string + type: object + required: + - name + type: object + type: array + uri: + description: URI Reference of a parent devfile YAML file. It can + be a full URL or a relative URI with the current devfile as + the base URI. type: string - zip: - description: Project's Zip source - properties: - location: - description: Zip project's source location address. Should - be file path of the archive, e.g. file://$FILE_PATH - type: string + variables: + additionalProperties: + type: string + description: Overrides of variables encapsulated in a parent devfile. + Overriding is done according to K8S strategic merge patch standard + rules. type: object - required: - - name type: object - type: array - starterProjects: - description: StarterProjects is a project that can be used as a starting - point when bootstrapping new projects - items: - oneOf: - - required: - - git - - required: - - zip - - required: - - custom - properties: - attributes: - description: Map of implementation-dependant free-form YAML attributes. - type: object - x-kubernetes-preserve-unknown-fields: true - custom: - description: Project's Custom source - properties: - embeddedResource: - type: object - x-kubernetes-embedded-resource: true - x-kubernetes-preserve-unknown-fields: true - projectSourceClass: - type: string - required: - - embeddedResource - - projectSourceClass - type: object - description: - description: Description of a starter project - type: string - git: - description: Project's Git source - properties: - checkoutFrom: - description: Defines from what the project should be checked - out. Required if there are more than one remote configured - properties: - remote: - description: The remote name should be used as init. Required - if there are more than one remote configured + projects: + description: Projects worked on in the devworkspace, containing names + and sources locations + items: + oneOf: + - required: + - git + - required: + - zip + - required: + - custom + properties: + attributes: + description: Map of implementation-dependant free-form YAML + attributes. + type: object + x-kubernetes-preserve-unknown-fields: true + clonePath: + description: Path relative to the root of the projects to which + this project should be cloned into. This is a unix-style relative + path (i.e. uses forward slashes). The path is invalid if it + is absolute or tries to escape the project root through the + usage of '..'. If not specified, defaults to the project name. + type: string + custom: + description: Project's Custom source + properties: + embeddedResource: + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + projectSourceClass: + type: string + required: + - embeddedResource + - projectSourceClass + type: object + git: + description: Project's Git source + properties: + checkoutFrom: + description: Defines from what the project should be checked + out. Required if there are more than one remote configured + properties: + remote: + description: The remote name should be used as init. + Required if there are more than one remote configured + type: string + revision: + description: The revision to checkout from. Should be + branch name, tag or commit id. Default branch is used + if missing or specified revision is not found. + type: string + type: object + remotes: + additionalProperties: type: string - revision: - description: The revision to checkout from. Should be - branch name, tag or commit id. Default branch is used - if missing or specified revision is not found. + description: The remotes map which should be initialized + in the git project. Projects must have at least one remote + configured while StarterProjects & Image Component's Git + source can only have at most one remote configured. + type: object + required: + - remotes + type: object + name: + description: Project name + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + sourceType: + description: Type of project source + enum: + - Git + - Zip + - Custom + type: string + zip: + description: Project's Zip source + properties: + location: + description: Zip project's source location address. Should + be file path of the archive, e.g. file://$FILE_PATH + type: string + type: object + required: + - name + type: object + type: array + starterProjects: + description: StarterProjects is a project that can be used as a starting + point when bootstrapping new projects + items: + oneOf: + - required: + - git + - required: + - zip + - required: + - custom + properties: + attributes: + description: Map of implementation-dependant free-form YAML + attributes. + type: object + x-kubernetes-preserve-unknown-fields: true + custom: + description: Project's Custom source + properties: + embeddedResource: + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + projectSourceClass: + type: string + required: + - embeddedResource + - projectSourceClass + type: object + description: + description: Description of a starter project + type: string + git: + description: Project's Git source + properties: + checkoutFrom: + description: Defines from what the project should be checked + out. Required if there are more than one remote configured + properties: + remote: + description: The remote name should be used as init. + Required if there are more than one remote configured + type: string + revision: + description: The revision to checkout from. Should be + branch name, tag or commit id. Default branch is used + if missing or specified revision is not found. + type: string + type: object + remotes: + additionalProperties: type: string - type: object - remotes: - additionalProperties: - type: string - description: The remotes map which should be initialized in - the git project. Projects must have at least one remote - configured while StarterProjects & Image Component's Git - source can only have at most one remote configured. - type: object - required: - - remotes - type: object - name: - description: Project name - maxLength: 63 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - sourceType: - description: Type of project source - enum: - - Git - - Zip - - Custom - type: string - subDir: - description: Sub-directory from a starter project to be used as - root for starter project. - type: string - zip: - description: Project's Zip source - properties: - location: - description: Zip project's source location address. Should - be file path of the archive, e.g. file://$FILE_PATH - type: string - type: object - required: - - name + description: The remotes map which should be initialized + in the git project. Projects must have at least one remote + configured while StarterProjects & Image Component's Git + source can only have at most one remote configured. + type: object + required: + - remotes + type: object + name: + description: Project name + maxLength: 63 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + sourceType: + description: Type of project source + enum: + - Git + - Zip + - Custom + type: string + subDir: + description: Sub-directory from a starter project to be used + as root for starter project. + type: string + zip: + description: Project's Zip source + properties: + location: + description: Zip project's source location address. Should + be file path of the archive, e.g. file://$FILE_PATH + type: string + type: object + required: + - name + type: object + type: array + variables: + additionalProperties: + type: string + description: "Map of key-value variables used for string replacement + in the devfile. Values can be referenced via {{variable-key}} to + replace the corresponding value in string fields in the devfile. + Replacement cannot be used for \n - schemaVersion, metadata, parent + source \n - element identifiers, e.g. command id, component name, + endpoint name, project name \n - references to identifiers, e.g. + in events, a command's component, container's volume mount name + \n - string enums, e.g. command group kind, endpoint exposure" type: object - type: array - variables: - additionalProperties: - type: string - description: "Map of key-value variables used for string replacement - in the devfile. Values can be referenced via {{variable-key}} to replace - the corresponding value in string fields in the devfile. Replacement - cannot be used for \n - schemaVersion, metadata, parent source \n - \ - element identifiers, e.g. command id, component name, endpoint - name, project name \n - references to identifiers, e.g. in events, - a command's component, container's volume mount name \n - string - enums, e.g. command group kind, endpoint exposure" - type: object - type: object - type: object - version: v1alpha2 - versions: - - name: v1alpha2 + type: object + type: object served: true storage: true status: diff --git a/crds/workspace.devfile.io_devworkspacetemplates.yaml b/crds/workspace.devfile.io_devworkspacetemplates.yaml index f39e5cb1f..57661581b 100644 --- a/crds/workspace.devfile.io_devworkspacetemplates.yaml +++ b/crds/workspace.devfile.io_devworkspacetemplates.yaml @@ -16,6 +16,3881 @@ spec: singular: devworkspacetemplate scope: Namespaced versions: + - deprecated: true + name: v1alpha1 + schema: + openAPIV3Schema: + description: DevWorkspaceTemplate is the Schema for the devworkspacetemplates + API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: Structure of the workspace. This is also the specification + of a workspace template. + properties: + commands: + description: Predefined, ready-to-use, workspace-related commands + items: + oneOf: + - required: + - exec + - required: + - apply + - required: + - vscodeTask + - required: + - vscodeLaunch + - required: + - composite + - required: + - custom + properties: + apply: + description: "Command that consists in applying a given component + definition, typically bound to a workspace event. \n For example, + when an `apply` command is bound to a `preStart` event, and + references a `container` component, it will start the container + as a K8S initContainer in the workspace POD, unless the component + has its `dedicatedPod` field set to `true`. \n When no `apply` + command exist for a given component, it is assumed the component + will be applied at workspace start by default." + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional command + attributes + type: object + component: + description: Describes component that will be applied + type: string + group: + description: Defines the group this command is part of + properties: + isDefault: + description: Identifies the default command for a given + group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, or + in events. + type: string + label: + description: Optional label that provides a label for this + command to be used in Editor UI menus for example + type: string + required: + - id + type: object + commandType: + description: Type of workspace command + enum: + - Exec + - Apply + - VscodeTask + - VscodeLaunch + - Composite + - Custom + type: string + composite: + description: Composite command that allows executing several + sub-commands either sequentially or concurrently + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional command + attributes + type: object + commands: + description: The commands that comprise this composite command + items: + type: string + type: array + group: + description: Defines the group this command is part of + properties: + isDefault: + description: Identifies the default command for a given + group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, or + in events. + type: string + label: + description: Optional label that provides a label for this + command to be used in Editor UI menus for example + type: string + parallel: + description: Indicates if the sub-commands should be executed + concurrently + type: boolean + required: + - id + type: object + custom: + description: Custom command whose logic is implementation-dependant + and should be provided by the user possibly through some dedicated + plugin + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional command + attributes + type: object + commandClass: + description: Class of command that the associated implementation + component should use to process this command with the + appropriate logic + type: string + embeddedResource: + description: Additional free-form configuration for this + custom command that the implementation component will + know how to use + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + group: + description: Defines the group this command is part of + properties: + isDefault: + description: Identifies the default command for a given + group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, or + in events. + type: string + label: + description: Optional label that provides a label for this + command to be used in Editor UI menus for example + type: string + required: + - commandClass + - embeddedResource + - id + type: object + exec: + description: CLI Command executed in an existing component container + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional command + attributes + type: object + commandLine: + description: "The actual command-line string \n Special + variables that can be used: \n - `$PROJECTS_ROOT`: A + path where projects sources are mounted \n - `$PROJECT_SOURCE`: + A path to a project source ($PROJECTS_ROOT/). + If there are multiple projects, this will point to the + directory of the first one." + type: string + component: + description: Describes component to which given action relates + type: string + env: + description: Optional list of environment variables that + have to be set before running the command + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + group: + description: Defines the group this command is part of + properties: + isDefault: + description: Identifies the default command for a given + group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + hotReloadCapable: + description: "Whether the command is capable to reload itself + when source code changes. If set to `true` the command + won't be restarted and it is expected to handle file changes + on its own. \n Default value is `false`" + type: boolean + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, or + in events. + type: string + label: + description: Optional label that provides a label for this + command to be used in Editor UI menus for example + type: string + workingDir: + description: "Working directory where the command should + be executed \n Special variables that can be used: \n + \ - `${PROJECTS_ROOT}`: A path where projects sources + are mounted \n - `${PROJECT_SOURCE}`: A path to a project + source (${PROJECTS_ROOT}/). If there are + multiple projects, this will point to the directory of + the first one." + type: string + required: + - id + type: object + vscodeLaunch: + description: "Command providing the definition of a VsCode launch + action \n Deprecated; removed in v1alpha2" + oneOf: + - required: + - uri + - required: + - inlined + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional command + attributes + type: object + group: + description: Defines the group this command is part of + properties: + isDefault: + description: Identifies the default command for a given + group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, or + in events. + type: string + inlined: + description: Inlined content of the VsCode configuration + type: string + locationType: + description: Type of Vscode configuration command location + enum: + - Uri + - Inlined + type: string + uri: + description: Location as an absolute of relative URI the + VsCode configuration will be fetched from + type: string + required: + - id + type: object + vscodeTask: + description: "Command providing the definition of a VsCode Task + \n Deprecated; removed in v1alpha2" + oneOf: + - required: + - uri + - required: + - inlined + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional command + attributes + type: object + group: + description: Defines the group this command is part of + properties: + isDefault: + description: Identifies the default command for a given + group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, or + in events. + type: string + inlined: + description: Inlined content of the VsCode configuration + type: string + locationType: + description: Type of Vscode configuration command location + enum: + - Uri + - Inlined + type: string + uri: + description: Location as an absolute of relative URI the + VsCode configuration will be fetched from + type: string + required: + - id + type: object + type: object + type: array + components: + description: List of the workspace components, such as editor and + plugins, user-provided containers, or other types of components + items: + oneOf: + - required: + - container + - required: + - kubernetes + - required: + - openshift + - required: + - volume + - required: + - plugin + - required: + - custom + properties: + componentType: + description: Type of component + enum: + - Container + - Kubernetes + - Openshift + - Volume + - Plugin + - Custom + type: string + container: + description: Allows adding and configuring workspace-related + containers + properties: + args: + description: "The arguments to supply to the command running + the dockerimage component. The arguments are supplied + either to the default command provided in the image or + to the overridden command. \n Defaults to an empty array, + meaning use whatever is defined in the image." + items: + type: string + type: array + command: + description: "The command to run in the dockerimage component + instead of the default one provided in the image. \n Defaults + to an empty array, meaning use whatever is defined in + the image." + items: + type: string + type: array + dedicatedPod: + description: "Specify if a container should run in its own + separated pod, instead of running as part of the main + development environment pod. \n Default value is `false`" + type: boolean + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant string-based + free-form attributes. \n Examples of Che-specific + attributes: \n - cookiesAuthEnabled: \"true\" / + \"false\", \n - type: \"terminal\" / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint should be + exposed on the network. \n - `public` means that + the endpoint will be exposed on the public network, + typically through a K8S ingress or an OpenShift + route. \n - `internal` means that the endpoint will + be exposed internally outside of the main workspace + POD, typically by K8S services, to be consumed by + other elements running on the same cloud internal + network. \n - `none` means that the endpoint will + not be exposed and will only be accessible inside + the main workspace POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application and transport + protocols of the traffic that will go through this + endpoint. \n - `http`: Endpoint will have `http` + traffic, typically on a TCP connection. It will + be automaticaly promoted to `https` when the `secure` + field is set to `true`. \n - `https`: Endpoint will + have `https` traffic, typically on a TCP connection. + \n - `ws`: Endpoint will have `ws` traffic, typically + on a TCP connection. It will be automaticaly promoted + to `wss` when the `secure` field is set to `true`. + \n - `wss`: Endpoint will have `wss` traffic, typically + on a TCP connection. \n - `tcp`: Endpoint will have + traffic on a TCP connection, without specifying + an application protocol. \n - `udp`: Endpoint will + have traffic on an UDP connection, without specifying + an application protocol. \n Default value is `http`" + type: string + secure: + description: Describes whether the endpoint should + be secured and protected by some authentication + process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + env: + description: Environment variables used in this container + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + image: + type: string + memoryLimit: + type: string + mountSources: + type: boolean + name: + type: string + sourceMapping: + description: Optional specification of the path in the container + where project sources should be transferred/mounted when + `mountSources` is `true`. When omitted, the value of the + `PROJECTS_ROOT` environment variable is used. + type: string + volumeMounts: + description: List of volumes mounts that should be mounted + is this container. + items: + description: Volume that should be mounted to a component + container + properties: + name: + description: The volume mount name is the name of + an existing `Volume` component. If several containers + mount the same volume name then they will reuse + the same volume and will be able to access to the + same files. + type: string + path: + description: The path in the component container where + the volume should be mounted. If not path is mentioned, + default path is the is `/`. + type: string + required: + - name + type: object + type: array + required: + - name + type: object + custom: + description: Custom component whose logic is implementation-dependant + and should be provided by the user possibly through some dedicated + controller + properties: + componentClass: + description: Class of component that the associated implementation + controller should use to process this command with the + appropriate logic + type: string + embeddedResource: + description: Additional free-form configuration for this + custom component that the implementation controller will + know how to use + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + name: + description: Mandatory name that allows referencing the + component in commands, or inside a parent + type: string + required: + - componentClass + - embeddedResource + - name + type: object + kubernetes: + description: Allows importing into the workspace the Kubernetes + resources defined in a given manifest. For example this allows + reusing the Kubernetes definitions used to deploy some runtime + components in production. + oneOf: + - required: + - uri + - required: + - inlined + properties: + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant string-based + free-form attributes. \n Examples of Che-specific + attributes: \n - cookiesAuthEnabled: \"true\" / + \"false\", \n - type: \"terminal\" / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint should be + exposed on the network. \n - `public` means that + the endpoint will be exposed on the public network, + typically through a K8S ingress or an OpenShift + route. \n - `internal` means that the endpoint will + be exposed internally outside of the main workspace + POD, typically by K8S services, to be consumed by + other elements running on the same cloud internal + network. \n - `none` means that the endpoint will + not be exposed and will only be accessible inside + the main workspace POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application and transport + protocols of the traffic that will go through this + endpoint. \n - `http`: Endpoint will have `http` + traffic, typically on a TCP connection. It will + be automaticaly promoted to `https` when the `secure` + field is set to `true`. \n - `https`: Endpoint will + have `https` traffic, typically on a TCP connection. + \n - `ws`: Endpoint will have `ws` traffic, typically + on a TCP connection. It will be automaticaly promoted + to `wss` when the `secure` field is set to `true`. + \n - `wss`: Endpoint will have `wss` traffic, typically + on a TCP connection. \n - `tcp`: Endpoint will have + traffic on a TCP connection, without specifying + an application protocol. \n - `udp`: Endpoint will + have traffic on an UDP connection, without specifying + an application protocol. \n Default value is `http`" + type: string + secure: + description: Describes whether the endpoint should + be secured and protected by some authentication + process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + name: + description: Mandatory name that allows referencing the + component in commands, or inside a parent + type: string + uri: + description: Location in a file fetched from a uri. + type: string + required: + - name + type: object + openshift: + description: Allows importing into the workspace the OpenShift + resources defined in a given manifest. For example this allows + reusing the OpenShift definitions used to deploy some runtime + components in production. + oneOf: + - required: + - uri + - required: + - inlined + properties: + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant string-based + free-form attributes. \n Examples of Che-specific + attributes: \n - cookiesAuthEnabled: \"true\" / + \"false\", \n - type: \"terminal\" / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint should be + exposed on the network. \n - `public` means that + the endpoint will be exposed on the public network, + typically through a K8S ingress or an OpenShift + route. \n - `internal` means that the endpoint will + be exposed internally outside of the main workspace + POD, typically by K8S services, to be consumed by + other elements running on the same cloud internal + network. \n - `none` means that the endpoint will + not be exposed and will only be accessible inside + the main workspace POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application and transport + protocols of the traffic that will go through this + endpoint. \n - `http`: Endpoint will have `http` + traffic, typically on a TCP connection. It will + be automaticaly promoted to `https` when the `secure` + field is set to `true`. \n - `https`: Endpoint will + have `https` traffic, typically on a TCP connection. + \n - `ws`: Endpoint will have `ws` traffic, typically + on a TCP connection. It will be automaticaly promoted + to `wss` when the `secure` field is set to `true`. + \n - `wss`: Endpoint will have `wss` traffic, typically + on a TCP connection. \n - `tcp`: Endpoint will have + traffic on a TCP connection, without specifying + an application protocol. \n - `udp`: Endpoint will + have traffic on an UDP connection, without specifying + an application protocol. \n Default value is `http`" + type: string + secure: + description: Describes whether the endpoint should + be secured and protected by some authentication + process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + name: + description: Mandatory name that allows referencing the + component in commands, or inside a parent + type: string + uri: + description: Location in a file fetched from a uri. + type: string + required: + - name + type: object + plugin: + description: "Allows importing a plugin. \n Plugins are mainly + imported devfiles that contribute components, commands and + events as a consistent single unit. They are defined in either + YAML files following the devfile syntax, or as `DevWorkspaceTemplate` + Kubernetes Custom Resources" + oneOf: + - required: + - uri + - required: + - id + - required: + - kubernetes + properties: + commands: + description: Overrides of commands encapsulated in a parent + devfile or a plugin. Overriding is done using a strategic + merge patch + items: + oneOf: + - required: + - exec + - required: + - apply + - required: + - vscodeTask + - required: + - vscodeLaunch + - required: + - composite + - required: + - custom + properties: + apply: + description: "Command that consists in applying a + given component definition, typically bound to a + workspace event. \n For example, when an `apply` + command is bound to a `preStart` event, and references + a `container` component, it will start the container + as a K8S initContainer in the workspace POD, unless + the component has its `dedicatedPod` field set to + `true`. \n When no `apply` command exist for a given + component, it is assumed the component will be applied + at workspace start by default." + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + component: + description: Describes component that will be + applied + type: string + group: + description: Defines the group this command is + part of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command is + part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. + type: string + label: + description: Optional label that provides a label + for this command to be used in Editor UI menus + for example + type: string + required: + - id + type: object + commandType: + description: Type of workspace command + enum: + - Exec + - Apply + - VscodeTask + - VscodeLaunch + - Composite + - Custom + type: string + composite: + description: Composite command that allows executing + several sub-commands either sequentially or concurrently + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + commands: + description: The commands that comprise this composite + command + items: + type: string + type: array + group: + description: Defines the group this command is + part of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command is + part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. + type: string + label: + description: Optional label that provides a label + for this command to be used in Editor UI menus + for example + type: string + parallel: + description: Indicates if the sub-commands should + be executed concurrently + type: boolean + required: + - id + type: object + custom: + description: Custom command whose logic is implementation-dependant + and should be provided by the user possibly through + some dedicated plugin + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + commandClass: + description: Class of command that the associated + implementation component should use to process + this command with the appropriate logic + type: string + embeddedResource: + description: Additional free-form configuration + for this custom command that the implementation + component will know how to use + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + group: + description: Defines the group this command is + part of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command is + part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. + type: string + label: + description: Optional label that provides a label + for this command to be used in Editor UI menus + for example + type: string + required: + - commandClass + - embeddedResource + - id + type: object + exec: + description: CLI Command executed in an existing component + container + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + commandLine: + description: "The actual command-line string \n + Special variables that can be used: \n - `$PROJECTS_ROOT`: + A path where projects sources are mounted \n + \ - `$PROJECT_SOURCE`: A path to a project source + ($PROJECTS_ROOT/). If there are + multiple projects, this will point to the directory + of the first one." + type: string + component: + description: Describes component to which given + action relates + type: string + env: + description: Optional list of environment variables + that have to be set before running the command + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + group: + description: Defines the group this command is + part of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command is + part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + hotReloadCapable: + description: "Whether the command is capable to + reload itself when source code changes. If set + to `true` the command won't be restarted and + it is expected to handle file changes on its + own. \n Default value is `false`" + type: boolean + id: + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. + type: string + label: + description: Optional label that provides a label + for this command to be used in Editor UI menus + for example + type: string + workingDir: + description: "Working directory where the command + should be executed \n Special variables that + can be used: \n - `${PROJECTS_ROOT}`: A path + where projects sources are mounted \n - `${PROJECT_SOURCE}`: + A path to a project source (${PROJECTS_ROOT}/). + If there are multiple projects, this will point + to the directory of the first one." + type: string + required: + - id + type: object + vscodeLaunch: + description: "Command providing the definition of + a VsCode launch action \n Deprecated; removed in + v1alpha2" + oneOf: + - required: + - uri + - required: + - inlined + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + group: + description: Defines the group this command is + part of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command is + part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. + type: string + inlined: + description: Inlined content of the VsCode configuration + type: string + locationType: + description: Type of Vscode configuration command + location + enum: + - Uri + - Inlined + type: string + uri: + description: Location as an absolute of relative + URI the VsCode configuration will be fetched + from + type: string + required: + - id + type: object + vscodeTask: + description: "Command providing the definition of + a VsCode Task \n Deprecated; removed in v1alpha2" + oneOf: + - required: + - uri + - required: + - inlined + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + group: + description: Defines the group this command is + part of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command is + part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. + type: string + inlined: + description: Inlined content of the VsCode configuration + type: string + locationType: + description: Type of Vscode configuration command + location + enum: + - Uri + - Inlined + type: string + uri: + description: Location as an absolute of relative + URI the VsCode configuration will be fetched + from + type: string + required: + - id + type: object + type: object + type: array + components: + description: Overrides of components encapsulated in a plugin. + Overriding is done using a strategic merge patch. A plugin + cannot override embedded plugin components. + items: + oneOf: + - required: + - container + - required: + - kubernetes + - required: + - openshift + - required: + - volume + properties: + componentType: + description: Type of component override for a plugin + enum: + - Container + - Kubernetes + - Openshift + - Volume + type: string + container: + description: Configuration overriding for a Container + component in a plugin + properties: + args: + description: "The arguments to supply to the command + running the dockerimage component. The arguments + are supplied either to the default command provided + in the image or to the overridden command. \n + Defaults to an empty array, meaning use whatever + is defined in the image." + items: + type: string + type: array + command: + description: "The command to run in the dockerimage + component instead of the default one provided + in the image. \n Defaults to an empty array, + meaning use whatever is defined in the image." + items: + type: string + type: array + dedicatedPod: + description: "Specify if a container should run + in its own separated pod, instead of running + as part of the main development environment + pod. \n Default value is `false`" + type: boolean + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant + string-based free-form attributes. \n + Examples of Che-specific attributes: \n + - cookiesAuthEnabled: \"true\" / \"false\", + \n - type: \"terminal\" / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint + should be exposed on the network. \n - + `public` means that the endpoint will + be exposed on the public network, typically + through a K8S ingress or an OpenShift + route. \n - `internal` means that the + endpoint will be exposed internally outside + of the main workspace POD, typically by + K8S services, to be consumed by other + elements running on the same cloud internal + network. \n - `none` means that the endpoint + will not be exposed and will only be accessible + inside the main workspace POD, on a local + address. \n Default value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application + and transport protocols of the traffic + that will go through this endpoint. \n + - `http`: Endpoint will have `http` traffic, + typically on a TCP connection. It will + be automaticaly promoted to `https` when + the `secure` field is set to `true`. \n + - `https`: Endpoint will have `https` + traffic, typically on a TCP connection. + \n - `ws`: Endpoint will have `ws` traffic, + typically on a TCP connection. It will + be automaticaly promoted to `wss` when + the `secure` field is set to `true`. \n + - `wss`: Endpoint will have `wss` traffic, + typically on a TCP connection. \n - `tcp`: + Endpoint will have traffic on a TCP connection, + without specifying an application protocol. + \n - `udp`: Endpoint will have traffic + on an UDP connection, without specifying + an application protocol. \n Default value + is `http`" + type: string + secure: + description: Describes whether the endpoint + should be secured and protected by some + authentication process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + env: + description: Environment variables used in this + container + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + image: + type: string + memoryLimit: + type: string + mountSources: + type: boolean + name: + type: string + sourceMapping: + description: Optional specification of the path + in the container where project sources should + be transferred/mounted when `mountSources` is + `true`. When omitted, the value of the `PROJECTS_ROOT` + environment variable is used. + type: string + volumeMounts: + description: List of volumes mounts that should + be mounted is this container. + items: + description: Volume that should be mounted to + a component container + properties: + name: + description: The volume mount name is the + name of an existing `Volume` component. + If several containers mount the same volume + name then they will reuse the same volume + and will be able to access to the same + files. + type: string + path: + description: The path in the component container + where the volume should be mounted. If + not path is mentioned, default path is + the is `/`. + type: string + required: + - name + type: object + type: array + required: + - name + type: object + kubernetes: + description: Configuration overriding for a Kubernetes + component in a plugin + oneOf: + - required: + - uri + - required: + - inlined + properties: + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant + string-based free-form attributes. \n + Examples of Che-specific attributes: \n + - cookiesAuthEnabled: \"true\" / \"false\", + \n - type: \"terminal\" / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint + should be exposed on the network. \n - + `public` means that the endpoint will + be exposed on the public network, typically + through a K8S ingress or an OpenShift + route. \n - `internal` means that the + endpoint will be exposed internally outside + of the main workspace POD, typically by + K8S services, to be consumed by other + elements running on the same cloud internal + network. \n - `none` means that the endpoint + will not be exposed and will only be accessible + inside the main workspace POD, on a local + address. \n Default value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application + and transport protocols of the traffic + that will go through this endpoint. \n + - `http`: Endpoint will have `http` traffic, + typically on a TCP connection. It will + be automaticaly promoted to `https` when + the `secure` field is set to `true`. \n + - `https`: Endpoint will have `https` + traffic, typically on a TCP connection. + \n - `ws`: Endpoint will have `ws` traffic, + typically on a TCP connection. It will + be automaticaly promoted to `wss` when + the `secure` field is set to `true`. \n + - `wss`: Endpoint will have `wss` traffic, + typically on a TCP connection. \n - `tcp`: + Endpoint will have traffic on a TCP connection, + without specifying an application protocol. + \n - `udp`: Endpoint will have traffic + on an UDP connection, without specifying + an application protocol. \n Default value + is `http`" + type: string + secure: + description: Describes whether the endpoint + should be secured and protected by some + authentication process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + name: + description: Mandatory name that allows referencing + the component in commands, or inside a parent + type: string + uri: + description: Location in a file fetched from a + uri. + type: string + required: + - name + type: object + openshift: + description: Configuration overriding for an OpenShift + component in a plugin + oneOf: + - required: + - uri + - required: + - inlined + properties: + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant + string-based free-form attributes. \n + Examples of Che-specific attributes: \n + - cookiesAuthEnabled: \"true\" / \"false\", + \n - type: \"terminal\" / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint + should be exposed on the network. \n - + `public` means that the endpoint will + be exposed on the public network, typically + through a K8S ingress or an OpenShift + route. \n - `internal` means that the + endpoint will be exposed internally outside + of the main workspace POD, typically by + K8S services, to be consumed by other + elements running on the same cloud internal + network. \n - `none` means that the endpoint + will not be exposed and will only be accessible + inside the main workspace POD, on a local + address. \n Default value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application + and transport protocols of the traffic + that will go through this endpoint. \n + - `http`: Endpoint will have `http` traffic, + typically on a TCP connection. It will + be automaticaly promoted to `https` when + the `secure` field is set to `true`. \n + - `https`: Endpoint will have `https` + traffic, typically on a TCP connection. + \n - `ws`: Endpoint will have `ws` traffic, + typically on a TCP connection. It will + be automaticaly promoted to `wss` when + the `secure` field is set to `true`. \n + - `wss`: Endpoint will have `wss` traffic, + typically on a TCP connection. \n - `tcp`: + Endpoint will have traffic on a TCP connection, + without specifying an application protocol. + \n - `udp`: Endpoint will have traffic + on an UDP connection, without specifying + an application protocol. \n Default value + is `http`" + type: string + secure: + description: Describes whether the endpoint + should be secured and protected by some + authentication process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + name: + description: Mandatory name that allows referencing + the component in commands, or inside a parent + type: string + uri: + description: Location in a file fetched from a + uri. + type: string + required: + - name + type: object + volume: + description: Configuration overriding for a Volume + component in a plugin + properties: + ephemeral: + description: Ephemeral volumes are not stored + persistently across restarts. Defaults to false + type: boolean + name: + description: Mandatory name that allows referencing + the Volume component in Container volume mounts + or inside a parent + type: string + size: + description: Size of the volume + type: string + required: + - name + type: object + type: object + type: array + id: + description: Id in a registry that contains a Devfile yaml + file + type: string + importReferenceType: + description: type of location from where the referenced + template structure should be retrieved + enum: + - Uri + - Id + - Kubernetes + type: string + kubernetes: + description: Reference to a Kubernetes CRD of type DevWorkspaceTemplate + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object + name: + description: Optional name that allows referencing the component + in commands, or inside a parent If omitted it will be + infered from the location (uri or registryEntry) + type: string + registryUrl: + type: string + uri: + description: Uri of a Devfile yaml file + type: string + type: object + volume: + description: Allows specifying the definition of a volume shared + by several other components + properties: + ephemeral: + description: Ephemeral volumes are not stored persistently + across restarts. Defaults to false + type: boolean + name: + description: Mandatory name that allows referencing the + Volume component in Container volume mounts or inside + a parent + type: string + size: + description: Size of the volume + type: string + required: + - name + type: object + type: object + type: array + events: + description: Bindings of commands to events. Each command is referred-to + by its name. + properties: + postStart: + description: Names of commands that should be executed after the + workspace is completely started. In the case of Che-Theia, these + commands should be executed after all plugins and extensions + have started, including project cloning. This means that those + commands are not triggered until the user opens the IDE in his + browser. + items: + type: string + type: array + postStop: + description: Names of commands that should be executed after stopping + the workspace. + items: + type: string + type: array + preStart: + description: Names of commands that should be executed before + the workspace start. Kubernetes-wise, these commands would typically + be executed in init containers of the workspace POD. + items: + type: string + type: array + preStop: + description: Names of commands that should be executed before + stopping the workspace. + items: + type: string + type: array + type: object + parent: + description: Parent workspace template + oneOf: + - required: + - uri + - required: + - id + - required: + - kubernetes + properties: + commands: + description: Overrides of commands encapsulated in a parent devfile + or a plugin. Overriding is done using a strategic merge patch + items: + oneOf: + - required: + - exec + - required: + - apply + - required: + - vscodeTask + - required: + - vscodeLaunch + - required: + - composite + - required: + - custom + properties: + apply: + description: "Command that consists in applying a given + component definition, typically bound to a workspace event. + \n For example, when an `apply` command is bound to a + `preStart` event, and references a `container` component, + it will start the container as a K8S initContainer in + the workspace POD, unless the component has its `dedicatedPod` + field set to `true`. \n When no `apply` command exist + for a given component, it is assumed the component will + be applied at workspace start by default." + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional command + attributes + type: object + component: + description: Describes component that will be applied + type: string + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command for + a given group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + type: string + label: + description: Optional label that provides a label for + this command to be used in Editor UI menus for example + type: string + required: + - id + type: object + commandType: + description: Type of workspace command + enum: + - Exec + - Apply + - VscodeTask + - VscodeLaunch + - Composite + - Custom + type: string + composite: + description: Composite command that allows executing several + sub-commands either sequentially or concurrently + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional command + attributes + type: object + commands: + description: The commands that comprise this composite + command + items: + type: string + type: array + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command for + a given group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + type: string + label: + description: Optional label that provides a label for + this command to be used in Editor UI menus for example + type: string + parallel: + description: Indicates if the sub-commands should be + executed concurrently + type: boolean + required: + - id + type: object + custom: + description: Custom command whose logic is implementation-dependant + and should be provided by the user possibly through some + dedicated plugin + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional command + attributes + type: object + commandClass: + description: Class of command that the associated implementation + component should use to process this command with + the appropriate logic + type: string + embeddedResource: + description: Additional free-form configuration for + this custom command that the implementation component + will know how to use + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command for + a given group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + type: string + label: + description: Optional label that provides a label for + this command to be used in Editor UI menus for example + type: string + required: + - commandClass + - embeddedResource + - id + type: object + exec: + description: CLI Command executed in an existing component + container + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional command + attributes + type: object + commandLine: + description: "The actual command-line string \n Special + variables that can be used: \n - `$PROJECTS_ROOT`: + A path where projects sources are mounted \n - `$PROJECT_SOURCE`: + A path to a project source ($PROJECTS_ROOT/). + If there are multiple projects, this will point to + the directory of the first one." + type: string + component: + description: Describes component to which given action + relates + type: string + env: + description: Optional list of environment variables + that have to be set before running the command + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command for + a given group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + hotReloadCapable: + description: "Whether the command is capable to reload + itself when source code changes. If set to `true` + the command won't be restarted and it is expected + to handle file changes on its own. \n Default value + is `false`" + type: boolean + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + type: string + label: + description: Optional label that provides a label for + this command to be used in Editor UI menus for example + type: string + workingDir: + description: "Working directory where the command should + be executed \n Special variables that can be used: + \n - `${PROJECTS_ROOT}`: A path where projects sources + are mounted \n - `${PROJECT_SOURCE}`: A path to a + project source (${PROJECTS_ROOT}/). + If there are multiple projects, this will point to + the directory of the first one." + type: string + required: + - id + type: object + vscodeLaunch: + description: "Command providing the definition of a VsCode + launch action \n Deprecated; removed in v1alpha2" + oneOf: + - required: + - uri + - required: + - inlined + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional command + attributes + type: object + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command for + a given group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + type: string + inlined: + description: Inlined content of the VsCode configuration + type: string + locationType: + description: Type of Vscode configuration command location + enum: + - Uri + - Inlined + type: string + uri: + description: Location as an absolute of relative URI + the VsCode configuration will be fetched from + type: string + required: + - id + type: object + vscodeTask: + description: "Command providing the definition of a VsCode + Task \n Deprecated; removed in v1alpha2" + oneOf: + - required: + - uri + - required: + - inlined + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional command + attributes + type: object + group: + description: Defines the group this command is part + of + properties: + isDefault: + description: Identifies the default command for + a given group kind + type: boolean + kind: + description: Kind of group the command is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows referencing + this command in composite commands, from a parent, + or in events. + type: string + inlined: + description: Inlined content of the VsCode configuration + type: string + locationType: + description: Type of Vscode configuration command location + enum: + - Uri + - Inlined + type: string + uri: + description: Location as an absolute of relative URI + the VsCode configuration will be fetched from + type: string + required: + - id + type: object + type: object + type: array + components: + description: Overrides of components encapsulated in a parent + devfile. Overriding is done using a strategic merge patch + items: + oneOf: + - required: + - container + - required: + - kubernetes + - required: + - openshift + - required: + - volume + - required: + - plugin + - required: + - custom + properties: + componentType: + description: Type of component + enum: + - Container + - Kubernetes + - Openshift + - Volume + - Plugin + - Custom + type: string + container: + description: Allows adding and configuring workspace-related + containers + properties: + args: + description: "The arguments to supply to the command + running the dockerimage component. The arguments are + supplied either to the default command provided in + the image or to the overridden command. \n Defaults + to an empty array, meaning use whatever is defined + in the image." + items: + type: string + type: array + command: + description: "The command to run in the dockerimage + component instead of the default one provided in the + image. \n Defaults to an empty array, meaning use + whatever is defined in the image." + items: + type: string + type: array + dedicatedPod: + description: "Specify if a container should run in its + own separated pod, instead of running as part of the + main development environment pod. \n Default value + is `false`" + type: boolean + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant + string-based free-form attributes. \n Examples + of Che-specific attributes: \n - cookiesAuthEnabled: + \"true\" / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint should + be exposed on the network. \n - `public` means + that the endpoint will be exposed on the public + network, typically through a K8S ingress or + an OpenShift route. \n - `internal` means that + the endpoint will be exposed internally outside + of the main workspace POD, typically by K8S + services, to be consumed by other elements running + on the same cloud internal network. \n - `none` + means that the endpoint will not be exposed + and will only be accessible inside the main + workspace POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application and transport + protocols of the traffic that will go through + this endpoint. \n - `http`: Endpoint will have + `http` traffic, typically on a TCP connection. + It will be automaticaly promoted to `https` + when the `secure` field is set to `true`. \n + - `https`: Endpoint will have `https` traffic, + typically on a TCP connection. \n - `ws`: Endpoint + will have `ws` traffic, typically on a TCP connection. + It will be automaticaly promoted to `wss` when + the `secure` field is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, typically + on a TCP connection. \n - `tcp`: Endpoint will + have traffic on a TCP connection, without specifying + an application protocol. \n - `udp`: Endpoint + will have traffic on an UDP connection, without + specifying an application protocol. \n Default + value is `http`" + type: string + secure: + description: Describes whether the endpoint should + be secured and protected by some authentication + process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + env: + description: Environment variables used in this container + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + image: + type: string + memoryLimit: + type: string + mountSources: + type: boolean + name: + type: string + sourceMapping: + description: Optional specification of the path in the + container where project sources should be transferred/mounted + when `mountSources` is `true`. When omitted, the value + of the `PROJECTS_ROOT` environment variable is used. + type: string + volumeMounts: + description: List of volumes mounts that should be mounted + is this container. + items: + description: Volume that should be mounted to a component + container + properties: + name: + description: The volume mount name is the name + of an existing `Volume` component. If several + containers mount the same volume name then they + will reuse the same volume and will be able + to access to the same files. + type: string + path: + description: The path in the component container + where the volume should be mounted. If not path + is mentioned, default path is the is `/`. + type: string + required: + - name + type: object + type: array + required: + - name + type: object + custom: + description: Custom component whose logic is implementation-dependant + and should be provided by the user possibly through some + dedicated controller + properties: + componentClass: + description: Class of component that the associated + implementation controller should use to process this + command with the appropriate logic + type: string + embeddedResource: + description: Additional free-form configuration for + this custom component that the implementation controller + will know how to use + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + name: + description: Mandatory name that allows referencing + the component in commands, or inside a parent + type: string + required: + - componentClass + - embeddedResource + - name + type: object + kubernetes: + description: Allows importing into the workspace the Kubernetes + resources defined in a given manifest. For example this + allows reusing the Kubernetes definitions used to deploy + some runtime components in production. + oneOf: + - required: + - uri + - required: + - inlined + properties: + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant + string-based free-form attributes. \n Examples + of Che-specific attributes: \n - cookiesAuthEnabled: + \"true\" / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint should + be exposed on the network. \n - `public` means + that the endpoint will be exposed on the public + network, typically through a K8S ingress or + an OpenShift route. \n - `internal` means that + the endpoint will be exposed internally outside + of the main workspace POD, typically by K8S + services, to be consumed by other elements running + on the same cloud internal network. \n - `none` + means that the endpoint will not be exposed + and will only be accessible inside the main + workspace POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application and transport + protocols of the traffic that will go through + this endpoint. \n - `http`: Endpoint will have + `http` traffic, typically on a TCP connection. + It will be automaticaly promoted to `https` + when the `secure` field is set to `true`. \n + - `https`: Endpoint will have `https` traffic, + typically on a TCP connection. \n - `ws`: Endpoint + will have `ws` traffic, typically on a TCP connection. + It will be automaticaly promoted to `wss` when + the `secure` field is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, typically + on a TCP connection. \n - `tcp`: Endpoint will + have traffic on a TCP connection, without specifying + an application protocol. \n - `udp`: Endpoint + will have traffic on an UDP connection, without + specifying an application protocol. \n Default + value is `http`" + type: string + secure: + description: Describes whether the endpoint should + be secured and protected by some authentication + process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + name: + description: Mandatory name that allows referencing + the component in commands, or inside a parent + type: string + uri: + description: Location in a file fetched from a uri. + type: string + required: + - name + type: object + openshift: + description: Allows importing into the workspace the OpenShift + resources defined in a given manifest. For example this + allows reusing the OpenShift definitions used to deploy + some runtime components in production. + oneOf: + - required: + - uri + - required: + - inlined + properties: + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant + string-based free-form attributes. \n Examples + of Che-specific attributes: \n - cookiesAuthEnabled: + \"true\" / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint should + be exposed on the network. \n - `public` means + that the endpoint will be exposed on the public + network, typically through a K8S ingress or + an OpenShift route. \n - `internal` means that + the endpoint will be exposed internally outside + of the main workspace POD, typically by K8S + services, to be consumed by other elements running + on the same cloud internal network. \n - `none` + means that the endpoint will not be exposed + and will only be accessible inside the main + workspace POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application and transport + protocols of the traffic that will go through + this endpoint. \n - `http`: Endpoint will have + `http` traffic, typically on a TCP connection. + It will be automaticaly promoted to `https` + when the `secure` field is set to `true`. \n + - `https`: Endpoint will have `https` traffic, + typically on a TCP connection. \n - `ws`: Endpoint + will have `ws` traffic, typically on a TCP connection. + It will be automaticaly promoted to `wss` when + the `secure` field is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, typically + on a TCP connection. \n - `tcp`: Endpoint will + have traffic on a TCP connection, without specifying + an application protocol. \n - `udp`: Endpoint + will have traffic on an UDP connection, without + specifying an application protocol. \n Default + value is `http`" + type: string + secure: + description: Describes whether the endpoint should + be secured and protected by some authentication + process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + name: + description: Mandatory name that allows referencing + the component in commands, or inside a parent + type: string + uri: + description: Location in a file fetched from a uri. + type: string + required: + - name + type: object + plugin: + description: "Allows importing a plugin. \n Plugins are + mainly imported devfiles that contribute components, commands + and events as a consistent single unit. They are defined + in either YAML files following the devfile syntax, or + as `DevWorkspaceTemplate` Kubernetes Custom Resources" + oneOf: + - required: + - uri + - required: + - id + - required: + - kubernetes + properties: + commands: + description: Overrides of commands encapsulated in a + parent devfile or a plugin. Overriding is done using + a strategic merge patch + items: + oneOf: + - required: + - exec + - required: + - apply + - required: + - vscodeTask + - required: + - vscodeLaunch + - required: + - composite + - required: + - custom + properties: + apply: + description: "Command that consists in applying + a given component definition, typically bound + to a workspace event. \n For example, when an + `apply` command is bound to a `preStart` event, + and references a `container` component, it will + start the container as a K8S initContainer in + the workspace POD, unless the component has + its `dedicatedPod` field set to `true`. \n When + no `apply` command exist for a given component, + it is assumed the component will be applied + at workspace start by default." + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + component: + description: Describes component that will + be applied + type: string + group: + description: Defines the group this command + is part of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. + type: string + label: + description: Optional label that provides + a label for this command to be used in Editor + UI menus for example + type: string + required: + - id + type: object + commandType: + description: Type of workspace command + enum: + - Exec + - Apply + - VscodeTask + - VscodeLaunch + - Composite + - Custom + type: string + composite: + description: Composite command that allows executing + several sub-commands either sequentially or + concurrently + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + commands: + description: The commands that comprise this + composite command + items: + type: string + type: array + group: + description: Defines the group this command + is part of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. + type: string + label: + description: Optional label that provides + a label for this command to be used in Editor + UI menus for example + type: string + parallel: + description: Indicates if the sub-commands + should be executed concurrently + type: boolean + required: + - id + type: object + custom: + description: Custom command whose logic is implementation-dependant + and should be provided by the user possibly + through some dedicated plugin + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + commandClass: + description: Class of command that the associated + implementation component should use to process + this command with the appropriate logic + type: string + embeddedResource: + description: Additional free-form configuration + for this custom command that the implementation + component will know how to use + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + group: + description: Defines the group this command + is part of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. + type: string + label: + description: Optional label that provides + a label for this command to be used in Editor + UI menus for example + type: string + required: + - commandClass + - embeddedResource + - id + type: object + exec: + description: CLI Command executed in an existing + component container + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + commandLine: + description: "The actual command-line string + \n Special variables that can be used: \n + \ - `$PROJECTS_ROOT`: A path where projects + sources are mounted \n - `$PROJECT_SOURCE`: + A path to a project source ($PROJECTS_ROOT/). + If there are multiple projects, this will + point to the directory of the first one." + type: string + component: + description: Describes component to which + given action relates + type: string + env: + description: Optional list of environment + variables that have to be set before running + the command + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + group: + description: Defines the group this command + is part of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + hotReloadCapable: + description: "Whether the command is capable + to reload itself when source code changes. + If set to `true` the command won't be restarted + and it is expected to handle file changes + on its own. \n Default value is `false`" + type: boolean + id: + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. + type: string + label: + description: Optional label that provides + a label for this command to be used in Editor + UI menus for example + type: string + workingDir: + description: "Working directory where the + command should be executed \n Special variables + that can be used: \n - `${PROJECTS_ROOT}`: + A path where projects sources are mounted + \n - `${PROJECT_SOURCE}`: A path to a project + source (${PROJECTS_ROOT}/). + If there are multiple projects, this will + point to the directory of the first one." + type: string + required: + - id + type: object + vscodeLaunch: + description: "Command providing the definition + of a VsCode launch action \n Deprecated; removed + in v1alpha2" + oneOf: + - required: + - uri + - required: + - inlined + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + group: + description: Defines the group this command + is part of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. + type: string + inlined: + description: Inlined content of the VsCode + configuration + type: string + locationType: + description: Type of Vscode configuration + command location + enum: + - Uri + - Inlined + type: string + uri: + description: Location as an absolute of relative + URI the VsCode configuration will be fetched + from + type: string + required: + - id + type: object + vscodeTask: + description: "Command providing the definition + of a VsCode Task \n Deprecated; removed in v1alpha2" + oneOf: + - required: + - uri + - required: + - inlined + properties: + attributes: + additionalProperties: + type: string + description: Optional map of free-form additional + command attributes + type: object + group: + description: Defines the group this command + is part of + properties: + isDefault: + description: Identifies the default command + for a given group kind + type: boolean + kind: + description: Kind of group the command + is part of + enum: + - build + - run + - test + - debug + type: string + required: + - kind + type: object + id: + description: Mandatory identifier that allows + referencing this command in composite commands, + from a parent, or in events. + type: string + inlined: + description: Inlined content of the VsCode + configuration + type: string + locationType: + description: Type of Vscode configuration + command location + enum: + - Uri + - Inlined + type: string + uri: + description: Location as an absolute of relative + URI the VsCode configuration will be fetched + from + type: string + required: + - id + type: object + type: object + type: array + components: + description: Overrides of components encapsulated in + a plugin. Overriding is done using a strategic merge + patch. A plugin cannot override embedded plugin components. + items: + oneOf: + - required: + - container + - required: + - kubernetes + - required: + - openshift + - required: + - volume + properties: + componentType: + description: Type of component override for a + plugin + enum: + - Container + - Kubernetes + - Openshift + - Volume + type: string + container: + description: Configuration overriding for a Container + component in a plugin + properties: + args: + description: "The arguments to supply to the + command running the dockerimage component. + The arguments are supplied either to the + default command provided in the image or + to the overridden command. \n Defaults to + an empty array, meaning use whatever is + defined in the image." + items: + type: string + type: array + command: + description: "The command to run in the dockerimage + component instead of the default one provided + in the image. \n Defaults to an empty array, + meaning use whatever is defined in the image." + items: + type: string + type: array + dedicatedPod: + description: "Specify if a container should + run in its own separated pod, instead of + running as part of the main development + environment pod. \n Default value is `false`" + type: boolean + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant + string-based free-form attributes. + \n Examples of Che-specific attributes: + \n - cookiesAuthEnabled: \"true\" + / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint + should be exposed on the network. + \n - `public` means that the endpoint + will be exposed on the public network, + typically through a K8S ingress or + an OpenShift route. \n - `internal` + means that the endpoint will be exposed + internally outside of the main workspace + POD, typically by K8S services, to + be consumed by other elements running + on the same cloud internal network. + \n - `none` means that the endpoint + will not be exposed and will only + be accessible inside the main workspace + POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application + and transport protocols of the traffic + that will go through this endpoint. + \n - `http`: Endpoint will have `http` + traffic, typically on a TCP connection. + It will be automaticaly promoted to + `https` when the `secure` field is + set to `true`. \n - `https`: Endpoint + will have `https` traffic, typically + on a TCP connection. \n - `ws`: Endpoint + will have `ws` traffic, typically + on a TCP connection. It will be automaticaly + promoted to `wss` when the `secure` + field is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, + typically on a TCP connection. \n + - `tcp`: Endpoint will have traffic + on a TCP connection, without specifying + an application protocol. \n - `udp`: + Endpoint will have traffic on an UDP + connection, without specifying an + application protocol. \n Default value + is `http`" + type: string + secure: + description: Describes whether the endpoint + should be secured and protected by + some authentication process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + env: + description: Environment variables used in + this container + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + image: + type: string + memoryLimit: + type: string + mountSources: + type: boolean + name: + type: string + sourceMapping: + description: Optional specification of the + path in the container where project sources + should be transferred/mounted when `mountSources` + is `true`. When omitted, the value of the + `PROJECTS_ROOT` environment variable is + used. + type: string + volumeMounts: + description: List of volumes mounts that should + be mounted is this container. + items: + description: Volume that should be mounted + to a component container + properties: + name: + description: The volume mount name is + the name of an existing `Volume` component. + If several containers mount the same + volume name then they will reuse the + same volume and will be able to access + to the same files. + type: string + path: + description: The path in the component + container where the volume should + be mounted. If not path is mentioned, + default path is the is `/`. + type: string + required: + - name + type: object + type: array + required: + - name + type: object + kubernetes: + description: Configuration overriding for a Kubernetes + component in a plugin + oneOf: + - required: + - uri + - required: + - inlined + properties: + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant + string-based free-form attributes. + \n Examples of Che-specific attributes: + \n - cookiesAuthEnabled: \"true\" + / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint + should be exposed on the network. + \n - `public` means that the endpoint + will be exposed on the public network, + typically through a K8S ingress or + an OpenShift route. \n - `internal` + means that the endpoint will be exposed + internally outside of the main workspace + POD, typically by K8S services, to + be consumed by other elements running + on the same cloud internal network. + \n - `none` means that the endpoint + will not be exposed and will only + be accessible inside the main workspace + POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application + and transport protocols of the traffic + that will go through this endpoint. + \n - `http`: Endpoint will have `http` + traffic, typically on a TCP connection. + It will be automaticaly promoted to + `https` when the `secure` field is + set to `true`. \n - `https`: Endpoint + will have `https` traffic, typically + on a TCP connection. \n - `ws`: Endpoint + will have `ws` traffic, typically + on a TCP connection. It will be automaticaly + promoted to `wss` when the `secure` + field is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, + typically on a TCP connection. \n + - `tcp`: Endpoint will have traffic + on a TCP connection, without specifying + an application protocol. \n - `udp`: + Endpoint will have traffic on an UDP + connection, without specifying an + application protocol. \n Default value + is `http`" + type: string + secure: + description: Describes whether the endpoint + should be secured and protected by + some authentication process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + name: + description: Mandatory name that allows referencing + the component in commands, or inside a parent + type: string + uri: + description: Location in a file fetched from + a uri. + type: string + required: + - name + type: object + openshift: + description: Configuration overriding for an OpenShift + component in a plugin + oneOf: + - required: + - uri + - required: + - inlined + properties: + endpoints: + items: + properties: + attributes: + additionalProperties: + type: string + description: "Map of implementation-dependant + string-based free-form attributes. + \n Examples of Che-specific attributes: + \n - cookiesAuthEnabled: \"true\" + / \"false\", \n - type: \"terminal\" + / \"ide\" / \"ide-dev\"," + type: object + exposure: + description: "Describes how the endpoint + should be exposed on the network. + \n - `public` means that the endpoint + will be exposed on the public network, + typically through a K8S ingress or + an OpenShift route. \n - `internal` + means that the endpoint will be exposed + internally outside of the main workspace + POD, typically by K8S services, to + be consumed by other elements running + on the same cloud internal network. + \n - `none` means that the endpoint + will not be exposed and will only + be accessible inside the main workspace + POD, on a local address. \n Default + value is `public`" + enum: + - public + - internal + - none + type: string + name: + type: string + path: + description: Path of the endpoint URL + type: string + protocol: + description: "Describes the application + and transport protocols of the traffic + that will go through this endpoint. + \n - `http`: Endpoint will have `http` + traffic, typically on a TCP connection. + It will be automaticaly promoted to + `https` when the `secure` field is + set to `true`. \n - `https`: Endpoint + will have `https` traffic, typically + on a TCP connection. \n - `ws`: Endpoint + will have `ws` traffic, typically + on a TCP connection. It will be automaticaly + promoted to `wss` when the `secure` + field is set to `true`. \n - `wss`: + Endpoint will have `wss` traffic, + typically on a TCP connection. \n + - `tcp`: Endpoint will have traffic + on a TCP connection, without specifying + an application protocol. \n - `udp`: + Endpoint will have traffic on an UDP + connection, without specifying an + application protocol. \n Default value + is `http`" + type: string + secure: + description: Describes whether the endpoint + should be secured and protected by + some authentication process + type: boolean + targetPort: + type: integer + required: + - name + type: object + type: array + inlined: + description: Inlined manifest + type: string + locationType: + description: Type of Kubernetes-like location + enum: + - Uri + - Inlined + type: string + name: + description: Mandatory name that allows referencing + the component in commands, or inside a parent + type: string + uri: + description: Location in a file fetched from + a uri. + type: string + required: + - name + type: object + volume: + description: Configuration overriding for a Volume + component in a plugin + properties: + ephemeral: + description: Ephemeral volumes are not stored + persistently across restarts. Defaults to + false + type: boolean + name: + description: Mandatory name that allows referencing + the Volume component in Container volume + mounts or inside a parent + type: string + size: + description: Size of the volume + type: string + required: + - name + type: object + type: object + type: array + id: + description: Id in a registry that contains a Devfile + yaml file + type: string + importReferenceType: + description: type of location from where the referenced + template structure should be retrieved + enum: + - Uri + - Id + - Kubernetes + type: string + kubernetes: + description: Reference to a Kubernetes CRD of type DevWorkspaceTemplate + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object + name: + description: Optional name that allows referencing the + component in commands, or inside a parent If omitted + it will be infered from the location (uri or registryEntry) + type: string + registryUrl: + type: string + uri: + description: Uri of a Devfile yaml file + type: string + type: object + volume: + description: Allows specifying the definition of a volume + shared by several other components + properties: + ephemeral: + description: Ephemeral volumes are not stored persistently + across restarts. Defaults to false + type: boolean + name: + description: Mandatory name that allows referencing + the Volume component in Container volume mounts or + inside a parent + type: string + size: + description: Size of the volume + type: string + required: + - name + type: object + type: object + type: array + id: + description: Id in a registry that contains a Devfile yaml file + type: string + importReferenceType: + description: type of location from where the referenced template + structure should be retrieved + enum: + - Uri + - Id + - Kubernetes + type: string + kubernetes: + description: Reference to a Kubernetes CRD of type DevWorkspaceTemplate + properties: + name: + type: string + namespace: + type: string + required: + - name + type: object + projects: + description: Overrides of projects encapsulated in a parent devfile. + Overriding is done using a strategic merge patch. + items: + oneOf: + - required: + - git + - required: + - github + - required: + - zip + - required: + - custom + properties: + clonePath: + description: Path relative to the root of the projects to + which this project should be cloned into. This is a unix-style + relative path (i.e. uses forward slashes). The path is + invalid if it is absolute or tries to escape the project + root through the usage of '..'. If not specified, defaults + to the project name. + type: string + custom: + description: Project's Custom source + properties: + embeddedResource: + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + projectSourceClass: + type: string + required: + - embeddedResource + - projectSourceClass + type: object + git: + description: Project's Git source + properties: + checkoutFrom: + description: Defines from what the project should be + checked out. Required if there are more than one remote + configured + properties: + remote: + description: The remote name should be used as init. + Required if there are more than one remote configured + type: string + revision: + description: The revision to checkout from. Should + be branch name, tag or commit id. Default branch + is used if missing or specified revision is not + found. + type: string + type: object + remotes: + additionalProperties: + type: string + description: The remotes map which should be initialized + in the git project. Must have at least one remote + configured + type: object + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + github: + description: Project's GitHub source + properties: + checkoutFrom: + description: Defines from what the project should be + checked out. Required if there are more than one remote + configured + properties: + remote: + description: The remote name should be used as init. + Required if there are more than one remote configured + type: string + revision: + description: The revision to checkout from. Should + be branch name, tag or commit id. Default branch + is used if missing or specified revision is not + found. + type: string + type: object + remotes: + additionalProperties: + type: string + description: The remotes map which should be initialized + in the git project. Must have at least one remote + configured + type: object + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + name: + description: Project name + type: string + sourceType: + description: Type of project source + enum: + - Git + - Github + - Zip + - Custom + type: string + zip: + description: Project's Zip source + properties: + location: + description: Zip project's source location address. + Should be file path of the archive, e.g. file://$FILE_PATH + type: string + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + required: + - name + type: object + type: array + registryUrl: + type: string + starterProjects: + description: Overrides of starter projects encapsulated in a parent + devfile Overriding is done using a strategic merge patch. + items: + oneOf: + - required: + - git + - required: + - github + - required: + - zip + - required: + - custom + properties: + clonePath: + description: Path relative to the root of the projects to + which this project should be cloned into. This is a unix-style + relative path (i.e. uses forward slashes). The path is + invalid if it is absolute or tries to escape the project + root through the usage of '..'. If not specified, defaults + to the project name. + type: string + custom: + description: Project's Custom source + properties: + embeddedResource: + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + projectSourceClass: + type: string + required: + - embeddedResource + - projectSourceClass + type: object + description: + description: Description of a starter project + type: string + git: + description: Project's Git source + properties: + checkoutFrom: + description: Defines from what the project should be + checked out. Required if there are more than one remote + configured + properties: + remote: + description: The remote name should be used as init. + Required if there are more than one remote configured + type: string + revision: + description: The revision to checkout from. Should + be branch name, tag or commit id. Default branch + is used if missing or specified revision is not + found. + type: string + type: object + remotes: + additionalProperties: + type: string + description: The remotes map which should be initialized + in the git project. Must have at least one remote + configured + type: object + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + github: + description: Project's GitHub source + properties: + checkoutFrom: + description: Defines from what the project should be + checked out. Required if there are more than one remote + configured + properties: + remote: + description: The remote name should be used as init. + Required if there are more than one remote configured + type: string + revision: + description: The revision to checkout from. Should + be branch name, tag or commit id. Default branch + is used if missing or specified revision is not + found. + type: string + type: object + remotes: + additionalProperties: + type: string + description: The remotes map which should be initialized + in the git project. Must have at least one remote + configured + type: object + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + name: + description: Project name + type: string + sourceType: + description: Type of project source + enum: + - Git + - Github + - Zip + - Custom + type: string + zip: + description: Project's Zip source + properties: + location: + description: Zip project's source location address. + Should be file path of the archive, e.g. file://$FILE_PATH + type: string + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + required: + - name + type: object + type: array + uri: + description: Uri of a Devfile yaml file + type: string + type: object + projects: + description: Projects worked on in the workspace, containing names + and sources locations + items: + oneOf: + - required: + - git + - required: + - github + - required: + - zip + - required: + - custom + properties: + clonePath: + description: Path relative to the root of the projects to which + this project should be cloned into. This is a unix-style relative + path (i.e. uses forward slashes). The path is invalid if it + is absolute or tries to escape the project root through the + usage of '..'. If not specified, defaults to the project name. + type: string + custom: + description: Project's Custom source + properties: + embeddedResource: + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + projectSourceClass: + type: string + required: + - embeddedResource + - projectSourceClass + type: object + git: + description: Project's Git source + properties: + checkoutFrom: + description: Defines from what the project should be checked + out. Required if there are more than one remote configured + properties: + remote: + description: The remote name should be used as init. + Required if there are more than one remote configured + type: string + revision: + description: The revision to checkout from. Should be + branch name, tag or commit id. Default branch is used + if missing or specified revision is not found. + type: string + type: object + remotes: + additionalProperties: + type: string + description: The remotes map which should be initialized + in the git project. Must have at least one remote configured + type: object + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + github: + description: Project's GitHub source + properties: + checkoutFrom: + description: Defines from what the project should be checked + out. Required if there are more than one remote configured + properties: + remote: + description: The remote name should be used as init. + Required if there are more than one remote configured + type: string + revision: + description: The revision to checkout from. Should be + branch name, tag or commit id. Default branch is used + if missing or specified revision is not found. + type: string + type: object + remotes: + additionalProperties: + type: string + description: The remotes map which should be initialized + in the git project. Must have at least one remote configured + type: object + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + name: + description: Project name + type: string + sourceType: + description: Type of project source + enum: + - Git + - Github + - Zip + - Custom + type: string + zip: + description: Project's Zip source + properties: + location: + description: Zip project's source location address. Should + be file path of the archive, e.g. file://$FILE_PATH + type: string + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + required: + - name + type: object + type: array + starterProjects: + description: StarterProjects is a project that can be used as a starting + point when bootstrapping new projects + items: + oneOf: + - required: + - git + - required: + - github + - required: + - zip + - required: + - custom + properties: + clonePath: + description: Path relative to the root of the projects to which + this project should be cloned into. This is a unix-style relative + path (i.e. uses forward slashes). The path is invalid if it + is absolute or tries to escape the project root through the + usage of '..'. If not specified, defaults to the project name. + type: string + custom: + description: Project's Custom source + properties: + embeddedResource: + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + projectSourceClass: + type: string + required: + - embeddedResource + - projectSourceClass + type: object + description: + description: Description of a starter project + type: string + git: + description: Project's Git source + properties: + checkoutFrom: + description: Defines from what the project should be checked + out. Required if there are more than one remote configured + properties: + remote: + description: The remote name should be used as init. + Required if there are more than one remote configured + type: string + revision: + description: The revision to checkout from. Should be + branch name, tag or commit id. Default branch is used + if missing or specified revision is not found. + type: string + type: object + remotes: + additionalProperties: + type: string + description: The remotes map which should be initialized + in the git project. Must have at least one remote configured + type: object + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + github: + description: Project's GitHub source + properties: + checkoutFrom: + description: Defines from what the project should be checked + out. Required if there are more than one remote configured + properties: + remote: + description: The remote name should be used as init. + Required if there are more than one remote configured + type: string + revision: + description: The revision to checkout from. Should be + branch name, tag or commit id. Default branch is used + if missing or specified revision is not found. + type: string + type: object + remotes: + additionalProperties: + type: string + description: The remotes map which should be initialized + in the git project. Must have at least one remote configured + type: object + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + name: + description: Project name + type: string + sourceType: + description: Type of project source + enum: + - Git + - Github + - Zip + - Custom + type: string + zip: + description: Project's Zip source + properties: + location: + description: Zip project's source location address. Should + be file path of the archive, e.g. file://$FILE_PATH + type: string + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + required: + - name + type: object + type: array + type: object + type: object + served: false + storage: false - name: v1alpha2 schema: openAPIV3Schema: diff --git a/devfile.api.code-workspace b/devfile.api.code-workspace index 0375ec8ae..a259f5c45 100644 --- a/devfile.api.code-workspace +++ b/devfile.api.code-workspace @@ -65,7 +65,7 @@ "mode": "auto", "program": "${workspaceFolder:generator}", "env": { "GOMOD": "${workspaceFolder:generator}/go.mod"}, - "args": [ "crds", "paths=./pkg/apis/workspaces/v1alpha2;", "output:crds:artifacts:config=crds" ], + "args": [ "crds", "paths=./pkg/apis/workspaces/v1alpha2;./pkg/apis/workspaces/v1alpha1", "output:crds:artifacts:config=crds" ], "cwd": "${workspaceFolder:api}" }, { @@ -75,7 +75,7 @@ "mode": "auto", "program": "${workspaceFolder:generator}", "env": { "GOMOD": "${workspaceFolder:generator}/go.mod"}, - "args": [ "deepcopy", "paths=./pkg/apis/workspaces/v1alpha2;" ], + "args": [ "deepcopy", "paths=./pkg/apis/workspaces/v1alpha2;./pkg/apis/workspaces/v1alpha1" ], "cwd": "${workspaceFolder:api}" }, { @@ -85,7 +85,7 @@ "mode": "auto", "program": "${workspaceFolder:generator}", "env": { "GOMOD": "${workspaceFolder:generator}/go.mod"}, - "args": [ "schemas", "paths=./pkg/apis/workspaces/v1alpha2;", "output:schemas:artifacts:config=schemas" ], + "args": [ "schemas", "paths=./pkg/apis/workspaces/v1alpha2;./pkg/apis/workspaces/v1alpha1", "output:schemas:artifacts:config=schemas" ], "cwd": "${workspaceFolder:api}" }, { diff --git a/generator/crds/zz_generated.markerhelp.go b/generator/crds/zz_generated.markerhelp.go index 615653311..6be3f97a0 100644 --- a/generator/crds/zz_generated.markerhelp.go +++ b/generator/crds/zz_generated.markerhelp.go @@ -1,4 +1,3 @@ -//go:build !ignore_autogenerated // +build !ignore_autogenerated // Generated for the devfile generator diff --git a/generator/getters/zz_generated.markerhelp.go b/generator/getters/zz_generated.markerhelp.go index 9627a57e7..98f022020 100644 --- a/generator/getters/zz_generated.markerhelp.go +++ b/generator/getters/zz_generated.markerhelp.go @@ -1,4 +1,3 @@ -//go:build !ignore_autogenerated // +build !ignore_autogenerated // Generated for the devfile generator diff --git a/generator/interfaces/zz_generated.markerhelp.go b/generator/interfaces/zz_generated.markerhelp.go index 1e07f3656..f62612939 100644 --- a/generator/interfaces/zz_generated.markerhelp.go +++ b/generator/interfaces/zz_generated.markerhelp.go @@ -1,4 +1,3 @@ -//go:build !ignore_autogenerated // +build !ignore_autogenerated // Generated for the devfile generator diff --git a/generator/overrides/zz_generated.markerhelp.go b/generator/overrides/zz_generated.markerhelp.go index 0da6281de..ca6d7a98f 100644 --- a/generator/overrides/zz_generated.markerhelp.go +++ b/generator/overrides/zz_generated.markerhelp.go @@ -1,4 +1,3 @@ -//go:build !ignore_autogenerated // +build !ignore_autogenerated // Generated for the devfile generator diff --git a/generator/schemas/zz_generated.markerhelp.go b/generator/schemas/zz_generated.markerhelp.go index 0e59bc17b..0025b0e32 100644 --- a/generator/schemas/zz_generated.markerhelp.go +++ b/generator/schemas/zz_generated.markerhelp.go @@ -1,4 +1,3 @@ -//go:build !ignore_autogenerated // +build !ignore_autogenerated // Generated for the devfile generator diff --git a/generator/validate/zz_generated.markerhelp.go b/generator/validate/zz_generated.markerhelp.go index 150e7a595..9741b37ca 100644 --- a/generator/validate/zz_generated.markerhelp.go +++ b/generator/validate/zz_generated.markerhelp.go @@ -1,4 +1,3 @@ -//go:build !ignore_autogenerated // +build !ignore_autogenerated // Generated for the devfile generator diff --git a/go.mod b/go.mod index d334a9c1d..18fd81146 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,8 @@ go 1.13 require ( github.com/ghodss/yaml v1.0.0 - github.com/google/gofuzz v1.2.0 // indirect + github.com/google/go-cmp v0.5.5 + github.com/google/gofuzz v1.2.0 github.com/hashicorp/go-multierror v1.1.0 github.com/lucasjones/reggen v0.0.0-20200904144131-37ba4fa293bb github.com/mitchellh/reflectwalk v1.0.1 diff --git a/pkg/apis/workspaces/v1alpha1/attributes_conversion.go b/pkg/apis/workspaces/v1alpha1/attributes_conversion.go new file mode 100644 index 000000000..505da885c --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/attributes_conversion.go @@ -0,0 +1,40 @@ +package v1alpha1 + +import ( + "fmt" + + "github.com/devfile/api/v2/pkg/attributes" +) + +func convertAttributesTo_v1alpha2(src map[string]string, dest *attributes.Attributes) { + dest.FromStringMap(src) +} + +func convertAttributesFrom_v1alpha2(src *attributes.Attributes, dest map[string]string) error { + if dest == nil { + return fmt.Errorf("trying to insert into a nil map") + } + var err error + stringAttributes := src.Strings(&err) + if err != nil { + return err + } + for k, v := range stringAttributes { + dest[k] = v + } + return nil +} + +func getCommandAttributes(command *Command) map[string]string { + switch { + case command.Exec != nil: + return command.Exec.Attributes + case command.Apply != nil: + return command.Apply.Attributes + case command.Composite != nil: + return command.Composite.Attributes + case command.Custom != nil: + return command.Custom.Attributes + } + return nil +} diff --git a/pkg/apis/workspaces/v1alpha1/commands.go b/pkg/apis/workspaces/v1alpha1/commands.go new file mode 100644 index 000000000..c767c78e2 --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/commands.go @@ -0,0 +1,215 @@ +package v1alpha1 + +import runtime "k8s.io/apimachinery/pkg/runtime" + +// CommandType describes the type of command. +// Only one of the following command type may be specified. +// +kubebuilder:validation:Enum=Exec;Apply;VscodeTask;VscodeLaunch;Composite;Custom +type CommandType string + +const ( + ExecCommandType CommandType = "Exec" + ApplyCommandType CommandType = "Apply" + VscodeTaskCommandType CommandType = "VscodeTask" + VscodeLaunchCommandType CommandType = "VscodeLaunch" + CompositeCommandType CommandType = "Composite" + CustomCommandType CommandType = "Custom" +) + +// CommandGroupKind describes the kind of command group. +// +kubebuilder:validation:Enum=build;run;test;debug +type CommandGroupKind string + +const ( + BuildCommandGroupKind CommandGroupKind = "build" + RunCommandGroupKind CommandGroupKind = "run" + TestCommandGroupKind CommandGroupKind = "test" + DebugCommandGroupKind CommandGroupKind = "debug" +) + +type CommandGroup struct { + // Kind of group the command is part of + Kind CommandGroupKind `json:"kind"` + + // +optional + // Identifies the default command for a given group kind + IsDefault bool `json:"isDefault,omitempty"` +} + +type BaseCommand struct { + // Mandatory identifier that allows referencing + // this command in composite commands, from + // a parent, or in events. + Id string `json:"id"` + + // +optional + // Defines the group this command is part of + Group *CommandGroup `json:"group,omitempty"` + + // Optional map of free-form additional command attributes + Attributes map[string]string `json:"attributes,omitempty"` +} + +type LabeledCommand struct { + BaseCommand `json:",inline"` + + // +optional + // Optional label that provides a label for this command + // to be used in Editor UI menus for example + Label string `json:"label,omitempty"` +} + +// +k8s:openapi-gen=true +// +union +type Command struct { + // Type of workspace command + // +unionDiscriminator + // +optional + CommandType CommandType `json:"commandType,omitempty"` + + // CLI Command executed in an existing component container + // +optional + Exec *ExecCommand `json:"exec,omitempty"` + + // Command that consists in applying a given component definition, + // typically bound to a workspace event. + // + // For example, when an `apply` command is bound to a `preStart` event, + // and references a `container` component, it will start the container as a + // K8S initContainer in the workspace POD, unless the component has its + // `dedicatedPod` field set to `true`. + // + // When no `apply` command exist for a given component, + // it is assumed the component will be applied at workspace start + // by default. + // +optional + Apply *ApplyCommand `json:"apply,omitempty"` + + // Command providing the definition of a VsCode Task + // + // Deprecated; removed in v1alpha2 + // +optional + VscodeTask *VscodeConfigurationCommand `json:"vscodeTask,omitempty"` + + // Command providing the definition of a VsCode launch action + // + // Deprecated; removed in v1alpha2 + // +optional + VscodeLaunch *VscodeConfigurationCommand `json:"vscodeLaunch,omitempty"` + + // Composite command that allows executing several sub-commands + // either sequentially or concurrently + // +optional + Composite *CompositeCommand `json:"composite,omitempty"` + + // Custom command whose logic is implementation-dependant + // and should be provided by the user + // possibly through some dedicated plugin + // +optional + Custom *CustomCommand `json:"custom,omitempty"` +} + +type ExecCommand struct { + LabeledCommand `json:",inline"` + + // The actual command-line string + // + // Special variables that can be used: + // + // - `$PROJECTS_ROOT`: A path where projects sources are mounted + // + // - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/). If there are multiple projects, this will point to the directory of the first one. + CommandLine string `json:"commandLine,omitempty"` + + // Describes component to which given action relates + Component string `json:"component,omitempty"` + + // Working directory where the command should be executed + // + // Special variables that can be used: + // + // - `${PROJECTS_ROOT}`: A path where projects sources are mounted + // + // - `${PROJECT_SOURCE}`: A path to a project source (${PROJECTS_ROOT}/). If there are multiple projects, this will point to the directory of the first one. + WorkingDir string `json:"workingDir,omitempty"` + + // +optional + // Optional list of environment variables that have to be set + // before running the command + Env []EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name"` + + // +optional + // Whether the command is capable to reload itself when source code changes. + // If set to `true` the command won't be restarted and it is expected to handle file changes on its own. + // + // Default value is `false` + HotReloadCapable bool `json:"hotReloadCapable,omitempty"` +} + +type ApplyCommand struct { + LabeledCommand `json:",inline"` + + // Describes component that will be applied + Component string `json:"component,omitempty"` +} + +type CompositeCommand struct { + LabeledCommand `json:",inline"` + + // The commands that comprise this composite command + Commands []string `json:"commands,omitempty" patchStrategy:"replace"` + + // Indicates if the sub-commands should be executed concurrently + // +optional + Parallel bool `json:"parallel,omitempty"` +} + +// VscodeConfigurationCommandLocationType describes the type of +// the location the configuration is fetched from. +// Only one of the following component type may be specified. +// +kubebuilder:validation:Enum=Uri;Inlined +type VscodeConfigurationCommandLocationType string + +const ( + UriVscodeConfigurationCommandLocationType VscodeConfigurationCommandLocationType = "Uri" + InlinedVscodeConfigurationCommandLocationType VscodeConfigurationCommandLocationType = "Inlined" +) + +// +k8s:openapi-gen=true +// +union +type VscodeConfigurationCommandLocation struct { + // Type of Vscode configuration command location + // + + // +unionDiscriminator + // +optional + LocationType VscodeConfigurationCommandLocationType `json:"locationType,omitempty"` + + // Location as an absolute of relative URI + // the VsCode configuration will be fetched from + // +optional + Uri string `json:"uri,omitempty"` + + // Inlined content of the VsCode configuration + // +optional + Inlined string `json:"inlined,omitempty"` +} + +type VscodeConfigurationCommand struct { + BaseCommand `json:",inline"` + VscodeConfigurationCommandLocation `json:",inline"` +} + +type CustomCommand struct { + LabeledCommand `json:",inline"` + + // Class of command that the associated implementation component + // should use to process this command with the appropriate logic + CommandClass string `json:"commandClass"` + + // Additional free-form configuration for this custom command + // that the implementation component will know how to use + // + // +kubebuilder:pruning:PreserveUnknownFields + // +kubebuilder:validation:EmbeddedResource + EmbeddedResource runtime.RawExtension `json:"embeddedResource"` +} diff --git a/pkg/apis/workspaces/v1alpha1/commands_conversion.go b/pkg/apis/workspaces/v1alpha1/commands_conversion.go new file mode 100644 index 000000000..878b448d6 --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/commands_conversion.go @@ -0,0 +1,105 @@ +package v1alpha1 + +import ( + "encoding/json" + + "github.com/devfile/api/v2/pkg/attributes" + + "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" +) + +func convertCommandTo_v1alpha2(src *Command, dest *v1alpha2.Command) error { + id, err := src.Key() + if err != nil { + return err + } + jsonCommand, err := json.Marshal(src) + if err != nil { + return err + } + err = json.Unmarshal(jsonCommand, dest) + if err != nil { + return err + } + var srcAttributes map[string]string + switch { + case src.Exec != nil: + srcAttributes = src.Exec.Attributes + case src.Apply != nil: + srcAttributes = src.Apply.Attributes + case src.Composite != nil: + srcAttributes = src.Composite.Attributes + case src.Custom != nil: + srcAttributes = src.Custom.Attributes + } + if srcAttributes != nil { + dest.Attributes = attributes.Attributes{} + convertAttributesTo_v1alpha2(srcAttributes, &dest.Attributes) + } + dest.Id = id + return nil +} + +// getGroup returns the group the command belongs to +func getGroup(dc v1alpha2.Command) *v1alpha2.CommandGroup { + switch { + case dc.Composite != nil: + return dc.Composite.Group + case dc.Exec != nil: + return dc.Exec.Group + case dc.Apply != nil: + return dc.Apply.Group + case dc.Custom != nil: + return dc.Custom.Group + + default: + return nil + } +} + +func convertCommandFrom_v1alpha2(src *v1alpha2.Command, dest *Command) error { + if src == nil { + return nil + } + + id := src.Key() + + srcCmdGroup := getGroup(*src) + if srcCmdGroup != nil && srcCmdGroup.Kind == v1alpha2.DeployCommandGroupKind { + // skip converting deploy kind commands as deploy kind commands are not supported in v1alpha1 + return nil + } + + jsonCommand, err := json.Marshal(src) + if err != nil { + return err + } + err = json.Unmarshal(jsonCommand, dest) + if err != nil { + return err + } + var destAttributes map[string]string + if src.Attributes != nil { + destAttributes = make(map[string]string) + err = convertAttributesFrom_v1alpha2(&src.Attributes, destAttributes) + if err != nil { + return err + } + } + + switch { + case dest.Apply != nil: + dest.Apply.Attributes = destAttributes + dest.Apply.Id = id + case dest.Composite != nil: + dest.Composite.Attributes = destAttributes + dest.Composite.Id = id + case dest.Custom != nil: + dest.Custom.Attributes = destAttributes + dest.Custom.Id = id + case dest.Exec != nil: + dest.Exec.Attributes = destAttributes + dest.Exec.Id = id + } + return err +} diff --git a/pkg/apis/workspaces/v1alpha1/commands_conversion_test.go b/pkg/apis/workspaces/v1alpha1/commands_conversion_test.go new file mode 100644 index 000000000..d33e6e801 --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/commands_conversion_test.go @@ -0,0 +1,62 @@ +package v1alpha1 + +import ( + "testing" + + "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" + "github.com/google/go-cmp/cmp" + fuzz "github.com/google/gofuzz" + "github.com/stretchr/testify/assert" +) + +func TestCommandConversion_v1alpha1(t *testing.T) { + f := fuzz.New().NilChance(fuzzNilChance).MaxDepth(100).Funcs( + commandFuzzFunc, + rawExtFuzzFunc, + ) + for i := 0; i < fuzzIterations; i++ { + original := &Command{} + intermediate := &v1alpha2.Command{} + output := &Command{} + f.Fuzz(original) + input := original.DeepCopy() + err := convertCommandTo_v1alpha2(input, intermediate) + if !assert.NoError(t, err, "Should not return error when converting to v1alpha2") { + return + } + err = convertCommandFrom_v1alpha2(intermediate, output) + if !assert.NoError(t, err, "Should not return error when converting from v1alpha2") { + return + } + if !assert.True(t, cmp.Equal(original, output), "Command should not be changed when converting between v1alpha1 and v1alpha2") { + t.Logf("Diff: \n%s\n", cmp.Diff(original, output)) + } + } +} + +func TestCommandConversionFrom_v1alpha2(t *testing.T) { + + src := &v1alpha2.Command{ + Id: "test1", + CommandUnion: v1alpha2.CommandUnion{ + Exec: &v1alpha2.ExecCommand{ + LabeledCommand: v1alpha2.LabeledCommand{ + BaseCommand: v1alpha2.BaseCommand{ + Group: &v1alpha2.CommandGroup{ + Kind: v1alpha2.DeployCommandGroupKind, + }, + }, + }, + }, + }, + } + + output := &Command{} + + err := convertCommandFrom_v1alpha2(src, output) + if !assert.NoError(t, err, "Should not return error when converting from v1alpha2") { + return + } + + assert.Equal(t, &Command{}, output, "Conversion from v1alpha2 should be skipped for deploy kind command") +} diff --git a/pkg/apis/workspaces/v1alpha1/component__plugin.go b/pkg/apis/workspaces/v1alpha1/component__plugin.go new file mode 100644 index 000000000..35dfb044d --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/component__plugin.go @@ -0,0 +1,13 @@ +package v1alpha1 + +type PluginComponent struct { + BaseComponent `json:",inline"` + ImportReference `json:",inline"` + PluginOverrides `json:",inline"` + + // +optional + // Optional name that allows referencing the component + // in commands, or inside a parent + // If omitted it will be infered from the location (uri or registryEntry) + Name string `json:"name,omitempty"` +} diff --git a/pkg/apis/workspaces/v1alpha1/component_container.go b/pkg/apis/workspaces/v1alpha1/component_container.go new file mode 100644 index 000000000..ea7dc4287 --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/component_container.go @@ -0,0 +1,71 @@ +package v1alpha1 + +// Component that allows the developer to add a configured container into his workspace +type ContainerComponent struct { + BaseComponent `json:",inline"` + Container `json:",inline"` + Endpoints []Endpoint `json:"endpoints,omitempty" patchStrategy:"merge" patchMergeKey:"name"` +} + +type Container struct { + Name string `json:"name"` + + Image string `json:"image,omitempty"` + + // +optional + // Environment variables used in this container + Env []EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name"` + + // +optional + // List of volumes mounts that should be mounted is this container. + VolumeMounts []VolumeMount `json:"volumeMounts,omitempty" patchStrategy:"merge" patchMergeKey:"name"` + + // +optional + MemoryLimit string `json:"memoryLimit,omitempty"` + + // The command to run in the dockerimage component instead of the default one provided in the image. + // + // Defaults to an empty array, meaning use whatever is defined in the image. + // +optional + Command []string `json:"command,omitempty" patchStrategy:"replace"` + + // The arguments to supply to the command running the dockerimage component. The arguments are supplied either to the default command provided in the image or to the overridden command. + // + // Defaults to an empty array, meaning use whatever is defined in the image. + // +optional + Args []string `json:"args,omitempty" patchStrategy:"replace"` + + // +optional + MountSources bool `json:"mountSources,omitempty"` + + // Optional specification of the path in the container where + // project sources should be transferred/mounted when `mountSources` is `true`. + // When omitted, the value of the `PROJECTS_ROOT` environment variable is used. + // +optional + SourceMapping string `json:"sourceMapping,omitempty"` + + // Specify if a container should run in its own separated pod, + // instead of running as part of the main development environment pod. + // + // Default value is `false` + // +optional + DedicatedPod bool `json:"dedicatedPod,omitempty"` +} + +type EnvVar struct { + Name string `json:"name" yaml:"name"` + Value string `json:"value" yaml:"value"` +} + +// Volume that should be mounted to a component container +type VolumeMount struct { + // The volume mount name is the name of an existing `Volume` component. + // If several containers mount the same volume name + // then they will reuse the same volume and will be able to access to the same files. + Name string `json:"name"` + + // The path in the component container where the volume should be mounted. + // If not path is mentioned, default path is the is `/`. + // +optional + Path string `json:"path,omitempty"` +} diff --git a/pkg/apis/workspaces/v1alpha1/component_kubernetes_like.go b/pkg/apis/workspaces/v1alpha1/component_kubernetes_like.go new file mode 100644 index 000000000..b17863161 --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/component_kubernetes_like.go @@ -0,0 +1,51 @@ +package v1alpha1 + +// K8sLikeComponentLocationType describes the type of +// the location the configuration is fetched from. +// Only one of the following component type may be specified. +// +kubebuilder:validation:Enum=Uri;Inlined +type K8sLikeComponentLocationType string + +const ( + UriK8sLikeComponentLocationType K8sLikeComponentLocationType = "Uri" + InlinedK8sLikeComponentLocationType K8sLikeComponentLocationType = "Inlined" +) + +// +k8s:openapi-gen=true +// +union +type K8sLikeComponentLocation struct { + // Type of Kubernetes-like location + // + + // +unionDiscriminator + // +optional + LocationType K8sLikeComponentLocationType `json:"locationType,omitempty"` + + // Location in a file fetched from a uri. + // +optional + Uri string `json:"uri,omitempty"` + + // Inlined manifest + // +optional + Inlined string `json:"inlined,omitempty"` +} + +type K8sLikeComponent struct { + BaseComponent `json:",inline"` + K8sLikeComponentLocation `json:",inline"` + + // Mandatory name that allows referencing the component + // in commands, or inside a parent + Name string `json:"name"` + + Endpoints []Endpoint `json:"endpoints,omitempty" patchStrategy:"merge" patchMergeKey:"name"` +} + +// Component that allows partly importing Kubernetes resources into the workspace POD +type KubernetesComponent struct { + K8sLikeComponent `json:",inline"` +} + +// Component that allows partly importing Openshift resources into the workspace POD +type OpenshiftComponent struct { + K8sLikeComponent `json:",inline"` +} diff --git a/pkg/apis/workspaces/v1alpha1/component_plugin_conversion.go b/pkg/apis/workspaces/v1alpha1/component_plugin_conversion.go new file mode 100644 index 000000000..91d11c560 --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/component_plugin_conversion.go @@ -0,0 +1,166 @@ +package v1alpha1 + +import ( + "encoding/json" + + "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" +) + +func convertPluginComponentTo_v1alpha2(srcComponent *Component, destComponent *v1alpha2.Component) error { + src := srcComponent.Plugin + if destComponent.Plugin == nil { + destComponent.Plugin = &v1alpha2.PluginComponent{} + } + dest := destComponent.Plugin + dest.Id = src.Id + dest.RegistryUrl = src.RegistryUrl + dest.Uri = src.Uri + dest.ImportReferenceType = v1alpha2.ImportReferenceType(src.ImportReferenceType) + if src.Kubernetes != nil { + kube := v1alpha2.KubernetesCustomResourceImportReference(*src.Kubernetes) + dest.Kubernetes = &kube + } + pluginKey, err := srcComponent.Key() + if err != nil { + return err + } + destComponent.Name = pluginKey + + for _, srcCommand := range src.Commands { + if srcCommand.Custom != nil { + // v1alpha2 does not support Plugin Custom commands, so we have to drop them here + continue + } + destCommand := v1alpha2.CommandPluginOverride{} + err := convertPluginComponentCommandTo_v1alpha2(&srcCommand, &destCommand) + if err != nil { + return err + } + dest.Commands = append(dest.Commands, destCommand) + } + + for _, srcComponent := range src.Components { + destComponent := v1alpha2.ComponentPluginOverride{} + err := convertPluginComponentSubComponentTo_v1alpha2(&srcComponent, &destComponent) + if err != nil { + return err + } + dest.Components = append(dest.Components, destComponent) + } + return nil +} + +func convertPluginComponentCommandTo_v1alpha2(src *Command, dest *v1alpha2.CommandPluginOverride) error { + srcId, err := src.Key() + if err != nil { + return err + } + jsonCommand, err := json.Marshal(src) + if err != nil { + return err + } + err = json.Unmarshal(jsonCommand, &dest) + if err != nil { + return err + } + dest.Id = srcId + return nil +} + +func convertPluginComponentSubComponentTo_v1alpha2(src *PluginComponentsOverride, dest *v1alpha2.ComponentPluginOverride) error { + srcName, err := src.Key() + if err != nil { + return err + } + jsonComponent, err := json.Marshal(src) + if err != nil { + return err + } + err = json.Unmarshal(jsonComponent, dest) + if err != nil { + return err + } + dest.Name = srcName + return nil +} + +func convertPluginComponentFrom_v1alpha2(srcComponent *v1alpha2.Component, destComponent *Component) error { + src := srcComponent.Plugin + if destComponent.Plugin == nil { + destComponent.Plugin = &PluginComponent{} + } + dest := destComponent.Plugin + dest.Id = src.Id + dest.RegistryUrl = src.RegistryUrl + dest.Uri = src.Uri + dest.ImportReferenceType = ImportReferenceType(src.ImportReferenceType) + if src.Kubernetes != nil { + kube := KubernetesCustomResourceImportReference(*src.Kubernetes) + dest.Kubernetes = &kube + } + destComponent.Plugin.Name = srcComponent.Name + + for _, srcCommand := range src.Commands { + destCommand := Command{} + err := convertPluginComponentCommandFrom_v1alpha2(&srcCommand, &destCommand) + if err != nil { + return err + } + dest.Commands = append(dest.Commands, destCommand) + } + + for _, srcComponent := range src.Components { + destComponent := PluginComponentsOverride{} + err := convertPluginComponentSubComponentFrom_v1alpha2(&srcComponent, &destComponent) + if err != nil { + return err + } + dest.Components = append(dest.Components, destComponent) + } + + return nil +} + +func convertPluginComponentCommandFrom_v1alpha2(src *v1alpha2.CommandPluginOverride, dest *Command) error { + srcId := src.Key() + jsonCommand, err := json.Marshal(src) + if err != nil { + return err + } + err = json.Unmarshal(jsonCommand, &dest) + if err != nil { + return err + } + switch { + case src.Apply != nil: + dest.Apply.Id = srcId + case src.Composite != nil: + dest.Composite.Id = srcId + case src.Exec != nil: + dest.Exec.Id = srcId + } + return nil +} + +func convertPluginComponentSubComponentFrom_v1alpha2(src *v1alpha2.ComponentPluginOverride, dest *PluginComponentsOverride) error { + srcName := src.Key() + jsonComponent, err := json.Marshal(src) + if err != nil { + return err + } + err = json.Unmarshal(jsonComponent, &dest) + if err != nil { + return err + } + switch { + case src.Container != nil: + dest.Container.Name = srcName + case src.Volume != nil: + dest.Volume.Name = srcName + case src.Openshift != nil: + dest.Openshift.Name = srcName + case src.Kubernetes != nil: + dest.Kubernetes.Name = srcName + } + return nil +} diff --git a/pkg/apis/workspaces/v1alpha1/component_volume.go b/pkg/apis/workspaces/v1alpha1/component_volume.go new file mode 100644 index 000000000..7815e1a10 --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/component_volume.go @@ -0,0 +1,23 @@ +package v1alpha1 + +// Component that allows the developer to declare and configure a volume into his workspace +type VolumeComponent struct { + BaseComponent `json:",inline"` + Volume `json:",inline"` +} + +// Volume that should be mounted to a component container +type Volume struct { + // Mandatory name that allows referencing the Volume component + // in Container volume mounts or inside a parent + Name string `json:"name"` + + // +optional + // Size of the volume + Size string `json:"size,omitempty"` + + // +optional + // Ephemeral volumes are not stored persistently across restarts. Defaults + // to false + Ephemeral bool `json:"ephemeral,omitempty"` +} diff --git a/pkg/apis/workspaces/v1alpha1/components.go b/pkg/apis/workspaces/v1alpha1/components.go new file mode 100644 index 000000000..f4c603d8b --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/components.go @@ -0,0 +1,126 @@ +package v1alpha1 + +import runtime "k8s.io/apimachinery/pkg/runtime" + +// ComponentType describes the type of component. +// Only one of the following component type may be specified. +// +kubebuilder:validation:Enum=Container;Kubernetes;Openshift;Volume;Plugin;Custom +type ComponentType string + +const ( + ContainerComponentType ComponentType = "Container" + KubernetesComponentType ComponentType = "Kubernetes" + OpenshiftComponentType ComponentType = "Openshift" + PluginComponentType ComponentType = "Plugin" + VolumeComponentType ComponentType = "Volume" + CustomComponentType ComponentType = "Custom" +) + +// Workspace component: Anything that will bring additional features / tooling / behaviour / context +// to the workspace, in order to make working in it easier. +type BaseComponent struct { +} + +// +k8s:openapi-gen=true +// +union +type Component struct { + // Type of component + // + // +unionDiscriminator + // +optional + ComponentType ComponentType `json:"componentType,omitempty"` + + // Allows adding and configuring workspace-related containers + // +optional + Container *ContainerComponent `json:"container,omitempty"` + + // Allows specifying the definition of a volume + // shared by several other components + // +optional + Volume *VolumeComponent `json:"volume,omitempty"` + + // Allows importing a plugin. + // + // Plugins are mainly imported devfiles that contribute components, commands + // and events as a consistent single unit. They are defined in either YAML files + // following the devfile syntax, + // or as `DevWorkspaceTemplate` Kubernetes Custom Resources + // +optional + Plugin *PluginComponent `json:"plugin,omitempty"` + + // Allows importing into the workspace the Kubernetes resources + // defined in a given manifest. For example this allows reusing the Kubernetes + // definitions used to deploy some runtime components in production. + // + // +optional + Kubernetes *KubernetesComponent `json:"kubernetes,omitempty"` + + // Allows importing into the workspace the OpenShift resources + // defined in a given manifest. For example this allows reusing the OpenShift + // definitions used to deploy some runtime components in production. + // + // +optional + Openshift *OpenshiftComponent `json:"openshift,omitempty"` + + // Custom component whose logic is implementation-dependant + // and should be provided by the user + // possibly through some dedicated controller + // +optional + Custom *CustomComponent `json:"custom,omitempty"` +} + +type CustomComponent struct { + // Mandatory name that allows referencing the component + // in commands, or inside a parent + Name string `json:"name"` + + // Class of component that the associated implementation controller + // should use to process this command with the appropriate logic + ComponentClass string `json:"componentClass"` + + // Additional free-form configuration for this custom component + // that the implementation controller will know how to use + // + // +kubebuilder:pruning:PreserveUnknownFields + // +kubebuilder:validation:EmbeddedResource + EmbeddedResource runtime.RawExtension `json:"embeddedResource"` +} + +// PluginComponentsOverrideType describes the type of components +// that can be overriden for a plugin. +// Only one of the following component type may be specified. +// +kubebuilder:validation:Enum=Container;Kubernetes;Openshift;Volume +type PluginComponentsOverrideType string + +const ( + ContainerPluginComponentsOverrideType PluginComponentsOverrideType = "Container" + KubernetesPluginComponentsOverrideType PluginComponentsOverrideType = "Kubernetes" + OpenshiftPluginComponentsOverrideType PluginComponentsOverrideType = "Openshift" + VolumePluginComponentsOverrideType PluginComponentsOverrideType = "Volume" +) + +// +k8s:openapi-gen=true +// +union +type PluginComponentsOverride struct { + // Type of component override for a plugin + // + // +unionDiscriminator + // +optional + ComponentType PluginComponentsOverrideType `json:"componentType,omitempty"` + + // Configuration overriding for a Container component in a plugin + // +optional + Container *ContainerComponent `json:"container,omitempty"` + + // Configuration overriding for a Volume component in a plugin + // +optional + Volume *VolumeComponent `json:"volume,omitempty"` + + // Configuration overriding for a Kubernetes component in a plugin + // +optional + Kubernetes *KubernetesComponent `json:"kubernetes,omitempty"` + + // Configuration overriding for an OpenShift component in a plugin + // +optional + Openshift *OpenshiftComponent `json:"openshift,omitempty"` +} diff --git a/pkg/apis/workspaces/v1alpha1/components_conversion.go b/pkg/apis/workspaces/v1alpha1/components_conversion.go new file mode 100644 index 000000000..0398eb256 --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/components_conversion.go @@ -0,0 +1,59 @@ +package v1alpha1 + +import ( + "encoding/json" + + "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" +) + +func convertComponentTo_v1alpha2(src *Component, dest *v1alpha2.Component) error { + if src.Plugin != nil { + // Need to handle plugin components separately. + return convertPluginComponentTo_v1alpha2(src, dest) + } + name, err := src.Key() + if err != nil { + return err + } + jsonComponent, err := json.Marshal(src) + if err != nil { + return err + } + err = json.Unmarshal(jsonComponent, dest) + if err != nil { + return err + } + dest.Name = name + return nil +} + +func convertComponentFrom_v1alpha2(src *v1alpha2.Component, dest *Component) error { + if src.Plugin != nil { + // Need to handle plugin components separately. + return convertPluginComponentFrom_v1alpha2(src, dest) + } else if src.Image != nil { + // Skip converting an Image component since v1alpha1 does not have an Image component + return nil + } + name := src.Key() + jsonComponent, err := json.Marshal(src) + if err != nil { + return err + } + err = json.Unmarshal(jsonComponent, dest) + switch { + case dest.Container != nil: + dest.Container.Name = name + case dest.Plugin != nil: + dest.Plugin.Name = name + case dest.Volume != nil: + dest.Volume.Name = name + case dest.Openshift != nil: + dest.Openshift.Name = name + case dest.Kubernetes != nil: + dest.Kubernetes.Name = name + case dest.Custom != nil: + dest.Custom.Name = name + } + return nil +} diff --git a/pkg/apis/workspaces/v1alpha1/components_conversion_test.go b/pkg/apis/workspaces/v1alpha1/components_conversion_test.go new file mode 100644 index 000000000..95be9ca7b --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/components_conversion_test.go @@ -0,0 +1,60 @@ +package v1alpha1 + +import ( + "testing" + + "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" + "github.com/google/go-cmp/cmp" + fuzz "github.com/google/gofuzz" + "github.com/stretchr/testify/assert" +) + +func TestComponentConversion_v1alpha1(t *testing.T) { + f := fuzz.New().NilChance(fuzzNilChance).MaxDepth(100).Funcs( + componentFuzzFunc, + commandFuzzFunc, + pluginComponentsOverrideFuzzFunc, + pluginComponentFuzzFunc, + rawExtFuzzFunc, + ) + for i := 0; i < fuzzIterations; i++ { + original := &Component{} + intermediate := &v1alpha2.Component{} + output := &Component{} + f.Fuzz(original) + input := original.DeepCopy() + err := convertComponentTo_v1alpha2(input, intermediate) + if !assert.NoError(t, err, "Should not return error when converting to v1alpha2") { + return + } + err = convertComponentFrom_v1alpha2(intermediate, output) + if !assert.NoError(t, err, "Should not return error when converting from v1alpha2") { + return + } + if !assert.True(t, cmp.Equal(original, output), "Component should not be changed when converting between v1alpha1 and v1alpha2") { + t.Logf("Diff: \n%s\n", cmp.Diff(original, output)) + } + } +} + +func TestComponentConversionFrom_v1alpha2(t *testing.T) { + + src := &v1alpha2.Component{ + Name: "test1", + ComponentUnion: v1alpha2.ComponentUnion{ + Image: &v1alpha2.ImageComponent{ + Image: v1alpha2.Image{ + ImageName: "image:latest", + }, + }, + }, + } + output := &Component{} + + err := convertComponentFrom_v1alpha2(src, output) + if !assert.NoError(t, err, "Should not return error when converting from v1alpha2") { + return + } + + assert.Equal(t, &Component{}, output, "Conversion from v1alpha2 should be skipped for Image Component") +} diff --git a/pkg/apis/workspaces/v1alpha1/conversion.go b/pkg/apis/workspaces/v1alpha1/conversion.go new file mode 100644 index 000000000..f244d80a6 --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/conversion.go @@ -0,0 +1,171 @@ +package v1alpha1 + +import ( + "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" +) + +const ( + // ConvertedFromAttribute marks a devfile element as being converted from a different underlying field. For example, + // since v1alpha2 does not support + ConvertedFromAttribute = "conversion.api.devfile.io/converted-from" +) + +func convertDevWorkspaceTo_v1alpha2(src *DevWorkspace, dest *v1alpha2.DevWorkspace) error { + dest.ObjectMeta = src.ObjectMeta + dest.Status.DevWorkspaceId = src.Status.WorkspaceId + dest.Status.MainUrl = src.Status.IdeUrl + dest.Status.Phase = v1alpha2.DevWorkspacePhase(src.Status.Phase) + dest.Status.Message = src.Status.Message + convertConditionsTo_v1alpha2(src, dest) + dest.Spec.RoutingClass = src.Spec.RoutingClass + dest.Spec.Started = src.Spec.Started + + return convertDevWorkspaceTemplateSpecTo_v1alpha2(&src.Spec.Template, &dest.Spec.Template) +} + +func convertDevWorkspaceFrom_v1alpha2(src *v1alpha2.DevWorkspace, dest *DevWorkspace) error { + dest.ObjectMeta = src.ObjectMeta + dest.Status.WorkspaceId = src.Status.DevWorkspaceId + dest.Status.IdeUrl = src.Status.MainUrl + dest.Status.Phase = WorkspacePhase(src.Status.Phase) + dest.Status.Message = src.Status.Message + convertConditionsFrom_v1alpha2(src, dest) + dest.Spec.RoutingClass = src.Spec.RoutingClass + dest.Spec.Started = src.Spec.Started + + return convertDevWorkspaceTemplateSpecFrom_v1alpha2(&src.Spec.Template, &dest.Spec.Template) +} + +func convertDevWorkspaceTemplateTo_v1alpha2(src *DevWorkspaceTemplate, dest *v1alpha2.DevWorkspaceTemplate) error { + dest.ObjectMeta = src.ObjectMeta + return convertDevWorkspaceTemplateSpecTo_v1alpha2(&src.Spec, &dest.Spec) +} + +func convertDevWorkspaceTemplateFrom_v1alpha2(src *v1alpha2.DevWorkspaceTemplate, dest *DevWorkspaceTemplate) error { + dest.ObjectMeta = src.ObjectMeta + return convertDevWorkspaceTemplateSpecFrom_v1alpha2(&src.Spec, &dest.Spec) +} + +func convertDevWorkspaceTemplateSpecTo_v1alpha2(src *DevWorkspaceTemplateSpec, dest *v1alpha2.DevWorkspaceTemplateSpec) error { + if src.Parent != nil { + dest.Parent = &v1alpha2.Parent{} + err := convertParentTo_v1alpha2(src.Parent, dest.Parent) + if err != nil { + return err + } + } + for _, srcComponent := range src.Components { + destComponent := v1alpha2.Component{} + err := convertComponentTo_v1alpha2(&srcComponent, &destComponent) + if err != nil { + return err + } + dest.Components = append(dest.Components, destComponent) + } + for _, srcProject := range src.Projects { + destProject := v1alpha2.Project{} + err := convertProjectTo_v1alpha2(&srcProject, &destProject) + if err != nil { + return err + } + dest.Projects = append(dest.Projects, destProject) + } + for _, srcStarterProject := range src.StarterProjects { + destStarterProject := v1alpha2.StarterProject{} + err := convertStarterProjectTo_v1alpha2(&srcStarterProject, &destStarterProject) + if err != nil { + return err + } + dest.StarterProjects = append(dest.StarterProjects, destStarterProject) + } + for _, srcCommand := range src.Commands { + destCommand := v1alpha2.Command{} + err := convertCommandTo_v1alpha2(&srcCommand, &destCommand) + if err != nil { + return err + } + dest.Commands = append(dest.Commands, destCommand) + } + if src.Events != nil { + dest.Events = &v1alpha2.Events{} + err := convertEventsTo_v1alpha2(src.Events, dest.Events) + if err != nil { + return err + } + } + return nil +} + +func convertDevWorkspaceTemplateSpecFrom_v1alpha2(src *v1alpha2.DevWorkspaceTemplateSpec, dest *DevWorkspaceTemplateSpec) error { + if src.Parent != nil { + dest.Parent = &Parent{} + err := convertParentFrom_v1alpha2(src.Parent, dest.Parent) + if err != nil { + return err + } + } + for _, srcComponent := range src.Components { + destComponent := Component{} + err := convertComponentFrom_v1alpha2(&srcComponent, &destComponent) + if err != nil { + return err + } + dest.Components = append(dest.Components, destComponent) + } + for _, srcProject := range src.Projects { + destProject := Project{} + err := convertProjectFrom_v1alpha2(&srcProject, &destProject) + if err != nil { + return err + } + dest.Projects = append(dest.Projects, destProject) + } + for _, srcStarterProject := range src.StarterProjects { + destStarterProject := StarterProject{} + err := convertStarterProjectFrom_v1alpha2(&srcStarterProject, &destStarterProject) + if err != nil { + return err + } + dest.StarterProjects = append(dest.StarterProjects, destStarterProject) + } + for _, srcCommand := range src.Commands { + destCommand := Command{} + err := convertCommandFrom_v1alpha2(&srcCommand, &destCommand) + if err != nil { + return err + } + dest.Commands = append(dest.Commands, destCommand) + } + if src.Events != nil { + dest.Events = &Events{} + err := convertEventsFrom_v1alpha2(src.Events, dest.Events) + if err != nil { + return err + } + } + return nil +} + +func convertConditionsTo_v1alpha2(src *DevWorkspace, dest *v1alpha2.DevWorkspace) { + for _, srcCondition := range src.Status.Conditions { + dstCondition := v1alpha2.DevWorkspaceCondition{} + dstCondition.Status = srcCondition.Status + dstCondition.LastTransitionTime = srcCondition.LastTransitionTime + dstCondition.Message = srcCondition.Message + dstCondition.Reason = srcCondition.Reason + dstCondition.Type = v1alpha2.DevWorkspaceConditionType(srcCondition.Type) + dest.Status.Conditions = append(dest.Status.Conditions, dstCondition) + } +} + +func convertConditionsFrom_v1alpha2(src *v1alpha2.DevWorkspace, dest *DevWorkspace) { + for _, srcCondition := range src.Status.Conditions { + dstCondition := WorkspaceCondition{} + dstCondition.Status = srcCondition.Status + dstCondition.LastTransitionTime = srcCondition.LastTransitionTime + dstCondition.Message = srcCondition.Message + dstCondition.Reason = srcCondition.Reason + dstCondition.Type = WorkspaceConditionType(srcCondition.Type) + dest.Status.Conditions = append(dest.Status.Conditions, dstCondition) + } +} diff --git a/pkg/apis/workspaces/v1alpha1/conversion_test.go b/pkg/apis/workspaces/v1alpha1/conversion_test.go new file mode 100644 index 000000000..9181dfa9a --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/conversion_test.go @@ -0,0 +1,302 @@ +package v1alpha1 + +import ( + "testing" + + "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" + "github.com/google/go-cmp/cmp" + fuzz "github.com/google/gofuzz" + "github.com/stretchr/testify/assert" + "k8s.io/apimachinery/pkg/runtime" +) + +const fuzzIterations = 500 +const fuzzNilChance = 0.2 + +var devWorkspaceFuzzFunc = func(workspace *DevWorkspace, c fuzz.Continue) { + c.Fuzz(&workspace.Status) + c.Fuzz(&workspace.Spec) +} + +var devWorkspaceTemplateFuzzFunc = func(workspace *DevWorkspaceTemplate, c fuzz.Continue) { + c.Fuzz(&workspace.Spec) +} + +var componentFuzzFunc = func(component *Component, c fuzz.Continue) { + switch c.Intn(6) { + case 0: // Generate Container + c.Fuzz(&component.Container) + case 1: // Generate Plugin + c.Fuzz(&component.Plugin) + case 2: // Generate Kubernetes + c.Fuzz(&component.Kubernetes) + case 3: // Generate OpenShift + c.Fuzz(&component.Openshift) + case 4: // Generate Volume + c.Fuzz(&component.Volume) + case 5: // Generate Custom + c.Fuzz(&component.Custom) + } +} + +var commandFuzzFunc = func(command *Command, c fuzz.Continue) { + switch c.Intn(4) { + case 0: + c.Fuzz(&command.Apply) + case 1: + c.Fuzz(&command.Composite) + case 2: + c.Fuzz(&command.Custom) + case 3: + c.Fuzz(&command.Exec) + } +} + +var pluginComponentsOverrideFuzzFunc = func(component *PluginComponentsOverride, c fuzz.Continue) { + switch c.Intn(4) { + case 0: + c.Fuzz(&component.Container) + case 1: + c.Fuzz(&component.Volume) + case 2: + c.Fuzz(&component.Openshift) + case 3: + c.Fuzz(&component.Kubernetes) + } +} + +var pluginComponentFuzzFunc = func(plugin *PluginComponent, c fuzz.Continue) { + c.Fuzz(plugin) + plugin.Name = c.RandString() + var filteredCommands []Command + for _, command := range plugin.Commands { + if command.Custom == nil { + filteredCommands = append(filteredCommands, command) + } + } + plugin.Commands = filteredCommands +} + +var parentFuzzFunc = func(parent *Parent, c fuzz.Continue) { + for i := 0; i < c.Intn(4); i++ { + component := Component{} + parentComponentFuzzFunc(&component, c) + parent.Components = append(parent.Components, component) + } + for i := 0; i < c.Intn(4); i++ { + command := Command{} + parentCommandFuzzFunc(&command, c) + parent.Commands = append(parent.Commands, command) + } + for i := 0; i < c.Intn(4); i++ { + project := Project{} + parentProjectFuzzFunc(&project, c) + parent.Projects = append(parent.Projects, project) + } + for i := 0; i < c.Intn(4); i++ { + starterProject := StarterProject{} + starterProject.Description = c.RandString() + parentProjectFuzzFunc(&starterProject.Project, c) + parent.StarterProjects = append(parent.StarterProjects, starterProject) + } +} + +var conditionFuzzFunc = func(condition *WorkspaceCondition, c fuzz.Continue) { + condition.Reason = c.RandString() + condition.Type = WorkspaceConditionType(c.RandString()) + condition.Message = c.RandString() +} + +var parentComponentFuzzFunc = func(component *Component, c fuzz.Continue) { + // Do not generate custom components when working with Parents + switch c.Intn(5) { + case 0: // Generate Container + c.Fuzz(&component.Container) + case 1: // Generate Plugin + c.Fuzz(&component.Plugin) + case 2: // Generate Kubernetes + c.Fuzz(&component.Kubernetes) + case 3: // Generate OpenShift + c.Fuzz(&component.Openshift) + case 4: // Generate Volume + c.Fuzz(&component.Volume) + } +} + +var parentCommandFuzzFunc = func(command *Command, c fuzz.Continue) { + // Do not generate Custom commands for Parents + // Also: commands in Parents cannot have attributes. + switch c.Intn(3) { + case 0: + c.Fuzz(&command.Apply) + if command.Apply != nil { + command.Apply.Attributes = nil + } + case 1: + c.Fuzz(&command.Composite) + if command.Composite != nil { + command.Composite.Attributes = nil + } + case 2: + c.Fuzz(&command.Exec) + if command.Exec != nil { + command.Exec.Attributes = nil + } + } +} + +var parentProjectFuzzFunc = func(project *Project, c fuzz.Continue) { + // Custom projects are not supported in v1alpha2 parent + project.Name = c.RandString() + switch c.Intn(3) { + case 0: + c.Fuzz(&project.Git) + if project.Git != nil { + project.Git.SparseCheckoutDir = "" + } + case 1: + c.Fuzz(&project.Github) + if project.Github != nil { + project.Github.SparseCheckoutDir = "" + } + case 2: + c.Fuzz(&project.Zip) + if project.Zip != nil { + project.Zip.SparseCheckoutDir = "" + } + } +} + +var projectFuzzFunc = func(project *Project, c fuzz.Continue) { + switch c.Intn(4) { + case 0: + c.Fuzz(&project.Git) + if project.Git != nil { + project.Git.SparseCheckoutDir = "" + } + case 1: + c.Fuzz(&project.Github) + if project.Github != nil { + project.Github.SparseCheckoutDir = "" + } + case 2: + c.Fuzz(&project.Zip) + if project.Zip != nil { + project.Zip.SparseCheckoutDir = "" + } + case 3: + c.Fuzz(&project.Custom) + } +} + +// embeddedResource.Object is an interface and hard to fuzz right now. +var rawExtFuzzFunc = func(embeddedResource *runtime.RawExtension, c fuzz.Continue) {} + +func TestDevWorkspaceConversion_v1alpha1(t *testing.T) { + f := fuzz.New().NilChance(fuzzNilChance).MaxDepth(100).Funcs( + devWorkspaceFuzzFunc, + conditionFuzzFunc, + parentFuzzFunc, + componentFuzzFunc, + commandFuzzFunc, + projectFuzzFunc, + pluginComponentsOverrideFuzzFunc, + pluginComponentFuzzFunc, + rawExtFuzzFunc, + ) + for i := 0; i < fuzzIterations; i++ { + original := &DevWorkspace{} + intermediate := &v1alpha2.DevWorkspace{} + output := &DevWorkspace{} + f.Fuzz(original) + input := original.DeepCopy() + err := convertDevWorkspaceTo_v1alpha2(input, intermediate) + if !assert.NoError(t, err, "Should not return error when converting to v1alpha2") { + return + } + err = convertDevWorkspaceFrom_v1alpha2(intermediate, output) + if !assert.NoError(t, err, "Should not return error when converting from v1alpha2") { + return + } + if !assert.True(t, cmp.Equal(original, output), "DevWorkspace should not be changed when converting between v1alpha1 and v1alpha2") { + t.Logf("Diff: \n%s\n", cmp.Diff(original, output)) + } + } +} + +func TestDevWorkspaceTemplateConversion_v1alpha1(t *testing.T) { + f := fuzz.New().NilChance(fuzzNilChance).MaxDepth(100).Funcs( + devWorkspaceTemplateFuzzFunc, + conditionFuzzFunc, + parentFuzzFunc, + componentFuzzFunc, + commandFuzzFunc, + projectFuzzFunc, + pluginComponentsOverrideFuzzFunc, + pluginComponentFuzzFunc, + rawExtFuzzFunc, + ) + for i := 0; i < fuzzIterations; i++ { + original := &DevWorkspaceTemplate{} + intermediate := &v1alpha2.DevWorkspaceTemplate{} + output := &DevWorkspaceTemplate{} + f.Fuzz(original) + input := original.DeepCopy() + err := convertDevWorkspaceTemplateTo_v1alpha2(input, intermediate) + if !assert.NoError(t, err, "Should not return error when converting to v1alpha2") { + return + } + err = convertDevWorkspaceTemplateFrom_v1alpha2(intermediate, output) + if !assert.NoError(t, err, "Should not return error when converting from v1alpha2") { + return + } + if !assert.True(t, cmp.Equal(original, output), "DevWorkspaceTemplate should not be changed when converting between v1alpha1 and v1alpha2") { + t.Logf("Diff: \n%s\n", cmp.Diff(original, output)) + } + } +} + +func BenchmarkDevWorkspaceConversion(b *testing.B) { + f := fuzz.New().NilChance(fuzzNilChance).MaxDepth(100).Funcs( + devWorkspaceFuzzFunc, + conditionFuzzFunc, + parentFuzzFunc, + componentFuzzFunc, + commandFuzzFunc, + projectFuzzFunc, + pluginComponentsOverrideFuzzFunc, + pluginComponentFuzzFunc, + rawExtFuzzFunc, + ) + b.ResetTimer() + b.Run("Convert to v1alpha2", func(b *testing.B) { + for i := 0; i < b.N; i++ { + b.StopTimer() + v1alpha1DW := &DevWorkspace{} + v1alpha2DW := &v1alpha2.DevWorkspace{} + f.Fuzz(v1alpha1DW) + b.StartTimer() + err := convertDevWorkspaceTo_v1alpha2(v1alpha1DW, v1alpha2DW) + if err != nil { + b.FailNow() + } + } + }) + b.Run("Convert from v1alpha2", func(b *testing.B) { + for i := 0; i < b.N; i++ { + b.StopTimer() + v1alpha1DW := &DevWorkspace{} + v1alpha2DW := &v1alpha2.DevWorkspace{} + f.Fuzz(v1alpha1DW) + err := convertDevWorkspaceTo_v1alpha2(v1alpha1DW, v1alpha2DW) + if err != nil { + b.FailNow() + } + b.StartTimer() + err = convertDevWorkspaceFrom_v1alpha2(v1alpha2DW, v1alpha1DW) + if err != nil { + b.FailNow() + } + } + }) +} diff --git a/pkg/apis/workspaces/v1alpha1/devworkspace_conversion.go b/pkg/apis/workspaces/v1alpha1/devworkspace_conversion.go new file mode 100644 index 000000000..a4e01a4b8 --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/devworkspace_conversion.go @@ -0,0 +1,19 @@ +package v1alpha1 + +import ( + "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" + "sigs.k8s.io/controller-runtime/pkg/conversion" +) + +// Spokes for conversion have to satisfy the Convertible interface. +var _ conversion.Convertible = (*DevWorkspace)(nil) + +func (src *DevWorkspace) ConvertTo(destRaw conversion.Hub) error { + dest := destRaw.(*v1alpha2.DevWorkspace) + return convertDevWorkspaceTo_v1alpha2(src, dest) +} + +func (dest *DevWorkspace) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*v1alpha2.DevWorkspace) + return convertDevWorkspaceFrom_v1alpha2(src, dest) +} diff --git a/pkg/apis/workspaces/v1alpha1/devworkspace_types.go b/pkg/apis/workspaces/v1alpha1/devworkspace_types.go new file mode 100644 index 000000000..0e12c813e --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/devworkspace_types.go @@ -0,0 +1,100 @@ +package v1alpha1 + +import ( + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// DevWorkspaceSpec defines the desired state of DevWorkspace +// +k8s:openapi-gen=true +type DevWorkspaceSpec struct { + Started bool `json:"started"` + RoutingClass string `json:"routingClass,omitempty"` + Template DevWorkspaceTemplateSpec `json:"template,omitempty"` +} + +// DevWorkspaceStatus defines the observed state of DevWorkspace +// +k8s:openapi-gen=true +type DevWorkspaceStatus struct { + // Id of the workspace + WorkspaceId string `json:"workspaceId"` + // URL at which the Worksace Editor can be joined + IdeUrl string `json:"ideUrl,omitempty"` + Phase WorkspacePhase `json:"phase,omitempty"` + // Conditions represent the latest available observations of an object's state + Conditions []WorkspaceCondition `json:"conditions,omitempty"` + // Message is a short user-readable message giving additional information + // about an object's state + Message string `json:"message,omitempty"` +} + +type WorkspacePhase string + +// Valid workspace Statuses +const ( + WorkspaceStatusStarting WorkspacePhase = "Starting" + WorkspaceStatusRunning WorkspacePhase = "Running" + WorkspaceStatusStopped WorkspacePhase = "Stopped" + WorkspaceStatusStopping WorkspacePhase = "Stopping" + WorkspaceStatusFailed WorkspacePhase = "Failed" + WorkspaceStatusError WorkspacePhase = "Error" +) + +// WorkspaceCondition contains details for the current condition of this workspace. +type WorkspaceCondition struct { + // Type is the type of the condition. + Type WorkspaceConditionType `json:"type"` + // Phase is the status of the condition. + // Can be True, False, Unknown. + Status corev1.ConditionStatus `json:"status"` + // Last time the condition transitioned from one status to another. + LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` + // Unique, one-word, CamelCase reason for the condition's last transition. + Reason string `json:"reason,omitempty"` + // Human-readable message indicating details about last transition. + Message string `json:"message,omitempty"` +} + +// Types of conditions reported by workspace +type WorkspaceConditionType string + +const ( + WorkspaceComponentsReady WorkspaceConditionType = "ComponentsReady" + WorkspaceRoutingReady WorkspaceConditionType = "RoutingReady" + WorkspaceServiceAccountReady WorkspaceConditionType = "ServiceAccountReady" + WorkspaceReady WorkspaceConditionType = "Ready" + WorkspaceFailedStart WorkspaceConditionType = "FailedStart" + WorkspaceError WorkspaceConditionType = "Error" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// DevWorkspace is the Schema for the devworkspaces API +// +k8s:openapi-gen=true +// +kubebuilder:subresource:status +// +kubebuilder:resource:path=devworkspaces,scope=Namespaced +// +kubebuilder:printcolumn:name="Workspace ID",type="string",JSONPath=".status.workspaceId",description="The workspace's unique id" +// +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="The current workspace startup phase" +// +kubebuilder:printcolumn:name="URL",type="string",JSONPath=".status.ideUrl",description="Url endpoint for accessing workspace" +// +kubebuilder:deprecatedversion +// +kubebuilder:unservedversion +type DevWorkspace struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec DevWorkspaceSpec `json:"spec,omitempty"` + Status DevWorkspaceStatus `json:"status,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// DevWorkspaceList contains a list of DevWorkspace +type DevWorkspaceList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []DevWorkspace `json:"items"` +} + +func init() { + SchemeBuilder.Register(&DevWorkspace{}, &DevWorkspaceList{}) +} diff --git a/pkg/apis/workspaces/v1alpha1/devworkspacetemplate_conversion.go b/pkg/apis/workspaces/v1alpha1/devworkspacetemplate_conversion.go new file mode 100644 index 000000000..f74b766d8 --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/devworkspacetemplate_conversion.go @@ -0,0 +1,20 @@ +package v1alpha1 + +import ( + "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" + "sigs.k8s.io/controller-runtime/pkg/conversion" +) + +// Spokes for conversion have to satisfy the Convertible interface. +var _ conversion.Convertible = (*DevWorkspaceTemplate)(nil) + +func (src *DevWorkspaceTemplate) ConvertTo(destRaw conversion.Hub) error { + dest := destRaw.(*v1alpha2.DevWorkspaceTemplate) + return convertDevWorkspaceTemplateTo_v1alpha2(src, dest) + +} + +func (dest *DevWorkspaceTemplate) ConvertFrom(srcRaw conversion.Hub) error { + src := srcRaw.(*v1alpha2.DevWorkspaceTemplate) + return convertDevWorkspaceTemplateFrom_v1alpha2(src, dest) +} diff --git a/pkg/apis/workspaces/v1alpha1/devworkspacetemplate_spec.go b/pkg/apis/workspaces/v1alpha1/devworkspacetemplate_spec.go new file mode 100644 index 000000000..ac0c3ac5b --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/devworkspacetemplate_spec.go @@ -0,0 +1,36 @@ +package v1alpha1 + +// Structure of the workspace. This is also the specification of a workspace template. +// +k8s:openapi-gen=true +type DevWorkspaceTemplateSpec struct { + // Parent workspace template + // +optional + Parent *Parent `json:"parent,omitempty"` + + DevWorkspaceTemplateSpecContent `json:",inline"` +} + +type DevWorkspaceTemplateSpecContent struct { + // Predefined, ready-to-use, workspace-related commands + // +optional + // + Commands []Command `json:"commands,omitempty" patchStrategy:"merge" patchMergeKey:"id"` + + // Bindings of commands to events. + // Each command is referred-to by its name. + // +optional + Events *Events `json:"events,omitempty"` + + // Projects worked on in the workspace, containing names and sources locations + // +optional + Projects []Project `json:"projects,omitempty" patchStrategy:"merge" patchMergeKey:"name"` + + // StarterProjects is a project that can be used as a starting point when bootstrapping new projects + // +optional + StarterProjects []StarterProject `json:"starterProjects,omitempty"` + + // List of the workspace components, such as editor and plugins, + // user-provided containers, or other types of components + // +optional + Components []Component `json:"components,omitempty" patchStrategy:"merge" patchMergeKey:"name"` +} diff --git a/pkg/apis/workspaces/v1alpha1/devworkspacetemplate_types.go b/pkg/apis/workspaces/v1alpha1/devworkspacetemplate_types.go new file mode 100644 index 000000000..7e58fa347 --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/devworkspacetemplate_types.go @@ -0,0 +1,32 @@ +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// DevWorkspaceTemplate is the Schema for the devworkspacetemplates API +// +k8s:openapi-gen=true +// +kubebuilder:resource:path=devworkspacetemplates,scope=Namespaced,shortName=dwt +// +kubebuilder:deprecatedversion +// +kubebuilder:unservedversion +type DevWorkspaceTemplate struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec DevWorkspaceTemplateSpec `json:"spec,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// DevWorkspaceTemplateList contains a list of DevWorkspaceTemplate +type DevWorkspaceTemplateList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []DevWorkspaceTemplate `json:"items"` +} + +func init() { + SchemeBuilder.Register(&DevWorkspaceTemplate{}, &DevWorkspaceTemplateList{}) +} diff --git a/pkg/apis/workspaces/v1alpha1/doc.go b/pkg/apis/workspaces/v1alpha1/doc.go new file mode 100644 index 000000000..1c2d6aa60 --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/doc.go @@ -0,0 +1,4 @@ +// Package v1alpha1 contains API Schema definitions for the org v1alpha1 API group +// +k8s:deepcopy-gen=package,register +// +groupName=workspace.devfile.io +package v1alpha1 diff --git a/pkg/apis/workspaces/v1alpha1/endpoint.go b/pkg/apis/workspaces/v1alpha1/endpoint.go new file mode 100644 index 000000000..affd725e0 --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/endpoint.go @@ -0,0 +1,105 @@ +package v1alpha1 + +// EndpointProtocol defines the application and transport protocols of the traffic that will go through this endpoint. +// Only one of the following protocols may be specified: http, ws, tcp, udp. +// +kubebuilder:validation:Enum=http;ws;tcp;udp +type EndpointProtocol string + +const ( + // Endpoint will have `http` traffic, typically on a TCP connection. + // It will be automaticaly promoted to `https` when the `secure` field is set to `true` + HTTPEndpointProtocol EndpointProtocol = "http" + // Endpoint will have `https` traffic, typically on a TCP connection + HTTPSEndpointProtocol EndpointProtocol = "https" + // Endpoint will have `ws` traffic, typically on a TCP connection + // It will be automaticaly promoted to `wss` when the `secure` field is set to `true` + WSEndpointProtocol EndpointProtocol = "ws" + // Endpoint will have `wss` traffic, typically on a TCP connection + WSSEndpointProtocol EndpointProtocol = "wss" + // Endpoint will have traffic on a TCP connection, + // without specifying an application protocol + TCPEndpointProtocol EndpointProtocol = "tcp" + // Endpoint will have traffic on an UDP connection, + // without specifying an application protocol + UDPEndpointProtocol EndpointProtocol = "udp" +) + +// EndpointExposure describes the way an endpoint is exposed on the network. +// Only one of the following exposures may be specified: public, internal, none. +// +kubebuilder:validation:Enum=public;internal;none +type EndpointExposure string + +const ( + // Endpoint will be exposed on the public network, typically through + // a K8S ingress or an OpenShift route + PublicEndpointExposure EndpointExposure = "public" + // Endpoint will be exposed internally outside of the main workspace POD, + // typically by K8S services, to be consumed by other elements running + // on the same cloud internal network. + InternalEndpointExposure EndpointExposure = "internal" + // Endpoint will not be exposed and will only be accessible + // inside the main workspace POD, on a local address. + NoneEndpointExposure EndpointExposure = "none" +) + +type Endpoint struct { + Name string `json:"name"` + + // +optional + TargetPort int `json:"targetPort,omitempty"` + + // Describes how the endpoint should be exposed on the network. + // + // - `public` means that the endpoint will be exposed on the public network, typically through + // a K8S ingress or an OpenShift route. + // + // - `internal` means that the endpoint will be exposed internally outside of the main workspace POD, + // typically by K8S services, to be consumed by other elements running + // on the same cloud internal network. + // + // - `none` means that the endpoint will not be exposed and will only be accessible + // inside the main workspace POD, on a local address. + // + // Default value is `public` + // +optional + Exposure EndpointExposure `json:"exposure,omitempty"` + + // Describes the application and transport protocols of the traffic that will go through this endpoint. + // + // - `http`: Endpoint will have `http` traffic, typically on a TCP connection. + // It will be automaticaly promoted to `https` when the `secure` field is set to `true`. + // + // - `https`: Endpoint will have `https` traffic, typically on a TCP connection. + // + // - `ws`: Endpoint will have `ws` traffic, typically on a TCP connection. + // It will be automaticaly promoted to `wss` when the `secure` field is set to `true`. + // + // - `wss`: Endpoint will have `wss` traffic, typically on a TCP connection. + // + // - `tcp`: Endpoint will have traffic on a TCP connection, without specifying an application protocol. + // + // - `udp`: Endpoint will have traffic on an UDP connection, without specifying an application protocol. + // + // Default value is `http` + // +optional + Protocol string `json:"protocol,omitempty"` + + // Describes whether the endpoint should be secured and protected by some + // authentication process + // +optional + Secure bool `json:"secure,omitempty"` + + // Path of the endpoint URL + // +optional + Path string `json:"path,omitempty"` + + // Map of implementation-dependant string-based free-form attributes. + // + // Examples of Che-specific attributes: + // + // - cookiesAuthEnabled: "true" / "false", + // + // - type: "terminal" / "ide" / "ide-dev", + // +optional + Attributes map[string]string `json:"attributes,omitempty"` +} diff --git a/pkg/apis/workspaces/v1alpha1/events.go b/pkg/apis/workspaces/v1alpha1/events.go new file mode 100644 index 000000000..4897a4b2c --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/events.go @@ -0,0 +1,26 @@ +package v1alpha1 + +type Events struct { + WorkspaceEvents `json:",inline"` +} + +type WorkspaceEvents struct { + // Names of commands that should be executed before the workspace start. + // Kubernetes-wise, these commands would typically be executed in init containers of the workspace POD. + // +optional + PreStart []string `json:"preStart,omitempty"` + + // Names of commands that should be executed after the workspace is completely started. + // In the case of Che-Theia, these commands should be executed after all plugins and extensions have started, including project cloning. + // This means that those commands are not triggered until the user opens the IDE in his browser. + // +optional + PostStart []string `json:"postStart,omitempty"` + + // +optional + // Names of commands that should be executed before stopping the workspace. + PreStop []string `json:"preStop,omitempty"` + + // +optional + // Names of commands that should be executed after stopping the workspace. + PostStop []string `json:"postStop,omitempty"` +} diff --git a/pkg/apis/workspaces/v1alpha1/events_conversion.go b/pkg/apis/workspaces/v1alpha1/events_conversion.go new file mode 100644 index 000000000..9b93c6b63 --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/events_conversion.go @@ -0,0 +1,19 @@ +package v1alpha1 + +import ( + "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" +) + +func convertEventsTo_v1alpha2(src *Events, dest *v1alpha2.Events) error { + if src != nil { + dest.DevWorkspaceEvents = v1alpha2.DevWorkspaceEvents(src.WorkspaceEvents) + } + return nil +} + +func convertEventsFrom_v1alpha2(src *v1alpha2.Events, dest *Events) error { + if src != nil { + dest.WorkspaceEvents = WorkspaceEvents(src.DevWorkspaceEvents) + } + return nil +} diff --git a/pkg/apis/workspaces/v1alpha1/events_conversion_test.go b/pkg/apis/workspaces/v1alpha1/events_conversion_test.go new file mode 100644 index 000000000..dd10b5ac3 --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/events_conversion_test.go @@ -0,0 +1,29 @@ +package v1alpha1 + +import ( + "testing" + + "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" + fuzz "github.com/google/gofuzz" + "github.com/stretchr/testify/assert" +) + +func TestEventsConversion_v1alpha1(t *testing.T) { + f := fuzz.New().NilChance(fuzzNilChance) + for i := 0; i < fuzzIterations; i++ { + original := &Events{} + intermediate := &v1alpha2.Events{} + output := &Events{} + f.Fuzz(original) + input := original.DeepCopy() + err := convertEventsTo_v1alpha2(input, intermediate) + if !assert.NoError(t, err, "Should not return error when converting to v1alpha2") { + return + } + err = convertEventsFrom_v1alpha2(intermediate, output) + if !assert.NoError(t, err, "Should not return error when converting from v1alpha2") { + return + } + assert.Equal(t, original, output, "Events should not be changed when converting between v1alpha1 and v1alpha2") + } +} diff --git a/pkg/apis/workspaces/v1alpha1/import_reference.go b/pkg/apis/workspaces/v1alpha1/import_reference.go new file mode 100644 index 000000000..57cc2d3df --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/import_reference.go @@ -0,0 +1,49 @@ +package v1alpha1 + +// ImportReferenceType describes the type of location +// from where the referenced template structure should be retrieved. +// Only one of the following parent locations may be specified. +// +kubebuilder:validation:Enum=Uri;Id;Kubernetes +type ImportReferenceType string + +const ( + UriImportReferenceType ImportReferenceType = "Uri" + IdImportReferenceType ImportReferenceType = "Id" + KubernetesImportReferenceType ImportReferenceType = "Kubernetes" +) + +// Location from where the an import reference is retrieved +// +k8s:openapi-gen=true +// +union +type ImportReferenceUnion struct { + // type of location from where the referenced template structure should be retrieved + // + + // +unionDiscriminator + // +optional + ImportReferenceType ImportReferenceType `json:"importReferenceType,omitempty"` + + // Uri of a Devfile yaml file + // +optional + Uri string `json:"uri,omitempty"` + + // Id in a registry that contains a Devfile yaml file + // +optional + Id string `json:"id,omitempty"` + + // Reference to a Kubernetes CRD of type DevWorkspaceTemplate + // +optional + Kubernetes *KubernetesCustomResourceImportReference `json:"kubernetes,omitempty"` +} + +type KubernetesCustomResourceImportReference struct { + Name string `json:"name"` + + // +optional + Namespace string `json:"namespace,omitempty"` +} + +type ImportReference struct { + ImportReferenceUnion `json:",inline"` + // +optional + RegistryUrl string `json:"registryUrl,omitempty"` +} diff --git a/pkg/apis/workspaces/v1alpha1/keyed.go b/pkg/apis/workspaces/v1alpha1/keyed.go new file mode 100644 index 000000000..6615d78ed --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/keyed.go @@ -0,0 +1,113 @@ +package v1alpha1 + +// +k8s:deepcopy-gen=false +type Keyed interface { + Key() (string, error) +} + +func (union Component) Key() (string, error) { + key := "" + err := union.Visit(ComponentVisitor{ + Container: func(container *ContainerComponent) error { + key = container.Name + return nil + }, + Plugin: func(plugin *PluginComponent) error { + if plugin.Name != "" { + key = plugin.Name + return nil + } + return plugin.ImportReference.ImportReferenceUnion.Visit(ImportReferenceUnionVisitor{ + Uri: func(uri string) error { + key = uri + return nil + }, + Id: func(id string) error { + key = plugin.Id + if plugin.RegistryUrl != "" { + key = plugin.RegistryUrl + "/" + key + } + return nil + }, + Kubernetes: func(cr *KubernetesCustomResourceImportReference) error { + key = cr.Name + if cr.Namespace != "" { + key = cr.Namespace + "/" + key + } + return nil + }, + }) + }, + Kubernetes: func(k8s *KubernetesComponent) error { + key = k8s.Name + return nil + }, + Openshift: func(os *OpenshiftComponent) error { + key = os.Name + return nil + }, + Volume: func(vol *VolumeComponent) error { + key = vol.Name + return nil + }, + Custom: func(custom *CustomComponent) error { + key = custom.Name + return nil + }, + }) + return key, err +} + +func (union PluginComponentsOverride) Key() (string, error) { + key := "" + err := union.Visit(PluginComponentsOverrideVisitor{ + Container: func(container *ContainerComponent) error { + key = container.Name + return nil + }, + Kubernetes: func(k8s *KubernetesComponent) error { + key = k8s.Name + return nil + }, + Openshift: func(os *OpenshiftComponent) error { + key = os.Name + return nil + }, + Volume: func(vol *VolumeComponent) error { + key = vol.Name + return nil + }, + }) + return key, err +} + +func (keyed Command) Key() (string, error) { + key := "" + err := keyed.Visit(CommandVisitor{ + Apply: func(command *ApplyCommand) error { + key = command.Id + return nil + }, + Exec: func(command *ExecCommand) error { + key = command.Id + return nil + }, + Composite: func(command *CompositeCommand) error { + key = command.Id + return nil + }, + Custom: func(command *CustomCommand) error { + key = command.Id + return nil + }, + VscodeLaunch: func(command *VscodeConfigurationCommand) error { + key = command.Id + return nil + }, + VscodeTask: func(command *VscodeConfigurationCommand) error { + key = command.Id + return nil + }, + }) + return key, err +} diff --git a/pkg/apis/workspaces/v1alpha1/override_directives.go b/pkg/apis/workspaces/v1alpha1/override_directives.go new file mode 100644 index 000000000..cd9f9294d --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/override_directives.go @@ -0,0 +1,58 @@ +package v1alpha1 + +// +kubebuilder:validation:Enum=replace;delete +type OverridingPatchDirective string + +const ( + ReplaceOverridingDirective OverridingPatchDirective = "replace" + DeleteOverridingDirective OverridingPatchDirective = "delete" +) + +const ( + DeleteFromPrimitiveListOverridingPatchDirective OverridingPatchDirective = "replace" +) + +type OverrideDirective struct { + // Path of the element the directive should be applied on + // + // For the following path tree: + // + // ```json + // commands: + // - exec + // id: commandId + // ``` + // + // the path would be: `commands["commandId"]`. + Path string `json:"path"` + + // `$Patch` directlive as defined in + // https://github.com/kubernetes/community/blob/master/contributors/devel/sig-api-machinery/strategic-merge-patch.md#basic-patch-format + // + // This is an enumeration that allows the following values: + // + // - *replace*: indicates that the element matched by the `jsonPath` field should be replaced instead of being merged. + // + // - *delete*: indicates that the element matched by the `jsonPath` field should be deleted. + // + // +optional + Patch OverridingPatchDirective `json:"patch,omitempty"` + + // `DeleteFromPrimitiveList` directive as defined in + // https://github.com/kubernetes/community/blob/master/contributors/devel/sig-api-machinery/strategic-merge-patch.md#deletefromprimitivelist-directive + // + // This indicates that the elements in this list should be deleted from the original primitive list. + // The original primitive list is the element matched by the `jsonPath` field. + // +optional + DeleteFromPrimitiveList []string `json:"deleteFromPrimitiveList,omitempty"` + + // `SetElementOrder` directive as defined in + // https://github.com/kubernetes/community/blob/master/contributors/devel/sig-api-machinery/strategic-merge-patch.md#deletefromprimitivelist-directive + // + // This provides a way to specify the order of a list. The relative order specified in this directive will be retained. + // The list whose order is controller is the element matched by the `jsonPath` field. + // If the controller list is a list of objects, then the values in this list should be + // the merge keys of the objects to order. + // +optional + SetElementOrder []string `json:"setElementOrder,omitempty"` +} diff --git a/pkg/apis/workspaces/v1alpha1/overrides.go b/pkg/apis/workspaces/v1alpha1/overrides.go new file mode 100644 index 000000000..252f6ad4e --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/overrides.go @@ -0,0 +1,41 @@ +package v1alpha1 + +type OverridesBase struct { + // Overrides of commands encapsulated in a parent devfile or a plugin. + // Overriding is done using a strategic merge patch + // +optional + Commands []Command `json:"commands,omitempty" patchStrategy:"merge" patchMergeKey:"id"` + + // Not implemented for now + // additional directives to drive the strategic merge patch + // OverrideDirectives []OverrideDirective `json:"overrideDirectives,omitempty"` +} + +type Overrides struct { + OverridesBase `json:",inline"` + + // Overrides of projects encapsulated in a parent devfile. + // Overriding is done using a strategic merge patch. + // +optional + Projects []Project `json:"projects,omitempty" patchStrategy:"merge" patchMergeKey:"name"` + + // Overrides of starter projects encapsulated in a parent devfile + // Overriding is done using a strategic merge patch. + // +optional + StarterProjects []StarterProject `json:"starterProjects,omitempty"` + + // Overrides of components encapsulated in a parent devfile. + // Overriding is done using a strategic merge patch + // +optional + Components []Component `json:"components,omitempty" patchStrategy:"merge" patchMergeKey:"name"` +} + +type PluginOverrides struct { + OverridesBase `json:",inline"` + + // Overrides of components encapsulated in a plugin. + // Overriding is done using a strategic merge patch. + // A plugin cannot override embedded plugin components. + // +optional + Components []PluginComponentsOverride `json:"components,omitempty"` +} diff --git a/pkg/apis/workspaces/v1alpha1/parent.go b/pkg/apis/workspaces/v1alpha1/parent.go new file mode 100644 index 000000000..78a69ddf7 --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/parent.go @@ -0,0 +1,6 @@ +package v1alpha1 + +type Parent struct { + ImportReference `json:",inline"` + Overrides `json:",inline"` +} diff --git a/pkg/apis/workspaces/v1alpha1/parent_conversion.go b/pkg/apis/workspaces/v1alpha1/parent_conversion.go new file mode 100644 index 000000000..d1f5b5383 --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/parent_conversion.go @@ -0,0 +1,273 @@ +package v1alpha1 + +import ( + "encoding/json" + + "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" +) + +func convertParentTo_v1alpha2(src *Parent, dest *v1alpha2.Parent) error { + dest.Id = src.Id + dest.Uri = src.Uri + dest.ImportReferenceType = v1alpha2.ImportReferenceType(src.ImportReferenceType) + dest.RegistryUrl = src.RegistryUrl + if src.Kubernetes != nil { + kube := v1alpha2.KubernetesCustomResourceImportReference(*src.Kubernetes) + dest.Kubernetes = &kube + } + + for _, srcCommand := range src.Commands { + if srcCommand.Custom != nil { + // v1alpha2 does not support Parent Custom commands, so we have to drop them here + continue + } + destCommand := v1alpha2.CommandParentOverride{} + err := convertParentCommandTo_v1alpha2(&srcCommand, &destCommand) + if err != nil { + return err + } + dest.Commands = append(dest.Commands, destCommand) + } + + for _, srcComponent := range src.Components { + if srcComponent.Custom != nil { + // v1alpha2 does not support Parent Custom Components, so we have to drop them here + continue + } + destComponent := v1alpha2.ComponentParentOverride{} + err := convertParentComponentTo_v1alpha2(&srcComponent, &destComponent) + if err != nil { + return err + } + dest.Components = append(dest.Components, destComponent) + } + + for _, srcProject := range src.Projects { + destProject := v1alpha2.Project{} + err := convertProjectTo_v1alpha2(&srcProject, &destProject) + if err != nil { + return err + } + destParentProject := v1alpha2.ProjectParentOverride{} + jsonProject, err := json.Marshal(destProject) + if err != nil { + return err + } + err = json.Unmarshal(jsonProject, &destParentProject) + if err != nil { + return err + } + dest.Projects = append(dest.Projects, destParentProject) + } + + for _, srcProject := range src.StarterProjects { + destProject := v1alpha2.StarterProject{} + err := convertStarterProjectTo_v1alpha2(&srcProject, &destProject) + if err != nil { + return err + } + destParentProject := v1alpha2.StarterProjectParentOverride{} + jsonProject, err := json.Marshal(destProject) + if err != nil { + return err + } + err = json.Unmarshal(jsonProject, &destParentProject) + if err != nil { + return err + } + dest.StarterProjects = append(dest.StarterProjects, destParentProject) + } + + return nil +} + +func convertParentCommandTo_v1alpha2(src *Command, dest *v1alpha2.CommandParentOverride) error { + srcId, err := src.Key() + if err != nil { + return err + } + jsonCommand, err := json.Marshal(src) + if err != nil { + return err + } + err = json.Unmarshal(jsonCommand, &dest) + if err != nil { + return err + } + dest.Id = srcId + return nil +} + +func convertParentComponentTo_v1alpha2(src *Component, dest *v1alpha2.ComponentParentOverride) error { + srcName, err := src.Key() + if err != nil { + return err + } + + if src.Plugin != nil { + destPluginComponent := &v1alpha2.PluginComponentParentOverride{} + pluginComponent := v1alpha2.Component{} + err := convertPluginComponentTo_v1alpha2(src, &pluginComponent) + if err != nil { + return err + } + // Though identical in json representation, we can't assign between PluginComponentParentOverride and Plugin + jsonPlugin, err := json.Marshal(pluginComponent) + if err != nil { + return err + } + err = json.Unmarshal(jsonPlugin, destPluginComponent) + if err != nil { + return err + } + dest.Plugin = destPluginComponent + } else { + jsonComponent, err := json.Marshal(src) + if err != nil { + return err + } + err = json.Unmarshal(jsonComponent, &dest) + if err != nil { + return err + } + } + + dest.Name = srcName + return nil +} + +func convertParentFrom_v1alpha2(src *v1alpha2.Parent, dest *Parent) error { + dest.Id = src.Id + dest.Uri = src.Uri + dest.ImportReferenceType = ImportReferenceType(src.ImportReferenceType) + dest.RegistryUrl = src.RegistryUrl + if src.Kubernetes != nil { + kube := KubernetesCustomResourceImportReference(*src.Kubernetes) + dest.Kubernetes = &kube + } + for _, srcCommand := range src.Commands { + destCommand := Command{} + err := convertParentCommandFrom_v1alpha2(&srcCommand, &destCommand) + if err != nil { + return err + } + dest.Commands = append(dest.Commands, destCommand) + } + + for _, srcComponent := range src.Components { + destComponent := Component{} + err := convertParentComponentFrom_v1alpha2(&srcComponent, &destComponent) + if err != nil { + return err + } + dest.Components = append(dest.Components, destComponent) + } + + for _, srcParentProject := range src.Projects { + destProject := Project{} + srcProject := v1alpha2.Project{} + jsonProject, err := json.Marshal(srcParentProject) + if err != nil { + return err + } + err = json.Unmarshal(jsonProject, &srcProject) + if err != nil { + return err + } + err = convertProjectFrom_v1alpha2(&srcProject, &destProject) + if err != nil { + return err + } + dest.Projects = append(dest.Projects, destProject) + } + + for _, srcParentProject := range src.StarterProjects { + destProject := StarterProject{} + srcProject := v1alpha2.StarterProject{} + jsonProject, err := json.Marshal(srcParentProject) + if err != nil { + return err + } + err = json.Unmarshal(jsonProject, &srcProject) + if err != nil { + return err + } + err = convertStarterProjectFrom_v1alpha2(&srcProject, &destProject) + if err != nil { + return err + } + dest.StarterProjects = append(dest.StarterProjects, destProject) + } + + return nil +} + +func convertParentCommandFrom_v1alpha2(src *v1alpha2.CommandParentOverride, dest *Command) error { + srcId := src.Key() + jsonCommand, err := json.Marshal(src) + if err != nil { + return err + } + err = json.Unmarshal(jsonCommand, &dest) + if err != nil { + return err + } + switch { + case src.Apply != nil: + dest.Apply.Id = srcId + case src.Composite != nil: + dest.Composite.Id = srcId + case src.Exec != nil: + dest.Exec.Id = srcId + } + return nil +} + +func convertParentComponentFrom_v1alpha2(src *v1alpha2.ComponentParentOverride, dest *Component) error { + srcName := src.Key() + + if src.Plugin != nil { + // If the parent component is a Plugin, we need to first convert it to v1alpha2.Component, then to a v1alpha1.Component + // Through the json representation of v1alpha2 Plugin and PluginComponentParentOverride is identical they're not assignable in go + // so we convert with a json intermediary + srcPluginComponent := &v1alpha2.PluginComponent{} + v1alpha2Component := v1alpha2.Component{} + jsonPlugin, err := json.Marshal(src.Plugin) + if err != nil { + return err + } + err = json.Unmarshal(jsonPlugin, srcPluginComponent) + if err != nil { + return err + } + v1alpha2Component.Plugin = srcPluginComponent + + err = convertPluginComponentFrom_v1alpha2(&v1alpha2Component, dest) + if err != nil { + return err + } + } else { + jsonComponent, err := json.Marshal(src) + if err != nil { + return err + } + err = json.Unmarshal(jsonComponent, &dest) + if err != nil { + return err + } + } + + switch { + case src.Container != nil: + dest.Container.Name = srcName + case src.Plugin != nil: + dest.Plugin.Name = srcName + case src.Volume != nil: + dest.Volume.Name = srcName + case src.Openshift != nil: + dest.Openshift.Name = srcName + case src.Kubernetes != nil: + dest.Kubernetes.Name = srcName + } + return nil +} diff --git a/pkg/apis/workspaces/v1alpha1/parent_conversion_test.go b/pkg/apis/workspaces/v1alpha1/parent_conversion_test.go new file mode 100644 index 000000000..aaf7c8f69 --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/parent_conversion_test.go @@ -0,0 +1,40 @@ +package v1alpha1 + +import ( + "testing" + + "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" + "github.com/google/go-cmp/cmp" + fuzz "github.com/google/gofuzz" + "github.com/stretchr/testify/assert" +) + +func TestParentConversion_v1alpha1(t *testing.T) { + f := fuzz.New().NilChance(fuzzNilChance).MaxDepth(100).Funcs( + parentComponentFuzzFunc, + parentCommandFuzzFunc, + parentProjectFuzzFunc, + pluginComponentsOverrideFuzzFunc, + pluginComponentFuzzFunc, + rawExtFuzzFunc, + ) + for i := 0; i < fuzzIterations; i++ { + original := &Parent{} + intermediate := &v1alpha2.Parent{} + output := &Parent{} + f.Fuzz(original) + input := original.DeepCopy() + err := convertParentTo_v1alpha2(input, intermediate) + if !assert.NoError(t, err, "Should not return error when converting to v1alpha2") { + return + } + err = convertParentFrom_v1alpha2(intermediate, output) + if !assert.NoError(t, err, "Should not return error when converting from v1alpha2") { + return + } + if !assert.True(t, cmp.Equal(original, output), "Parent should not be changed when converting between v1alpha1 and v1alpha2") { + t.Logf("Diff: \n%s\n", cmp.Diff(original, output)) + t.Logf("Intermediate: \n%+v\n", intermediate.Projects) + } + } +} diff --git a/pkg/apis/workspaces/v1alpha1/projects.go b/pkg/apis/workspaces/v1alpha1/projects.go new file mode 100644 index 000000000..baf1883f5 --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/projects.go @@ -0,0 +1,112 @@ +package v1alpha1 + +import runtime "k8s.io/apimachinery/pkg/runtime" + +type Project struct { + // Project name + Name string `json:"name"` + + // Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name. + // +optional + ClonePath string `json:"clonePath,omitempty"` + + ProjectSource `json:",inline"` +} +type StarterProject struct { + Project `json:",inline"` + + // Description of a starter project + // +optional + Description string `json:"description,omitempty"` +} + +// ProjectSourceType describes the type of Project sources. +// Only one of the following project sources may be specified. +// If none of the following policies is specified, the default one +// is AllowConcurrent. +// +kubebuilder:validation:Enum=Git;Github;Zip;Custom +type ProjectSourceType string + +const ( + GitProjectSourceType ProjectSourceType = "Git" + GitHubProjectSourceType ProjectSourceType = "Github" + ZipProjectSourceType ProjectSourceType = "Zip" + CustomProjectSourceType ProjectSourceType = "Custom" +) + +// +k8s:openapi-gen=true +// +union +type ProjectSource struct { + // Type of project source + // + + // +unionDiscriminator + // +optional + SourceType ProjectSourceType `json:"sourceType,omitempty"` + + // Project's Git source + // +optional + Git *GitProjectSource `json:"git,omitempty"` + + // Project's GitHub source + // +optional + Github *GithubProjectSource `json:"github,omitempty"` + + // Project's Zip source + // +optional + Zip *ZipProjectSource `json:"zip,omitempty"` + + // Project's Custom source + // +optional + Custom *CustomProjectSource `json:"custom,omitempty"` +} + +type CommonProjectSource struct { + // Part of project to populate in the working directory. + // +optional + SparseCheckoutDir string `json:"sparseCheckoutDir,omitempty"` +} + +type CustomProjectSource struct { + ProjectSourceClass string `json:"projectSourceClass"` + // +kubebuilder:pruning:PreserveUnknownFields + // +kubebuilder:validation:EmbeddedResource + EmbeddedResource runtime.RawExtension `json:"embeddedResource"` +} + +type ZipProjectSource struct { + CommonProjectSource `json:",inline"` + + // Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH + // +required + Location string `json:"location,omitempty"` +} + +type GitLikeProjectSource struct { + CommonProjectSource `json:",inline"` + + // Defines from what the project should be checked out. Required if there are more than one remote configured + // +optional + CheckoutFrom *CheckoutFrom `json:"checkoutFrom,omitempty"` + + // The remotes map which should be initialized in the git project. Must have at least one remote configured + // +optional + Remotes map[string]string `json:"remotes,omitempty"` +} + +type CheckoutFrom struct { + // The revision to checkout from. Should be branch name, tag or commit id. + // Default branch is used if missing or specified revision is not found. + // +optional + Revision string `json:"revision,omitempty"` + // The remote name should be used as init. Required if there are more than one remote configured + // +optional + Remote string `json:"remote,omitempty"` +} + +type GitProjectSource struct { + GitLikeProjectSource `json:",inline"` +} + +type GithubProjectSource struct { + GitLikeProjectSource `json:",inline"` +} diff --git a/pkg/apis/workspaces/v1alpha1/projects_conversion.go b/pkg/apis/workspaces/v1alpha1/projects_conversion.go new file mode 100644 index 000000000..452fad712 --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/projects_conversion.go @@ -0,0 +1,137 @@ +package v1alpha1 + +import ( + "encoding/json" + + "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" + "github.com/devfile/api/v2/pkg/attributes" +) + +const ( + GitHubConversionFromAttributeValue = "GitHub" +) + +func convertProjectTo_v1alpha2(src *Project, dest *v1alpha2.Project) error { + // Convert Github type projects in v1alpha1 to Git-type projects in v1alpha2, since Github was dropped + if src.Github != nil { + src.Git = &GitProjectSource{ + GitLikeProjectSource: src.Github.GitLikeProjectSource, + } + if dest.Attributes == nil { + dest.Attributes = attributes.Attributes{} + } + dest.Attributes.PutString(ConvertedFromAttribute, GitHubConversionFromAttributeValue) + } + + jsonProject, err := json.Marshal(src) + if err != nil { + return err + } + err = json.Unmarshal(jsonProject, dest) + if err != nil { + return err + } + + // Make sure we didn't modify underlying src struct + if src.Github != nil { + src.Git = nil + } + + return nil +} + +func convertProjectFrom_v1alpha2(src *v1alpha2.Project, dest *Project) error { + jsonProject, err := json.Marshal(src) + if err != nil { + return err + } + err = json.Unmarshal(jsonProject, dest) + if err != nil { + return err + } + + // Check if a Git-type project was originally a Github-type project in v1alpha1 + if src.Git != nil && src.Attributes != nil { + convertedFrom := src.Attributes.GetString(ConvertedFromAttribute, nil) + if convertedFrom == GitHubConversionFromAttributeValue { + dest.Github = &GithubProjectSource{ + GitLikeProjectSource: dest.Git.GitLikeProjectSource, + } + dest.Git = nil + } + } + + return nil +} + +func convertStarterProjectTo_v1alpha2(src *StarterProject, dest *v1alpha2.StarterProject) error { + // Convert Github type projects in v1alpha1 to Git-type projects in v1alpha2, since Github was dropped + if src.Github != nil { + src.Git = &GitProjectSource{ + GitLikeProjectSource: src.Github.GitLikeProjectSource, + } + if dest.Attributes == nil { + dest.Attributes = attributes.Attributes{} + } + dest.Attributes.PutString(ConvertedFromAttribute, GitHubConversionFromAttributeValue) + } + + jsonProject, err := json.Marshal(src) + if err != nil { + return err + } + err = json.Unmarshal(jsonProject, dest) + if err != nil { + return err + } + // **Note**: There are API differences for starter projects between v1alpha1 and v1alpha2: + // - ClonePath is removed from starter projects in v1alpha2; we drop it on conversion + // - SparseCheckoutDir is removed and SubDir is added in its place. For conversion purposes, we make these fields + // equivalent. + switch { + case src.Git != nil: + dest.SubDir = src.Git.SparseCheckoutDir + case src.Zip != nil: + dest.SubDir = src.Zip.SparseCheckoutDir + } + + // Make sure we didn't modify underlying src struct + if src.Github != nil { + src.Git = nil + } + + return nil +} + +func convertStarterProjectFrom_v1alpha2(src *v1alpha2.StarterProject, dest *StarterProject) error { + jsonProject, err := json.Marshal(src) + if err != nil { + return err + } + err = json.Unmarshal(jsonProject, dest) + if err != nil { + return err + } + + if src.SubDir != "" { + switch { + case src.Git != nil: + dest.Git.SparseCheckoutDir = src.SubDir + case src.Zip != nil: + dest.Zip.SparseCheckoutDir = src.SubDir + } + } + + // Check if a Git-type project was originally a Github-type project in v1alpha1 + if src.Git != nil && src.Attributes != nil { + convertedFrom := src.Attributes.GetString(ConvertedFromAttribute, nil) + if convertedFrom == GitHubConversionFromAttributeValue { + dest.Github = &GithubProjectSource{ + GitLikeProjectSource: dest.Git.GitLikeProjectSource, + } + dest.Git = nil + } + } + + return nil +} diff --git a/pkg/apis/workspaces/v1alpha1/projects_conversion_test.go b/pkg/apis/workspaces/v1alpha1/projects_conversion_test.go new file mode 100644 index 000000000..45d290161 --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/projects_conversion_test.go @@ -0,0 +1,55 @@ +package v1alpha1 + +import ( + "testing" + + "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" + fuzz "github.com/google/gofuzz" + "github.com/stretchr/testify/assert" +) + +func TestProjectConversion_v1alpha1(t *testing.T) { + f := fuzz.New().NilChance(fuzzNilChance).Funcs( + rawExtFuzzFunc, + projectFuzzFunc, + ) + for i := 0; i < fuzzIterations; i++ { + original := &Project{} + intermediate := &v1alpha2.Project{} + output := &Project{} + f.Fuzz(original) + input := original.DeepCopy() + err := convertProjectTo_v1alpha2(input, intermediate) + if !assert.NoError(t, err, "Should not return error when converting to v1alpha2") { + return + } + err = convertProjectFrom_v1alpha2(intermediate, output) + if !assert.NoError(t, err, "Should not return error when converting from v1alpha2") { + return + } + assert.Equal(t, original, output, "Projects should not be changed when converting between v1alpha1 and v1alpha2") + } +} + +func TestStarterProjectConversion_v1alpha1(t *testing.T) { + f := fuzz.New().NilChance(fuzzNilChance).Funcs( + rawExtFuzzFunc, + projectFuzzFunc, + ) + for i := 0; i < fuzzIterations; i++ { + original := &StarterProject{} + intermediate := &v1alpha2.StarterProject{} + output := &StarterProject{} + f.Fuzz(original) + input := original.DeepCopy() + err := convertStarterProjectTo_v1alpha2(input, intermediate) + if !assert.NoError(t, err, "Should not return error when converting to v1alpha2") { + return + } + err = convertStarterProjectFrom_v1alpha2(intermediate, output) + if !assert.NoError(t, err, "Should not return error when converting from v1alpha2") { + return + } + assert.Equal(t, original, output, "StarterProjects should not be changed when converting between v1alpha1 and v1alpha2") + } +} diff --git a/pkg/apis/workspaces/v1alpha1/register.go b/pkg/apis/workspaces/v1alpha1/register.go new file mode 100644 index 000000000..95ffde3a9 --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/register.go @@ -0,0 +1,22 @@ +// NOTE: Boilerplate only. Ignore this file. + +// Package v1alpha1 contains API Schema definitions for the org v1alpha1 API group +// +k8s:deepcopy-gen=package,register +// +groupName=workspace.devfile.io +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // SchemeGroupVersion is group version used to register these objects + SchemeGroupVersion = schema.GroupVersion{Group: "workspace.devfile.io", Version: "v1alpha1"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme +) diff --git a/pkg/apis/workspaces/v1alpha1/union.go b/pkg/apis/workspaces/v1alpha1/union.go new file mode 100644 index 000000000..39c06e01e --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/union.go @@ -0,0 +1,20 @@ +package v1alpha1 + +// Union is an interface that allows managing structs defined as +// Kubernetes unions with discriminators, according to the following KEP: +// https://github.com/kubernetes/enhancements/blob/master/keps/sig-api-machinery/20190325-unions.md +// +k8s:deepcopy-gen=false +type Union interface { + discriminator() *string + + // Normalize allows normalizing the union, according to the following rules: + // - When only one field of the union is set and no discriminator is set, set the discriminator according to the union value. + // - When several fields are set and a discrimnator is set, remove (== reset to zero value) all the values that do not match the discriminator. + // - When only one union value is set and it matches discriminator, just do nothing. + // - In other case, something is inconsistent or ambiguous: an error is thrown. + Normalize() error + + // Simplify allows removing the union discriminator, + // but only after normalizing it if necessary. + Simplify() +} diff --git a/pkg/apis/workspaces/v1alpha1/union_definitions.go b/pkg/apis/workspaces/v1alpha1/union_definitions.go new file mode 100644 index 000000000..d8647caf1 --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/union_definitions.go @@ -0,0 +1,177 @@ +package v1alpha1 + +import ( + "reflect" +) + +/* + +This file implements the `Union` methods on all the struct types +that are defined as Kubernetes unions. + +The implementations here mainly delegate to generic implementation functions. +so, in the future, we should probably produce this file +by some code generation mechanism based on API source code parsing, especially +based on the `+union` comments in the API GO source code. + +*/ + +// +k8s:deepcopy-gen=false +type ComponentVisitor struct { + Container func(*ContainerComponent) error + Plugin func(*PluginComponent) error + Volume func(*VolumeComponent) error + Kubernetes func(*KubernetesComponent) error + Openshift func(*OpenshiftComponent) error + Custom func(*CustomComponent) error +} + +var componentVisitorType reflect.Type = reflect.TypeOf(ComponentVisitor{}) + +func (union Component) Visit(visitor ComponentVisitor) error { + return visitUnion(union, visitor) +} +func (union *Component) discriminator() *string { + return (*string)(&union.ComponentType) +} +func (union *Component) Normalize() error { + return normalizeUnion(union, componentVisitorType) +} +func (union *Component) Simplify() { + simplifyUnion(union, componentVisitorType) +} + +// +k8s:deepcopy-gen=false +type PluginComponentsOverrideVisitor struct { + Container func(*ContainerComponent) error + Volume func(*VolumeComponent) error + Kubernetes func(*KubernetesComponent) error + Openshift func(*OpenshiftComponent) error +} + +var pluginComponentsOverrideVisitorType reflect.Type = reflect.TypeOf(PluginComponentsOverrideVisitor{}) + +func (union PluginComponentsOverride) Visit(visitor PluginComponentsOverrideVisitor) error { + return visitUnion(union, visitor) +} +func (union *PluginComponentsOverride) discriminator() *string { + return (*string)(&union.ComponentType) +} +func (union *PluginComponentsOverride) Normalize() error { + return normalizeUnion(union, pluginComponentsOverrideVisitorType) +} +func (union *PluginComponentsOverride) Simplify() { + simplifyUnion(union, pluginComponentsOverrideVisitorType) +} + +// +k8s:deepcopy-gen=false +type CommandVisitor struct { + Apply func(*ApplyCommand) error + Exec func(*ExecCommand) error + VscodeTask func(*VscodeConfigurationCommand) error + VscodeLaunch func(*VscodeConfigurationCommand) error + Composite func(*CompositeCommand) error + Custom func(*CustomCommand) error +} + +var commandVisitorType reflect.Type = reflect.TypeOf(CommandVisitor{}) + +func (union Command) Visit(visitor CommandVisitor) error { + return visitUnion(union, visitor) +} +func (union *Command) discriminator() *string { + return (*string)(&union.CommandType) +} +func (union *Command) Normalize() error { + return normalizeUnion(union, commandVisitorType) +} +func (union *Command) Simplify() { + simplifyUnion(union, commandVisitorType) +} + +// +k8s:deepcopy-gen=false +type ImportReferenceUnionVisitor struct { + Uri func(string) error + Id func(string) error + Kubernetes func(*KubernetesCustomResourceImportReference) error +} + +var importReferenceUnionVisitorType reflect.Type = reflect.TypeOf(ImportReferenceUnionVisitor{}) + +func (union ImportReferenceUnion) Visit(visitor ImportReferenceUnionVisitor) error { + return visitUnion(union, visitor) +} +func (union *ImportReferenceUnion) discriminator() *string { + return (*string)(&union.ImportReferenceType) +} +func (union *ImportReferenceUnion) Normalize() error { + return normalizeUnion(union, importReferenceUnionVisitorType) +} +func (union *ImportReferenceUnion) Simplify() { + simplifyUnion(union, importReferenceUnionVisitorType) +} + +// +k8s:deepcopy-gen=false +type K8sLikeComponentLocationVisitor struct { + Uri func(string) error + Inlined func(string) error +} + +var k8sLikeComponentLocationVisitorType reflect.Type = reflect.TypeOf(K8sLikeComponentLocationVisitor{}) + +func (union K8sLikeComponentLocation) Visit(visitor K8sLikeComponentLocationVisitor) error { + return visitUnion(union, visitor) +} +func (union *K8sLikeComponentLocation) discriminator() *string { + return (*string)(&union.LocationType) +} +func (union *K8sLikeComponentLocation) Normalize() error { + return normalizeUnion(union, k8sLikeComponentLocationVisitorType) +} +func (union *K8sLikeComponentLocation) Simplify() { + simplifyUnion(union, k8sLikeComponentLocationVisitorType) +} + +// +k8s:deepcopy-gen=false +type VscodeConfigurationCommandLocationVisitor struct { + Uri func(string) error + Inlined func(string) error +} + +var vscodeConfigurationCommandLocationVisitorType reflect.Type = reflect.TypeOf(VscodeConfigurationCommandLocationVisitor{}) + +func (union VscodeConfigurationCommandLocation) Visit(visitor VscodeConfigurationCommandLocation) error { + return visitUnion(union, visitor) +} +func (union *VscodeConfigurationCommandLocation) discriminator() *string { + return (*string)(&union.LocationType) +} +func (union *VscodeConfigurationCommandLocation) Normalize() error { + return normalizeUnion(union, vscodeConfigurationCommandLocationVisitorType) +} +func (union *VscodeConfigurationCommandLocation) Simplify() { + simplifyUnion(union, vscodeConfigurationCommandLocationVisitorType) +} + +// +k8s:deepcopy-gen=false +type ProjectSourceVisitor struct { + Git func(*GitProjectSource) error + Github func(*GithubProjectSource) error + Zip func(*ZipProjectSource) error + Custom func(*CustomProjectSource) error +} + +var projectSourceVisitorType reflect.Type = reflect.TypeOf(ProjectSourceVisitor{}) + +func (union ProjectSource) Visit(visitor ProjectSourceVisitor) error { + return visitUnion(union, visitor) +} +func (union *ProjectSource) discriminator() *string { + return (*string)(&union.SourceType) +} +func (union *ProjectSource) Normalize() error { + return normalizeUnion(union, projectSourceVisitorType) +} +func (union *ProjectSource) Simplify() { + simplifyUnion(union, projectSourceVisitorType) +} diff --git a/pkg/apis/workspaces/v1alpha1/union_implementation.go b/pkg/apis/workspaces/v1alpha1/union_implementation.go new file mode 100644 index 000000000..600c7d871 --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/union_implementation.go @@ -0,0 +1,103 @@ +package v1alpha1 + +import ( + "errors" + "reflect" +) + +func visitUnion(union interface{}, visitor interface{}) (err error) { + visitorValue := reflect.ValueOf(visitor) + unionValue := reflect.ValueOf(union) + oneMemberPresent := false + typeOfVisitor := visitorValue.Type() + for i := 0; i < visitorValue.NumField(); i++ { + unionMemberToRead := typeOfVisitor.Field(i).Name + unionMember := unionValue.FieldByName(unionMemberToRead) + if !unionMember.IsZero() { + if oneMemberPresent { + err = errors.New("Only one element should be set in union: " + unionValue.Type().Name()) + return + } + oneMemberPresent = true + visitorFunction := visitorValue.Field(i) + if visitorFunction.IsNil() { + return + } + results := visitorFunction.Call([]reflect.Value{unionMember}) + if !results[0].IsNil() { + err = results[0].Interface().(error) + } + return + } + } + return +} + +func simplifyUnion(union Union, visitorType reflect.Type) { + normalizeUnion(union, visitorType) + *union.discriminator() = "" +} + +func normalizeUnion(union Union, visitorType reflect.Type) error { + err := updateDiscriminator(union, visitorType) + if err != nil { + return err + } + + err = cleanupValues(union, visitorType) + if err != nil { + return err + } + return nil +} + +func updateDiscriminator(union Union, visitorType reflect.Type) error { + unionValue := reflect.ValueOf(union) + + if union.discriminator() == nil { + return errors.New("Discriminator should not be 'nil' in union: " + unionValue.Type().Name()) + } + + if *union.discriminator() != "" { + // Nothing to do + return nil + } + + oneMemberPresent := false + for i := 0; i < visitorType.NumField(); i++ { + unionMemberToRead := visitorType.Field(i).Name + unionMember := unionValue.Elem().FieldByName(unionMemberToRead) + if !unionMember.IsZero() { + if oneMemberPresent { + return errors.New("Discriminator cannot be deduced from 2 values in union: " + unionValue.Type().Name()) + } + oneMemberPresent = true + *(union.discriminator()) = unionMemberToRead + } + } + return nil +} + +func cleanupValues(union Union, visitorType reflect.Type) error { + unionValue := reflect.ValueOf(union) + + if union.discriminator() == nil { + return errors.New("Discriminator should not be 'nil' in union: " + unionValue.Type().Name()) + } + + if *union.discriminator() == "" { + // Nothing to do + return errors.New("Values cannot be cleaned up without a discriminator in union: " + unionValue.Type().Name()) + } + + for i := 0; i < visitorType.NumField(); i++ { + unionMemberToRead := visitorType.Field(i).Name + unionMember := unionValue.Elem().FieldByName(unionMemberToRead) + if !unionMember.IsZero() { + if unionMemberToRead != *union.discriminator() { + unionMember.Set(reflect.Zero(unionMember.Type())) + } + } + } + return nil +} diff --git a/pkg/apis/workspaces/v1alpha1/union_test.go b/pkg/apis/workspaces/v1alpha1/union_test.go new file mode 100644 index 000000000..d769bf391 --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/union_test.go @@ -0,0 +1,62 @@ +package v1alpha1 + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestNormalizingUnion_SetDiscriminator(t *testing.T) { + original := ProjectSource{ + Git: &GitProjectSource{}, + } + expected := ProjectSource{ + Git: &GitProjectSource{}, + SourceType: "Git", + } + + err := original.Normalize() + assert.NoError(t, err) + + assert.Equal(t, + expected, + original, + "The two values should be the same.") +} + +func TestNormalizingUnion_CleanupOldValue(t *testing.T) { + original := ProjectSource{ + Git: &GitProjectSource{}, + Zip: &ZipProjectSource{}, + SourceType: "Git", + } + expected := ProjectSource{ + Git: &GitProjectSource{}, + SourceType: "Git", + } + + err := original.Normalize() + assert.NoError(t, err) + + assert.Equal(t, + expected, + original, + "The two values should be the same.") +} + +func TestSimplifyingUnion(t *testing.T) { + original := ProjectSource{ + Git: &GitProjectSource{}, + SourceType: "Git", + } + expected := ProjectSource{ + Git: &GitProjectSource{}, + } + + original.Simplify() + + assert.Equal(t, + expected, + original, + "The two values should be the same.") +} diff --git a/pkg/apis/workspaces/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/workspaces/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 000000000..d9e8d76d2 --- /dev/null +++ b/pkg/apis/workspaces/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,1217 @@ +// +build !ignore_autogenerated + +// Code generated by controller-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ApplyCommand) DeepCopyInto(out *ApplyCommand) { + *out = *in + in.LabeledCommand.DeepCopyInto(&out.LabeledCommand) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplyCommand. +func (in *ApplyCommand) DeepCopy() *ApplyCommand { + if in == nil { + return nil + } + out := new(ApplyCommand) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BaseCommand) DeepCopyInto(out *BaseCommand) { + *out = *in + if in.Group != nil { + in, out := &in.Group, &out.Group + *out = new(CommandGroup) + **out = **in + } + if in.Attributes != nil { + in, out := &in.Attributes, &out.Attributes + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BaseCommand. +func (in *BaseCommand) DeepCopy() *BaseCommand { + if in == nil { + return nil + } + out := new(BaseCommand) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BaseComponent) DeepCopyInto(out *BaseComponent) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BaseComponent. +func (in *BaseComponent) DeepCopy() *BaseComponent { + if in == nil { + return nil + } + out := new(BaseComponent) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CheckoutFrom) DeepCopyInto(out *CheckoutFrom) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CheckoutFrom. +func (in *CheckoutFrom) DeepCopy() *CheckoutFrom { + if in == nil { + return nil + } + out := new(CheckoutFrom) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Command) DeepCopyInto(out *Command) { + *out = *in + if in.Exec != nil { + in, out := &in.Exec, &out.Exec + *out = new(ExecCommand) + (*in).DeepCopyInto(*out) + } + if in.Apply != nil { + in, out := &in.Apply, &out.Apply + *out = new(ApplyCommand) + (*in).DeepCopyInto(*out) + } + if in.VscodeTask != nil { + in, out := &in.VscodeTask, &out.VscodeTask + *out = new(VscodeConfigurationCommand) + (*in).DeepCopyInto(*out) + } + if in.VscodeLaunch != nil { + in, out := &in.VscodeLaunch, &out.VscodeLaunch + *out = new(VscodeConfigurationCommand) + (*in).DeepCopyInto(*out) + } + if in.Composite != nil { + in, out := &in.Composite, &out.Composite + *out = new(CompositeCommand) + (*in).DeepCopyInto(*out) + } + if in.Custom != nil { + in, out := &in.Custom, &out.Custom + *out = new(CustomCommand) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Command. +func (in *Command) DeepCopy() *Command { + if in == nil { + return nil + } + out := new(Command) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CommandGroup) DeepCopyInto(out *CommandGroup) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommandGroup. +func (in *CommandGroup) DeepCopy() *CommandGroup { + if in == nil { + return nil + } + out := new(CommandGroup) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CommonProjectSource) DeepCopyInto(out *CommonProjectSource) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommonProjectSource. +func (in *CommonProjectSource) DeepCopy() *CommonProjectSource { + if in == nil { + return nil + } + out := new(CommonProjectSource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Component) DeepCopyInto(out *Component) { + *out = *in + if in.Container != nil { + in, out := &in.Container, &out.Container + *out = new(ContainerComponent) + (*in).DeepCopyInto(*out) + } + if in.Volume != nil { + in, out := &in.Volume, &out.Volume + *out = new(VolumeComponent) + **out = **in + } + if in.Plugin != nil { + in, out := &in.Plugin, &out.Plugin + *out = new(PluginComponent) + (*in).DeepCopyInto(*out) + } + if in.Kubernetes != nil { + in, out := &in.Kubernetes, &out.Kubernetes + *out = new(KubernetesComponent) + (*in).DeepCopyInto(*out) + } + if in.Openshift != nil { + in, out := &in.Openshift, &out.Openshift + *out = new(OpenshiftComponent) + (*in).DeepCopyInto(*out) + } + if in.Custom != nil { + in, out := &in.Custom, &out.Custom + *out = new(CustomComponent) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Component. +func (in *Component) DeepCopy() *Component { + if in == nil { + return nil + } + out := new(Component) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CompositeCommand) DeepCopyInto(out *CompositeCommand) { + *out = *in + in.LabeledCommand.DeepCopyInto(&out.LabeledCommand) + if in.Commands != nil { + in, out := &in.Commands, &out.Commands + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CompositeCommand. +func (in *CompositeCommand) DeepCopy() *CompositeCommand { + if in == nil { + return nil + } + out := new(CompositeCommand) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Container) DeepCopyInto(out *Container) { + *out = *in + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]EnvVar, len(*in)) + copy(*out, *in) + } + if in.VolumeMounts != nil { + in, out := &in.VolumeMounts, &out.VolumeMounts + *out = make([]VolumeMount, len(*in)) + copy(*out, *in) + } + if in.Command != nil { + in, out := &in.Command, &out.Command + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Args != nil { + in, out := &in.Args, &out.Args + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Container. +func (in *Container) DeepCopy() *Container { + if in == nil { + return nil + } + out := new(Container) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ContainerComponent) DeepCopyInto(out *ContainerComponent) { + *out = *in + out.BaseComponent = in.BaseComponent + in.Container.DeepCopyInto(&out.Container) + if in.Endpoints != nil { + in, out := &in.Endpoints, &out.Endpoints + *out = make([]Endpoint, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerComponent. +func (in *ContainerComponent) DeepCopy() *ContainerComponent { + if in == nil { + return nil + } + out := new(ContainerComponent) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CustomCommand) DeepCopyInto(out *CustomCommand) { + *out = *in + in.LabeledCommand.DeepCopyInto(&out.LabeledCommand) + in.EmbeddedResource.DeepCopyInto(&out.EmbeddedResource) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomCommand. +func (in *CustomCommand) DeepCopy() *CustomCommand { + if in == nil { + return nil + } + out := new(CustomCommand) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CustomComponent) DeepCopyInto(out *CustomComponent) { + *out = *in + in.EmbeddedResource.DeepCopyInto(&out.EmbeddedResource) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomComponent. +func (in *CustomComponent) DeepCopy() *CustomComponent { + if in == nil { + return nil + } + out := new(CustomComponent) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CustomProjectSource) DeepCopyInto(out *CustomProjectSource) { + *out = *in + in.EmbeddedResource.DeepCopyInto(&out.EmbeddedResource) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomProjectSource. +func (in *CustomProjectSource) DeepCopy() *CustomProjectSource { + if in == nil { + return nil + } + out := new(CustomProjectSource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevWorkspace) DeepCopyInto(out *DevWorkspace) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevWorkspace. +func (in *DevWorkspace) DeepCopy() *DevWorkspace { + if in == nil { + return nil + } + out := new(DevWorkspace) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevWorkspace) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevWorkspaceList) DeepCopyInto(out *DevWorkspaceList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DevWorkspace, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevWorkspaceList. +func (in *DevWorkspaceList) DeepCopy() *DevWorkspaceList { + if in == nil { + return nil + } + out := new(DevWorkspaceList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevWorkspaceList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevWorkspaceSpec) DeepCopyInto(out *DevWorkspaceSpec) { + *out = *in + in.Template.DeepCopyInto(&out.Template) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevWorkspaceSpec. +func (in *DevWorkspaceSpec) DeepCopy() *DevWorkspaceSpec { + if in == nil { + return nil + } + out := new(DevWorkspaceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevWorkspaceStatus) DeepCopyInto(out *DevWorkspaceStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]WorkspaceCondition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevWorkspaceStatus. +func (in *DevWorkspaceStatus) DeepCopy() *DevWorkspaceStatus { + if in == nil { + return nil + } + out := new(DevWorkspaceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevWorkspaceTemplate) DeepCopyInto(out *DevWorkspaceTemplate) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevWorkspaceTemplate. +func (in *DevWorkspaceTemplate) DeepCopy() *DevWorkspaceTemplate { + if in == nil { + return nil + } + out := new(DevWorkspaceTemplate) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevWorkspaceTemplate) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevWorkspaceTemplateList) DeepCopyInto(out *DevWorkspaceTemplateList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DevWorkspaceTemplate, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevWorkspaceTemplateList. +func (in *DevWorkspaceTemplateList) DeepCopy() *DevWorkspaceTemplateList { + if in == nil { + return nil + } + out := new(DevWorkspaceTemplateList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DevWorkspaceTemplateList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevWorkspaceTemplateSpec) DeepCopyInto(out *DevWorkspaceTemplateSpec) { + *out = *in + if in.Parent != nil { + in, out := &in.Parent, &out.Parent + *out = new(Parent) + (*in).DeepCopyInto(*out) + } + in.DevWorkspaceTemplateSpecContent.DeepCopyInto(&out.DevWorkspaceTemplateSpecContent) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevWorkspaceTemplateSpec. +func (in *DevWorkspaceTemplateSpec) DeepCopy() *DevWorkspaceTemplateSpec { + if in == nil { + return nil + } + out := new(DevWorkspaceTemplateSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DevWorkspaceTemplateSpecContent) DeepCopyInto(out *DevWorkspaceTemplateSpecContent) { + *out = *in + if in.Commands != nil { + in, out := &in.Commands, &out.Commands + *out = make([]Command, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Events != nil { + in, out := &in.Events, &out.Events + *out = new(Events) + (*in).DeepCopyInto(*out) + } + if in.Projects != nil { + in, out := &in.Projects, &out.Projects + *out = make([]Project, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.StarterProjects != nil { + in, out := &in.StarterProjects, &out.StarterProjects + *out = make([]StarterProject, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Components != nil { + in, out := &in.Components, &out.Components + *out = make([]Component, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DevWorkspaceTemplateSpecContent. +func (in *DevWorkspaceTemplateSpecContent) DeepCopy() *DevWorkspaceTemplateSpecContent { + if in == nil { + return nil + } + out := new(DevWorkspaceTemplateSpecContent) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Endpoint) DeepCopyInto(out *Endpoint) { + *out = *in + if in.Attributes != nil { + in, out := &in.Attributes, &out.Attributes + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Endpoint. +func (in *Endpoint) DeepCopy() *Endpoint { + if in == nil { + return nil + } + out := new(Endpoint) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EnvVar) DeepCopyInto(out *EnvVar) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvVar. +func (in *EnvVar) DeepCopy() *EnvVar { + if in == nil { + return nil + } + out := new(EnvVar) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Events) DeepCopyInto(out *Events) { + *out = *in + in.WorkspaceEvents.DeepCopyInto(&out.WorkspaceEvents) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Events. +func (in *Events) DeepCopy() *Events { + if in == nil { + return nil + } + out := new(Events) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExecCommand) DeepCopyInto(out *ExecCommand) { + *out = *in + in.LabeledCommand.DeepCopyInto(&out.LabeledCommand) + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]EnvVar, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecCommand. +func (in *ExecCommand) DeepCopy() *ExecCommand { + if in == nil { + return nil + } + out := new(ExecCommand) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GitLikeProjectSource) DeepCopyInto(out *GitLikeProjectSource) { + *out = *in + out.CommonProjectSource = in.CommonProjectSource + if in.CheckoutFrom != nil { + in, out := &in.CheckoutFrom, &out.CheckoutFrom + *out = new(CheckoutFrom) + **out = **in + } + if in.Remotes != nil { + in, out := &in.Remotes, &out.Remotes + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitLikeProjectSource. +func (in *GitLikeProjectSource) DeepCopy() *GitLikeProjectSource { + if in == nil { + return nil + } + out := new(GitLikeProjectSource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GitProjectSource) DeepCopyInto(out *GitProjectSource) { + *out = *in + in.GitLikeProjectSource.DeepCopyInto(&out.GitLikeProjectSource) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitProjectSource. +func (in *GitProjectSource) DeepCopy() *GitProjectSource { + if in == nil { + return nil + } + out := new(GitProjectSource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GithubProjectSource) DeepCopyInto(out *GithubProjectSource) { + *out = *in + in.GitLikeProjectSource.DeepCopyInto(&out.GitLikeProjectSource) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GithubProjectSource. +func (in *GithubProjectSource) DeepCopy() *GithubProjectSource { + if in == nil { + return nil + } + out := new(GithubProjectSource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImportReference) DeepCopyInto(out *ImportReference) { + *out = *in + in.ImportReferenceUnion.DeepCopyInto(&out.ImportReferenceUnion) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImportReference. +func (in *ImportReference) DeepCopy() *ImportReference { + if in == nil { + return nil + } + out := new(ImportReference) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImportReferenceUnion) DeepCopyInto(out *ImportReferenceUnion) { + *out = *in + if in.Kubernetes != nil { + in, out := &in.Kubernetes, &out.Kubernetes + *out = new(KubernetesCustomResourceImportReference) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImportReferenceUnion. +func (in *ImportReferenceUnion) DeepCopy() *ImportReferenceUnion { + if in == nil { + return nil + } + out := new(ImportReferenceUnion) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *K8sLikeComponent) DeepCopyInto(out *K8sLikeComponent) { + *out = *in + out.BaseComponent = in.BaseComponent + out.K8sLikeComponentLocation = in.K8sLikeComponentLocation + if in.Endpoints != nil { + in, out := &in.Endpoints, &out.Endpoints + *out = make([]Endpoint, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new K8sLikeComponent. +func (in *K8sLikeComponent) DeepCopy() *K8sLikeComponent { + if in == nil { + return nil + } + out := new(K8sLikeComponent) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *K8sLikeComponentLocation) DeepCopyInto(out *K8sLikeComponentLocation) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new K8sLikeComponentLocation. +func (in *K8sLikeComponentLocation) DeepCopy() *K8sLikeComponentLocation { + if in == nil { + return nil + } + out := new(K8sLikeComponentLocation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubernetesComponent) DeepCopyInto(out *KubernetesComponent) { + *out = *in + in.K8sLikeComponent.DeepCopyInto(&out.K8sLikeComponent) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesComponent. +func (in *KubernetesComponent) DeepCopy() *KubernetesComponent { + if in == nil { + return nil + } + out := new(KubernetesComponent) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubernetesCustomResourceImportReference) DeepCopyInto(out *KubernetesCustomResourceImportReference) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesCustomResourceImportReference. +func (in *KubernetesCustomResourceImportReference) DeepCopy() *KubernetesCustomResourceImportReference { + if in == nil { + return nil + } + out := new(KubernetesCustomResourceImportReference) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LabeledCommand) DeepCopyInto(out *LabeledCommand) { + *out = *in + in.BaseCommand.DeepCopyInto(&out.BaseCommand) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LabeledCommand. +func (in *LabeledCommand) DeepCopy() *LabeledCommand { + if in == nil { + return nil + } + out := new(LabeledCommand) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenshiftComponent) DeepCopyInto(out *OpenshiftComponent) { + *out = *in + in.K8sLikeComponent.DeepCopyInto(&out.K8sLikeComponent) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenshiftComponent. +func (in *OpenshiftComponent) DeepCopy() *OpenshiftComponent { + if in == nil { + return nil + } + out := new(OpenshiftComponent) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OverrideDirective) DeepCopyInto(out *OverrideDirective) { + *out = *in + if in.DeleteFromPrimitiveList != nil { + in, out := &in.DeleteFromPrimitiveList, &out.DeleteFromPrimitiveList + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.SetElementOrder != nil { + in, out := &in.SetElementOrder, &out.SetElementOrder + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OverrideDirective. +func (in *OverrideDirective) DeepCopy() *OverrideDirective { + if in == nil { + return nil + } + out := new(OverrideDirective) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Overrides) DeepCopyInto(out *Overrides) { + *out = *in + in.OverridesBase.DeepCopyInto(&out.OverridesBase) + if in.Projects != nil { + in, out := &in.Projects, &out.Projects + *out = make([]Project, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.StarterProjects != nil { + in, out := &in.StarterProjects, &out.StarterProjects + *out = make([]StarterProject, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Components != nil { + in, out := &in.Components, &out.Components + *out = make([]Component, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Overrides. +func (in *Overrides) DeepCopy() *Overrides { + if in == nil { + return nil + } + out := new(Overrides) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OverridesBase) DeepCopyInto(out *OverridesBase) { + *out = *in + if in.Commands != nil { + in, out := &in.Commands, &out.Commands + *out = make([]Command, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OverridesBase. +func (in *OverridesBase) DeepCopy() *OverridesBase { + if in == nil { + return nil + } + out := new(OverridesBase) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Parent) DeepCopyInto(out *Parent) { + *out = *in + in.ImportReference.DeepCopyInto(&out.ImportReference) + in.Overrides.DeepCopyInto(&out.Overrides) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Parent. +func (in *Parent) DeepCopy() *Parent { + if in == nil { + return nil + } + out := new(Parent) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PluginComponent) DeepCopyInto(out *PluginComponent) { + *out = *in + out.BaseComponent = in.BaseComponent + in.ImportReference.DeepCopyInto(&out.ImportReference) + in.PluginOverrides.DeepCopyInto(&out.PluginOverrides) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PluginComponent. +func (in *PluginComponent) DeepCopy() *PluginComponent { + if in == nil { + return nil + } + out := new(PluginComponent) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PluginComponentsOverride) DeepCopyInto(out *PluginComponentsOverride) { + *out = *in + if in.Container != nil { + in, out := &in.Container, &out.Container + *out = new(ContainerComponent) + (*in).DeepCopyInto(*out) + } + if in.Volume != nil { + in, out := &in.Volume, &out.Volume + *out = new(VolumeComponent) + **out = **in + } + if in.Kubernetes != nil { + in, out := &in.Kubernetes, &out.Kubernetes + *out = new(KubernetesComponent) + (*in).DeepCopyInto(*out) + } + if in.Openshift != nil { + in, out := &in.Openshift, &out.Openshift + *out = new(OpenshiftComponent) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PluginComponentsOverride. +func (in *PluginComponentsOverride) DeepCopy() *PluginComponentsOverride { + if in == nil { + return nil + } + out := new(PluginComponentsOverride) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PluginOverrides) DeepCopyInto(out *PluginOverrides) { + *out = *in + in.OverridesBase.DeepCopyInto(&out.OverridesBase) + if in.Components != nil { + in, out := &in.Components, &out.Components + *out = make([]PluginComponentsOverride, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PluginOverrides. +func (in *PluginOverrides) DeepCopy() *PluginOverrides { + if in == nil { + return nil + } + out := new(PluginOverrides) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Project) DeepCopyInto(out *Project) { + *out = *in + in.ProjectSource.DeepCopyInto(&out.ProjectSource) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Project. +func (in *Project) DeepCopy() *Project { + if in == nil { + return nil + } + out := new(Project) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProjectSource) DeepCopyInto(out *ProjectSource) { + *out = *in + if in.Git != nil { + in, out := &in.Git, &out.Git + *out = new(GitProjectSource) + (*in).DeepCopyInto(*out) + } + if in.Github != nil { + in, out := &in.Github, &out.Github + *out = new(GithubProjectSource) + (*in).DeepCopyInto(*out) + } + if in.Zip != nil { + in, out := &in.Zip, &out.Zip + *out = new(ZipProjectSource) + **out = **in + } + if in.Custom != nil { + in, out := &in.Custom, &out.Custom + *out = new(CustomProjectSource) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectSource. +func (in *ProjectSource) DeepCopy() *ProjectSource { + if in == nil { + return nil + } + out := new(ProjectSource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StarterProject) DeepCopyInto(out *StarterProject) { + *out = *in + in.Project.DeepCopyInto(&out.Project) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StarterProject. +func (in *StarterProject) DeepCopy() *StarterProject { + if in == nil { + return nil + } + out := new(StarterProject) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Volume) DeepCopyInto(out *Volume) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Volume. +func (in *Volume) DeepCopy() *Volume { + if in == nil { + return nil + } + out := new(Volume) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeComponent) DeepCopyInto(out *VolumeComponent) { + *out = *in + out.BaseComponent = in.BaseComponent + out.Volume = in.Volume +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeComponent. +func (in *VolumeComponent) DeepCopy() *VolumeComponent { + if in == nil { + return nil + } + out := new(VolumeComponent) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeMount) DeepCopyInto(out *VolumeMount) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeMount. +func (in *VolumeMount) DeepCopy() *VolumeMount { + if in == nil { + return nil + } + out := new(VolumeMount) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VscodeConfigurationCommand) DeepCopyInto(out *VscodeConfigurationCommand) { + *out = *in + in.BaseCommand.DeepCopyInto(&out.BaseCommand) + out.VscodeConfigurationCommandLocation = in.VscodeConfigurationCommandLocation +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VscodeConfigurationCommand. +func (in *VscodeConfigurationCommand) DeepCopy() *VscodeConfigurationCommand { + if in == nil { + return nil + } + out := new(VscodeConfigurationCommand) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VscodeConfigurationCommandLocation) DeepCopyInto(out *VscodeConfigurationCommandLocation) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VscodeConfigurationCommandLocation. +func (in *VscodeConfigurationCommandLocation) DeepCopy() *VscodeConfigurationCommandLocation { + if in == nil { + return nil + } + out := new(VscodeConfigurationCommandLocation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WorkspaceCondition) DeepCopyInto(out *WorkspaceCondition) { + *out = *in + in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceCondition. +func (in *WorkspaceCondition) DeepCopy() *WorkspaceCondition { + if in == nil { + return nil + } + out := new(WorkspaceCondition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WorkspaceEvents) DeepCopyInto(out *WorkspaceEvents) { + *out = *in + if in.PreStart != nil { + in, out := &in.PreStart, &out.PreStart + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.PostStart != nil { + in, out := &in.PostStart, &out.PostStart + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.PreStop != nil { + in, out := &in.PreStop, &out.PreStop + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.PostStop != nil { + in, out := &in.PostStop, &out.PostStop + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkspaceEvents. +func (in *WorkspaceEvents) DeepCopy() *WorkspaceEvents { + if in == nil { + return nil + } + out := new(WorkspaceEvents) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ZipProjectSource) DeepCopyInto(out *ZipProjectSource) { + *out = *in + out.CommonProjectSource = in.CommonProjectSource +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZipProjectSource. +func (in *ZipProjectSource) DeepCopy() *ZipProjectSource { + if in == nil { + return nil + } + out := new(ZipProjectSource) + in.DeepCopyInto(out) + return out +} diff --git a/pkg/apis/workspaces/v1alpha2/zz_generated.deepcopy.go b/pkg/apis/workspaces/v1alpha2/zz_generated.deepcopy.go index 01ac606ac..6465a6fb5 100644 --- a/pkg/apis/workspaces/v1alpha2/zz_generated.deepcopy.go +++ b/pkg/apis/workspaces/v1alpha2/zz_generated.deepcopy.go @@ -1,4 +1,3 @@ -//go:build !ignore_autogenerated // +build !ignore_autogenerated // Code generated by controller-gen. DO NOT EDIT.