diff --git a/Makefile b/Makefile index d47d3c67e..c7fa16559 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ export ROUTING_SUFFIX ?= 192.168.99.100.nip.io export PULL_POLICY ?= Always export DEFAULT_ROUTING ?= basic export KUBECONFIG ?= ${HOME}/.kube/config -export DEVWORKSPACE_API_VERSION ?= aeda60d4361911da85103f224644bfa792498499 +export DEVWORKSPACE_API_VERSION ?= 283b0c54946e9fea9872c25e1e086c303688f0e8 #internal params DEVWORKSPACE_CTRL_SA=devworkspace-controller-serviceaccount @@ -110,7 +110,7 @@ endif ##### Rules for dealing with devfile/api ### update_devworkspace_api: update version of devworkspace crds in go.mod update_devworkspace_api: - go mod edit --require github.com/devfile/api@$(DEVWORKSPACE_API_VERSION) + go mod edit --require github.com/devfile/api/v2@$(DEVWORKSPACE_API_VERSION) go mod download go mod tidy diff --git a/apis/controller/v1alpha1/component.go b/apis/controller/v1alpha1/component.go index 575b0ab66..20552f11a 100644 --- a/apis/controller/v1alpha1/component.go +++ b/apis/controller/v1alpha1/component.go @@ -13,7 +13,7 @@ package v1alpha1 import ( - devworkspace "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + devworkspace "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" ) // Description of a devfile component's workspace additions diff --git a/apis/controller/v1alpha1/component_types.go b/apis/controller/v1alpha1/component_types.go index 6d3e0b629..1ad7f5aea 100644 --- a/apis/controller/v1alpha1/component_types.go +++ b/apis/controller/v1alpha1/component_types.go @@ -13,7 +13,7 @@ package v1alpha1 import ( - devworkspace "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + devworkspace "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/apis/controller/v1alpha1/workspacerouting_types.go b/apis/controller/v1alpha1/workspacerouting_types.go index 017af1af2..b423f2c6b 100644 --- a/apis/controller/v1alpha1/workspacerouting_types.go +++ b/apis/controller/v1alpha1/workspacerouting_types.go @@ -13,7 +13,7 @@ package v1alpha1 import ( - devworkspace "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + devworkspace "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/apis/controller/v1alpha1/zz_generated.deepcopy.go b/apis/controller/v1alpha1/zz_generated.deepcopy.go index ffebd9cbf..2c0621e29 100644 --- a/apis/controller/v1alpha1/zz_generated.deepcopy.go +++ b/apis/controller/v1alpha1/zz_generated.deepcopy.go @@ -17,7 +17,7 @@ package v1alpha1 import ( - "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" v1 "k8s.io/api/core/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) diff --git a/controllers/controller/workspacerouting/solvers/cluster_solver.go b/controllers/controller/workspacerouting/solvers/cluster_solver.go index 4c93f4f9a..67cd7b0f2 100644 --- a/controllers/controller/workspacerouting/solvers/cluster_solver.go +++ b/controllers/controller/workspacerouting/solvers/cluster_solver.go @@ -17,7 +17,7 @@ import ( "github.com/devfile/devworkspace-operator/pkg/common" - devworkspace "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + devworkspace "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" controllerv1alpha1 "github.com/devfile/devworkspace-operator/apis/controller/v1alpha1" "github.com/devfile/devworkspace-operator/pkg/config" corev1 "k8s.io/api/core/v1" diff --git a/controllers/controller/workspacerouting/solvers/common.go b/controllers/controller/workspacerouting/solvers/common.go index f4eea8901..b419d4177 100644 --- a/controllers/controller/workspacerouting/solvers/common.go +++ b/controllers/controller/workspacerouting/solvers/common.go @@ -13,8 +13,8 @@ package solvers import ( - "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" - devworkspace "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" + devworkspace "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" controllerv1alpha1 "github.com/devfile/devworkspace-operator/apis/controller/v1alpha1" "github.com/devfile/devworkspace-operator/pkg/common" "github.com/devfile/devworkspace-operator/pkg/config" diff --git a/controllers/controller/workspacerouting/solvers/openshift_oauth_solver.go b/controllers/controller/workspacerouting/solvers/openshift_oauth_solver.go index b44639b0d..bd92da9d3 100644 --- a/controllers/controller/workspacerouting/solvers/openshift_oauth_solver.go +++ b/controllers/controller/workspacerouting/solvers/openshift_oauth_solver.go @@ -18,7 +18,7 @@ import ( maputils "github.com/devfile/devworkspace-operator/internal/map" "sigs.k8s.io/controller-runtime/pkg/client" - devworkspace "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + devworkspace "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" controllerv1alpha1 "github.com/devfile/devworkspace-operator/apis/controller/v1alpha1" "github.com/devfile/devworkspace-operator/pkg/common" "github.com/devfile/devworkspace-operator/pkg/config" diff --git a/controllers/controller/workspacerouting/solvers/resolve_endpoints.go b/controllers/controller/workspacerouting/solvers/resolve_endpoints.go index a86b21dfd..5de48702e 100644 --- a/controllers/controller/workspacerouting/solvers/resolve_endpoints.go +++ b/controllers/controller/workspacerouting/solvers/resolve_endpoints.go @@ -17,7 +17,7 @@ import ( "net/url" "strings" - devworkspace "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + devworkspace "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" controllerv1alpha1 "github.com/devfile/devworkspace-operator/apis/controller/v1alpha1" "github.com/devfile/devworkspace-operator/pkg/config" ) diff --git a/controllers/workspace/devworkspace_controller.go b/controllers/workspace/devworkspace_controller.go index 8fdd0cc9a..fd2d47460 100644 --- a/controllers/workspace/devworkspace_controller.go +++ b/controllers/workspace/devworkspace_controller.go @@ -45,7 +45,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/reconcile" - devworkspace "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + devworkspace "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" ) type currentStatus struct { @@ -215,7 +215,7 @@ func (r *DevWorkspaceReconciler) Reconcile(req ctrl.Request) (reconcileResult ct reconcileStatus.Conditions[devworkspace.WorkspaceFailedStart] = fmt.Sprintf("Error processing devfile for Theia: %s", err) return reconcile.Result{}, nil } - reconcileStatus.Conditions[devworkspace.WorkspaceReady] = "" + reconcileStatus.Conditions[devworkspace.WorkspaceComponentsReady] = "" timing.SetTime(timingInfo, timing.ComponentsReady) // Only add che rest apis if Theia editor is present in the devfile diff --git a/controllers/workspace/finalize.go b/controllers/workspace/finalize.go index 5ac812291..77922e6ba 100644 --- a/controllers/workspace/finalize.go +++ b/controllers/workspace/finalize.go @@ -20,7 +20,7 @@ import ( storagelib "github.com/devfile/devworkspace-operator/pkg/library/storage" - "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" "github.com/devfile/devworkspace-operator/controllers/workspace/provision" "github.com/devfile/devworkspace-operator/internal/images" "github.com/devfile/devworkspace-operator/pkg/common" @@ -63,6 +63,12 @@ func (r *DevWorkspaceReconciler) finalize(ctx context.Context, log logr.Logger, if !hasFinalizer(workspace) { return reconcile.Result{}, nil } + workspace.Status.Message = "Cleaning up resources for deletion" + err := r.Client.Status().Update(ctx, workspace) + if err != nil && !k8sErrors.IsConflict(err) { + return reconcile.Result{}, err + } + // Need to make sure Deployment is cleaned up before starting job to avoid mounting issues for RWO PVCs wait, err := provision.DeleteWorkspaceDeployment(ctx, workspace, r.Client) if err != nil { diff --git a/controllers/workspace/predicates.go b/controllers/workspace/predicates.go index 8ec806eed..137f2352b 100644 --- a/controllers/workspace/predicates.go +++ b/controllers/workspace/predicates.go @@ -13,7 +13,7 @@ package controllers import ( - "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" "k8s.io/apimachinery/pkg/api/equality" "sigs.k8s.io/controller-runtime/pkg/event" "sigs.k8s.io/controller-runtime/pkg/predicate" diff --git a/controllers/workspace/provision/deployment.go b/controllers/workspace/provision/deployment.go index a1881fd43..06c2978f5 100644 --- a/controllers/workspace/provision/deployment.go +++ b/controllers/workspace/provision/deployment.go @@ -22,7 +22,7 @@ import ( "github.com/devfile/devworkspace-operator/pkg/common" - devworkspace "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + devworkspace "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" "github.com/devfile/devworkspace-operator/apis/controller/v1alpha1" "github.com/devfile/devworkspace-operator/controllers/workspace/env" "github.com/devfile/devworkspace-operator/pkg/config" diff --git a/controllers/workspace/provision/pvc.go b/controllers/workspace/provision/pvc.go index db54686c3..9a995a7be 100644 --- a/controllers/workspace/provision/pvc.go +++ b/controllers/workspace/provision/pvc.go @@ -13,7 +13,7 @@ package provision import ( - devworkspace "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + devworkspace "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" "github.com/devfile/devworkspace-operator/pkg/config" "github.com/go-logr/logr" corev1 "k8s.io/api/core/v1" diff --git a/controllers/workspace/provision/rbac.go b/controllers/workspace/provision/rbac.go index 4590ad07b..c98f98a1d 100644 --- a/controllers/workspace/provision/rbac.go +++ b/controllers/workspace/provision/rbac.go @@ -13,7 +13,7 @@ package provision import ( - devworkspace "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + devworkspace "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" "github.com/devfile/devworkspace-operator/pkg/config" "github.com/go-logr/logr" rbacv1 "k8s.io/api/rbac/v1" diff --git a/controllers/workspace/provision/routing.go b/controllers/workspace/provision/routing.go index 3eee674c2..56d8cd201 100644 --- a/controllers/workspace/provision/routing.go +++ b/controllers/workspace/provision/routing.go @@ -17,7 +17,7 @@ import ( "fmt" "strings" - devworkspace "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + devworkspace "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" "github.com/devfile/devworkspace-operator/apis/controller/v1alpha1" maputils "github.com/devfile/devworkspace-operator/internal/map" "github.com/devfile/devworkspace-operator/pkg/config" diff --git a/controllers/workspace/provision/serviceaccount.go b/controllers/workspace/provision/serviceaccount.go index ff1807115..54e8433c8 100644 --- a/controllers/workspace/provision/serviceaccount.go +++ b/controllers/workspace/provision/serviceaccount.go @@ -15,7 +15,7 @@ package provision import ( "context" - devworkspace "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + devworkspace "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" "github.com/devfile/devworkspace-operator/pkg/common" "github.com/google/go-cmp/cmp" corev1 "k8s.io/api/core/v1" diff --git a/controllers/workspace/restapis/component.go b/controllers/workspace/restapis/component.go index 7f2d2ab8e..817d0d6a2 100644 --- a/controllers/workspace/restapis/component.go +++ b/controllers/workspace/restapis/component.go @@ -15,7 +15,7 @@ package restapis import ( "strings" - devworkspace "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + devworkspace "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" controllerv1alpha1 "github.com/devfile/devworkspace-operator/apis/controller/v1alpha1" "github.com/devfile/devworkspace-operator/pkg/common" "github.com/devfile/devworkspace-operator/pkg/config" diff --git a/controllers/workspace/restapis/configmap.go b/controllers/workspace/restapis/configmap.go index 9c0803879..b0ffe3055 100644 --- a/controllers/workspace/restapis/configmap.go +++ b/controllers/workspace/restapis/configmap.go @@ -16,7 +16,7 @@ import ( "context" "encoding/json" - devworkspace "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + devworkspace "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" "github.com/devfile/devworkspace-operator/apis/controller/v1alpha1" "github.com/devfile/devworkspace-operator/controllers/workspace/provision" "github.com/devfile/devworkspace-operator/pkg/common" diff --git a/controllers/workspace/restapis/devfilev1.go b/controllers/workspace/restapis/devfilev1.go index 6476c44f0..eae328ec2 100644 --- a/controllers/workspace/restapis/devfilev1.go +++ b/controllers/workspace/restapis/devfilev1.go @@ -17,7 +17,7 @@ import ( "path" "strings" - devworkspace "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + devworkspace "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" workspaceApi "github.com/devfile/devworkspace-operator/apis/controller/v1alpha1" "github.com/devfile/devworkspace-operator/pkg/config" ) diff --git a/controllers/workspace/status.go b/controllers/workspace/status.go index aa23d8573..53eeab136 100644 --- a/controllers/workspace/status.go +++ b/controllers/workspace/status.go @@ -23,7 +23,7 @@ import ( "github.com/go-logr/logr" - devworkspace "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + devworkspace "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" "github.com/devfile/devworkspace-operator/apis/controller/v1alpha1" "github.com/devfile/devworkspace-operator/controllers/workspace/provision" corev1 "k8s.io/api/core/v1" @@ -79,6 +79,10 @@ func (r *DevWorkspaceReconciler) updateWorkspaceStatus(workspace *devworkspace.D sort.SliceStable(workspace.Status.Conditions, func(i, j int) bool { return strings.Compare(string(workspace.Status.Conditions[i].Type), string(workspace.Status.Conditions[j].Type)) > 0 }) + infoMessage := getInfoMessage(workspace, status.Conditions) + if workspace.Status.Message != infoMessage { + workspace.Status.Message = infoMessage + } err := r.Status().Update(context.TODO(), workspace) if err != nil { @@ -138,3 +142,34 @@ func getIdeUrl(exposedEndpoints map[string]v1alpha1.ExposedEndpointList) string } return "" } + +func getInfoMessage(workspace *devworkspace.DevWorkspace, conditions map[devworkspace.WorkspaceConditionType]string) string { + // Check for errors and failure + if msg, ok := conditions[devworkspace.WorkspaceError]; ok { + return msg + } + if msg, ok := conditions[devworkspace.WorkspaceFailedStart]; ok { + return msg + } + switch workspace.Status.Phase { + case devworkspace.WorkspaceStatusRunning: + return workspace.Status.IdeUrl + case devworkspace.WorkspaceStatusStopped, devworkspace.WorkspaceStatusStopping: + return string(workspace.Status.Phase) + } + + // Check for progress + if _, ok := conditions[devworkspace.WorkspaceReady]; ok { + return "Waiting on editor to start" + } + if _, ok := conditions[devworkspace.WorkspaceServiceAccountReady]; ok { + return "Waiting for deployment to be ready" + } + if _, ok := conditions[devworkspace.WorkspaceRoutingReady]; ok { + return "Waiting for workspace serviceaccount" + } + if _, ok := conditions[devworkspace.WorkspaceComponentsReady]; ok { + return "Waiting for workspace routing objects" + } + return "Processing DevWorkspace components" +} diff --git a/controllers/workspace/validation.go b/controllers/workspace/validation.go index a2a22cad8..3217ece95 100644 --- a/controllers/workspace/validation.go +++ b/controllers/workspace/validation.go @@ -15,7 +15,7 @@ package controllers import ( "fmt" - devworkspace "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + devworkspace "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" "github.com/devfile/devworkspace-operator/pkg/config" "github.com/devfile/devworkspace-operator/pkg/webhook" ) diff --git a/deploy/deployment/kubernetes/combined.yaml b/deploy/deployment/kubernetes/combined.yaml index 03cb758fe..f1f469e77 100644 --- a/deploy/deployment/kubernetes/combined.yaml +++ b/deploy/deployment/kubernetes/combined.yaml @@ -203,6 +203,8 @@ spec: 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 vscodeLaunch: description: Command providing the definition of a VsCode launch action @@ -307,6 +309,10 @@ spec: 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 @@ -328,6 +334,8 @@ spec: - 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 @@ -337,12 +345,14 @@ spec: 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 + 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: type: integer @@ -368,6 +378,8 @@ spec: 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 @@ -382,6 +394,8 @@ spec: 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 `/`. @@ -429,6 +443,8 @@ spec: - 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 @@ -438,12 +454,14 @@ spec: 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 + 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: type: integer @@ -467,6 +485,8 @@ spec: 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 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. @@ -489,6 +509,8 @@ spec: - 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 @@ -498,12 +520,14 @@ spec: 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 + 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: type: integer @@ -557,6 +581,12 @@ spec: description: Optional label that provides a label for this command to be used in Editor UI menus for example type: string type: object + attributes: + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + description: Map of implementation-dependant free-form YAML attributes. + type: object + x-kubernetes-preserve-unknown-fields: true commandType: description: Type of workspace command enum: @@ -644,6 +674,8 @@ spec: 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 vscodeLaunch: description: Command providing the definition of a VsCode launch action @@ -715,6 +747,12 @@ spec: description: Overrides of components encapsulated in a parent devfile or a plugin. Overriding is done according to K8S strategic merge patch standard rules. items: properties: + attributes: + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + description: Map of implementation-dependant free-form YAML attributes. + type: object + x-kubernetes-preserve-unknown-fields: true componentType: description: Type of component enum: @@ -736,6 +774,10 @@ spec: 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 @@ -756,6 +798,8 @@ spec: - 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 @@ -764,12 +808,14 @@ spec: 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 + 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: type: integer @@ -793,6 +839,8 @@ spec: 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 @@ -806,6 +854,8 @@ spec: 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 `/`. @@ -835,6 +885,8 @@ spec: - 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 @@ -843,12 +895,14 @@ spec: 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 + 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: type: integer @@ -871,6 +925,8 @@ spec: 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 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. @@ -892,6 +948,8 @@ spec: - 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 @@ -900,12 +958,14 @@ spec: 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 + 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: type: integer @@ -929,6 +989,9 @@ spec: 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 @@ -966,6 +1029,9 @@ spec: 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 @@ -1077,6 +1143,8 @@ spec: - 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 @@ -1086,12 +1154,14 @@ spec: 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 + 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: type: integer @@ -14030,6 +14100,8 @@ spec: - 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 @@ -14039,12 +14111,14 @@ spec: 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 + 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: type: integer diff --git a/deploy/deployment/kubernetes/objects/components.controller.devfile.io.CustomResourceDefinition.yaml b/deploy/deployment/kubernetes/objects/components.controller.devfile.io.CustomResourceDefinition.yaml index b4d6ae5c3..0060982bd 100644 --- a/deploy/deployment/kubernetes/objects/components.controller.devfile.io.CustomResourceDefinition.yaml +++ b/deploy/deployment/kubernetes/objects/components.controller.devfile.io.CustomResourceDefinition.yaml @@ -203,6 +203,8 @@ spec: 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 vscodeLaunch: description: Command providing the definition of a VsCode launch action @@ -307,6 +309,10 @@ spec: 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 @@ -328,6 +334,8 @@ spec: - 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 @@ -337,12 +345,14 @@ spec: 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 + 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: type: integer @@ -368,6 +378,8 @@ spec: 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 @@ -382,6 +394,8 @@ spec: 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 `/`. @@ -429,6 +443,8 @@ spec: - 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 @@ -438,12 +454,14 @@ spec: 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 + 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: type: integer @@ -467,6 +485,8 @@ spec: 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 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. @@ -489,6 +509,8 @@ spec: - 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 @@ -498,12 +520,14 @@ spec: 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 + 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: type: integer @@ -557,6 +581,12 @@ spec: description: Optional label that provides a label for this command to be used in Editor UI menus for example type: string type: object + attributes: + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + description: Map of implementation-dependant free-form YAML attributes. + type: object + x-kubernetes-preserve-unknown-fields: true commandType: description: Type of workspace command enum: @@ -644,6 +674,8 @@ spec: 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 vscodeLaunch: description: Command providing the definition of a VsCode launch action @@ -715,6 +747,12 @@ spec: description: Overrides of components encapsulated in a parent devfile or a plugin. Overriding is done according to K8S strategic merge patch standard rules. items: properties: + attributes: + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + description: Map of implementation-dependant free-form YAML attributes. + type: object + x-kubernetes-preserve-unknown-fields: true componentType: description: Type of component enum: @@ -736,6 +774,10 @@ spec: 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 @@ -756,6 +798,8 @@ spec: - 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 @@ -764,12 +808,14 @@ spec: 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 + 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: type: integer @@ -793,6 +839,8 @@ spec: 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 @@ -806,6 +854,8 @@ spec: 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 `/`. @@ -835,6 +885,8 @@ spec: - 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 @@ -843,12 +895,14 @@ spec: 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 + 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: type: integer @@ -871,6 +925,8 @@ spec: 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 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. @@ -892,6 +948,8 @@ spec: - 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 @@ -900,12 +958,14 @@ spec: 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 + 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: type: integer @@ -929,6 +989,9 @@ spec: 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 @@ -966,6 +1029,9 @@ spec: 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 @@ -1077,6 +1143,8 @@ spec: - 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 @@ -1086,12 +1154,14 @@ spec: 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 + 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: type: integer diff --git a/deploy/deployment/kubernetes/objects/workspaceroutings.controller.devfile.io.CustomResourceDefinition.yaml b/deploy/deployment/kubernetes/objects/workspaceroutings.controller.devfile.io.CustomResourceDefinition.yaml index bb5b14e35..78820008c 100644 --- a/deploy/deployment/kubernetes/objects/workspaceroutings.controller.devfile.io.CustomResourceDefinition.yaml +++ b/deploy/deployment/kubernetes/objects/workspaceroutings.controller.devfile.io.CustomResourceDefinition.yaml @@ -52,6 +52,8 @@ spec: - 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 @@ -61,12 +63,14 @@ spec: 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 + 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: type: integer diff --git a/deploy/deployment/openshift/combined.yaml b/deploy/deployment/openshift/combined.yaml index c6edcdb81..cd33deac1 100644 --- a/deploy/deployment/openshift/combined.yaml +++ b/deploy/deployment/openshift/combined.yaml @@ -203,6 +203,8 @@ spec: 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 vscodeLaunch: description: Command providing the definition of a VsCode launch action @@ -307,6 +309,10 @@ spec: 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 @@ -328,6 +334,8 @@ spec: - 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 @@ -337,12 +345,14 @@ spec: 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 + 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: type: integer @@ -368,6 +378,8 @@ spec: 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 @@ -382,6 +394,8 @@ spec: 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 `/`. @@ -429,6 +443,8 @@ spec: - 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 @@ -438,12 +454,14 @@ spec: 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 + 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: type: integer @@ -467,6 +485,8 @@ spec: 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 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. @@ -489,6 +509,8 @@ spec: - 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 @@ -498,12 +520,14 @@ spec: 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 + 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: type: integer @@ -557,6 +581,12 @@ spec: description: Optional label that provides a label for this command to be used in Editor UI menus for example type: string type: object + attributes: + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + description: Map of implementation-dependant free-form YAML attributes. + type: object + x-kubernetes-preserve-unknown-fields: true commandType: description: Type of workspace command enum: @@ -644,6 +674,8 @@ spec: 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 vscodeLaunch: description: Command providing the definition of a VsCode launch action @@ -715,6 +747,12 @@ spec: description: Overrides of components encapsulated in a parent devfile or a plugin. Overriding is done according to K8S strategic merge patch standard rules. items: properties: + attributes: + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + description: Map of implementation-dependant free-form YAML attributes. + type: object + x-kubernetes-preserve-unknown-fields: true componentType: description: Type of component enum: @@ -736,6 +774,10 @@ spec: 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 @@ -756,6 +798,8 @@ spec: - 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 @@ -764,12 +808,14 @@ spec: 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 + 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: type: integer @@ -793,6 +839,8 @@ spec: 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 @@ -806,6 +854,8 @@ spec: 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 `/`. @@ -835,6 +885,8 @@ spec: - 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 @@ -843,12 +895,14 @@ spec: 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 + 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: type: integer @@ -871,6 +925,8 @@ spec: 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 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. @@ -892,6 +948,8 @@ spec: - 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 @@ -900,12 +958,14 @@ spec: 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 + 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: type: integer @@ -929,6 +989,9 @@ spec: 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 @@ -966,6 +1029,9 @@ spec: 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 @@ -1077,6 +1143,8 @@ spec: - 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 @@ -1086,12 +1154,14 @@ spec: 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 + 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: type: integer @@ -14030,6 +14100,8 @@ spec: - 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 @@ -14039,12 +14111,14 @@ spec: 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 + 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: type: integer diff --git a/deploy/deployment/openshift/objects/components.controller.devfile.io.CustomResourceDefinition.yaml b/deploy/deployment/openshift/objects/components.controller.devfile.io.CustomResourceDefinition.yaml index b4d6ae5c3..0060982bd 100644 --- a/deploy/deployment/openshift/objects/components.controller.devfile.io.CustomResourceDefinition.yaml +++ b/deploy/deployment/openshift/objects/components.controller.devfile.io.CustomResourceDefinition.yaml @@ -203,6 +203,8 @@ spec: 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 vscodeLaunch: description: Command providing the definition of a VsCode launch action @@ -307,6 +309,10 @@ spec: 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 @@ -328,6 +334,8 @@ spec: - 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 @@ -337,12 +345,14 @@ spec: 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 + 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: type: integer @@ -368,6 +378,8 @@ spec: 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 @@ -382,6 +394,8 @@ spec: 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 `/`. @@ -429,6 +443,8 @@ spec: - 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 @@ -438,12 +454,14 @@ spec: 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 + 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: type: integer @@ -467,6 +485,8 @@ spec: 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 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. @@ -489,6 +509,8 @@ spec: - 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 @@ -498,12 +520,14 @@ spec: 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 + 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: type: integer @@ -557,6 +581,12 @@ spec: description: Optional label that provides a label for this command to be used in Editor UI menus for example type: string type: object + attributes: + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + description: Map of implementation-dependant free-form YAML attributes. + type: object + x-kubernetes-preserve-unknown-fields: true commandType: description: Type of workspace command enum: @@ -644,6 +674,8 @@ spec: 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 vscodeLaunch: description: Command providing the definition of a VsCode launch action @@ -715,6 +747,12 @@ spec: description: Overrides of components encapsulated in a parent devfile or a plugin. Overriding is done according to K8S strategic merge patch standard rules. items: properties: + attributes: + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + description: Map of implementation-dependant free-form YAML attributes. + type: object + x-kubernetes-preserve-unknown-fields: true componentType: description: Type of component enum: @@ -736,6 +774,10 @@ spec: 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 @@ -756,6 +798,8 @@ spec: - 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 @@ -764,12 +808,14 @@ spec: 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 + 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: type: integer @@ -793,6 +839,8 @@ spec: 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 @@ -806,6 +854,8 @@ spec: 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 `/`. @@ -835,6 +885,8 @@ spec: - 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 @@ -843,12 +895,14 @@ spec: 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 + 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: type: integer @@ -871,6 +925,8 @@ spec: 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 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. @@ -892,6 +948,8 @@ spec: - 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 @@ -900,12 +958,14 @@ spec: 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 + 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: type: integer @@ -929,6 +989,9 @@ spec: 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 @@ -966,6 +1029,9 @@ spec: 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 @@ -1077,6 +1143,8 @@ spec: - 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 @@ -1086,12 +1154,14 @@ spec: 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 + 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: type: integer diff --git a/deploy/deployment/openshift/objects/workspaceroutings.controller.devfile.io.CustomResourceDefinition.yaml b/deploy/deployment/openshift/objects/workspaceroutings.controller.devfile.io.CustomResourceDefinition.yaml index bb5b14e35..78820008c 100644 --- a/deploy/deployment/openshift/objects/workspaceroutings.controller.devfile.io.CustomResourceDefinition.yaml +++ b/deploy/deployment/openshift/objects/workspaceroutings.controller.devfile.io.CustomResourceDefinition.yaml @@ -52,6 +52,8 @@ spec: - 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 @@ -61,12 +63,14 @@ spec: 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 + 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: type: integer diff --git a/deploy/templates/crd/bases/controller.devfile.io_components.yaml b/deploy/templates/crd/bases/controller.devfile.io_components.yaml index d9d81116d..8774b01e8 100644 --- a/deploy/templates/crd/bases/controller.devfile.io_components.yaml +++ b/deploy/templates/crd/bases/controller.devfile.io_components.yaml @@ -253,6 +253,8 @@ spec: 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 vscodeLaunch: description: Command providing the definition of a VsCode @@ -373,6 +375,10 @@ spec: 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\ @@ -413,6 +419,8 @@ spec: - 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 @@ -439,14 +447,17 @@ spec: \ 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 + process. This requires a protocol of `https` or + `wss`. type: boolean targetPort: type: integer @@ -475,6 +486,8 @@ spec: 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\ @@ -501,6 +514,8 @@ spec: 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 @@ -575,6 +590,8 @@ spec: - 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 @@ -601,14 +618,17 @@ spec: \ 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 + process. This requires a protocol of `https` or + `wss`. type: boolean targetPort: type: integer @@ -635,6 +655,8 @@ spec: 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 workspace the OpenShift @@ -676,6 +698,8 @@ spec: - 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 @@ -702,14 +726,17 @@ spec: \ 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 + process. This requires a protocol of `https` or + `wss`. type: boolean targetPort: type: integer @@ -785,6 +812,13 @@ spec: UI menus for example type: string type: object + attributes: + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + description: Map of implementation-dependant free-form + YAML attributes. + type: object + x-kubernetes-preserve-unknown-fields: true commandType: description: Type of workspace command enum: @@ -909,6 +943,8 @@ spec: 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 vscodeLaunch: description: Command providing the definition of @@ -996,6 +1032,13 @@ spec: to K8S strategic merge patch standard rules. items: properties: + attributes: + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + description: Map of implementation-dependant free-form + YAML attributes. + type: object + x-kubernetes-preserve-unknown-fields: true componentType: description: Type of component enum: @@ -1027,6 +1070,10 @@ spec: 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\ @@ -1070,6 +1117,8 @@ spec: - 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 @@ -1100,14 +1149,17 @@ spec: \ 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 + authentication process. This requires + a protocol of `https` or `wss`. type: boolean targetPort: type: integer @@ -1134,6 +1186,8 @@ spec: type: string memoryLimit: type: string + memoryRequest: + type: string mountSources: description: "Toggles whether or not the project\ \ source code should be mounted in the component.\ @@ -1162,6 +1216,8 @@ spec: 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 @@ -1218,6 +1274,8 @@ spec: - 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 @@ -1248,14 +1306,17 @@ spec: \ 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 + authentication process. This requires + a protocol of `https` or `wss`. type: boolean targetPort: type: integer @@ -1282,6 +1343,8 @@ spec: 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 workspace @@ -1327,6 +1390,8 @@ spec: - 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 @@ -1357,14 +1422,17 @@ spec: \ 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 + authentication process. This requires + a protocol of `https` or `wss`. type: boolean targetPort: type: integer @@ -1390,6 +1458,11 @@ spec: 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 @@ -1430,6 +1503,10 @@ spec: 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 @@ -1581,6 +1658,8 @@ spec: - 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 @@ -1607,14 +1686,17 @@ spec: \ 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 + process. This requires a protocol of `https` or + `wss`. type: boolean targetPort: type: integer diff --git a/deploy/templates/crd/bases/controller.devfile.io_workspaceroutings.yaml b/deploy/templates/crd/bases/controller.devfile.io_workspaceroutings.yaml index 1b6971cb0..f425f44f4 100644 --- a/deploy/templates/crd/bases/controller.devfile.io_workspaceroutings.yaml +++ b/deploy/templates/crd/bases/controller.devfile.io_workspaceroutings.yaml @@ -67,6 +67,8 @@ spec: - 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 @@ -90,13 +92,16 @@ spec: \ 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 + and protected by some authentication process. This requires + a protocol of `https` or `wss`. type: boolean targetPort: type: integer diff --git a/go.mod b/go.mod index f0202b17e..b6e122b83 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/devfile/devworkspace-operator go 1.13 require ( - github.com/devfile/api v0.0.0-20201125082321-aeda60d43619 + github.com/devfile/api/v2 v2.0.0-20210212161736-283b0c54946e github.com/go-logr/logr v0.1.0 github.com/google/go-cmp v0.5.0 github.com/google/uuid v1.1.1 diff --git a/go.sum b/go.sum index 6dae35973..e4f2da4df 100644 --- a/go.sum +++ b/go.sum @@ -49,8 +49,8 @@ github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/devfile/api v0.0.0-20201125082321-aeda60d43619 h1:1pTtDONDby55+kqHhvSqPiVKIGf1OJRY1vXCeHFG+wU= -github.com/devfile/api v0.0.0-20201125082321-aeda60d43619/go.mod h1:/aDiwWjDEW/fY1/Ig8umVtmneAXKZImnLvWqzMlcfrY= +github.com/devfile/api/v2 v2.0.0-20210212161736-283b0c54946e h1:BZ2yGqLeup9dugsYQMWhhyb525TPQr5Krq+nzBj09X0= +github.com/devfile/api/v2 v2.0.0-20210212161736-283b0c54946e/go.mod h1:Cot4snybn3qhIh48oIFi9McocnIx7zY5fFbjfrIpPvg= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= @@ -298,6 +298,7 @@ github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uY github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/santhosh-tekuri/jsonschema v1.2.4/go.mod h1:TEAUOeZSmIxTTuHatJzrvARHiuO9LYd+cIxzgEHCQI4= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= diff --git a/internal/images/image.go b/internal/images/image.go index 591d8416b..244e3ccdf 100644 --- a/internal/images/image.go +++ b/internal/images/image.go @@ -25,7 +25,7 @@ import ( "os" "regexp" - devworkspace "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + devworkspace "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" logf "sigs.k8s.io/controller-runtime/pkg/log" ) diff --git a/main.go b/main.go index 2bddf24a0..eb687dfd2 100644 --- a/main.go +++ b/main.go @@ -23,8 +23,8 @@ import ( "github.com/devfile/devworkspace-operator/pkg/config" "github.com/devfile/devworkspace-operator/pkg/webhook" - workspacev1alpha1 "github.com/devfile/api/pkg/apis/workspaces/v1alpha1" - workspacev1alpha2 "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + workspacev1alpha1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha1" + workspacev1alpha2 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" controllerv1alpha1 "github.com/devfile/devworkspace-operator/apis/controller/v1alpha1" workspacecontroller "github.com/devfile/devworkspace-operator/controllers/workspace" diff --git a/pkg/config/cmd_terminal.go b/pkg/config/cmd_terminal.go index cf53e7648..688fee2b8 100644 --- a/pkg/config/cmd_terminal.go +++ b/pkg/config/cmd_terminal.go @@ -17,7 +17,7 @@ import ( "github.com/devfile/devworkspace-operator/internal/images" - devworkspace "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + devworkspace "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" "sigs.k8s.io/yaml" ) diff --git a/pkg/library/container/container.go b/pkg/library/container/container.go index a4618a944..74f79c6cf 100644 --- a/pkg/library/container/container.go +++ b/pkg/library/container/container.go @@ -24,7 +24,7 @@ package container import ( "fmt" - devworkspace "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + devworkspace "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" "github.com/devfile/devworkspace-operator/apis/controller/v1alpha1" "github.com/devfile/devworkspace-operator/pkg/library/flatten" "github.com/devfile/devworkspace-operator/pkg/library/lifecycle" diff --git a/pkg/library/container/container_test.go b/pkg/library/container/container_test.go index c628bb7b7..fcefdabab 100644 --- a/pkg/library/container/container_test.go +++ b/pkg/library/container/container_test.go @@ -21,7 +21,7 @@ import ( "github.com/google/go-cmp/cmp" corev1 "k8s.io/api/core/v1" - devworkspace "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + devworkspace "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" "github.com/devfile/devworkspace-operator/apis/controller/v1alpha1" "github.com/devfile/devworkspace-operator/pkg/config" "github.com/stretchr/testify/assert" diff --git a/pkg/library/container/conversion.go b/pkg/library/container/conversion.go index b1ea720b8..b977a1142 100644 --- a/pkg/library/container/conversion.go +++ b/pkg/library/container/conversion.go @@ -15,7 +15,7 @@ package container import ( "fmt" - "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" "github.com/devfile/devworkspace-operator/pkg/config" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" diff --git a/pkg/library/container/mountSources.go b/pkg/library/container/mountSources.go index c56f17105..6cefd6b6d 100644 --- a/pkg/library/container/mountSources.go +++ b/pkg/library/container/mountSources.go @@ -13,7 +13,7 @@ package container import ( - devworkspace "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + devworkspace "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" "github.com/devfile/devworkspace-operator/pkg/config" "github.com/devfile/devworkspace-operator/pkg/library/constants" corev1 "k8s.io/api/core/v1" diff --git a/pkg/library/flatten/common.go b/pkg/library/flatten/common.go index 066d0608d..f86e04206 100644 --- a/pkg/library/flatten/common.go +++ b/pkg/library/flatten/common.go @@ -12,7 +12,7 @@ package flatten -import devworkspace "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" +import devworkspace "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" func DevWorkspaceIsFlattened(devworkspace devworkspace.DevWorkspaceTemplateSpec) bool { if devworkspace.Parent != nil { diff --git a/pkg/library/flatten/flatten.go b/pkg/library/flatten/flatten.go index 28bbe2c52..c6323d118 100644 --- a/pkg/library/flatten/flatten.go +++ b/pkg/library/flatten/flatten.go @@ -20,8 +20,8 @@ import ( registry "github.com/devfile/devworkspace-operator/pkg/library/flatten/internal_registry" - devworkspace "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" - "github.com/devfile/api/pkg/utils/overriding" + devworkspace "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" + "github.com/devfile/api/v2/pkg/utils/overriding" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" @@ -34,20 +34,6 @@ type ResolverTools struct { InternalRegistry registry.InternalRegistry } -// TODO: temp workaround for panic in devfile/api when using plugin overrides. See: https://github.com/devfile/api/issues/296 -type tempOverrides struct { - devworkspace.PluginOverrides -} - -func (t tempOverrides) GetToplevelLists() devworkspace.TopLevelLists { - base := t.PluginOverrides.GetToplevelLists() - base["Projects"] = []devworkspace.Keyed{} - base["StarterProjects"] = []devworkspace.Keyed{} - return base -} - -// END WORKAROUND - // ResolveDevWorkspace takes a devworkspace and returns a "resolved" version of it -- i.e. one where all plugins and parents // are inlined as components. // TODO: @@ -106,9 +92,7 @@ func recursiveResolve(workspace devworkspace.DevWorkspaceTemplateSpec, tooling R } } - // TODO: Temp workaround for issue in devfile API: can't pass in nil for parentFlattenedContent - // see: https://github.com/devfile/api/issues/295 - resolvedContent, err := overriding.MergeDevWorkspaceTemplateSpec(resolvedContent, &devworkspace.DevWorkspaceTemplateSpecContent{}, pluginSpecContents...) + resolvedContent, err := overriding.MergeDevWorkspaceTemplateSpec(resolvedContent, nil, pluginSpecContents...) if err != nil { return nil, fmt.Errorf("failed to merge DevWorkspace parents/plugins: %w", err) } @@ -142,16 +126,9 @@ func resolvePluginComponent( } if plugin.Components != nil || plugin.Commands != nil { - // TODO: temp workaround for panic in devfile/api when using plugin overrides. See: https://github.com/devfile/api/issues/296 - //overrideSpec, err := overriding.OverrideDevWorkspaceTemplateSpec(&resolvedPlugin.DevWorkspaceTemplateSpecContent, devworkspace.PluginOverrides{ - // Components: plugin.Components, - // Commands: plugin.Commands, - //}) - overrideSpec, err := overriding.OverrideDevWorkspaceTemplateSpec(&resolvedPlugin.DevWorkspaceTemplateSpecContent, tempOverrides{ - PluginOverrides: devworkspace.PluginOverrides{ - Components: plugin.Components, - Commands: plugin.Commands, - }, + overrideSpec, err := overriding.OverrideDevWorkspaceTemplateSpec(&resolvedPlugin.DevWorkspaceTemplateSpecContent, devworkspace.PluginOverrides{ + Components: plugin.Components, + Commands: plugin.Commands, }) if err != nil { diff --git a/pkg/library/flatten/flatten_test.go b/pkg/library/flatten/flatten_test.go index 8a3c9d462..a5b98c299 100644 --- a/pkg/library/flatten/flatten_test.go +++ b/pkg/library/flatten/flatten_test.go @@ -33,7 +33,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/yaml" - devworkspace "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + devworkspace "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" ) var workspaceTemplateDiffOpts = cmp.Options{ diff --git a/pkg/library/flatten/helper.go b/pkg/library/flatten/helper.go index a3f8a4f6e..b26b89ca4 100644 --- a/pkg/library/flatten/helper.go +++ b/pkg/library/flatten/helper.go @@ -16,7 +16,7 @@ import ( "fmt" "reflect" - devworkspace "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + devworkspace "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" ) // resolutionContextTree is a recursive structure representing information about the devworkspace that is diff --git a/pkg/library/flatten/internal_registry/registry.go b/pkg/library/flatten/internal_registry/registry.go index 59ee492c3..241598ae8 100644 --- a/pkg/library/flatten/internal_registry/registry.go +++ b/pkg/library/flatten/internal_registry/registry.go @@ -18,7 +18,7 @@ import ( "os" "path/filepath" - devworkspace "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + devworkspace "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" "github.com/devfile/devworkspace-operator/internal/images" "sigs.k8s.io/yaml" diff --git a/pkg/library/flatten/web_terminal/web_terminal.go b/pkg/library/flatten/web_terminal/web_terminal.go index 4fa495007..649a79b24 100644 --- a/pkg/library/flatten/web_terminal/web_terminal.go +++ b/pkg/library/flatten/web_terminal/web_terminal.go @@ -16,7 +16,7 @@ import ( "fmt" "strings" - devworkspace "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + devworkspace "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" "github.com/devfile/devworkspace-operator/pkg/config" ) diff --git a/pkg/library/lifecycle/command.go b/pkg/library/lifecycle/command.go index 7ea2a9f8f..19033aaf4 100644 --- a/pkg/library/lifecycle/command.go +++ b/pkg/library/lifecycle/command.go @@ -15,7 +15,7 @@ package lifecycle import ( "fmt" - devworkspace "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + devworkspace "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" ) func getCommandType(command devworkspace.Command) (devworkspace.CommandType, error) { diff --git a/pkg/library/lifecycle/lifecycle.go b/pkg/library/lifecycle/lifecycle.go index 14d013c6a..bde81fc1c 100644 --- a/pkg/library/lifecycle/lifecycle.go +++ b/pkg/library/lifecycle/lifecycle.go @@ -15,7 +15,7 @@ package lifecycle import ( "fmt" - "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" ) // GetInitContainers partitions the components in a devfile's flattened spec into initContainer and non-initContainer lists diff --git a/pkg/library/lifecycle/lifecycle_test.go b/pkg/library/lifecycle/lifecycle_test.go index e060e11b7..c6d63d409 100644 --- a/pkg/library/lifecycle/lifecycle_test.go +++ b/pkg/library/lifecycle/lifecycle_test.go @@ -18,7 +18,7 @@ import ( "path/filepath" "testing" - "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" "github.com/stretchr/testify/assert" "sigs.k8s.io/yaml" ) diff --git a/pkg/library/shim/component.go b/pkg/library/shim/component.go index 6577f6fdf..15897e6bc 100644 --- a/pkg/library/shim/component.go +++ b/pkg/library/shim/component.go @@ -18,10 +18,10 @@ package shim import ( "fmt" - "github.com/devfile/api/pkg/attributes" + "github.com/devfile/api/v2/pkg/attributes" "github.com/devfile/devworkspace-operator/pkg/config" - devworkspace "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + devworkspace "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" "github.com/devfile/devworkspace-operator/apis/controller/v1alpha1" corev1 "k8s.io/api/core/v1" ) diff --git a/pkg/library/storage/commonStorage.go b/pkg/library/storage/commonStorage.go index b5dc33c93..0541f6068 100644 --- a/pkg/library/storage/commonStorage.go +++ b/pkg/library/storage/commonStorage.go @@ -29,7 +29,7 @@ import ( containerlib "github.com/devfile/devworkspace-operator/pkg/library/container" corev1 "k8s.io/api/core/v1" - devworkspace "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + devworkspace "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" "github.com/devfile/devworkspace-operator/apis/controller/v1alpha1" "github.com/devfile/devworkspace-operator/pkg/config" ) diff --git a/pkg/library/storage/commonStorage_test.go b/pkg/library/storage/commonStorage_test.go index 4707d4edb..6ac4a104f 100644 --- a/pkg/library/storage/commonStorage_test.go +++ b/pkg/library/storage/commonStorage_test.go @@ -21,7 +21,7 @@ import ( "github.com/devfile/devworkspace-operator/pkg/config" corev1 "k8s.io/api/core/v1" - devworkspace "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + devworkspace "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" "github.com/devfile/devworkspace-operator/apis/controller/v1alpha1" "github.com/stretchr/testify/assert" "sigs.k8s.io/yaml" diff --git a/pkg/timing/annotations.go b/pkg/timing/annotations.go index 43ecd4a66..75abd3d1c 100644 --- a/pkg/timing/annotations.go +++ b/pkg/timing/annotations.go @@ -15,7 +15,7 @@ package timing import ( "strconv" - devworkspace "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + devworkspace "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" ) const ( diff --git a/pkg/timing/timing.go b/pkg/timing/timing.go index ebdbf9c0c..148bb7114 100644 --- a/pkg/timing/timing.go +++ b/pkg/timing/timing.go @@ -17,7 +17,7 @@ import ( "strconv" "time" - devworkspace "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + devworkspace "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" "github.com/devfile/devworkspace-operator/pkg/config" ) diff --git a/samples/flattened_theia-nodejs.yaml b/samples/flattened_theia-nodejs.yaml index ebc247e23..9595d6e31 100644 --- a/samples/flattened_theia-nodejs.yaml +++ b/samples/flattened_theia-nodejs.yaml @@ -231,7 +231,7 @@ spec: component: nodejs commandLine: nodemon app.js workingDir: ${PROJECTS_ROOT}/project/app - - id: run-the-app-(debugging-enabled) + - id: run-the-app-debugging-enabled exec: component: nodejs commandLine: nodemon --inspect app.js diff --git a/samples/theia-next.yaml b/samples/theia-next.yaml deleted file mode 100644 index cd19e8d6b..000000000 --- a/samples/theia-next.yaml +++ /dev/null @@ -1,25 +0,0 @@ -kind: DevWorkspace -apiVersion: workspace.devfile.io/v1alpha2 -metadata: - name: theia -spec: - started: true - template: - projects: - - name: project - git: - remotes: - origin: "https://github.com/che-samples/web-nodejs-sample.git" - components: - - name: theia - plugin: - id: eclipse/che-theia/next - - name: terminal - plugin: - id: eclipse/che-machine-exec-plugin/nightly - commands: - - id: say-hello - exec: - component: plugin - commandLine: echo "Hello from $(pwd)" - workingDir: ${PROJECTS_ROOT}/project/app diff --git a/samples/theia-nodejs.yaml b/samples/theia-nodejs.yaml deleted file mode 100644 index f81b9ae54..000000000 --- a/samples/theia-nodejs.yaml +++ /dev/null @@ -1,73 +0,0 @@ -kind: DevWorkspace -apiVersion: workspace.devfile.io/v1alpha1 -metadata: - name: theia-nodejs -spec: - started: true - template: - projects: - - name: project - git: - remotes: - origin: "https://github.com/che-samples/web-nodejs-sample.git" - components: - - plugin: - id: eclipse/che-theia/latest - - plugin: - id: eclipse/che-machine-exec-plugin/latest - - plugin: - name: "typescript-plugin" - id: che-incubator/typescript/latest - components: - - container: - name: "" - memoryLimit: 512Mi - - container: - name: nodejs - image: quay.io/eclipse/che-nodejs10-ubi:nightly - memoryLimit: 512Mi - endpoints: - - name: nodejs - protocol: http - targetPort: 3000 - mountSources: true - commands: - - exec: - id: download-dependencies - component: nodejs - commandLine: npm install - workingDir: ${PROJECTS_ROOT}/project/app - - exec: - id: run-the-app - component: nodejs - commandLine: nodemon app.js - workingDir: ${PROJECTS_ROOT}/project/app - - exec: - id: run-the-app-(debugging-enabled) - component: nodejs - commandLine: nodemon --inspect app.js - workingDir: ${PROJECTS_ROOT}/project/app - - exec: - id: stop-the-app - component: nodejs - commandLine: >- - node_server_pids=$(pgrep -fx '.*nodemon (--inspect )?app.js' | tr "\\n" " ") && - echo "Stopping node server with PIDs: ${node_server_pids}" && - kill -15 ${node_server_pids} &>/dev/null && echo 'Done.' - - vscodeLaunch: - id: Attach-remote-debugger - inlined: | - { - "version": "0.2.0", - "configurations": [ - { - "type": "node", - "request": "attach", - "name": "Attach to Remote", - "address": "localhost", - "port": 9229, - "localRoot": "${workspaceFolder}", - "remoteRoot": "${workspaceFolder}" - } - ] - } diff --git a/test/e2e/pkg/client/client.go b/test/e2e/pkg/client/client.go index 8a21f5b66..36ae2120c 100644 --- a/test/e2e/pkg/client/client.go +++ b/test/e2e/pkg/client/client.go @@ -15,7 +15,7 @@ package client import ( "fmt" - workspacev1v1alpha2 "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + workspacev1v1alpha2 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" "k8s.io/apimachinery/pkg/runtime" utilruntime "k8s.io/apimachinery/pkg/util/runtime" clientgoscheme "k8s.io/client-go/kubernetes/scheme" diff --git a/test/e2e/pkg/client/devws.go b/test/e2e/pkg/client/devws.go index f358dcab9..599d148f3 100644 --- a/test/e2e/pkg/client/devws.go +++ b/test/e2e/pkg/client/devws.go @@ -18,7 +18,7 @@ import ( "log" "time" - workspacev1alpha2 "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + workspacev1alpha2 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" "k8s.io/apimachinery/pkg/types" ) diff --git a/test/e2e/pkg/tests/devworkspaces_tests.go b/test/e2e/pkg/tests/devworkspaces_tests.go index 1bc3f2d17..fb7309b19 100644 --- a/test/e2e/pkg/tests/devworkspaces_tests.go +++ b/test/e2e/pkg/tests/devworkspaces_tests.go @@ -16,7 +16,7 @@ import ( "fmt" "strings" - workspacesv1alpha2 "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + workspacesv1alpha2 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" "github.com/devfile/devworkspace-operator/test/e2e/pkg/config" "github.com/onsi/ginkgo" "github.com/onsi/gomega" diff --git a/webhook/main.go b/webhook/main.go index ba4ca8cc5..d474cccc3 100644 --- a/webhook/main.go +++ b/webhook/main.go @@ -20,8 +20,8 @@ import ( "syscall" - workspacev1alpha1 "github.com/devfile/api/pkg/apis/workspaces/v1alpha1" - workspacev1alpha2 "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + workspacev1alpha1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha1" + workspacev1alpha2 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" "github.com/devfile/devworkspace-operator/internal/cluster" "github.com/devfile/devworkspace-operator/pkg/config" "github.com/devfile/devworkspace-operator/webhook/server" diff --git a/webhook/workspace/handler/immutable.go b/webhook/workspace/handler/immutable.go index 883abe8f0..9dbcc7e4f 100644 --- a/webhook/workspace/handler/immutable.go +++ b/webhook/workspace/handler/immutable.go @@ -16,8 +16,8 @@ import ( "fmt" "reflect" - devworkspacev1alpha1 "github.com/devfile/api/pkg/apis/workspaces/v1alpha1" - devworkspacev1alpha2 "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + devworkspacev1alpha1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha1" + devworkspacev1alpha2 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" "github.com/devfile/devworkspace-operator/pkg/config" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" diff --git a/webhook/workspace/handler/workspace.go b/webhook/workspace/handler/workspace.go index 1f3583cf8..d8514b23b 100644 --- a/webhook/workspace/handler/workspace.go +++ b/webhook/workspace/handler/workspace.go @@ -17,8 +17,8 @@ import ( maputils "github.com/devfile/devworkspace-operator/internal/map" - devworkspacev1alpha1 "github.com/devfile/api/pkg/apis/workspaces/v1alpha1" - devworkspacev1alpha2 "github.com/devfile/api/pkg/apis/workspaces/v1alpha2" + devworkspacev1alpha1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha1" + devworkspacev1alpha2 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" "github.com/devfile/devworkspace-operator/pkg/config" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" ) diff --git a/webhook/workspace/mutating_cfg.go b/webhook/workspace/mutating_cfg.go index 85c0ae91e..9ef1cee75 100644 --- a/webhook/workspace/mutating_cfg.go +++ b/webhook/workspace/mutating_cfg.go @@ -30,6 +30,7 @@ func BuildMutateWebhookCfg(namespace string) *v1beta1.MutatingWebhookConfigurati mutateWebhookPath := mutateWebhookPath labelExistsOp := metav1.LabelSelectorOpExists equivalentMatchPolicy := v1beta1.Equivalent + sideEffectsNone := v1beta1.SideEffectClassNone webhookClientConfig := v1beta1.WebhookClientConfig{ Service: &v1beta1.ServiceReference{ Name: server.WebhookServerServiceName, @@ -43,6 +44,7 @@ func BuildMutateWebhookCfg(namespace string) *v1beta1.MutatingWebhookConfigurati Name: "mutate.devworkspace-controller.svc", FailurePolicy: &mutateWebhookFailurePolicy, ClientConfig: webhookClientConfig, + SideEffects: &sideEffectsNone, Rules: []v1beta1.RuleWithOperations{ { Operations: []v1beta1.OperationType{v1beta1.Create, v1beta1.Update}, diff --git a/webhook/workspace/validating_cfg.go b/webhook/workspace/validating_cfg.go index 7528b9bfc..55c34951a 100644 --- a/webhook/workspace/validating_cfg.go +++ b/webhook/workspace/validating_cfg.go @@ -26,6 +26,7 @@ const ( func buildValidatingWebhookCfg(namespace string) *v1beta1.ValidatingWebhookConfiguration { validateWebhookFailurePolicy := validateWebhookFailurePolicy validateWebhookPath := validateWebhookPath + sideEffectsNone := v1beta1.SideEffectClassNone return &v1beta1.ValidatingWebhookConfiguration{ ObjectMeta: metav1.ObjectMeta{ Name: ValidateWebhookCfgName, @@ -35,6 +36,7 @@ func buildValidatingWebhookCfg(namespace string) *v1beta1.ValidatingWebhookConfi { Name: "validate-exec.devworkspace-controller.svc", FailurePolicy: &validateWebhookFailurePolicy, + SideEffects: &sideEffectsNone, ClientConfig: v1beta1.WebhookClientConfig{ Service: &v1beta1.ServiceReference{ Name: server.WebhookServerServiceName,