Switch to VS Code as the default Eclips Che editor (#1551)

pull/1553/head
Mario Loriedo 2022-11-01 10:34:14 +01:00 committed by GitHub
parent 6057486aa0
commit fd6e188c7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 82 additions and 69 deletions

View File

@ -29,11 +29,13 @@ else
endif
# Detect image tool
ifeq ($(IMAGE_TOOL),)
ifneq (,$(shell which docker))
IMAGE_TOOL := docker
else
IMAGE_TOOL := podman
endif
endif
ifndef VERBOSE
MAKEFLAGS += --silent

View File

@ -19,7 +19,7 @@ Che operator is implemented using [operator framework](https://github.com/operat
## CheCluster custom resource
Che operator deploys Eclipse Che using configuration stored in the Kubernetes custom resource(CR). CR object structure defined in the code using `api/v2/checluster_types.go` file. Field name defined using the serialization tag `json`. Che operator default CR sample is stored in the `config/samples/org_v2_checluster.yaml`. This file should be directly modified if you want to apply new fields with default values, or in case of changing default values for existing fields. Also, you can apply in the field comments Openshift UI annotations: to display some interactive information about these fields on the Openshift UI.
Che operator deploys Eclipse Che using configuration stored in the Kubernetes custom resource(CR). CR object structure defined in the code using `api/v2/checluster_types.go` file. Field name defined using the serialization tag `json`. Che operator default CR sample is stored in the `config/samples/org_v2_checluster.yaml`. These files should be directly modified if you want to apply new fields with default values, or in case of changing default values for existing fields. Also, you can apply in the field comments Openshift UI annotations: to display some interactive information about these fields on the Openshift UI.
For example:
```go

View File

@ -368,7 +368,7 @@ type CheClusterSpecServer struct {
// The plugin ID must have `publisher/plugin/version`.
// The URI must start from `http`.
// +optional
// +kubebuilder:default:=eclipse/che-theia/latest
// +kubebuilder:default:=che-incubator/che-code/insiders
WorkspaceDefaultEditor string `json:"workspaceDefaultEditor,omitempty"`
// Default components applied to DevWorkspaces.
// These default components are meant to be used when a Devfile does not contain any components.

View File

@ -37,7 +37,7 @@ type CheClusterSpec struct {
// +optional
// +operator-sdk:csv:customresourcedefinitions:type=spec,order=1
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Development environments"
// +kubebuilder:default:={disableContainerBuildCapabilities: true, defaultComponents: {{name: universal-developer-image, container: {image: "quay.io/devfile/universal-developer-image:ubi8-38da5c2"}}}, defaultEditor: eclipse/che-theia/latest, storage: {pvcStrategy: per-user}, defaultNamespace: {template: <username>-che, autoProvision: true}, secondsOfInactivityBeforeIdling:1800, secondsOfRunBeforeIdling:-1}
// +kubebuilder:default:={disableContainerBuildCapabilities: true, defaultComponents: {{name: universal-developer-image, container: {image: "quay.io/devfile/universal-developer-image:ubi8-38da5c2"}}}, defaultEditor: che-incubator/che-code/insiders, storage: {pvcStrategy: per-user}, defaultNamespace: {template: <username>-che, autoProvision: true}, secondsOfInactivityBeforeIdling:1800, secondsOfRunBeforeIdling:-1}
DevEnvironments CheClusterDevEnvironments `json:"devEnvironments"`
// Che components configuration.
// +optional
@ -90,7 +90,7 @@ type CheClusterDevEnvironments struct {
// The plugin ID must have `publisher/plugin/version` format.
// The URI must start from `http://` or `https://`.
// +optional
// +kubebuilder:default:=eclipse/che-theia/latest
// +kubebuilder:default:=che-incubator/che-code/insiders
DefaultEditor string `json:"defaultEditor,omitempty"`
// Default components applied to DevWorkspaces.
// These default components are meant to be used when a Devfile, that does not contain any components.

View File

@ -77,7 +77,7 @@ metadata:
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
repository: https://github.com/eclipse-che/che-operator
support: Eclipse Foundation
name: eclipse-che-preview-openshift.v7.56.0-714.next
name: eclipse-che-preview-openshift.v7.56.0-716.next
namespace: placeholder
spec:
apiservicedefinitions: {}
@ -1240,7 +1240,7 @@ spec:
maturity: stable
provider:
name: Eclipse Foundation
version: 7.56.0-714.next
version: 7.56.0-716.next
webhookdefinitions:
- admissionReviewVersions:
- v1

View File

@ -3784,7 +3784,7 @@ spec:
type: object
type: array
workspaceDefaultEditor:
default: eclipse/che-theia/latest
default: che-incubator/che-code/insiders
description: The default editor to workspace create with. It
could be a plugin ID or a URI. The plugin ID must have `publisher/plugin/version`.
The URI must start from `http`.
@ -5403,7 +5403,7 @@ spec:
- container:
image: quay.io/devfile/universal-developer-image:ubi8-38da5c2
name: universal-developer-image
defaultEditor: eclipse/che-theia/latest
defaultEditor: che-incubator/che-code/insiders
defaultNamespace:
autoProvision: true
template: <username>-che
@ -6929,7 +6929,7 @@ spec:
type: object
type: array
defaultEditor:
default: eclipse/che-theia/latest
default: che-incubator/che-code/insiders
description: The default editor to workspace create with. It
could be a plugin ID or a URI. The plugin ID must have `publisher/plugin/version`
format. The URI must start from `http://` or `https://`.

View File

@ -3670,7 +3670,7 @@ spec:
type: object
type: array
workspaceDefaultEditor:
default: eclipse/che-theia/latest
default: che-incubator/che-code/insiders
description: The default editor to workspace create with. It could
be a plugin ID or a URI. The plugin ID must have `publisher/plugin/version`.
The URI must start from `http`.
@ -5264,7 +5264,7 @@ spec:
- container:
image: quay.io/devfile/universal-developer-image:ubi8-38da5c2
name: universal-developer-image
defaultEditor: eclipse/che-theia/latest
defaultEditor: che-incubator/che-code/insiders
defaultNamespace:
autoProvision: true
template: <username>-che
@ -6740,7 +6740,7 @@ spec:
type: object
type: array
defaultEditor:
default: eclipse/che-theia/latest
default: che-incubator/che-code/insiders
description: The default editor to workspace create with. It could
be a plugin ID or a URI. The plugin ID must have `publisher/plugin/version`
format. The URI must start from `http://` or `https://`.

View File

@ -2429,7 +2429,7 @@ spec:
type: object
type: array
workspaceDefaultEditor:
default: eclipse/che-theia/latest
default: che-incubator/che-code/insiders
description: The default editor to workspace create with. It could be a plugin ID or a URI. The plugin ID must have `publisher/plugin/version`. The URI must start from `http`.
type: string
workspaceNamespaceDefault:
@ -3605,7 +3605,7 @@ spec:
- container:
image: quay.io/devfile/universal-developer-image:ubi8-38da5c2
name: universal-developer-image
defaultEditor: eclipse/che-theia/latest
defaultEditor: che-incubator/che-code/insiders
defaultNamespace:
autoProvision: true
template: <username>-che
@ -4548,7 +4548,7 @@ spec:
type: object
type: array
defaultEditor:
default: eclipse/che-theia/latest
default: che-incubator/che-code/insiders
description: The default editor to workspace create with. It could be a plugin ID or a URI. The plugin ID must have `publisher/plugin/version` format. The URI must start from `http://` or `https://`.
type: string
defaultNamespace:

View File

@ -2424,7 +2424,7 @@ spec:
type: object
type: array
workspaceDefaultEditor:
default: eclipse/che-theia/latest
default: che-incubator/che-code/insiders
description: The default editor to workspace create with. It could be a plugin ID or a URI. The plugin ID must have `publisher/plugin/version`. The URI must start from `http`.
type: string
workspaceNamespaceDefault:
@ -3600,7 +3600,7 @@ spec:
- container:
image: quay.io/devfile/universal-developer-image:ubi8-38da5c2
name: universal-developer-image
defaultEditor: eclipse/che-theia/latest
defaultEditor: che-incubator/che-code/insiders
defaultNamespace:
autoProvision: true
template: <username>-che
@ -4543,7 +4543,7 @@ spec:
type: object
type: array
defaultEditor:
default: eclipse/che-theia/latest
default: che-incubator/che-code/insiders
description: The default editor to workspace create with. It could be a plugin ID or a URI. The plugin ID must have `publisher/plugin/version` format. The URI must start from `http://` or `https://`.
type: string
defaultNamespace:

View File

@ -2429,7 +2429,7 @@ spec:
type: object
type: array
workspaceDefaultEditor:
default: eclipse/che-theia/latest
default: che-incubator/che-code/insiders
description: The default editor to workspace create with. It could be a plugin ID or a URI. The plugin ID must have `publisher/plugin/version`. The URI must start from `http`.
type: string
workspaceNamespaceDefault:
@ -3605,7 +3605,7 @@ spec:
- container:
image: quay.io/devfile/universal-developer-image:ubi8-38da5c2
name: universal-developer-image
defaultEditor: eclipse/che-theia/latest
defaultEditor: che-incubator/che-code/insiders
defaultNamespace:
autoProvision: true
template: <username>-che
@ -4548,7 +4548,7 @@ spec:
type: object
type: array
defaultEditor:
default: eclipse/che-theia/latest
default: che-incubator/che-code/insiders
description: The default editor to workspace create with. It could be a plugin ID or a URI. The plugin ID must have `publisher/plugin/version` format. The URI must start from `http://` or `https://`.
type: string
defaultNamespace:

View File

@ -2424,7 +2424,7 @@ spec:
type: object
type: array
workspaceDefaultEditor:
default: eclipse/che-theia/latest
default: che-incubator/che-code/insiders
description: The default editor to workspace create with. It could be a plugin ID or a URI. The plugin ID must have `publisher/plugin/version`. The URI must start from `http`.
type: string
workspaceNamespaceDefault:
@ -3600,7 +3600,7 @@ spec:
- container:
image: quay.io/devfile/universal-developer-image:ubi8-38da5c2
name: universal-developer-image
defaultEditor: eclipse/che-theia/latest
defaultEditor: che-incubator/che-code/insiders
defaultNamespace:
autoProvision: true
template: <username>-che
@ -4543,7 +4543,7 @@ spec:
type: object
type: array
defaultEditor:
default: eclipse/che-theia/latest
default: che-incubator/che-code/insiders
description: The default editor to workspace create with. It could be a plugin ID or a URI. The plugin ID must have `publisher/plugin/version` format. The URI must start from `http://` or `https://`.
type: string
defaultNamespace:

View File

@ -9,49 +9,60 @@
# Contributors:
# Red Hat, Inc. - initial API and implementation
#
schemaVersion: 2.1.0
attributes:
controller.devfile.io/storage-type: ephemeral
metadata:
name: che-operator
projects:
- name: che-operator
source:
location: 'https://github.com/eclipse-che/che-operator.git'
type: git
branch: main
clonePath: src/github.com/eclipse-che/che-operator
components:
- id: golang/go/latest
memoryLimit: 1G
preferences:
go.lintFlags: '--fast'
go.useLanguageServer: true
go.lintTool: golangci-lint
type: chePlugin
alias: ms-vscode.go
env:
- value: 'on'
name: GO111MODULE
- mountSources: true
memoryLimit: 1G
type: dockerimage
alias: dev
image: 'quay.io/eclipse/che-golang-1.14:next'
env:
- value: /go
name: GOPATH
- value: /tmp/.cache
name: GOCACHE
apiVersion: 1.0.0
- name: tooling-container
container:
image: quay.io/devfile/universal-developer-image:ubi8-latest
memoryRequest: 2Gi
memoryLimit: 16Gi
cpuRequest: 2000m
cpuLimit: 6000m
env:
- name: GO111MODULE
value: 'on'
- name: GOPATH
value: /home/user/go
- name: GOCACHE
value: /tmp/.cache
commands:
- name: Compile
actions:
- workdir: /projects/src/github.com/eclipse-che/che-operator
type: exec
command: make compile
component: dev
- name: Format
actions:
- workdir: /projects/src/github.com/eclipse-che/che-operator
type: exec
command: 'make fmt'
component: dev
- id: go-build
exec:
label: 1. Build Eclipse Che Operator binary
component: tooling-container
commandLine: make build
- id: go-run
exec:
label: 2. Run Eclipse Che Operator
component: tooling-container
commandLine: make run
- id: go-debug
exec:
label: 3. Run and debug Eclipse Che Operator
component: tooling-container
commandLine: make debug
- id: bundle
exec:
label: 4. Generate OLM bundle for next channel
component: tooling-container
commandLine: CHANNEL=next make bundle
- id: docker-build-push
exec:
label: 5. Build and push Eclipse Che Operator container image
component: tooling-container
commandLine: >
read -p "ENTER the image registry (for example \"quay.io\"): " IMAGE_REGISTRY_HOST &&
read -p "ENTER the image organization (for example \"eclipse\"): " IMAGE_REGISTRY_USER_NAME &&
IMAGE_TOOL=podman make docker-build docker-push IMG="${IMAGE_REGISTRY_HOST}/${IMAGE_REGISTRY_USER_NAME}/che-operator:next"
- id: build-catalog
exec:
label: 6. Build and push Eclipse Che Operator custom catalog and bundle images.
component: tooling-container
commandLine: >
read -p "ENTER the image registry (for example \"quay.io\"): " IMAGE_REGISTRY_HOST &&
read -p "ENTER the image organization (for example \"eclipse\"): " IMAGE_REGISTRY_USER_NAME &&
build/scripts/olm/buildCatalog.sh -c next -i ${IMAGE_REGISTRY_HOST}/${IMAGE_REGISTRY_USER_NAME}/eclipse-che-openshift-opm-catalog:next --image-tool podman

View File

@ -2424,7 +2424,7 @@ spec:
type: object
type: array
workspaceDefaultEditor:
default: eclipse/che-theia/latest
default: che-incubator/che-code/insiders
description: The default editor to workspace create with. It could be a plugin ID or a URI. The plugin ID must have `publisher/plugin/version`. The URI must start from `http`.
type: string
workspaceNamespaceDefault:
@ -3600,7 +3600,7 @@ spec:
- container:
image: quay.io/devfile/universal-developer-image:ubi8-38da5c2
name: universal-developer-image
defaultEditor: eclipse/che-theia/latest
defaultEditor: che-incubator/che-code/insiders
defaultNamespace:
autoProvision: true
template: <username>-che
@ -4543,7 +4543,7 @@ spec:
type: object
type: array
defaultEditor:
default: eclipse/che-theia/latest
default: che-incubator/che-code/insiders
description: The default editor to workspace create with. It could be a plugin ID or a URI. The plugin ID must have `publisher/plugin/version` format. The URI must start from `http://` or `https://`.
type: string
defaultNamespace: