api

module
v2.0.0-...-01444cd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2021 License: EPL-2.0

README

Kube-native API for cloud development workspaces specification

Sources for this API are defined in Go code, starting from the devworkspace_types.go source file

From these Go sources, several files are generated:

  • A Kubernetes Custom Resource Definition(CRD) with an embedded OpenApi schema,
  • json schemas (in the schemas folder) generated from the above CRD, to specify the syntax of:
    • the DevWorkspace CRD itself;
    • the DevWorkspaceTemplate CRD (a devworkspace content, without runtime information);
    • the Devfile 2.0.0 format, which is generated from the DevWorkspace API.

Generated files are created by a build script (see section How to build).

Devfile 2.0.0 file format

A Subset of this DevWorkspace API defines a structure (workspace template content), which is also at the core of the Devfile 2.0 format specification. For more information about this, please look into the Devfile support Readme

The generated documentation of the Devfile 2.0 format, based on its json schema, is available here: https://devfile.github.io

How to build

In order to build the CRD and the various schemas, you don't need to install any pre-requisite apart from docker. In the root directory, just run the following command:

./docker-run.sh ./build.sh

Specification status

This work is still in an early stage of specification, and the related API and schemas are still a draft proposal.

Quickly open and test ?

In order to test existing or new Devfile 2.0 or DevWorkspace sample files in a self-service Che workspace (hosted on che.openshift.io), just click on the button below:

Contribute

As soon as the devworkspace is opened, you should be able to:

  • open the yaml files in the following folders:
    • samples/
    • devfile-support/samples
  • have yaml language support (completion and documentation) based on the current Json schemas.

Directories

Path Synopsis
pkg
apis/workspaces
Package org contains org API versions.
Package org contains org API versions.
apis/workspaces/v1alpha1
Package v1alpha1 contains API Schema definitions for the org v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=workspace.devfile.io Package v1alpha1 contains API Schema definitions for the org v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=workspace.devfile.io
Package v1alpha1 contains API Schema definitions for the org v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=workspace.devfile.io Package v1alpha1 contains API Schema definitions for the org v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=workspace.devfile.io
apis/workspaces/v1alpha2
Package v1alpha2 contains API Schema definitions for the org v1alpha2 API group +k8s:deepcopy-gen=package,register +k8s:openapi-gen=true +groupName=workspace.devfile.io +devfile:jsonschema:version=2.1.0-alpha Package v1alpha2 contains API Schema definitions for the org v1alpha2 API group +k8s:deepcopy-gen=package,register +groupName=workspace.devfile.io
Package v1alpha2 contains API Schema definitions for the org v1alpha2 API group +k8s:deepcopy-gen=package,register +k8s:openapi-gen=true +groupName=workspace.devfile.io +devfile:jsonschema:version=2.1.0-alpha Package v1alpha2 contains API Schema definitions for the org v1alpha2 API group +k8s:deepcopy-gen=package,register +groupName=workspace.devfile.io
test

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL