Skip to content

Commit bfe352f

Browse files
committed
Finalize workspace -> devworkspace renaming for v1alpha2
1 parent 0fe274a commit bfe352f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1238
-1230
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ From these Go sources, several files are generated:
1414
- A Kubernetes Custom Resource Definition(CRD) with an embedded OpenApi schema,
1515
- json schemas (in the [schemas](schemas) folder) generated from the above CRD, to specify the syntax of:
1616
- the DevWorkspace CRD itself;
17-
- the DevWorkspaceTemplate CRD (a workspace content, without runtime information);
17+
- the DevWorkspaceTemplate CRD (a devworkspace content, without runtime information);
1818
- the Devfile 2.0.0 format, which is generated from the `DevWorkspace` API.
1919

2020
Generated files are created by a build script (see section [How to build](#how-to-build)).
@@ -45,7 +45,7 @@ In order to test existing or new Devfile 2.0 or DevWorkspace sample files in a s
4545

4646
[![Contribute](https://www.eclipse.org/che/contribute.svg)](https://che.openshift.io/f/?url=https://github.com/devfile/api)
4747

48-
As soon as the workspace is opened, you should be able to:
48+
As soon as the devworkspace is opened, you should be able to:
4949
- open the `yaml` files in the following folders:
5050
- `samples/`
5151
- `devfile-support/samples`

crds/workspace.devfile.io_devworkspaces.v1beta1.yaml

Lines changed: 102 additions & 99 deletions
Large diffs are not rendered by default.

crds/workspace.devfile.io_devworkspaces.yaml

Lines changed: 102 additions & 99 deletions
Large diffs are not rendered by default.

crds/workspace.devfile.io_devworkspacetemplates.v1beta1.yaml

Lines changed: 97 additions & 96 deletions
Large diffs are not rendered by default.

crds/workspace.devfile.io_devworkspacetemplates.yaml

Lines changed: 97 additions & 96 deletions
Large diffs are not rendered by default.

pkg/apis/workspaces/v1alpha1/conversion.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import (
66

77
func convertDevWorkspaceTo_v1alpha2(src *DevWorkspace, dest *v1alpha2.DevWorkspace) error {
88
dest.ObjectMeta = src.ObjectMeta
9-
dest.Status.WorkspaceId = src.Status.WorkspaceId
9+
dest.Status.DevWorkspaceId = src.Status.WorkspaceId
1010
dest.Status.IdeUrl = src.Status.IdeUrl
11-
dest.Status.Phase = v1alpha2.WorkspacePhase(src.Status.Phase)
11+
dest.Status.Phase = v1alpha2.DevWorkspacePhase(src.Status.Phase)
1212
dest.Status.Message = src.Status.Message
1313
convertConditionsTo_v1alpha2(src, dest)
1414
dest.Spec.RoutingClass = src.Spec.RoutingClass
@@ -19,7 +19,7 @@ func convertDevWorkspaceTo_v1alpha2(src *DevWorkspace, dest *v1alpha2.DevWorkspa
1919

2020
func convertDevWorkspaceFrom_v1alpha2(src *v1alpha2.DevWorkspace, dest *DevWorkspace) error {
2121
dest.ObjectMeta = src.ObjectMeta
22-
dest.Status.WorkspaceId = src.Status.WorkspaceId
22+
dest.Status.WorkspaceId = src.Status.DevWorkspaceId
2323
dest.Status.IdeUrl = src.Status.IdeUrl
2424
dest.Status.Phase = WorkspacePhase(src.Status.Phase)
2525
dest.Status.Message = src.Status.Message
@@ -142,12 +142,12 @@ func convertDevWorkspaceTemplateSpecFrom_v1alpha2(src *v1alpha2.DevWorkspaceTemp
142142

143143
func convertConditionsTo_v1alpha2(src *DevWorkspace, dest *v1alpha2.DevWorkspace) {
144144
for _, srcCondition := range src.Status.Conditions {
145-
dstCondition := v1alpha2.WorkspaceCondition{}
145+
dstCondition := v1alpha2.DevWorkspaceCondition{}
146146
dstCondition.Status = srcCondition.Status
147147
dstCondition.LastTransitionTime = srcCondition.LastTransitionTime
148148
dstCondition.Message = srcCondition.Message
149149
dstCondition.Reason = srcCondition.Reason
150-
dstCondition.Type = v1alpha2.WorkspaceConditionType(srcCondition.Type)
150+
dstCondition.Type = v1alpha2.DevWorkspaceConditionType(srcCondition.Type)
151151
dest.Status.Conditions = append(dest.Status.Conditions, dstCondition)
152152
}
153153
}

pkg/apis/workspaces/v1alpha1/events_conversion.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ import (
66

77
func convertEventsTo_v1alpha2(src *Events, dest *v1alpha2.Events) error {
88
if src != nil {
9-
dest.WorkspaceEvents = v1alpha2.WorkspaceEvents(src.WorkspaceEvents)
9+
dest.DevWorkspaceEvents = v1alpha2.DevWorkspaceEvents(src.WorkspaceEvents)
1010
}
1111
return nil
1212
}
1313

1414
func convertEventsFrom_v1alpha2(src *v1alpha2.Events, dest *Events) error {
1515
if src != nil {
16-
dest.WorkspaceEvents = WorkspaceEvents(src.WorkspaceEvents)
16+
dest.WorkspaceEvents = WorkspaceEvents(src.DevWorkspaceEvents)
1717
}
1818
return nil
1919
}

pkg/apis/workspaces/v1alpha2/WorkspacePodContribution.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
corev1 "k8s.io/api/core/v1"
55
)
66

7-
type WorkspacePodContributions struct {
7+
type DevWorkspacePodContributions struct {
88
// +optional
99
// +patchMergeKey=name
1010
// +patchStrategy=merge,retainKeys
@@ -15,15 +15,15 @@ type WorkspacePodContributions struct {
1515
// +patchMergeKey=name
1616
// +patchStrategy=merge
1717
Containers []corev1.Container `json:"containers" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=containers"`
18-
// ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by the workspace Pod.
18+
// ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by the devworkspace Pod.
1919
// If specified, these secrets will be passed to individual puller implementations for them to use. For example,
2020
// in the case of docker, only DockerConfig type secrets are honored.
2121
// More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod
2222
// +optional
2323
// +patchMergeKey=name
2424
// +patchStrategy=merge
2525
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,15,rep,name=imagePullSecrets"`
26-
// List of workspace-wide environment variables to set in all containers of the workspace POD.
26+
// List of devworkspace-wide environment variables to set in all containers of the devworkspace POD.
2727
// +optional
2828
// +patchMergeKey=name
2929
// +patchStrategy=merge

pkg/apis/workspaces/v1alpha2/commands.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ type Command struct {
6767

6868
// +union
6969
type CommandUnion struct {
70-
// Type of workspace command
70+
// Type of devworkspace command
7171
// +unionDiscriminator
7272
// +optional
7373
CommandType CommandType `json:"commandType,omitempty"`
@@ -77,15 +77,15 @@ type CommandUnion struct {
7777
Exec *ExecCommand `json:"exec,omitempty"`
7878

7979
// Command that consists in applying a given component definition,
80-
// typically bound to a workspace event.
80+
// typically bound to a devworkspace event.
8181
//
8282
// For example, when an `apply` command is bound to a `preStart` event,
8383
// and references a `container` component, it will start the container as a
84-
// K8S initContainer in the workspace POD, unless the component has its
84+
// K8S initContainer in the devworkspace POD, unless the component has its
8585
// `dedicatedPod` field set to `true`.
8686
//
8787
// When no `apply` command exist for a given component,
88-
// it is assumed the component will be applied at workspace start
88+
// it is assumed the component will be applied at devworkspace start
8989
// by default.
9090
// +optional
9191
Apply *ApplyCommand `json:"apply,omitempty"`

pkg/apis/workspaces/v1alpha2/components.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ const (
1919
CustomComponentType ComponentType = "Custom"
2020
)
2121

22-
// Workspace component: Anything that will bring additional features / tooling / behaviour / context
23-
// to the workspace, in order to make working in it easier.
22+
// DevWorkspace component: Anything that will bring additional features / tooling / behaviour / context
23+
// to the devworkspace, in order to make working in it easier.
2424
type BaseComponent struct {
2525
}
2626

@@ -46,18 +46,18 @@ type ComponentUnion struct {
4646
// +optional
4747
ComponentType ComponentType `json:"componentType,omitempty"`
4848

49-
// Allows adding and configuring workspace-related containers
49+
// Allows adding and configuring devworkspace-related containers
5050
// +optional
5151
Container *ContainerComponent `json:"container,omitempty"`
5252

53-
// Allows importing into the workspace the Kubernetes resources
53+
// Allows importing into the devworkspace the Kubernetes resources
5454
// defined in a given manifest. For example this allows reusing the Kubernetes
5555
// definitions used to deploy some runtime components in production.
5656
//
5757
// +optional
5858
Kubernetes *KubernetesComponent `json:"kubernetes,omitempty"`
5959

60-
// Allows importing into the workspace the OpenShift resources
60+
// Allows importing into the devworkspace the OpenShift resources
6161
// defined in a given manifest. For example this allows reusing the OpenShift
6262
// definitions used to deploy some runtime components in production.
6363
//

0 commit comments

Comments
 (0)