From 8f4f87ebc029a541454e624df709d553a2729489 Mon Sep 17 00:00:00 2001 From: jingfu wang Date: Wed, 2 Dec 2020 17:25:31 -0500 Subject: [PATCH 1/3] feat: merge meta to devfile Signed-off-by: jingfu wang --- pkg/devfile/header.go | 20 +++++++++++++++++ schemas/latest/devfile.json | 23 +++++++++++++++++++ schemas/latest/ide-targeted/devfile.json | 28 ++++++++++++++++++++++++ 3 files changed, 71 insertions(+) diff --git a/pkg/devfile/header.go b/pkg/devfile/header.go index d4fb6a1ee..108062a8c 100644 --- a/pkg/devfile/header.go +++ b/pkg/devfile/header.go @@ -30,4 +30,24 @@ type DevfileMetadata struct { // Map of implementation-dependant free-form YAML attributes. // +optional Attributes attributes.Attributes `json:"attributes,omitempty"` + + // Optional devfile display name + // +optional + DisplayName string `json:"displayName,omitempty"` + + // Optional devfile description + // +optional + Description string `json:"description,omitempty"` + + // Optional devfile tags + // +optional + Tags []string `json:"tags,omitempty"` + + // Optional devfile icon + // +optional + Icon string `json:"icon,omitempty"` + + // Optional devfile global memory limit + // +optional + GlobalMemoryLimit string `json:"globalMemoryLimit,omitempty"` } diff --git a/schemas/latest/devfile.json b/schemas/latest/devfile.json index 0b477355c..ecfc09439 100644 --- a/schemas/latest/devfile.json +++ b/schemas/latest/devfile.json @@ -1427,10 +1427,33 @@ "type": "object", "additionalProperties": true }, + "description": { + "description": "Optional devfile description", + "type": "string" + }, + "displayName": { + "description": "Optional devfile display name", + "type": "string" + }, + "globalMemoryLimit": { + "description": "Optional devfile global memory limit", + "type": "string" + }, + "icon": { + "description": "Optional devfile icon", + "type": "string" + }, "name": { "description": "Optional devfile name", "type": "string" }, + "tags": { + "description": "Optional devfile tags", + "type": "array", + "items": { + "type": "string" + } + }, "version": { "description": "Optional semver-compatible version", "type": "string", diff --git a/schemas/latest/ide-targeted/devfile.json b/schemas/latest/ide-targeted/devfile.json index 2a5291c75..b0f54016c 100644 --- a/schemas/latest/ide-targeted/devfile.json +++ b/schemas/latest/ide-targeted/devfile.json @@ -1580,11 +1580,39 @@ "additionalProperties": true, "markdownDescription": "Map of implementation-dependant free-form YAML attributes." }, + "description": { + "description": "Optional devfile description", + "type": "string", + "markdownDescription": "Optional devfile description" + }, + "displayName": { + "description": "Optional devfile display name", + "type": "string", + "markdownDescription": "Optional devfile display name" + }, + "globalMemoryLimit": { + "description": "Optional devfile global memory limit", + "type": "string", + "markdownDescription": "Optional devfile global memory limit" + }, + "icon": { + "description": "Optional devfile icon", + "type": "string", + "markdownDescription": "Optional devfile icon" + }, "name": { "description": "Optional devfile name", "type": "string", "markdownDescription": "Optional devfile name" }, + "tags": { + "description": "Optional devfile tags", + "type": "array", + "items": { + "type": "string" + }, + "markdownDescription": "Optional devfile tags" + }, "version": { "description": "Optional semver-compatible version", "type": "string", From 51e7d23d96bca3664ad299bafaeef57be008454e Mon Sep 17 00:00:00 2001 From: jingfu wang Date: Wed, 2 Dec 2020 17:41:28 -0500 Subject: [PATCH 2/3] test: update crds Signed-off-by: jingfu wang --- crds/workspace.devfile.io_devworkspaces.v1beta1.yaml | 2 ++ crds/workspace.devfile.io_devworkspaces.yaml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/crds/workspace.devfile.io_devworkspaces.v1beta1.yaml b/crds/workspace.devfile.io_devworkspaces.v1beta1.yaml index 10a56eae3..f8ec401b3 100644 --- a/crds/workspace.devfile.io_devworkspaces.v1beta1.yaml +++ b/crds/workspace.devfile.io_devworkspaces.v1beta1.yaml @@ -24,6 +24,8 @@ spec: kind: DevWorkspace listKind: DevWorkspaceList plural: devworkspaces + shortNames: + - dw singular: devworkspace preserveUnknownFields: false scope: Namespaced diff --git a/crds/workspace.devfile.io_devworkspaces.yaml b/crds/workspace.devfile.io_devworkspaces.yaml index 993f4b17f..559c8e009 100644 --- a/crds/workspace.devfile.io_devworkspaces.yaml +++ b/crds/workspace.devfile.io_devworkspaces.yaml @@ -11,6 +11,8 @@ spec: kind: DevWorkspace listKind: DevWorkspaceList plural: devworkspaces + shortNames: + - dw singular: devworkspace scope: Namespaced versions: From 2e57c675243b3fc3bb297e6615ebaf4937f35bf8 Mon Sep 17 00:00:00 2001 From: jingfu wang Date: Wed, 2 Dec 2020 23:57:55 -0500 Subject: [PATCH 3/3] fix: update crds Signed-off-by: jingfu wang --- crds/workspace.devfile.io_devworkspaces.v1beta1.yaml | 2 -- crds/workspace.devfile.io_devworkspaces.yaml | 2 -- 2 files changed, 4 deletions(-) diff --git a/crds/workspace.devfile.io_devworkspaces.v1beta1.yaml b/crds/workspace.devfile.io_devworkspaces.v1beta1.yaml index f8ec401b3..10a56eae3 100644 --- a/crds/workspace.devfile.io_devworkspaces.v1beta1.yaml +++ b/crds/workspace.devfile.io_devworkspaces.v1beta1.yaml @@ -24,8 +24,6 @@ spec: kind: DevWorkspace listKind: DevWorkspaceList plural: devworkspaces - shortNames: - - dw singular: devworkspace preserveUnknownFields: false scope: Namespaced diff --git a/crds/workspace.devfile.io_devworkspaces.yaml b/crds/workspace.devfile.io_devworkspaces.yaml index 559c8e009..993f4b17f 100644 --- a/crds/workspace.devfile.io_devworkspaces.yaml +++ b/crds/workspace.devfile.io_devworkspaces.yaml @@ -11,8 +11,6 @@ spec: kind: DevWorkspace listKind: DevWorkspaceList plural: devworkspaces - shortNames: - - dw singular: devworkspace scope: Namespaced versions: