diff --git a/assembly/assembly-wsmaster-war/src/main/java/org/eclipse/che/api/deploy/WsMasterModule.java b/assembly/assembly-wsmaster-war/src/main/java/org/eclipse/che/api/deploy/WsMasterModule.java index 9e8e24dc11..d97e29e24d 100644 --- a/assembly/assembly-wsmaster-war/src/main/java/org/eclipse/che/api/deploy/WsMasterModule.java +++ b/assembly/assembly-wsmaster-war/src/main/java/org/eclipse/che/api/deploy/WsMasterModule.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2023 Red Hat, Inc. + * Copyright (c) 2012-2024 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -215,7 +215,6 @@ public class WsMasterModule extends AbstractModule { bind(WorkspaceEntityProvider.class); bind(org.eclipse.che.api.workspace.server.TemporaryWorkspaceRemover.class); bind(org.eclipse.che.api.workspace.server.WorkspaceService.class); - bind(org.eclipse.che.api.devfile.server.DevfileService.class); bind(org.eclipse.che.api.devfile.server.UserDevfileEntityProvider.class); install(new FactoryModuleBuilder().build(ServersCheckerFactory.class)); diff --git a/multiuser/permission/che-multiuser-permission-devfile/pom.xml b/multiuser/permission/che-multiuser-permission-devfile/pom.xml index 7f980ed55a..92e2b4ef6e 100644 --- a/multiuser/permission/che-multiuser-permission-devfile/pom.xml +++ b/multiuser/permission/che-multiuser-permission-devfile/pom.xml @@ -38,10 +38,6 @@ jakarta.inject jakarta.inject-api - - jakarta.ws.rs - jakarta.ws.rs-api - org.eclipse.che.core che-core-api-account @@ -82,10 +78,6 @@ org.eclipse.che.core che-core-commons-test - - org.everrest - everrest-core - org.slf4j slf4j-api diff --git a/multiuser/permission/che-multiuser-permission-devfile/src/main/java/org/eclipse/che/multiuser/permission/devfile/server/UserDevfileApiPermissionsModule.java b/multiuser/permission/che-multiuser-permission-devfile/src/main/java/org/eclipse/che/multiuser/permission/devfile/server/UserDevfileApiPermissionsModule.java index 9fc0aaf85a..a8ef05928c 100644 --- a/multiuser/permission/che-multiuser-permission-devfile/src/main/java/org/eclipse/che/multiuser/permission/devfile/server/UserDevfileApiPermissionsModule.java +++ b/multiuser/permission/che-multiuser-permission-devfile/src/main/java/org/eclipse/che/multiuser/permission/devfile/server/UserDevfileApiPermissionsModule.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2021 Red Hat, Inc. + * Copyright (c) 2012-2024 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -16,13 +16,11 @@ import com.google.inject.multibindings.Multibinder; import com.google.inject.name.Names; import org.eclipse.che.multiuser.api.permission.server.SuperPrivilegesChecker; import org.eclipse.che.multiuser.api.permission.shared.model.PermissionsDomain; -import org.eclipse.che.multiuser.permission.devfile.server.filters.UserDevfilePermissionsFilter; public class UserDevfileApiPermissionsModule extends AbstractModule { @Override protected void configure() { - bind(UserDevfilePermissionsFilter.class); bind(UserDevfileCreatorPermissionsProvider.class).asEagerSingleton(); Multibinder.newSetBinder( diff --git a/multiuser/permission/che-multiuser-permission-devfile/src/main/java/org/eclipse/che/multiuser/permission/devfile/server/filters/UserDevfilePermissionsFilter.java b/multiuser/permission/che-multiuser-permission-devfile/src/main/java/org/eclipse/che/multiuser/permission/devfile/server/filters/UserDevfilePermissionsFilter.java deleted file mode 100644 index 220123d44b..0000000000 --- a/multiuser/permission/che-multiuser-permission-devfile/src/main/java/org/eclipse/che/multiuser/permission/devfile/server/filters/UserDevfilePermissionsFilter.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2012-2021 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.multiuser.permission.devfile.server.filters; - -import static org.eclipse.che.multiuser.permission.devfile.server.UserDevfileDomain.DELETE; -import static org.eclipse.che.multiuser.permission.devfile.server.UserDevfileDomain.DOMAIN_ID; -import static org.eclipse.che.multiuser.permission.devfile.server.UserDevfileDomain.READ; -import static org.eclipse.che.multiuser.permission.devfile.server.UserDevfileDomain.UPDATE; - -import com.google.common.annotations.VisibleForTesting; -import jakarta.ws.rs.Path; -import javax.inject.Inject; -import org.eclipse.che.api.core.ForbiddenException; -import org.eclipse.che.api.devfile.server.DevfileService; -import org.eclipse.che.api.devfile.server.UserDevfileManager; -import org.eclipse.che.commons.env.EnvironmentContext; -import org.eclipse.che.everrest.CheMethodInvokerFilter; -import org.everrest.core.Filter; -import org.everrest.core.resource.GenericResourceMethod; - -/** - * Restricts access to methods of {@link DevfileService} by users' permissions. - * - *

Filter contains rules for protecting of all methods of {@link DevfileService}.
- * In case when requested method is unknown filter throws {@link ForbiddenException} - */ -@Filter -@Path("/devfile{path:(/.*)?}") -public class UserDevfilePermissionsFilter extends CheMethodInvokerFilter { - private final UserDevfileManager userDevfileManager; - - @Inject - public UserDevfilePermissionsFilter(UserDevfileManager userDevfileManager) { - this.userDevfileManager = userDevfileManager; - } - - @Override - public void filter(GenericResourceMethod genericResourceMethod, Object[] arguments) - throws ForbiddenException { - final String methodName = genericResourceMethod.getMethod().getName(); - switch (methodName) { - case "getById": - doCheckPermission(DOMAIN_ID, ((String) arguments[0]), READ); - break; - case "update": - doCheckPermission(DOMAIN_ID, ((String) arguments[0]), UPDATE); - break; - case "delete": - doCheckPermission(DOMAIN_ID, ((String) arguments[0]), DELETE); - break; - case "createFromDevfileYaml": - case "createFromUserDevfile": - case "getUserDevfiles": - case "getSchema": - return; - default: - throw new ForbiddenException("The user does not have permission to perform this operation"); - } - } - - @VisibleForTesting - void doCheckPermission(String domain, String instance, String action) throws ForbiddenException { - EnvironmentContext.getCurrent().getSubject().checkPermission(domain, instance, action); - } -} diff --git a/wsmaster/che-core-api-devfile/pom.xml b/wsmaster/che-core-api-devfile/pom.xml index 02067d4747..ffa187cce2 100644 --- a/wsmaster/che-core-api-devfile/pom.xml +++ b/wsmaster/che-core-api-devfile/pom.xml @@ -39,10 +39,6 @@ com.google.inject.extensions guice-persist - - io.swagger.core.v3 - swagger-annotations-jakarta - jakarta.annotation jakarta.annotation-api diff --git a/wsmaster/che-core-api-devfile/src/main/java/org/eclipse/che/api/devfile/server/DevfileService.java b/wsmaster/che-core-api-devfile/src/main/java/org/eclipse/che/api/devfile/server/DevfileService.java deleted file mode 100644 index d8c0b28769..0000000000 --- a/wsmaster/che-core-api-devfile/src/main/java/org/eclipse/che/api/devfile/server/DevfileService.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2012-2023 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.api.devfile.server; - -import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; -import static org.eclipse.che.api.workspace.server.devfile.Constants.CURRENT_API_VERSION; -import static org.eclipse.che.api.workspace.server.devfile.Constants.SUPPORTED_VERSIONS; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.responses.ApiResponse; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.ws.rs.DefaultValue; -import jakarta.ws.rs.GET; -import jakarta.ws.rs.Path; -import jakarta.ws.rs.Produces; -import jakarta.ws.rs.QueryParam; -import jakarta.ws.rs.core.Response; -import java.io.FileNotFoundException; -import java.io.IOException; -import javax.inject.Inject; -import org.eclipse.che.api.core.NotFoundException; -import org.eclipse.che.api.core.ServerException; -import org.eclipse.che.api.core.rest.Service; -import org.eclipse.che.api.workspace.server.devfile.schema.DevfileSchemaProvider; - -/** Defines Devfile REST API. */ -@Deprecated -@Tag(name = "devfile", description = "Devfile REST API") -@Path("/devfile") -public class DevfileService extends Service { - - private final DevfileSchemaProvider schemaCachedProvider; - - @Inject - public DevfileService(DevfileSchemaProvider schemaCachedProvider) { - this.schemaCachedProvider = schemaCachedProvider; - } - - /** - * Retrieves the json schema. - * - * @return json schema - */ - @GET - @Produces(APPLICATION_JSON) - @Operation( - summary = "Retrieves current version of devfile JSON schema", - responses = { - @ApiResponse(responseCode = "200", description = "The schema successfully retrieved"), - @ApiResponse( - responseCode = "404", - description = "The schema for given version was not found"), - @ApiResponse(responseCode = "500", description = "Internal server error occurred") - }) - public Response getSchema( - @Parameter(description = "Devfile schema version") - @DefaultValue(CURRENT_API_VERSION) - @QueryParam("version") - String version) - throws ServerException, NotFoundException { - if (!SUPPORTED_VERSIONS.contains(version)) { - throw new NotFoundException( - String.format( - "Devfile schema version '%s' is invalid or not supported. Supported versions are '%s'.", - version, SUPPORTED_VERSIONS)); - } - - try { - return Response.ok(schemaCachedProvider.getSchemaContent(version)).build(); - } catch (FileNotFoundException e) { - throw new NotFoundException(e.getLocalizedMessage()); - } catch (IOException e) { - throw new ServerException(e); - } - } -} diff --git a/wsmaster/che-core-api-devfile/src/main/java/org/eclipse/che/api/devfile/server/DevfileServiceLinksInjector.java b/wsmaster/che-core-api-devfile/src/main/java/org/eclipse/che/api/devfile/server/DevfileServiceLinksInjector.java deleted file mode 100644 index 82be8eeb49..0000000000 --- a/wsmaster/che-core-api-devfile/src/main/java/org/eclipse/che/api/devfile/server/DevfileServiceLinksInjector.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2012-2021 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.api.devfile.server; - -import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; - -import com.google.common.annotations.Beta; -import com.google.common.collect.ImmutableList; -import jakarta.ws.rs.HttpMethod; -import javax.inject.Singleton; -import org.eclipse.che.api.core.rest.ServiceContext; -import org.eclipse.che.api.core.util.LinksHelper; -import org.eclipse.che.api.devfile.shared.Constants; -import org.eclipse.che.api.devfile.shared.dto.UserDevfileDto; - -/** Helps to inject {@link DevfileService} related links. */ -@Beta -@Singleton -public class DevfileServiceLinksInjector { - public UserDevfileDto injectLinks(UserDevfileDto userDevfileDto, ServiceContext serviceContext) { - return userDevfileDto.withLinks( - ImmutableList.of( - LinksHelper.createLink( - HttpMethod.GET, - serviceContext - .getBaseUriBuilder() - .clone() - .path(DevfileService.class) - .path(DevfileService.class, "getById") - .build(userDevfileDto.getId()) - .toString(), - null, - APPLICATION_JSON, - Constants.LINK_REL_SELF))); - } -} diff --git a/wsmaster/che-core-api-devfile/src/test/java/org/eclipse/che/api/devfile/server/DevfileServiceTest.java b/wsmaster/che-core-api-devfile/src/test/java/org/eclipse/che/api/devfile/server/DevfileServiceTest.java deleted file mode 100644 index fa2cbba18f..0000000000 --- a/wsmaster/che-core-api-devfile/src/test/java/org/eclipse/che/api/devfile/server/DevfileServiceTest.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * Copyright (c) 2012-2023 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.api.devfile.server; - -import static io.restassured.RestAssured.given; -import static org.eclipse.che.api.devfile.server.TestObjectGenerator.TEST_SUBJECT; -import static org.eclipse.che.api.workspace.server.devfile.Constants.CURRENT_API_VERSION; -import static org.eclipse.che.api.workspace.server.devfile.Constants.SUPPORTED_VERSIONS; -import static org.eclipse.che.dto.server.DtoFactory.newDto; -import static org.everrest.assured.JettyHttpServer.ADMIN_USER_NAME; -import static org.everrest.assured.JettyHttpServer.ADMIN_USER_PASSWORD; -import static org.everrest.assured.JettyHttpServer.SECURE_PATH; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.lenient; -import static org.testng.Assert.assertEquals; - -import io.restassured.response.Response; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import org.eclipse.che.api.core.notification.EventService; -import org.eclipse.che.api.core.rest.ApiExceptionMapper; -import org.eclipse.che.api.core.rest.CheJsonProvider; -import org.eclipse.che.api.core.rest.ServiceContext; -import org.eclipse.che.api.core.rest.WebApplicationExceptionMapper; -import org.eclipse.che.api.devfile.server.spi.UserDevfileDao; -import org.eclipse.che.api.devfile.shared.dto.UserDevfileDto; -import org.eclipse.che.api.workspace.server.devfile.DevfileEntityProvider; -import org.eclipse.che.api.workspace.server.devfile.DevfileParser; -import org.eclipse.che.api.workspace.server.devfile.DevfileVersionDetector; -import org.eclipse.che.api.workspace.server.devfile.schema.DevfileSchemaProvider; -import org.eclipse.che.api.workspace.server.devfile.validator.DevfileIntegrityValidator; -import org.eclipse.che.api.workspace.server.devfile.validator.DevfileSchemaValidator; -import org.eclipse.che.api.workspace.shared.dto.devfile.DevfileDto; -import org.eclipse.che.api.workspace.shared.dto.devfile.MetadataDto; -import org.eclipse.che.commons.env.EnvironmentContext; -import org.eclipse.che.dto.server.DtoFactory; -import org.everrest.assured.EverrestJetty; -import org.everrest.core.Filter; -import org.everrest.core.GenericContainerRequest; -import org.everrest.core.RequestFilter; -import org.mockito.Mock; -import org.mockito.stubbing.Answer; -import org.mockito.testng.MockitoTestNGListener; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Listeners; -import org.testng.annotations.Test; - -@Listeners({EverrestJetty.class, MockitoTestNGListener.class}) -public class DevfileServiceTest { - - @SuppressWarnings("unused") // is declared for deploying by everrest-assured - ApiExceptionMapper exceptionMapper = new ApiExceptionMapper(); - - WebApplicationExceptionMapper exceptionMapper2 = new WebApplicationExceptionMapper(); - - private DevfileSchemaProvider schemaProvider = new DevfileSchemaProvider(); - - private static final EnvironmentFilter FILTER = new EnvironmentFilter(); - - private DevfileParser devfileParser = - new DevfileParser( - new DevfileSchemaValidator(new DevfileSchemaProvider(), new DevfileVersionDetector()), - new DevfileIntegrityValidator(Collections.emptyMap())); - DevfileEntityProvider devfileEntityProvider = new DevfileEntityProvider(devfileParser); - UserDevfileEntityProvider userDevfileEntityProvider = - new UserDevfileEntityProvider(devfileParser); - private CheJsonProvider jsonProvider = new CheJsonProvider(new HashSet<>()); - - @Mock UserDevfileDao userDevfileDao; - @Mock UserDevfileManager userDevfileManager; - @Mock EventService eventService; - @Mock DevfileServiceLinksInjector linksInjector; - - DevfileService userDevfileService; - - @Test - public void shouldRetrieveSchema() throws Exception { - final Response response = - given() - .auth() - .basic(ADMIN_USER_NAME, ADMIN_USER_PASSWORD) - .when() - .get(SECURE_PATH + "/devfile"); - - assertEquals(response.getStatusCode(), 200); - assertEquals( - response.getBody().asString(), schemaProvider.getSchemaContent(CURRENT_API_VERSION)); - } - - @Test - public void shouldReturn404WhenSchemaNotFound() { - final Response response = - given() - .auth() - .basic(ADMIN_USER_NAME, ADMIN_USER_PASSWORD) - .when() - .get(SECURE_PATH + "/devfile?version=1.2.3.4.5"); - - assertEquals(response.getStatusCode(), 404); - } - - @Test(dataProvider = "schemaVersions") - public void shouldRetrieveSchemaVersion(String version) throws Exception { - final Response response = - given() - .auth() - .basic(ADMIN_USER_NAME, ADMIN_USER_PASSWORD) - .when() - .get(SECURE_PATH + "/devfile?version=" + version); - - assertEquals(response.getStatusCode(), 200); - assertEquals(response.getBody().asString(), schemaProvider.getSchemaContent(version)); - } - - @DataProvider - public static Object[][] schemaVersions() { - Object[][] versions = new Object[SUPPORTED_VERSIONS.size()][]; - for (int i = 0; i < SUPPORTED_VERSIONS.size(); i++) { - versions[i] = new Object[] {SUPPORTED_VERSIONS.get(i)}; - } - - return versions; - } - - @BeforeMethod - public void setup() { - this.userDevfileService = new DevfileService(schemaProvider); - lenient() - .when(linksInjector.injectLinks(any(UserDevfileDto.class), any(ServiceContext.class))) - .thenAnswer((Answer) invocation -> invocation.getArgument(0)); - } - - @DataProvider - public Object[][] validUserDevfiles() { - return new Object[][] { - { - newDto(UserDevfileDto.class) - .withName("My devfile") - .withDescription("Devfile description") - .withDevfile( - newDto(DevfileDto.class) - .withApiVersion("1.0.0") - .withMetadata(newDto(MetadataDto.class).withName("name"))) - }, - { - newDto(UserDevfileDto.class) - .withName(null) - .withDescription("Devfile description") - .withDevfile( - newDto(DevfileDto.class) - .withApiVersion("1.0.0") - .withMetadata(newDto(MetadataDto.class).withName("name"))) - }, - { - newDto(UserDevfileDto.class) - .withName("My devfile") - .withDevfile( - newDto(DevfileDto.class) - .withApiVersion("1.0.0") - .withMetadata(newDto(MetadataDto.class).withName("name"))) - }, - { - newDto(UserDevfileDto.class) - .withName("My devfile") - .withDescription("Devfile description") - .withDevfile( - newDto(DevfileDto.class) - .withApiVersion("1.0.0") - .withMetadata(newDto(MetadataDto.class).withGenerateName("gen-"))) - }, - {DtoConverter.asDto(TestObjectGenerator.createUserDevfile())} - }; - } - - @DataProvider - public Object[][] invalidUserDevfiles() { - return new Object[][] { - { - newDto(UserDevfileDto.class) - .withName("My devfile") - .withDescription("Devfile description") - .withDevfile(null), - "Mandatory field `devfile` is not defined." - }, - { - newDto(UserDevfileDto.class) - .withName("My devfile") - .withDescription("Devfile description") - .withDevfile( - newDto(DevfileDto.class) - .withApiVersion(null) - .withMetadata(newDto(MetadataDto.class).withName("name"))), - "Devfile schema validation failed. Error: Neither of `apiVersion` or `schemaVersion` found. This is not a valid devfile." - } - }; - } - - private static T unwrapDto(Response response, Class dtoClass) { - return DtoFactory.getInstance().createDtoFromJson(response.asString(), dtoClass); - } - - private static List unwrapDtoList(Response response, Class dtoClass) - throws IOException { - return new ArrayList<>( - DtoFactory.getInstance().createListDtoFromJson(response.body().asInputStream(), dtoClass)); - } - - @Filter - public static class EnvironmentFilter implements RequestFilter { - - public void doFilter(GenericContainerRequest request) { - EnvironmentContext.getCurrent().setSubject(TEST_SUBJECT); - } - } -} diff --git a/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/RawDevfileUrlFactoryParameterResolverTest.java b/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/RawDevfileUrlFactoryParameterResolverTest.java index 287ea55bd5..68d7e1999d 100644 --- a/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/RawDevfileUrlFactoryParameterResolverTest.java +++ b/wsmaster/che-core-api-factory/src/test/java/org/eclipse/che/api/factory/server/RawDevfileUrlFactoryParameterResolverTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2023 Red Hat, Inc. + * Copyright (c) 2012-2024 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -38,11 +38,9 @@ import org.eclipse.che.api.workspace.server.devfile.DevfileParser; import org.eclipse.che.api.workspace.server.devfile.DevfileVersionDetector; import org.eclipse.che.api.workspace.server.devfile.URLFetcher; import org.eclipse.che.api.workspace.server.devfile.URLFileContentProvider; -import org.eclipse.che.api.workspace.server.devfile.schema.DevfileSchemaProvider; import org.eclipse.che.api.workspace.server.devfile.validator.ComponentIntegrityValidator; import org.eclipse.che.api.workspace.server.devfile.validator.ComponentIntegrityValidator.NoopComponentIntegrityValidator; import org.eclipse.che.api.workspace.server.devfile.validator.DevfileIntegrityValidator; -import org.eclipse.che.api.workspace.server.devfile.validator.DevfileSchemaValidator; import org.mockito.ArgumentCaptor; import org.mockito.InjectMocks; import org.mockito.Mock; @@ -71,11 +69,6 @@ public class RawDevfileUrlFactoryParameterResolverTest { @Test public void shouldResolveRelativeFiles() throws Exception { // given - - // we need to set up an "almost real" devfile converter which is a little bit involved - DevfileSchemaValidator validator = - new DevfileSchemaValidator(new DevfileSchemaProvider(), new DevfileVersionDetector()); - Map validators = new HashMap<>(); validators.put(EDITOR_COMPONENT_TYPE, new NoopComponentIntegrityValidator()); validators.put(PLUGIN_COMPONENT_TYPE, new NoopComponentIntegrityValidator()); @@ -84,7 +77,7 @@ public class RawDevfileUrlFactoryParameterResolverTest { DevfileIntegrityValidator integrityValidator = new DevfileIntegrityValidator(validators); - DevfileParser devfileParser = new DevfileParser(validator, integrityValidator); + DevfileParser devfileParser = new DevfileParser(integrityValidator); URLFactoryBuilder factoryBuilder = new URLFactoryBuilder( diff --git a/wsmaster/che-core-api-workspace/pom.xml b/wsmaster/che-core-api-workspace/pom.xml index 994bb5c3f5..b86dc68009 100644 --- a/wsmaster/che-core-api-workspace/pom.xml +++ b/wsmaster/che-core-api-workspace/pom.xml @@ -126,19 +126,9 @@ org.eclipse.che.core che-core-commons-tracing - - org.glassfish - jakarta.json - org.leadpony.justify justify - - - jakarta.json-api - jakarta.json - - org.slf4j diff --git a/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/devfile/Constants.java b/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/devfile/Constants.java index 4263005e0d..4f4de3e190 100644 --- a/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/devfile/Constants.java +++ b/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/devfile/Constants.java @@ -11,8 +11,6 @@ */ package org.eclipse.che.api.workspace.server.devfile; -import java.util.List; - public class Constants { private Constants() {} @@ -23,9 +21,6 @@ public class Constants { public static final String CURRENT_API_VERSION = "1.0.0"; - public static final List SUPPORTED_VERSIONS = - List.of(CURRENT_API_VERSION, "2.0.0", "2.1.0", "2.2.0", "2.2.1", "2.2.2"); - public static final String EDITOR_COMPONENT_TYPE = "cheEditor"; public static final String PLUGIN_COMPONENT_TYPE = "chePlugin"; diff --git a/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/devfile/DevfileParser.java b/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/devfile/DevfileParser.java index f131ad1b4a..afd836f3d8 100644 --- a/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/devfile/DevfileParser.java +++ b/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/devfile/DevfileParser.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2021 Red Hat, Inc. + * Copyright (c) 2012-2024 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -36,7 +36,6 @@ import org.eclipse.che.api.workspace.server.devfile.exception.DevfileException; import org.eclipse.che.api.workspace.server.devfile.exception.DevfileFormatException; import org.eclipse.che.api.workspace.server.devfile.exception.OverrideParameterException; import org.eclipse.che.api.workspace.server.devfile.validator.DevfileIntegrityValidator; -import org.eclipse.che.api.workspace.server.devfile.validator.DevfileSchemaValidator; import org.eclipse.che.api.workspace.server.model.impl.devfile.ComponentImpl; import org.eclipse.che.api.workspace.server.model.impl.devfile.DevfileImpl; @@ -51,27 +50,19 @@ public class DevfileParser { private final ObjectMapper yamlMapper; private final ObjectMapper jsonMapper; - private final DevfileSchemaValidator schemaValidator; private final DevfileIntegrityValidator integrityValidator; private final OverridePropertiesApplier overridePropertiesApplier; @Inject - public DevfileParser( - DevfileSchemaValidator schemaValidator, DevfileIntegrityValidator integrityValidator) { - this( - schemaValidator, - integrityValidator, - new ObjectMapper(new YAMLFactory()), - new ObjectMapper()); + public DevfileParser(DevfileIntegrityValidator integrityValidator) { + this(integrityValidator, new ObjectMapper(new YAMLFactory()), new ObjectMapper()); } @VisibleForTesting DevfileParser( - DevfileSchemaValidator schemaValidator, DevfileIntegrityValidator integrityValidator, ObjectMapper yamlMapper, ObjectMapper jsonMapper) { - this.schemaValidator = schemaValidator; this.integrityValidator = integrityValidator; this.yamlMapper = yamlMapper; this.jsonMapper = jsonMapper; @@ -120,8 +111,7 @@ public class DevfileParser { * @param devfileJson json with devfile content * @return devfile in simple Map structure */ - public Map convertYamlToMap(JsonNode devfileJson) throws DevfileFormatException { - schemaValidator.validate(devfileJson); + public Map convertYamlToMap(JsonNode devfileJson) { return yamlMapper.convertValue(devfileJson, new TypeReference<>() {}); } @@ -215,7 +205,6 @@ public class DevfileParser { DevfileImpl devfile; try { parsed = overridePropertiesApplier.applyPropertiesOverride(parsed, overrideProperties); - schemaValidator.validate(parsed); devfile = mapper.treeToValue(parsed, DevfileImpl.class); } catch (JsonProcessingException e) { throw new DevfileFormatException(e.getMessage()); diff --git a/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/devfile/convert/DevfileConverter.java b/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/devfile/convert/DevfileConverter.java index 73d3ae6df8..3529983ae4 100644 --- a/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/devfile/convert/DevfileConverter.java +++ b/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/devfile/convert/DevfileConverter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2021 Red Hat, Inc. + * Copyright (c) 2012-2024 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -12,11 +12,8 @@ package org.eclipse.che.api.workspace.server.devfile.convert; import static com.google.common.base.Preconditions.checkArgument; -import static java.lang.String.format; import static org.eclipse.che.api.workspace.server.devfile.Components.getIdentifiableComponentName; -import static org.eclipse.che.api.workspace.server.devfile.Constants.SUPPORTED_VERSIONS; -import com.google.common.base.Strings; import java.util.Map; import javax.inject.Inject; import org.eclipse.che.api.core.ServerException; @@ -104,8 +101,6 @@ public class DevfileConverter { // make copy to avoid modification of original devfile devfile = new DevfileImpl(devfile); - validateCurrentVersion(devfile); - defaultEditorProvisioner.apply(devfile, contentProvider); WorkspaceConfigImpl config = new WorkspaceConfigImpl(); @@ -143,17 +138,4 @@ public class DevfileConverter { return config; } - - private static void validateCurrentVersion(Devfile devFile) throws DevfileFormatException { - if (Strings.isNullOrEmpty(devFile.getApiVersion())) { - throw new DevfileFormatException("Provided Devfile has no API version specified"); - } - if (SUPPORTED_VERSIONS.stream().noneMatch(v -> v.equals(devFile.getApiVersion()))) { - throw new DevfileFormatException( - format( - "Provided Devfile has unsupported version '%s'. The following versions are" - + " supported: %s", - devFile.getApiVersion(), SUPPORTED_VERSIONS)); - } - } } diff --git a/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/devfile/schema/DevfileSchemaProvider.java b/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/devfile/schema/DevfileSchemaProvider.java deleted file mode 100644 index 3edb58740f..0000000000 --- a/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/devfile/schema/DevfileSchemaProvider.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2012-2021 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.api.workspace.server.devfile.schema; - -import static org.eclipse.che.api.workspace.server.devfile.Constants.SCHEMAS_LOCATION; -import static org.eclipse.che.api.workspace.server.devfile.Constants.SCHEMA_FILENAME; -import static org.eclipse.che.api.workspace.server.devfile.Constants.SUPPORTED_VERSIONS; -import static org.eclipse.che.commons.lang.IoUtil.getResource; -import static org.eclipse.che.commons.lang.IoUtil.readAndCloseQuietly; - -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.StringReader; -import java.lang.ref.SoftReference; -import java.util.HashMap; -import java.util.Map; -import javax.inject.Singleton; - -/** Loads a schema content and stores it in soft reference. */ -@Singleton -public class DevfileSchemaProvider { - - private final Map> schemas = new HashMap<>(); - - public String getSchemaContent(String version) throws IOException { - if (schemas.containsKey(version)) { - String schema = schemas.get(version).get(); - if (schema != null) { - return schema; - } else { - return loadAndPut(version); - } - } else { - return loadAndPut(version); - } - } - - public StringReader getAsReader(String version) throws IOException { - return new StringReader(getSchemaContent(version)); - } - - private String loadFile(String version) throws IOException { - try { - return readAndCloseQuietly(getResource(SCHEMAS_LOCATION + version + "/" + SCHEMA_FILENAME)); - } catch (FileNotFoundException e) { - throw new FileNotFoundException( - String.format( - "Unable to find schema for devfile version '%s'. Supported versions are '%s'.", - version, SUPPORTED_VERSIONS)); - } catch (IOException ioe) { - throw new IOException( - String.format( - "Unable to load devfile schema with version '%s'. Supported versions are '%s'", - version, SUPPORTED_VERSIONS), - ioe); - } - } - - private String loadAndPut(String version) throws IOException { - final String schema = loadFile(version); - schemas.put(version, new SoftReference<>(schema)); - return schema; - } -} diff --git a/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/devfile/validator/DevfileSchemaValidator.java b/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/devfile/validator/DevfileSchemaValidator.java deleted file mode 100644 index 9b54a259f1..0000000000 --- a/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/devfile/validator/DevfileSchemaValidator.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2012-2021 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.api.workspace.server.devfile.validator; - -import static java.lang.String.format; -import static org.eclipse.che.api.workspace.server.devfile.Constants.SUPPORTED_VERSIONS; - -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import jakarta.json.JsonReader; -import java.io.IOException; -import java.io.StringReader; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import javax.inject.Inject; -import javax.inject.Singleton; -import org.eclipse.che.api.workspace.server.devfile.DevfileVersionDetector; -import org.eclipse.che.api.workspace.server.devfile.exception.DevfileException; -import org.eclipse.che.api.workspace.server.devfile.exception.DevfileFormatException; -import org.eclipse.che.api.workspace.server.devfile.schema.DevfileSchemaProvider; -import org.leadpony.justify.api.JsonSchema; -import org.leadpony.justify.api.JsonValidationService; -import org.leadpony.justify.api.Problem; -import org.leadpony.justify.api.ProblemHandler; - -/** Validates YAML devfile content against given JSON schema. */ -@Singleton -public class DevfileSchemaValidator { - - private final JsonValidationService service; - private final ObjectMapper jsonMapper; - private final Map schemasByVersion; - private final ErrorMessageComposer errorMessageComposer; - private final DevfileVersionDetector devfileVersionDetector; - - @Inject - public DevfileSchemaValidator( - DevfileSchemaProvider schemaProvider, DevfileVersionDetector devfileVersionDetector) { - this.service = JsonValidationService.newInstance(); - this.jsonMapper = new ObjectMapper(); - this.errorMessageComposer = new ErrorMessageComposer(); - this.devfileVersionDetector = devfileVersionDetector; - try { - this.schemasByVersion = new HashMap<>(); - for (String version : SUPPORTED_VERSIONS) { - this.schemasByVersion.put(version, service.readSchema(schemaProvider.getAsReader(version))); - } - } catch (IOException e) { - throw new RuntimeException("Unable to read devfile json schema for validation.", e); - } - } - - public void validate(JsonNode contentNode) throws DevfileFormatException { - try { - List validationErrors = new ArrayList<>(); - ProblemHandler handler = ProblemHandler.collectingTo(validationErrors); - String devfileVersion = devfileVersionDetector.devfileVersion(contentNode); - - if (!schemasByVersion.containsKey(devfileVersion)) { - throw new DevfileFormatException( - String.format( - "Version '%s' of the devfile is not supported. Supported versions are '%s'.", - devfileVersion, SUPPORTED_VERSIONS)); - } - JsonSchema schema = schemasByVersion.get(devfileVersion); - try (JsonReader reader = - service.createReader( - new StringReader(jsonMapper.writeValueAsString(contentNode)), schema, handler)) { - reader.read(); - } - if (!validationErrors.isEmpty()) { - String error = errorMessageComposer.extractMessages(validationErrors, new StringBuilder()); - throw new DevfileFormatException(error); - } - } catch (DevfileException dfe) { - throw new DevfileFormatException( - format("Devfile schema validation failed. Error: %s", dfe.getMessage())); - } catch (IOException e) { - throw new DevfileFormatException("Unable to validate Devfile. Error: " + e.getMessage()); - } - } -} diff --git a/wsmaster/che-core-api-workspace/src/main/resources/schema/1.0.0/devfile.json b/wsmaster/che-core-api-workspace/src/main/resources/schema/1.0.0/devfile.json deleted file mode 100644 index e616ea565e..0000000000 --- a/wsmaster/che-core-api-workspace/src/main/resources/schema/1.0.0/devfile.json +++ /dev/null @@ -1,871 +0,0 @@ -{ - "meta:license": [ - " Copyright (c) 2012-2019 Red Hat, Inc.", - " This program and the accompanying materials are made", - " available under the terms of the Eclipse Public License 2.0", - " which is available at https://www.eclipse.org/legal/epl-2.0/", - " SPDX-License-Identifier: EPL-2.0", - " Contributors:", - " Red Hat, Inc. - initial API and implementation" - ], - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "title": "Devfile object", - "description": "This schema describes the structure of the devfile object", - "definitions": { - "attributes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "selector": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "required": [ - "apiVersion", - "metadata" - ], - "additionalProperties": false, - "properties": { - "apiVersion": { - "const": "1.0.0", - "title": "Devfile API Version" - }, - "metadata": { - "type": "object", - "properties": { - "name": { - "type": "string", - "minLength": 1, - "title": "Devfile Name", - "description": "The name of the devfile. Workspaces created from devfile, will inherit this name", - "examples": [ - "petclinic-dev-environment" - ] - }, - "generateName": { - "type": "string", - "minLength": 1, - "title": "Devfile Generate Name", - "description": "Workspaces created from devfile, will use it as base and append random suffix. It's used when name is not defined.", - "examples": [ - "petclinic-" - ] - } - }, - "additionalProperties": false, - "anyOf": [ - { - "required": [ - "name" - ] - }, - { - "required": [ - "generateName" - ] - } - ] - }, - "projects": { - "type": "array", - "title": "The Projects List", - "description": "Description of the projects, containing names and sources locations", - "items": { - "type": "object", - "required": [ - "name", - "source" - ], - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "title": "The Project Name", - "examples": [ - "petclinic" - ] - }, - "source": { - "type": "object", - "title": "The Project Source object", - "description": "Describes the project's source - type and location", - "required": [ - "type", - "location" - ], - "properties": { - "type": { - "type": "string", - "description": "Project's source type.", - "examples": [ - "git", - "github", - "zip" - ] - }, - "location": { - "type": "string", - "description": "Project's source location address. Should be URL for git and github located projects, or file:// for zip.", - "examples": [ - "git@github.com:spring-projects/spring-petclinic.git" - ] - }, - "branch": { - "type": "string", - "description": "The name of the of the branch to check out after obtaining the source from the location. The branch has to already exist in the source otherwise the default branch is used. In case of git, this is also the name of the remote branch to push to.", - "examples": [ - "master", - "feature-42" - ] - }, - "startPoint": { - "type": "string", - "description": "The tag or commit id to reset the checked out branch to.", - "examples": [ - "release/4.2", - "349d3ad", - "v4.2.0" - ] - }, - "tag": { - "type": "string", - "description": "The name of the tag to reset the checked out branch to. Note that this is equivalent to 'startPoint' and provided for convenience.", - "examples": [ - "v4.2.0" - ] - }, - "commitId": { - "type": "string", - "description": "The id of the commit to reset the checked out branch to. Note that this is equivalent to 'startPoint' and provided for convenience.", - "examples": [ - "349d3ad" - ] - }, - "sparseCheckoutDir": { - "type": "string", - "description": "Part of project to populate in the working directory.", - "examples": [ - "/core/", - "core/", - "core", - "/wsmaster/che-core-api-workspace/", - "/d*" - ] - } - } - }, - "clonePath": { - "type": "string", - "description": "The path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name." - } - } - } - }, - "components": { - "type": "array", - "title": "The Components List", - "description": "Description of the workspace components, such as editor and plugins", - "items": { - "type": "object", - "required": [ - "type" - ], - "if": { - "properties": { - "type": { - "type": "string" - } - }, - "required": [ - "type" - ] - }, - "then": { - "allOf": [ - { - "if": { - "properties": { - "type": { - "enum": [ - "cheEditor", - "chePlugin" - ] - } - } - }, - "then": { - "oneOf": [ - { - "required": [ - "id" - ], - "not": { - "required": [ - "reference" - ] - } - }, - { - "required": [ - "reference" - ], - "not": { - "required": [ - "id" - ] - } - } - ], - "properties": { - "type": {}, - "alias": {}, - "id": { - "type": "string", - "description": "Describes the component id. It has the following format: {plugin/editor PUBLISHER}/{plugin/editor NAME}/{plugin/editor VERSION}", - "pattern": "[a-z0-9_\\-.]+/[a-z0-9_\\-.]+/[a-z0-9_\\-.]+$", - "examples": [ - "eclipse/maven-jdk8/1.0.0" - ] - }, - "reference": { - "description": "Describes raw location of plugin yaml file.", - "type": "string", - "examples": [ - "https://pastebin.com/raw/kYprWiNB" - ] - }, - "registryUrl": { - "description": "Describes URL of custom plugin registry.", - "type": "string", - "pattern": "^(https?://)[a-zA-Z0-9_\\-./]+", - "examples": [ - "https://che-plugin-registry.openshift.io/v3/" - ] - } - } - } - }, - { - "if": { - "properties": { - "type": { - "enum": [ - "cheEditor" - ] - } - } - }, - "then": { - "additionalProperties": false, - "properties": { - "type": {}, - "alias": {}, - "id": {}, - "env": {}, - "endpoints": {}, - "volumes": {}, - "reference": {}, - "registryUrl": {}, - "memoryLimit": {}, - "memoryRequest": {}, - "automountWorkspaceSecrets": {}, - "cpuLimit": {}, - "cpuRequest": {} - } - } - }, - { - "if": { - "properties": { - "type": { - "enum": [ - "chePlugin" - ] - } - } - }, - "then": { - "additionalProperties": false, - "properties": { - "type": {}, - "alias": {}, - "id": {}, - "env": {}, - "endpoints": {}, - "volumes": {}, - "memoryLimit": {}, - "memoryRequest": {}, - "automountWorkspaceSecrets": {}, - "cpuLimit": {}, - "cpuRequest": {}, - "reference": {}, - "registryUrl": {}, - "preferences": { - "type": "object", - "description": "Additional plugin preferences", - "examples": [ - "{\"java.home\": \"/home/user/jdk11\", \"java.jdt.ls.vmargs\": \"-Xmx1G\"}" - ], - "additionalProperties": { - "anyOf": [ - { - "type": [ - "boolean", - "string", - "number" - ] - }, - { - "type": "array", - "items": { - "type": [ - "boolean", - "string", - "number" - ] - } - } - ] - } - } - } - } - }, - { - "if": { - "properties": { - "type": { - "enum": [ - "kubernetes", - "openshift" - ] - } - } - }, - "then": { - "anyOf": [ - { - "required": [ - "reference" - ], - "additionalProperties": true - }, - { - "required": [ - "referenceContent" - ], - "additionalProperties": true - } - ], - "additionalProperties": false, - "properties": { - "type": {}, - "alias": {}, - "mountSources": {}, - "automountWorkspaceSecrets": {}, - "volumes": {}, - "env": {}, - "endpoints": {}, - "reference": { - "description": "Describes absolute or devfile-relative location of Kubernetes list yaml file. Applicable only for 'kubernetes' and 'openshift' type components", - "type": "string", - "examples": [ - "petclinic-app.yaml" - ] - }, - "referenceContent": { - "description": "Inlined content of a file specified in field 'reference'", - "type": "string", - "examples": [ - "{\"kind\":\"List\",\"items\":[{\"apiVersion\":\"v1\",\"kind\":\"Pod\",\"metadata\":{\"name\":\"ws\"},\"spec\":{\"containers\":[{\"image\":\"quay.io/eclipse/che-dev:nightly\"}]}}]}" - ] - }, - "selector": { - "$ref": "#/definitions/selector", - "description": "Describes the objects selector for the recipe type components. Allows to pick-up only selected items from k8s/openshift list", - "examples": [ - "{\n \"app.kubernetes.io/name\" : \"mysql\", \n \"app.kubernetes.io/component\" : \"database\", \n \"app.kubernetes.io/part-of\" : \"petclinic\" \n}" - ] - }, - "entrypoints": { - "type": "array", - "items": { - "type": "object", - "properties": { - "parentName": { - "type": "string", - "description": "The name of the top level object in the referenced object list in which to search for containers. If not specified, the objects to search through can have any name." - }, - "containerName": { - "type": "string", - "description": "The name of the container to apply the entrypoint to. If not specified, the entrypoint is modified on all matching containers." - }, - "parentSelector": { - "$ref": "#/definitions/selector", - "description": "The selector on labels of the top level objects in the referenced list in which to search for containers. If not specified, the objects to search through can have any labels." - }, - "command": { - "type": "array", - "items": { - "type": "string" - }, - "default": null, - "description": "The command to run in the component instead of the default one provided in the image of the container. Defaults to null, meaning use whatever is defined in the image.", - "examples": [ - "['/bin/sh', '-c']" - ] - }, - "args": { - "type": "array", - "items": { - "type": "string" - }, - "default": null, - "description": "The arguments to supply to the command running the component. The arguments are supplied either to the default command provided in the image of the container or to the overridden command. Defaults to null, meaning use whatever is defined in the image.", - "examples": [ - "['-R', '-f']" - ] - } - } - } - } - } - } - }, - { - "if": { - "properties": { - "type": { - "enum": [ - "dockerimage" - ] - } - } - }, - "then": { - "required": [ - "image", - "memoryLimit" - ], - "additionalProperties": false, - "properties": { - "type": {}, - "alias": {}, - "mountSources": {}, - "env": {}, - "cpuLimit": {}, - "cpuRequest": {}, - "automountWorkspaceSecrets": {}, - "volumes": {}, - "endpoints": {}, - "memoryLimit": {}, - "memoryRequest": {}, - "image": { - "type": "string", - "description": "Specifies the docker image that should be used for component", - "examples": [ - "eclipse/maven-jdk8:1.0.0" - ] - }, - "command": { - "type": "array", - "items": { - "type": "string" - }, - "default": null, - "description": "The command to run in the dockerimage component instead of the default one provided in the image. Defaults to null, meaning use whatever is defined in the image.", - "examples": [ - "['/bin/sh', '-c']" - ] - }, - "args": { - "type": "array", - "items": { - "type": "string" - }, - "default": null, - "description": "The arguments to supply to the command running the dockerimage component. The arguments are supplied either to the default command provided in the image or to the overridden command. Defaults to null, meaning use whatever is defined in the image.", - "examples": [ - "['-R', '-f']" - ] - } - } - } - } - ] - }, - "properties": { - "alias": { - "description": "The name using which other places of this devfile (like commands) can refer to this component. This attribute is optional but must be unique in the devfile if specified.", - "type": "string", - "examples": [ - "mvn-stack" - ] - }, - "type": { - "description": "Describes type of the component, e.g. whether it is an plugin or editor or other type", - "enum": [ - "cheEditor", - "chePlugin", - "kubernetes", - "openshift", - "dockerimage" - ], - "examples": [ - "chePlugin", - "cheEditor", - "kubernetes", - "openshift", - "dockerimage" - ] - }, - "mountSources": { - "type": "boolean", - "description": "Describes whether projects sources should be mount to the component. `CHE_PROJECTS_ROOT` environment variable should contains a path where projects sources are mount", - "default": "false" - }, - "memoryLimit": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer", - "exclusiveMinimum": 0 - } - ], - "description": "Describes memory limit for the component. You can express memory as a plain integer or as a fixed-point integer using one of these suffixes: E, P, T, G, M, K. You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki", - "examples": [ - "128974848", - "129e6", - "129M", - "123Mi" - ] - }, - "memoryRequest": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer", - "exclusiveMinimum": 0 - } - ], - "description": "Describes memory request for the component. You can express memory as a plain integer or as a fixed-point integer using one of these suffixes: E, P, T, G, M, K. You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki", - "examples": [ - "128974848", - "129e6", - "129M", - "123Mi" - ] - }, - "cpuLimit": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number", - "exclusiveMinimum": 0 - } - ], - "description": "Describes CPU limit for the component. You can express CPU limit as a float-point cores or as a fixed-point integer millicores using 'm' suffix", - "examples": [ - "2", - "0.235", - "100m", - "1230m" - ] - }, - "cpuRequest": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number", - "exclusiveMinimum": 0 - } - ], - "description": "Describes CPU request for the component. You can express CPU request as a float-point cores or as a fixed-point integer millicores using 'm' suffix", - "examples": [ - "2", - "0.235", - "100m", - "1230m" - ] - }, - "automountWorkspaceSecrets": { - "type": "boolean", - "description": "Describes whether namespace secrets should be mount to the component." - }, - "volumes": { - "type": "array", - "description": "Describes volumes which should be mount to component", - "items": { - "type": "object", - "description": "Describe volume that should be mount to component", - "required": [ - "name", - "containerPath" - ], - "properties": { - "name": { - "type": "string", - "title": "The Volume Name", - "description": "The volume name. If several components mount the same volume then they will reuse the volume and will be able to access to the same files", - "examples": [ - "my-data" - ] - }, - "containerPath": { - "type": "string", - "title": "The path where volume should be mount to container", - "examples": [ - "/home/user/data" - ] - } - } - } - }, - "env": { - "type": "array", - "description": "The environment variables list that should be set to docker container", - "items": { - "type": "object", - "description": "Describes environment variable", - "required": [ - "name", - "value" - ], - "properties": { - "name": { - "type": "string", - "title": "The Environment Variable Name", - "description": "The environment variable name" - }, - "value": { - "type": "string", - "title": "The Environment Variable Value", - "description": "The environment variable value" - } - } - } - }, - "endpoints": { - "type": "array", - "description": "Describes dockerimage component endpoints", - "items": { - "name": "object", - "description": "Describes dockerimage component endpoint", - "required": [ - "name", - "port" - ], - "properties": { - "name": { - "type": "string", - "title": "The Endpoint Name", - "description": "The Endpoint name" - }, - "port": { - "type": "integer", - "title": "The Endpoint Port", - "description": "The container port that should be used as endpoint" - }, - "attributes": { - "type": "object", - "public": { - "type": "boolean", - "description": "Identifies endpoint as workspace internally or externally accessible.", - "default": "true" - }, - "secure": { - "type": "boolean", - "description": "Identifies server as secure or non-secure. Requests to secure servers will be authenticated and must contain machine token", - "default": "false" - }, - "discoverable": { - "type": "boolean", - "description": "Identifies endpoint as accessible by its name.", - "default": "false" - }, - "protocol": { - "type": "boolean", - "description": "Defines protocol that should be used for communication with endpoint. Is used for endpoint URL evaluation" - }, - "additionalProperties": { - "type": "string" - }, - "javaType": "java.util.Map" - } - } - } - } - }, - "additionalProperties": true - } - }, - "commands": { - "type": "array", - "title": "The Commands List", - "description": "Description of the predefined commands to be available in workspace", - "items": { - "type": "object", - "additionalProperties": false, - "required": [ - "name", - "actions" - ], - "properties": { - "name": { - "description": "Describes the name of the command. Should be unique per commands set.", - "type": "string", - "examples": [ - "build" - ] - }, - "attributes": { - "description": "Additional command attributes", - "$ref": "#/definitions/attributes" - }, - "actions": { - "type": "array", - "description": "List of the actions of given command. Now the only one command must be specified in list but there are plans to implement supporting multiple actions commands.", - "title": "The Command Actions List", - "minItems": 1, - "maxItems": 1, - "items": { - "oneOf": [ - { - "properties": { - "type": {}, - "component": {}, - "command": {}, - "workdir": {} - }, - "required": [ - "type", - "component", - "command" - ], - "additionalProperties": false - }, - { - "properties": { - "type": {}, - "reference": {}, - "referenceContent": {} - }, - "anyOf": [ - { - "required": [ - "type", - "reference" - ], - "additionalProperties": true - }, - { - "required": [ - "type", - "referenceContent" - ], - "additionalProperties": true - } - ], - "additionalProperties": false - } - ], - "type": "object", - "properties": { - "type": { - "description": "Describes action type", - "type": "string", - "examples": [ - "exec", - "vscode-task", - "vscode-launch" - ] - }, - "component": { - "type": "string", - "description": "Describes component to which given action relates", - "examples": [ - "mvn-stack" - ] - }, - "command": { - "type": "string", - "description": "The actual action command-line string", - "examples": [ - "mvn package" - ] - }, - "workdir": { - "type": "string", - "description": "Working directory where the command should be executed", - "examples": [ - "/projects/spring-petclinic" - ] - }, - "reference": { - "type": "string", - "description": "the path relative to the location of the devfile to the configuration file defining one or more actions in the editor-specific format", - "examples": [ - "../ide-config/launch.json" - ] - }, - "referenceContent": { - "type": "string", - "description": "The content of the referenced configuration file that defines one or more actions in the editor-specific format", - "examples": [ - "{\"version\": \"2.0.0\",\n \"tasks\": [\n {\n \"type\": \"typescript\",\n \"tsconfig\": \"tsconfig.json\",\n \"problemMatcher\": [\n \"$tsc\"\n ],\n \"group\": {\n \"kind\": \"build\",\n \"isDefault\": true\n }\n }\n ]}" - ] - } - } - } - }, - "previewUrl": { - "type": "object", - "required": [ - "port" - ], - "properties": { - "port": { - "type": "number", - "minimum": 0, - "maximum": 65535 - }, - "path": { - "type": "string" - } - } - } - } - } - }, - "attributes": { - "type": "object", - "editorFree": { - "type": "boolean", - "description": "Defines that no editor is needed and default one should not be provisioned. Defaults to `false`.", - "default": "false" - }, - "persistVolumes": { - "type": "boolean", - "description": "Defines whether volumes should be stored or not. Defaults to `true`. In case of `false` workspace volumes will be created as `emptyDir`. The data in the `emptyDir` volume is deleted forever when a workspace Pod is removed for any reason(pod is crashed, workspace is restarted).", - "default": "true" - }, - "additionalProperties": { - "type": "string" - } - } - } -} diff --git a/wsmaster/che-core-api-workspace/src/main/resources/schema/2.0.0/devfile.json b/wsmaster/che-core-api-workspace/src/main/resources/schema/2.0.0/devfile.json deleted file mode 100644 index 726f05fea0..0000000000 --- a/wsmaster/che-core-api-workspace/src/main/resources/schema/2.0.0/devfile.json +++ /dev/null @@ -1,3374 +0,0 @@ -{ - "description": "Devfile describes the structure of a cloud-native workspace and development environment.", - "type": "object", - "title": "Devfile schema - Version 2.0.0", - "required": [ - "schemaVersion" - ], - "properties": { - "commands": { - "description": "Predefined, ready-to-use, workspace-related commands", - "type": "array", - "items": { - "type": "object", - "required": [ - "id" - ], - "oneOf": [ - { - "required": [ - "exec" - ] - }, - { - "required": [ - "apply" - ] - }, - { - "required": [ - "vscodeTask" - ] - }, - { - "required": [ - "vscodeLaunch" - ] - }, - { - "required": [ - "composite" - ] - } - ], - "properties": { - "apply": { - "description": "Command that consists in applying a given component definition, typically bound to a workspace event.\n\nFor example, when an `apply` command is bound to a `preStart` event, and references a `container` component, it will start the container as a K8S initContainer in the workspace POD, unless the component has its `dedicatedPod` field set to `true`.\n\nWhen no `apply` command exist for a given component, it is assumed the component will be applied at workspace start by default.", - "type": "object", - "required": [ - "component" - ], - "properties": { - "component": { - "description": "Describes component that will be applied", - "type": "string" - }, - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "required": [ - "kind" - ], - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug" - ] - } - }, - "additionalProperties": false - }, - "label": { - "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string" - } - }, - "additionalProperties": false - }, - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "composite": { - "description": "Composite command that allows executing several sub-commands either sequentially or concurrently", - "type": "object", - "properties": { - "commands": { - "description": "The commands that comprise this composite command", - "type": "array", - "items": { - "type": "string" - } - }, - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "required": [ - "kind" - ], - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug" - ] - } - }, - "additionalProperties": false - }, - "label": { - "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string" - }, - "parallel": { - "description": "Indicates if the sub-commands should be executed concurrently", - "type": "boolean" - } - }, - "additionalProperties": false - }, - "exec": { - "description": "CLI Command executed in an existing component container", - "type": "object", - "required": [ - "commandLine", - "component" - ], - "properties": { - "commandLine": { - "description": "The actual command-line string\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/\u003cproject-name\u003e). If there are multiple projects, this will point to the directory of the first one.", - "type": "string" - }, - "component": { - "description": "Describes component to which given action relates", - "type": "string" - }, - "env": { - "description": "Optional list of environment variables that have to be set before running the command", - "type": "array", - "items": { - "type": "object", - "required": [ - "name", - "value" - ], - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "required": [ - "kind" - ], - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug" - ] - } - }, - "additionalProperties": false - }, - "hotReloadCapable": { - "description": "Whether the command is capable to reload itself when source code changes. If set to `true` the command won't be restarted and it is expected to handle file changes on its own.\n\nDefault value is `false`", - "type": "boolean" - }, - "label": { - "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string" - }, - "workingDir": { - "description": "Working directory where the command should be executed\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/\u003cproject-name\u003e). If there are multiple projects, this will point to the directory of the first one.", - "type": "string" - } - }, - "additionalProperties": false - }, - "id": { - "description": "Mandatory identifier that allows referencing this command in composite commands, from a parent, or in events.", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "vscodeLaunch": { - "description": "Command providing the definition of a VsCode launch action", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "inlined" - ] - } - ], - "properties": { - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "required": [ - "kind" - ], - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug" - ] - } - }, - "additionalProperties": false - }, - "inlined": { - "description": "Inlined content of the VsCode configuration", - "type": "string" - }, - "uri": { - "description": "Location as an absolute of relative URI the VsCode configuration will be fetched from", - "type": "string" - } - }, - "additionalProperties": false - }, - "vscodeTask": { - "description": "Command providing the definition of a VsCode Task", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "inlined" - ] - } - ], - "properties": { - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "required": [ - "kind" - ], - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug" - ] - } - }, - "additionalProperties": false - }, - "inlined": { - "description": "Inlined content of the VsCode configuration", - "type": "string" - }, - "uri": { - "description": "Location as an absolute of relative URI the VsCode configuration will be fetched from", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "components": { - "description": "List of the workspace components, such as editor and plugins, user-provided containers, or other types of components", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "container" - ] - }, - { - "required": [ - "kubernetes" - ] - }, - { - "required": [ - "openshift" - ] - }, - { - "required": [ - "volume" - ] - }, - { - "required": [ - "plugin" - ] - } - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "container": { - "description": "Allows adding and configuring workspace-related containers", - "type": "object", - "required": [ - "image" - ], - "properties": { - "args": { - "description": "The arguments to supply to the command running the dockerimage component. The arguments are supplied either to the default command provided in the image or to the overridden command.\n\nDefaults to an empty array, meaning use whatever is defined in the image.", - "type": "array", - "items": { - "type": "string" - } - }, - "command": { - "description": "The command to run in the dockerimage component instead of the default one provided in the image.\n\nDefaults to an empty array, meaning use whatever is defined in the image.", - "type": "array", - "items": { - "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\nDefault value is `false`", - "type": "boolean" - }, - "endpoints": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name", - "targetPort" - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", - "type": "object", - "additionalProperties": true - }, - "exposure": { - "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main workspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main workspace POD, on a local address.\n\nDefault value is `public`", - "type": "string", - "default": "public", - "enum": [ - "public", - "internal", - "none" - ] - }, - "name": { - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "Path of the endpoint URL", - "type": "string" - }, - "protocol": { - "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\nDefault value is `http`", - "type": "string", - "default": "http", - "enum": [ - "http", - "https", - "ws", - "wss", - "tcp", - "udp" - ] - }, - "secure": { - "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" - } - }, - "additionalProperties": false - } - }, - "env": { - "description": "Environment variables used in this container.\n\nThe following variables are reserved and cannot be overridden via env:\n\n - `$PROJECTS_ROOT`\n\n - `$PROJECT_SOURCE`", - "type": "array", - "items": { - "type": "object", - "required": [ - "name", - "value" - ], - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "image": { - "type": "string" - }, - "memoryLimit": { - "type": "string" - }, - "mountSources": { - "description": "Toggles whether or not the project source code should be mounted in the component.\n\nDefaults to true for all component types except plugins and components that set `dedicatedPod` to true.", - "type": "boolean" - }, - "sourceMapping": { - "description": "Optional specification of the path in the container where project sources should be transferred/mounted when `mountSources` is `true`. When omitted, the default value of /projects is used.", - "type": "string", - "default": "/projects" - }, - "volumeMounts": { - "description": "List of volumes mounts that should be mounted is this container.", - "type": "array", - "items": { - "description": "Volume that should be mounted to a component container", - "type": "object", - "required": [ - "name" - ], - "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.", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "The path in the component container where the volume should be mounted. If not path is mentioned, default path is the is `/\u003cname\u003e`.", - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "additionalProperties": false - }, - "kubernetes": { - "description": "Allows importing into the workspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "inlined" - ] - } - ], - "properties": { - "endpoints": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name", - "targetPort" - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", - "type": "object", - "additionalProperties": true - }, - "exposure": { - "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main workspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main workspace POD, on a local address.\n\nDefault value is `public`", - "type": "string", - "default": "public", - "enum": [ - "public", - "internal", - "none" - ] - }, - "name": { - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "Path of the endpoint URL", - "type": "string" - }, - "protocol": { - "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\nDefault value is `http`", - "type": "string", - "default": "http", - "enum": [ - "http", - "https", - "ws", - "wss", - "tcp", - "udp" - ] - }, - "secure": { - "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" - } - }, - "additionalProperties": false - } - }, - "inlined": { - "description": "Inlined manifest", - "type": "string" - }, - "uri": { - "description": "Location in a file fetched from a uri.", - "type": "string" - } - }, - "additionalProperties": false - }, - "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.", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "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.", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "inlined" - ] - } - ], - "properties": { - "endpoints": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name", - "targetPort" - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", - "type": "object", - "additionalProperties": true - }, - "exposure": { - "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main workspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main workspace POD, on a local address.\n\nDefault value is `public`", - "type": "string", - "default": "public", - "enum": [ - "public", - "internal", - "none" - ] - }, - "name": { - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "Path of the endpoint URL", - "type": "string" - }, - "protocol": { - "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\nDefault value is `http`", - "type": "string", - "default": "http", - "enum": [ - "http", - "https", - "ws", - "wss", - "tcp", - "udp" - ] - }, - "secure": { - "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" - } - }, - "additionalProperties": false - } - }, - "inlined": { - "description": "Inlined manifest", - "type": "string" - }, - "uri": { - "description": "Location in a file fetched from a uri.", - "type": "string" - } - }, - "additionalProperties": false - }, - "plugin": { - "description": "Allows importing a plugin.\n\nPlugins are mainly imported devfiles that contribute components, commands and events as a consistent single unit. They are defined in either YAML files following the devfile syntax, or as `DevWorkspaceTemplate` Kubernetes Custom Resources", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "id" - ] - }, - { - "required": [ - "kubernetes" - ] - } - ], - "properties": { - "commands": { - "description": "Overrides of commands encapsulated in a parent devfile or a plugin. Overriding is done according to K8S strategic merge patch standard rules.", - "type": "array", - "items": { - "type": "object", - "required": [ - "id" - ], - "oneOf": [ - { - "required": [ - "exec" - ] - }, - { - "required": [ - "apply" - ] - }, - { - "required": [ - "vscodeTask" - ] - }, - { - "required": [ - "vscodeLaunch" - ] - }, - { - "required": [ - "composite" - ] - } - ], - "properties": { - "apply": { - "description": "Command that consists in applying a given component definition, typically bound to a workspace event.\n\nFor example, when an `apply` command is bound to a `preStart` event, and references a `container` component, it will start the container as a K8S initContainer in the workspace POD, unless the component has its `dedicatedPod` field set to `true`.\n\nWhen no `apply` command exist for a given component, it is assumed the component will be applied at workspace start by default.", - "type": "object", - "properties": { - "component": { - "description": "Describes component that will be applied", - "type": "string" - }, - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug" - ] - } - }, - "additionalProperties": false - }, - "label": { - "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string" - } - }, - "additionalProperties": false - }, - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "composite": { - "description": "Composite command that allows executing several sub-commands either sequentially or concurrently", - "type": "object", - "properties": { - "commands": { - "description": "The commands that comprise this composite command", - "type": "array", - "items": { - "type": "string" - } - }, - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug" - ] - } - }, - "additionalProperties": false - }, - "label": { - "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string" - }, - "parallel": { - "description": "Indicates if the sub-commands should be executed concurrently", - "type": "boolean" - } - }, - "additionalProperties": false - }, - "exec": { - "description": "CLI Command executed in an existing component container", - "type": "object", - "properties": { - "commandLine": { - "description": "The actual command-line string\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/\u003cproject-name\u003e). If there are multiple projects, this will point to the directory of the first one.", - "type": "string" - }, - "component": { - "description": "Describes component to which given action relates", - "type": "string" - }, - "env": { - "description": "Optional list of environment variables that have to be set before running the command", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug" - ] - } - }, - "additionalProperties": false - }, - "hotReloadCapable": { - "description": "Whether the command is capable to reload itself when source code changes. If set to `true` the command won't be restarted and it is expected to handle file changes on its own.\n\nDefault value is `false`", - "type": "boolean" - }, - "label": { - "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string" - }, - "workingDir": { - "description": "Working directory where the command should be executed\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/\u003cproject-name\u003e). If there are multiple projects, this will point to the directory of the first one.", - "type": "string" - } - }, - "additionalProperties": false - }, - "id": { - "description": "Mandatory identifier that allows referencing this command in composite commands, from a parent, or in events.", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "vscodeLaunch": { - "description": "Command providing the definition of a VsCode launch action", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "inlined" - ] - } - ], - "properties": { - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug" - ] - } - }, - "additionalProperties": false - }, - "inlined": { - "description": "Inlined content of the VsCode configuration", - "type": "string" - }, - "uri": { - "description": "Location as an absolute of relative URI the VsCode configuration will be fetched from", - "type": "string" - } - }, - "additionalProperties": false - }, - "vscodeTask": { - "description": "Command providing the definition of a VsCode Task", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "inlined" - ] - } - ], - "properties": { - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug" - ] - } - }, - "additionalProperties": false - }, - "inlined": { - "description": "Inlined content of the VsCode configuration", - "type": "string" - }, - "uri": { - "description": "Location as an absolute of relative URI the VsCode configuration will be fetched from", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "components": { - "description": "Overrides of components encapsulated in a parent devfile or a plugin. Overriding is done according to K8S strategic merge patch standard rules.", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "container" - ] - }, - { - "required": [ - "kubernetes" - ] - }, - { - "required": [ - "openshift" - ] - }, - { - "required": [ - "volume" - ] - } - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "container": { - "description": "Allows adding and configuring workspace-related containers", - "type": "object", - "properties": { - "args": { - "description": "The arguments to supply to the command running the dockerimage component. The arguments are supplied either to the default command provided in the image or to the overridden command.\n\nDefaults to an empty array, meaning use whatever is defined in the image.", - "type": "array", - "items": { - "type": "string" - } - }, - "command": { - "description": "The command to run in the dockerimage component instead of the default one provided in the image.\n\nDefaults to an empty array, meaning use whatever is defined in the image.", - "type": "array", - "items": { - "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\nDefault value is `false`", - "type": "boolean" - }, - "endpoints": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", - "type": "object", - "additionalProperties": true - }, - "exposure": { - "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main workspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main workspace POD, on a local address.\n\nDefault value is `public`", - "type": "string", - "enum": [ - "public", - "internal", - "none" - ] - }, - "name": { - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "Path of the endpoint URL", - "type": "string" - }, - "protocol": { - "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\nDefault value is `http`", - "type": "string", - "enum": [ - "http", - "https", - "ws", - "wss", - "tcp", - "udp" - ] - }, - "secure": { - "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" - } - }, - "additionalProperties": false - } - }, - "env": { - "description": "Environment variables used in this container.\n\nThe following variables are reserved and cannot be overridden via env:\n\n - `$PROJECTS_ROOT`\n\n - `$PROJECT_SOURCE`", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "image": { - "type": "string" - }, - "memoryLimit": { - "type": "string" - }, - "mountSources": { - "description": "Toggles whether or not the project source code should be mounted in the component.\n\nDefaults to true for all component types except plugins and components that set `dedicatedPod` to true.", - "type": "boolean" - }, - "sourceMapping": { - "description": "Optional specification of the path in the container where project sources should be transferred/mounted when `mountSources` is `true`. When omitted, the default value of /projects is used.", - "type": "string" - }, - "volumeMounts": { - "description": "List of volumes mounts that should be mounted is this container.", - "type": "array", - "items": { - "description": "Volume that should be mounted to a component container", - "type": "object", - "required": [ - "name" - ], - "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.", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "The path in the component container where the volume should be mounted. If not path is mentioned, default path is the is `/\u003cname\u003e`.", - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "additionalProperties": false - }, - "kubernetes": { - "description": "Allows importing into the workspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "inlined" - ] - } - ], - "properties": { - "endpoints": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", - "type": "object", - "additionalProperties": true - }, - "exposure": { - "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main workspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main workspace POD, on a local address.\n\nDefault value is `public`", - "type": "string", - "enum": [ - "public", - "internal", - "none" - ] - }, - "name": { - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "Path of the endpoint URL", - "type": "string" - }, - "protocol": { - "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\nDefault value is `http`", - "type": "string", - "enum": [ - "http", - "https", - "ws", - "wss", - "tcp", - "udp" - ] - }, - "secure": { - "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" - } - }, - "additionalProperties": false - } - }, - "inlined": { - "description": "Inlined manifest", - "type": "string" - }, - "uri": { - "description": "Location in a file fetched from a uri.", - "type": "string" - } - }, - "additionalProperties": false - }, - "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.", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "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.", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "inlined" - ] - } - ], - "properties": { - "endpoints": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", - "type": "object", - "additionalProperties": true - }, - "exposure": { - "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main workspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main workspace POD, on a local address.\n\nDefault value is `public`", - "type": "string", - "enum": [ - "public", - "internal", - "none" - ] - }, - "name": { - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "Path of the endpoint URL", - "type": "string" - }, - "protocol": { - "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\nDefault value is `http`", - "type": "string", - "enum": [ - "http", - "https", - "ws", - "wss", - "tcp", - "udp" - ] - }, - "secure": { - "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" - } - }, - "additionalProperties": false - } - }, - "inlined": { - "description": "Inlined manifest", - "type": "string" - }, - "uri": { - "description": "Location in a file fetched from a uri.", - "type": "string" - } - }, - "additionalProperties": false - }, - "volume": { - "description": "Allows specifying the definition of a volume shared by several other components", - "type": "object", - "properties": { - "size": { - "description": "Size of the volume", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "id": { - "description": "Id in a registry that contains a Devfile yaml file", - "type": "string" - }, - "kubernetes": { - "description": "Reference to a Kubernetes CRD of type DevWorkspaceTemplate", - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "namespace": { - "type": "string" - } - }, - "additionalProperties": false - }, - "registryUrl": { - "type": "string" - }, - "uri": { - "description": "Uri of a Devfile yaml file", - "type": "string" - } - }, - "additionalProperties": false - }, - "volume": { - "description": "Allows specifying the definition of a volume shared by several other components", - "type": "object", - "properties": { - "size": { - "description": "Size of the volume", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "events": { - "description": "Bindings of commands to events. Each command is referred-to by its name.", - "type": "object", - "properties": { - "postStart": { - "description": "IDs of commands that should be executed after the workspace is completely started. In the case of Che-Theia, these commands should be executed after all plugins and extensions have started, including project cloning. This means that those commands are not triggered until the user opens the IDE in his browser.", - "type": "array", - "items": { - "type": "string" - } - }, - "postStop": { - "description": "IDs of commands that should be executed after stopping the workspace.", - "type": "array", - "items": { - "type": "string" - } - }, - "preStart": { - "description": "IDs of commands that should be executed before the workspace start. Kubernetes-wise, these commands would typically be executed in init containers of the workspace POD.", - "type": "array", - "items": { - "type": "string" - } - }, - "preStop": { - "description": "IDs of commands that should be executed before stopping the workspace.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "metadata": { - "description": "Optional metadata", - "type": "object", - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "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", - "pattern": "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(\\-[0-9a-z-]+(\\.[0-9a-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$" - } - }, - "additionalProperties": true - }, - "parent": { - "description": "Parent workspace template", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "id" - ] - }, - { - "required": [ - "kubernetes" - ] - } - ], - "properties": { - "commands": { - "description": "Overrides of commands encapsulated in a parent devfile or a plugin. Overriding is done according to K8S strategic merge patch standard rules.", - "type": "array", - "items": { - "type": "object", - "required": [ - "id" - ], - "oneOf": [ - { - "required": [ - "exec" - ] - }, - { - "required": [ - "apply" - ] - }, - { - "required": [ - "vscodeTask" - ] - }, - { - "required": [ - "vscodeLaunch" - ] - }, - { - "required": [ - "composite" - ] - } - ], - "properties": { - "apply": { - "description": "Command that consists in applying a given component definition, typically bound to a workspace event.\n\nFor example, when an `apply` command is bound to a `preStart` event, and references a `container` component, it will start the container as a K8S initContainer in the workspace POD, unless the component has its `dedicatedPod` field set to `true`.\n\nWhen no `apply` command exist for a given component, it is assumed the component will be applied at workspace start by default.", - "type": "object", - "properties": { - "component": { - "description": "Describes component that will be applied", - "type": "string" - }, - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug" - ] - } - }, - "additionalProperties": false - }, - "label": { - "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string" - } - }, - "additionalProperties": false - }, - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "composite": { - "description": "Composite command that allows executing several sub-commands either sequentially or concurrently", - "type": "object", - "properties": { - "commands": { - "description": "The commands that comprise this composite command", - "type": "array", - "items": { - "type": "string" - } - }, - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug" - ] - } - }, - "additionalProperties": false - }, - "label": { - "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string" - }, - "parallel": { - "description": "Indicates if the sub-commands should be executed concurrently", - "type": "boolean" - } - }, - "additionalProperties": false - }, - "exec": { - "description": "CLI Command executed in an existing component container", - "type": "object", - "properties": { - "commandLine": { - "description": "The actual command-line string\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/\u003cproject-name\u003e). If there are multiple projects, this will point to the directory of the first one.", - "type": "string" - }, - "component": { - "description": "Describes component to which given action relates", - "type": "string" - }, - "env": { - "description": "Optional list of environment variables that have to be set before running the command", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug" - ] - } - }, - "additionalProperties": false - }, - "hotReloadCapable": { - "description": "Whether the command is capable to reload itself when source code changes. If set to `true` the command won't be restarted and it is expected to handle file changes on its own.\n\nDefault value is `false`", - "type": "boolean" - }, - "label": { - "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string" - }, - "workingDir": { - "description": "Working directory where the command should be executed\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/\u003cproject-name\u003e). If there are multiple projects, this will point to the directory of the first one.", - "type": "string" - } - }, - "additionalProperties": false - }, - "id": { - "description": "Mandatory identifier that allows referencing this command in composite commands, from a parent, or in events.", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "vscodeLaunch": { - "description": "Command providing the definition of a VsCode launch action", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "inlined" - ] - } - ], - "properties": { - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug" - ] - } - }, - "additionalProperties": false - }, - "inlined": { - "description": "Inlined content of the VsCode configuration", - "type": "string" - }, - "uri": { - "description": "Location as an absolute of relative URI the VsCode configuration will be fetched from", - "type": "string" - } - }, - "additionalProperties": false - }, - "vscodeTask": { - "description": "Command providing the definition of a VsCode Task", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "inlined" - ] - } - ], - "properties": { - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug" - ] - } - }, - "additionalProperties": false - }, - "inlined": { - "description": "Inlined content of the VsCode configuration", - "type": "string" - }, - "uri": { - "description": "Location as an absolute of relative URI the VsCode configuration will be fetched from", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "components": { - "description": "Overrides of components encapsulated in a parent devfile or a plugin. Overriding is done according to K8S strategic merge patch standard rules.", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "container" - ] - }, - { - "required": [ - "kubernetes" - ] - }, - { - "required": [ - "openshift" - ] - }, - { - "required": [ - "volume" - ] - }, - { - "required": [ - "plugin" - ] - } - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "container": { - "description": "Allows adding and configuring workspace-related containers", - "type": "object", - "properties": { - "args": { - "description": "The arguments to supply to the command running the dockerimage component. The arguments are supplied either to the default command provided in the image or to the overridden command.\n\nDefaults to an empty array, meaning use whatever is defined in the image.", - "type": "array", - "items": { - "type": "string" - } - }, - "command": { - "description": "The command to run in the dockerimage component instead of the default one provided in the image.\n\nDefaults to an empty array, meaning use whatever is defined in the image.", - "type": "array", - "items": { - "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\nDefault value is `false`", - "type": "boolean" - }, - "endpoints": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", - "type": "object", - "additionalProperties": true - }, - "exposure": { - "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main workspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main workspace POD, on a local address.\n\nDefault value is `public`", - "type": "string", - "enum": [ - "public", - "internal", - "none" - ] - }, - "name": { - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "Path of the endpoint URL", - "type": "string" - }, - "protocol": { - "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\nDefault value is `http`", - "type": "string", - "enum": [ - "http", - "https", - "ws", - "wss", - "tcp", - "udp" - ] - }, - "secure": { - "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" - } - }, - "additionalProperties": false - } - }, - "env": { - "description": "Environment variables used in this container.\n\nThe following variables are reserved and cannot be overridden via env:\n\n - `$PROJECTS_ROOT`\n\n - `$PROJECT_SOURCE`", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "image": { - "type": "string" - }, - "memoryLimit": { - "type": "string" - }, - "mountSources": { - "description": "Toggles whether or not the project source code should be mounted in the component.\n\nDefaults to true for all component types except plugins and components that set `dedicatedPod` to true.", - "type": "boolean" - }, - "sourceMapping": { - "description": "Optional specification of the path in the container where project sources should be transferred/mounted when `mountSources` is `true`. When omitted, the default value of /projects is used.", - "type": "string" - }, - "volumeMounts": { - "description": "List of volumes mounts that should be mounted is this container.", - "type": "array", - "items": { - "description": "Volume that should be mounted to a component container", - "type": "object", - "required": [ - "name" - ], - "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.", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "The path in the component container where the volume should be mounted. If not path is mentioned, default path is the is `/\u003cname\u003e`.", - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "additionalProperties": false - }, - "kubernetes": { - "description": "Allows importing into the workspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "inlined" - ] - } - ], - "properties": { - "endpoints": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", - "type": "object", - "additionalProperties": true - }, - "exposure": { - "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main workspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main workspace POD, on a local address.\n\nDefault value is `public`", - "type": "string", - "enum": [ - "public", - "internal", - "none" - ] - }, - "name": { - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "Path of the endpoint URL", - "type": "string" - }, - "protocol": { - "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\nDefault value is `http`", - "type": "string", - "enum": [ - "http", - "https", - "ws", - "wss", - "tcp", - "udp" - ] - }, - "secure": { - "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" - } - }, - "additionalProperties": false - } - }, - "inlined": { - "description": "Inlined manifest", - "type": "string" - }, - "uri": { - "description": "Location in a file fetched from a uri.", - "type": "string" - } - }, - "additionalProperties": false - }, - "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.", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "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.", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "inlined" - ] - } - ], - "properties": { - "endpoints": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", - "type": "object", - "additionalProperties": true - }, - "exposure": { - "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main workspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main workspace POD, on a local address.\n\nDefault value is `public`", - "type": "string", - "enum": [ - "public", - "internal", - "none" - ] - }, - "name": { - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "Path of the endpoint URL", - "type": "string" - }, - "protocol": { - "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\nDefault value is `http`", - "type": "string", - "enum": [ - "http", - "https", - "ws", - "wss", - "tcp", - "udp" - ] - }, - "secure": { - "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" - } - }, - "additionalProperties": false - } - }, - "inlined": { - "description": "Inlined manifest", - "type": "string" - }, - "uri": { - "description": "Location in a file fetched from a uri.", - "type": "string" - } - }, - "additionalProperties": false - }, - "plugin": { - "description": "Allows importing a plugin.\n\nPlugins are mainly imported devfiles that contribute components, commands and events as a consistent single unit. They are defined in either YAML files following the devfile syntax, or as `DevWorkspaceTemplate` Kubernetes Custom Resources", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "id" - ] - }, - { - "required": [ - "kubernetes" - ] - } - ], - "properties": { - "commands": { - "description": "Overrides of commands encapsulated in a parent devfile or a plugin. Overriding is done according to K8S strategic merge patch standard rules.", - "type": "array", - "items": { - "type": "object", - "required": [ - "id" - ], - "oneOf": [ - { - "required": [ - "exec" - ] - }, - { - "required": [ - "apply" - ] - }, - { - "required": [ - "vscodeTask" - ] - }, - { - "required": [ - "vscodeLaunch" - ] - }, - { - "required": [ - "composite" - ] - } - ], - "properties": { - "apply": { - "description": "Command that consists in applying a given component definition, typically bound to a workspace event.\n\nFor example, when an `apply` command is bound to a `preStart` event, and references a `container` component, it will start the container as a K8S initContainer in the workspace POD, unless the component has its `dedicatedPod` field set to `true`.\n\nWhen no `apply` command exist for a given component, it is assumed the component will be applied at workspace start by default.", - "type": "object", - "properties": { - "component": { - "description": "Describes component that will be applied", - "type": "string" - }, - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug" - ] - } - }, - "additionalProperties": false - }, - "label": { - "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string" - } - }, - "additionalProperties": false - }, - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "composite": { - "description": "Composite command that allows executing several sub-commands either sequentially or concurrently", - "type": "object", - "properties": { - "commands": { - "description": "The commands that comprise this composite command", - "type": "array", - "items": { - "type": "string" - } - }, - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug" - ] - } - }, - "additionalProperties": false - }, - "label": { - "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string" - }, - "parallel": { - "description": "Indicates if the sub-commands should be executed concurrently", - "type": "boolean" - } - }, - "additionalProperties": false - }, - "exec": { - "description": "CLI Command executed in an existing component container", - "type": "object", - "properties": { - "commandLine": { - "description": "The actual command-line string\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/\u003cproject-name\u003e). If there are multiple projects, this will point to the directory of the first one.", - "type": "string" - }, - "component": { - "description": "Describes component to which given action relates", - "type": "string" - }, - "env": { - "description": "Optional list of environment variables that have to be set before running the command", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug" - ] - } - }, - "additionalProperties": false - }, - "hotReloadCapable": { - "description": "Whether the command is capable to reload itself when source code changes. If set to `true` the command won't be restarted and it is expected to handle file changes on its own.\n\nDefault value is `false`", - "type": "boolean" - }, - "label": { - "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string" - }, - "workingDir": { - "description": "Working directory where the command should be executed\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/\u003cproject-name\u003e). If there are multiple projects, this will point to the directory of the first one.", - "type": "string" - } - }, - "additionalProperties": false - }, - "id": { - "description": "Mandatory identifier that allows referencing this command in composite commands, from a parent, or in events.", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "vscodeLaunch": { - "description": "Command providing the definition of a VsCode launch action", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "inlined" - ] - } - ], - "properties": { - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug" - ] - } - }, - "additionalProperties": false - }, - "inlined": { - "description": "Inlined content of the VsCode configuration", - "type": "string" - }, - "uri": { - "description": "Location as an absolute of relative URI the VsCode configuration will be fetched from", - "type": "string" - } - }, - "additionalProperties": false - }, - "vscodeTask": { - "description": "Command providing the definition of a VsCode Task", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "inlined" - ] - } - ], - "properties": { - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug" - ] - } - }, - "additionalProperties": false - }, - "inlined": { - "description": "Inlined content of the VsCode configuration", - "type": "string" - }, - "uri": { - "description": "Location as an absolute of relative URI the VsCode configuration will be fetched from", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "components": { - "description": "Overrides of components encapsulated in a parent devfile or a plugin. Overriding is done according to K8S strategic merge patch standard rules.", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "container" - ] - }, - { - "required": [ - "kubernetes" - ] - }, - { - "required": [ - "openshift" - ] - }, - { - "required": [ - "volume" - ] - } - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "container": { - "description": "Allows adding and configuring workspace-related containers", - "type": "object", - "properties": { - "args": { - "description": "The arguments to supply to the command running the dockerimage component. The arguments are supplied either to the default command provided in the image or to the overridden command.\n\nDefaults to an empty array, meaning use whatever is defined in the image.", - "type": "array", - "items": { - "type": "string" - } - }, - "command": { - "description": "The command to run in the dockerimage component instead of the default one provided in the image.\n\nDefaults to an empty array, meaning use whatever is defined in the image.", - "type": "array", - "items": { - "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\nDefault value is `false`", - "type": "boolean" - }, - "endpoints": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", - "type": "object", - "additionalProperties": true - }, - "exposure": { - "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main workspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main workspace POD, on a local address.\n\nDefault value is `public`", - "type": "string", - "enum": [ - "public", - "internal", - "none" - ] - }, - "name": { - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "Path of the endpoint URL", - "type": "string" - }, - "protocol": { - "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\nDefault value is `http`", - "type": "string", - "enum": [ - "http", - "https", - "ws", - "wss", - "tcp", - "udp" - ] - }, - "secure": { - "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" - } - }, - "additionalProperties": false - } - }, - "env": { - "description": "Environment variables used in this container.\n\nThe following variables are reserved and cannot be overridden via env:\n\n - `$PROJECTS_ROOT`\n\n - `$PROJECT_SOURCE`", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "image": { - "type": "string" - }, - "memoryLimit": { - "type": "string" - }, - "mountSources": { - "description": "Toggles whether or not the project source code should be mounted in the component.\n\nDefaults to true for all component types except plugins and components that set `dedicatedPod` to true.", - "type": "boolean" - }, - "sourceMapping": { - "description": "Optional specification of the path in the container where project sources should be transferred/mounted when `mountSources` is `true`. When omitted, the default value of /projects is used.", - "type": "string" - }, - "volumeMounts": { - "description": "List of volumes mounts that should be mounted is this container.", - "type": "array", - "items": { - "description": "Volume that should be mounted to a component container", - "type": "object", - "required": [ - "name" - ], - "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.", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "The path in the component container where the volume should be mounted. If not path is mentioned, default path is the is `/\u003cname\u003e`.", - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "additionalProperties": false - }, - "kubernetes": { - "description": "Allows importing into the workspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "inlined" - ] - } - ], - "properties": { - "endpoints": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", - "type": "object", - "additionalProperties": true - }, - "exposure": { - "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main workspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main workspace POD, on a local address.\n\nDefault value is `public`", - "type": "string", - "enum": [ - "public", - "internal", - "none" - ] - }, - "name": { - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "Path of the endpoint URL", - "type": "string" - }, - "protocol": { - "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\nDefault value is `http`", - "type": "string", - "enum": [ - "http", - "https", - "ws", - "wss", - "tcp", - "udp" - ] - }, - "secure": { - "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" - } - }, - "additionalProperties": false - } - }, - "inlined": { - "description": "Inlined manifest", - "type": "string" - }, - "uri": { - "description": "Location in a file fetched from a uri.", - "type": "string" - } - }, - "additionalProperties": false - }, - "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.", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "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.", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "inlined" - ] - } - ], - "properties": { - "endpoints": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", - "type": "object", - "additionalProperties": true - }, - "exposure": { - "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main workspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main workspace POD, on a local address.\n\nDefault value is `public`", - "type": "string", - "enum": [ - "public", - "internal", - "none" - ] - }, - "name": { - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "Path of the endpoint URL", - "type": "string" - }, - "protocol": { - "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\nDefault value is `http`", - "type": "string", - "enum": [ - "http", - "https", - "ws", - "wss", - "tcp", - "udp" - ] - }, - "secure": { - "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" - } - }, - "additionalProperties": false - } - }, - "inlined": { - "description": "Inlined manifest", - "type": "string" - }, - "uri": { - "description": "Location in a file fetched from a uri.", - "type": "string" - } - }, - "additionalProperties": false - }, - "volume": { - "description": "Allows specifying the definition of a volume shared by several other components", - "type": "object", - "properties": { - "size": { - "description": "Size of the volume", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "id": { - "description": "Id in a registry that contains a Devfile yaml file", - "type": "string" - }, - "kubernetes": { - "description": "Reference to a Kubernetes CRD of type DevWorkspaceTemplate", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "namespace": { - "type": "string" - } - }, - "additionalProperties": false - }, - "registryUrl": { - "type": "string" - }, - "uri": { - "description": "Uri of a Devfile yaml file", - "type": "string" - } - }, - "additionalProperties": false - }, - "volume": { - "description": "Allows specifying the definition of a volume shared by several other components", - "type": "object", - "properties": { - "size": { - "description": "Size of the volume", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "id": { - "description": "Id in a registry that contains a Devfile yaml file", - "type": "string" - }, - "kubernetes": { - "description": "Reference to a Kubernetes CRD of type DevWorkspaceTemplate", - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "namespace": { - "type": "string" - } - }, - "additionalProperties": false - }, - "projects": { - "description": "Overrides of projects encapsulated in a parent devfile. Overriding is done according to K8S strategic merge patch standard rules.", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "git" - ] - }, - { - "required": [ - "github" - ] - }, - { - "required": [ - "zip" - ] - } - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "clonePath": { - "description": "Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name.", - "type": "string" - }, - "git": { - "description": "Project's Git source", - "type": "object", - "properties": { - "checkoutFrom": { - "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", - "type": "object", - "properties": { - "remote": { - "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string" - }, - "revision": { - "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string" - } - }, - "additionalProperties": false - }, - "remotes": { - "description": "The remotes map which should be initialized in the git project. Must have at least one remote configured", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "github": { - "description": "Project's GitHub source", - "type": "object", - "properties": { - "checkoutFrom": { - "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", - "type": "object", - "properties": { - "remote": { - "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string" - }, - "revision": { - "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string" - } - }, - "additionalProperties": false - }, - "remotes": { - "description": "The remotes map which should be initialized in the git project. Must have at least one remote configured", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "name": { - "description": "Project name", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "sparseCheckoutDirs": { - "description": "Populate the project sparsely with selected directories.", - "type": "array", - "items": { - "type": "string" - } - }, - "zip": { - "description": "Project's Zip source", - "type": "object", - "properties": { - "location": { - "description": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "registryUrl": { - "type": "string" - }, - "starterProjects": { - "description": "Overrides of starterProjects encapsulated in a parent devfile. Overriding is done according to K8S strategic merge patch standard rules.", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "git" - ] - }, - { - "required": [ - "github" - ] - }, - { - "required": [ - "zip" - ] - } - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "description": { - "description": "Description of a starter project", - "type": "string" - }, - "git": { - "description": "Project's Git source", - "type": "object", - "properties": { - "checkoutFrom": { - "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", - "type": "object", - "properties": { - "remote": { - "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string" - }, - "revision": { - "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string" - } - }, - "additionalProperties": false - }, - "remotes": { - "description": "The remotes map which should be initialized in the git project. Must have at least one remote configured", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "github": { - "description": "Project's GitHub source", - "type": "object", - "properties": { - "checkoutFrom": { - "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", - "type": "object", - "properties": { - "remote": { - "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string" - }, - "revision": { - "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string" - } - }, - "additionalProperties": false - }, - "remotes": { - "description": "The remotes map which should be initialized in the git project. Must have at least one remote configured", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "name": { - "description": "Project name", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "subDir": { - "description": "Sub-directory from a starter project to be used as root for starter project.", - "type": "string" - }, - "zip": { - "description": "Project's Zip source", - "type": "object", - "properties": { - "location": { - "description": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "uri": { - "description": "Uri of a Devfile yaml file", - "type": "string" - } - }, - "additionalProperties": false - }, - "projects": { - "description": "Projects worked on in the workspace, containing names and sources locations", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "git" - ] - }, - { - "required": [ - "github" - ] - }, - { - "required": [ - "zip" - ] - } - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "clonePath": { - "description": "Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name.", - "type": "string" - }, - "git": { - "description": "Project's Git source", - "type": "object", - "required": [ - "remotes" - ], - "properties": { - "checkoutFrom": { - "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", - "type": "object", - "properties": { - "remote": { - "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string" - }, - "revision": { - "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string" - } - }, - "additionalProperties": false - }, - "remotes": { - "description": "The remotes map which should be initialized in the git project. Must have at least one remote configured", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "github": { - "description": "Project's GitHub source", - "type": "object", - "required": [ - "remotes" - ], - "properties": { - "checkoutFrom": { - "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", - "type": "object", - "properties": { - "remote": { - "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string" - }, - "revision": { - "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string" - } - }, - "additionalProperties": false - }, - "remotes": { - "description": "The remotes map which should be initialized in the git project. Must have at least one remote configured", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "name": { - "description": "Project name", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "sparseCheckoutDirs": { - "description": "Populate the project sparsely with selected directories.", - "type": "array", - "items": { - "type": "string" - } - }, - "zip": { - "description": "Project's Zip source", - "type": "object", - "properties": { - "location": { - "description": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "schemaVersion": { - "description": "Devfile schema version", - "type": "string", - "pattern": "^2\\.0\\.0$" - }, - "starterProjects": { - "description": "StarterProjects is a project that can be used as a starting point when bootstrapping new projects", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "git" - ] - }, - { - "required": [ - "github" - ] - }, - { - "required": [ - "zip" - ] - } - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "description": { - "description": "Description of a starter project", - "type": "string" - }, - "git": { - "description": "Project's Git source", - "type": "object", - "required": [ - "remotes" - ], - "properties": { - "checkoutFrom": { - "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", - "type": "object", - "properties": { - "remote": { - "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string" - }, - "revision": { - "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string" - } - }, - "additionalProperties": false - }, - "remotes": { - "description": "The remotes map which should be initialized in the git project. Must have at least one remote configured", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "github": { - "description": "Project's GitHub source", - "type": "object", - "required": [ - "remotes" - ], - "properties": { - "checkoutFrom": { - "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", - "type": "object", - "properties": { - "remote": { - "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string" - }, - "revision": { - "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string" - } - }, - "additionalProperties": false - }, - "remotes": { - "description": "The remotes map which should be initialized in the git project. Must have at least one remote configured", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "name": { - "description": "Project name", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "subDir": { - "description": "Sub-directory from a starter project to be used as root for starter project.", - "type": "string" - }, - "zip": { - "description": "Project's Zip source", - "type": "object", - "properties": { - "location": { - "description": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - } - }, - "additionalProperties": false -} \ No newline at end of file diff --git a/wsmaster/che-core-api-workspace/src/main/resources/schema/2.1.0/devfile.json b/wsmaster/che-core-api-workspace/src/main/resources/schema/2.1.0/devfile.json deleted file mode 100644 index 9c7c8beace..0000000000 --- a/wsmaster/che-core-api-workspace/src/main/resources/schema/2.1.0/devfile.json +++ /dev/null @@ -1,1658 +0,0 @@ -{ - "description": "Devfile describes the structure of a cloud-native devworkspace and development environment.", - "type": "object", - "title": "Devfile schema - Version 2.1.0", - "required": [ - "schemaVersion" - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "commands": { - "description": "Predefined, ready-to-use, devworkspace-related commands", - "type": "array", - "items": { - "type": "object", - "required": [ - "id" - ], - "oneOf": [ - { - "required": [ - "exec" - ] - }, - { - "required": [ - "apply" - ] - }, - { - "required": [ - "composite" - ] - } - ], - "properties": { - "apply": { - "description": "Command that consists in applying a given component definition, typically bound to a devworkspace event.\n\nFor example, when an `apply` command is bound to a `preStart` event, and references a `container` component, it will start the container as a K8S initContainer in the devworkspace POD, unless the component has its `dedicatedPod` field set to `true`.\n\nWhen no `apply` command exist for a given component, it is assumed the component will be applied at devworkspace start by default.", - "type": "object", - "required": [ - "component" - ], - "properties": { - "component": { - "description": "Describes component that will be applied", - "type": "string" - }, - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "required": [ - "kind" - ], - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug" - ] - } - }, - "additionalProperties": false - }, - "label": { - "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string" - } - }, - "additionalProperties": false - }, - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "composite": { - "description": "Composite command that allows executing several sub-commands either sequentially or concurrently", - "type": "object", - "properties": { - "commands": { - "description": "The commands that comprise this composite command", - "type": "array", - "items": { - "type": "string" - } - }, - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "required": [ - "kind" - ], - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug" - ] - } - }, - "additionalProperties": false - }, - "label": { - "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string" - }, - "parallel": { - "description": "Indicates if the sub-commands should be executed concurrently", - "type": "boolean" - } - }, - "additionalProperties": false - }, - "exec": { - "description": "CLI Command executed in an existing component container", - "type": "object", - "required": [ - "commandLine", - "component" - ], - "properties": { - "commandLine": { - "description": "The actual command-line string\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/\u003cproject-name\u003e). If there are multiple projects, this will point to the directory of the first one.", - "type": "string" - }, - "component": { - "description": "Describes component to which given action relates", - "type": "string" - }, - "env": { - "description": "Optional list of environment variables that have to be set before running the command", - "type": "array", - "items": { - "type": "object", - "required": [ - "name", - "value" - ], - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "required": [ - "kind" - ], - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug" - ] - } - }, - "additionalProperties": false - }, - "hotReloadCapable": { - "description": "Whether the command is capable to reload itself when source code changes. If set to `true` the command won't be restarted and it is expected to handle file changes on its own.\n\nDefault value is `false`", - "type": "boolean" - }, - "label": { - "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string" - }, - "workingDir": { - "description": "Working directory where the command should be executed\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/\u003cproject-name\u003e). If there are multiple projects, this will point to the directory of the first one.", - "type": "string" - } - }, - "additionalProperties": false - }, - "id": { - "description": "Mandatory identifier that allows referencing this command in composite commands, from a parent, or in events.", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - } - }, - "additionalProperties": false - } - }, - "components": { - "description": "List of the devworkspace components, such as editor and plugins, user-provided containers, or other types of components", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "container" - ] - }, - { - "required": [ - "kubernetes" - ] - }, - { - "required": [ - "openshift" - ] - }, - { - "required": [ - "volume" - ] - } - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "container": { - "description": "Allows adding and configuring devworkspace-related containers", - "type": "object", - "required": [ - "image" - ], - "properties": { - "args": { - "description": "The arguments to supply to the command running the dockerimage component. The arguments are supplied either to the default command provided in the image or to the overridden command.\n\nDefaults to an empty array, meaning use whatever is defined in the image.", - "type": "array", - "items": { - "type": "string" - } - }, - "command": { - "description": "The command to run in the dockerimage component instead of the default one provided in the image.\n\nDefaults to an empty array, meaning use whatever is defined in the image.", - "type": "array", - "items": { - "type": "string" - } - }, - "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\nDefault value is `false`", - "type": "boolean" - }, - "endpoints": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name", - "targetPort" - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", - "type": "object", - "additionalProperties": true - }, - "exposure": { - "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`", - "type": "string", - "default": "public", - "enum": [ - "public", - "internal", - "none" - ] - }, - "name": { - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "Path of the endpoint URL", - "type": "string" - }, - "protocol": { - "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\nDefault value is `http`", - "type": "string", - "default": "http", - "enum": [ - "http", - "https", - "ws", - "wss", - "tcp", - "udp" - ] - }, - "secure": { - "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" - } - }, - "additionalProperties": false - } - }, - "env": { - "description": "Environment variables used in this container.\n\nThe following variables are reserved and cannot be overridden via env:\n\n - `$PROJECTS_ROOT`\n\n - `$PROJECT_SOURCE`", - "type": "array", - "items": { - "type": "object", - "required": [ - "name", - "value" - ], - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "image": { - "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\nDefaults to true for all component types except plugins and components that set `dedicatedPod` to true.", - "type": "boolean" - }, - "sourceMapping": { - "description": "Optional specification of the path in the container where project sources should be transferred/mounted when `mountSources` is `true`. When omitted, the default value of /projects is used.", - "type": "string", - "default": "/projects" - }, - "volumeMounts": { - "description": "List of volumes mounts that should be mounted is this container.", - "type": "array", - "items": { - "description": "Volume that should be mounted to a component container", - "type": "object", - "required": [ - "name" - ], - "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.", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "The path in the component container where the volume should be mounted. If not path is mentioned, default path is the is `/\u003cname\u003e`.", - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "additionalProperties": false - }, - "kubernetes": { - "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "inlined" - ] - } - ], - "properties": { - "endpoints": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name", - "targetPort" - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", - "type": "object", - "additionalProperties": true - }, - "exposure": { - "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`", - "type": "string", - "default": "public", - "enum": [ - "public", - "internal", - "none" - ] - }, - "name": { - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "Path of the endpoint URL", - "type": "string" - }, - "protocol": { - "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\nDefault value is `http`", - "type": "string", - "default": "http", - "enum": [ - "http", - "https", - "ws", - "wss", - "tcp", - "udp" - ] - }, - "secure": { - "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" - } - }, - "additionalProperties": false - } - }, - "inlined": { - "description": "Inlined manifest", - "type": "string" - }, - "uri": { - "description": "Location in a file fetched from a uri.", - "type": "string" - } - }, - "additionalProperties": false - }, - "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.", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "openshift": { - "description": "Allows importing into the devworkspace the OpenShift resources defined in a given manifest. For example this allows reusing the OpenShift definitions used to deploy some runtime components in production.", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "inlined" - ] - } - ], - "properties": { - "endpoints": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name", - "targetPort" - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", - "type": "object", - "additionalProperties": true - }, - "exposure": { - "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`", - "type": "string", - "default": "public", - "enum": [ - "public", - "internal", - "none" - ] - }, - "name": { - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "Path of the endpoint URL", - "type": "string" - }, - "protocol": { - "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\nDefault value is `http`", - "type": "string", - "default": "http", - "enum": [ - "http", - "https", - "ws", - "wss", - "tcp", - "udp" - ] - }, - "secure": { - "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" - } - }, - "additionalProperties": false - } - }, - "inlined": { - "description": "Inlined manifest", - "type": "string" - }, - "uri": { - "description": "Location in a file fetched from a uri.", - "type": "string" - } - }, - "additionalProperties": false - }, - "volume": { - "description": "Allows specifying the definition of a volume shared by several other components", - "type": "object", - "properties": { - "ephemeral": { - "description": "Ephemeral volumes are not stored persistently across restarts. Defaults to false", - "type": "boolean" - }, - "size": { - "description": "Size of the volume", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "events": { - "description": "Bindings of commands to events. Each command is referred-to by its name.", - "type": "object", - "properties": { - "postStart": { - "description": "IDs of commands that should be executed after the devworkspace is completely started. In the case of Che-Theia, these commands should be executed after all plugins and extensions have started, including project cloning. This means that those commands are not triggered until the user opens the IDE in his browser.", - "type": "array", - "items": { - "type": "string" - } - }, - "postStop": { - "description": "IDs of commands that should be executed after stopping the devworkspace.", - "type": "array", - "items": { - "type": "string" - } - }, - "preStart": { - "description": "IDs of commands that should be executed before the devworkspace start. Kubernetes-wise, these commands would typically be executed in init containers of the devworkspace POD.", - "type": "array", - "items": { - "type": "string" - } - }, - "preStop": { - "description": "IDs of commands that should be executed before stopping the devworkspace.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "metadata": { - "description": "Optional metadata", - "type": "object", - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes. Deprecated, use the top-level attributes field instead.", - "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, can be a URI or a relative path in the project", - "type": "string" - }, - "language": { - "description": "Optional devfile language", - "type": "string" - }, - "name": { - "description": "Optional devfile name", - "type": "string" - }, - "projectType": { - "description": "Optional devfile project type", - "type": "string" - }, - "tags": { - "description": "Optional devfile tags", - "type": "array", - "items": { - "type": "string" - } - }, - "version": { - "description": "Optional semver-compatible version", - "type": "string", - "pattern": "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(\\-[0-9a-z-]+(\\.[0-9a-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$" - }, - "website": { - "description": "Optional devfile website", - "type": "string" - } - }, - "additionalProperties": true - }, - "parent": { - "description": "Parent devworkspace template", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "id" - ] - }, - { - "required": [ - "kubernetes" - ] - } - ], - "properties": { - "attributes": { - "description": "Overrides of attributes encapsulated in a parent devfile. Overriding is done according to K8S strategic merge patch standard rules.", - "type": "object", - "additionalProperties": true - }, - "commands": { - "description": "Overrides of commands encapsulated in a parent devfile or a plugin. Overriding is done according to K8S strategic merge patch standard rules.", - "type": "array", - "items": { - "type": "object", - "required": [ - "id" - ], - "oneOf": [ - { - "required": [ - "exec" - ] - }, - { - "required": [ - "apply" - ] - }, - { - "required": [ - "composite" - ] - } - ], - "properties": { - "apply": { - "description": "Command that consists in applying a given component definition, typically bound to a devworkspace event.\n\nFor example, when an `apply` command is bound to a `preStart` event, and references a `container` component, it will start the container as a K8S initContainer in the devworkspace POD, unless the component has its `dedicatedPod` field set to `true`.\n\nWhen no `apply` command exist for a given component, it is assumed the component will be applied at devworkspace start by default.", - "type": "object", - "properties": { - "component": { - "description": "Describes component that will be applied", - "type": "string" - }, - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug" - ] - } - }, - "additionalProperties": false - }, - "label": { - "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string" - } - }, - "additionalProperties": false - }, - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "composite": { - "description": "Composite command that allows executing several sub-commands either sequentially or concurrently", - "type": "object", - "properties": { - "commands": { - "description": "The commands that comprise this composite command", - "type": "array", - "items": { - "type": "string" - } - }, - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug" - ] - } - }, - "additionalProperties": false - }, - "label": { - "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string" - }, - "parallel": { - "description": "Indicates if the sub-commands should be executed concurrently", - "type": "boolean" - } - }, - "additionalProperties": false - }, - "exec": { - "description": "CLI Command executed in an existing component container", - "type": "object", - "properties": { - "commandLine": { - "description": "The actual command-line string\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/\u003cproject-name\u003e). If there are multiple projects, this will point to the directory of the first one.", - "type": "string" - }, - "component": { - "description": "Describes component to which given action relates", - "type": "string" - }, - "env": { - "description": "Optional list of environment variables that have to be set before running the command", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug" - ] - } - }, - "additionalProperties": false - }, - "hotReloadCapable": { - "description": "Whether the command is capable to reload itself when source code changes. If set to `true` the command won't be restarted and it is expected to handle file changes on its own.\n\nDefault value is `false`", - "type": "boolean" - }, - "label": { - "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string" - }, - "workingDir": { - "description": "Working directory where the command should be executed\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/\u003cproject-name\u003e). If there are multiple projects, this will point to the directory of the first one.", - "type": "string" - } - }, - "additionalProperties": false - }, - "id": { - "description": "Mandatory identifier that allows referencing this command in composite commands, from a parent, or in events.", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - } - }, - "additionalProperties": false - } - }, - "components": { - "description": "Overrides of components encapsulated in a parent devfile or a plugin. Overriding is done according to K8S strategic merge patch standard rules.", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "container" - ] - }, - { - "required": [ - "kubernetes" - ] - }, - { - "required": [ - "openshift" - ] - }, - { - "required": [ - "volume" - ] - } - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "container": { - "description": "Allows adding and configuring devworkspace-related containers", - "type": "object", - "properties": { - "args": { - "description": "The arguments to supply to the command running the dockerimage component. The arguments are supplied either to the default command provided in the image or to the overridden command.\n\nDefaults to an empty array, meaning use whatever is defined in the image.", - "type": "array", - "items": { - "type": "string" - } - }, - "command": { - "description": "The command to run in the dockerimage component instead of the default one provided in the image.\n\nDefaults to an empty array, meaning use whatever is defined in the image.", - "type": "array", - "items": { - "type": "string" - } - }, - "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\nDefault value is `false`", - "type": "boolean" - }, - "endpoints": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", - "type": "object", - "additionalProperties": true - }, - "exposure": { - "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`", - "type": "string", - "enum": [ - "public", - "internal", - "none" - ] - }, - "name": { - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "Path of the endpoint URL", - "type": "string" - }, - "protocol": { - "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\nDefault value is `http`", - "type": "string", - "enum": [ - "http", - "https", - "ws", - "wss", - "tcp", - "udp" - ] - }, - "secure": { - "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" - } - }, - "additionalProperties": false - } - }, - "env": { - "description": "Environment variables used in this container.\n\nThe following variables are reserved and cannot be overridden via env:\n\n - `$PROJECTS_ROOT`\n\n - `$PROJECT_SOURCE`", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "image": { - "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\nDefaults to true for all component types except plugins and components that set `dedicatedPod` to true.", - "type": "boolean" - }, - "sourceMapping": { - "description": "Optional specification of the path in the container where project sources should be transferred/mounted when `mountSources` is `true`. When omitted, the default value of /projects is used.", - "type": "string" - }, - "volumeMounts": { - "description": "List of volumes mounts that should be mounted is this container.", - "type": "array", - "items": { - "description": "Volume that should be mounted to a component container", - "type": "object", - "required": [ - "name" - ], - "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.", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "The path in the component container where the volume should be mounted. If not path is mentioned, default path is the is `/\u003cname\u003e`.", - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "additionalProperties": false - }, - "kubernetes": { - "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "inlined" - ] - } - ], - "properties": { - "endpoints": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", - "type": "object", - "additionalProperties": true - }, - "exposure": { - "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`", - "type": "string", - "enum": [ - "public", - "internal", - "none" - ] - }, - "name": { - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "Path of the endpoint URL", - "type": "string" - }, - "protocol": { - "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\nDefault value is `http`", - "type": "string", - "enum": [ - "http", - "https", - "ws", - "wss", - "tcp", - "udp" - ] - }, - "secure": { - "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" - } - }, - "additionalProperties": false - } - }, - "inlined": { - "description": "Inlined manifest", - "type": "string" - }, - "uri": { - "description": "Location in a file fetched from a uri.", - "type": "string" - } - }, - "additionalProperties": false - }, - "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.", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "openshift": { - "description": "Allows importing into the devworkspace the OpenShift resources defined in a given manifest. For example this allows reusing the OpenShift definitions used to deploy some runtime components in production.", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "inlined" - ] - } - ], - "properties": { - "endpoints": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", - "type": "object", - "additionalProperties": true - }, - "exposure": { - "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`", - "type": "string", - "enum": [ - "public", - "internal", - "none" - ] - }, - "name": { - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "Path of the endpoint URL", - "type": "string" - }, - "protocol": { - "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\nDefault value is `http`", - "type": "string", - "enum": [ - "http", - "https", - "ws", - "wss", - "tcp", - "udp" - ] - }, - "secure": { - "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" - } - }, - "additionalProperties": false - } - }, - "inlined": { - "description": "Inlined manifest", - "type": "string" - }, - "uri": { - "description": "Location in a file fetched from a uri.", - "type": "string" - } - }, - "additionalProperties": false - }, - "volume": { - "description": "Allows specifying the definition of a volume shared by several other components", - "type": "object", - "properties": { - "ephemeral": { - "description": "Ephemeral volumes are not stored persistently across restarts. Defaults to false", - "type": "boolean" - }, - "size": { - "description": "Size of the volume", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "id": { - "description": "Id in a registry that contains a Devfile yaml file", - "type": "string" - }, - "kubernetes": { - "description": "Reference to a Kubernetes CRD of type DevWorkspaceTemplate", - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "namespace": { - "type": "string" - } - }, - "additionalProperties": false - }, - "projects": { - "description": "Overrides of projects encapsulated in a parent devfile. Overriding is done according to K8S strategic merge patch standard rules.", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "git" - ] - }, - { - "required": [ - "zip" - ] - } - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "clonePath": { - "description": "Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name.", - "type": "string" - }, - "git": { - "description": "Project's Git source", - "type": "object", - "properties": { - "checkoutFrom": { - "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", - "type": "object", - "properties": { - "remote": { - "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string" - }, - "revision": { - "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string" - } - }, - "additionalProperties": false - }, - "remotes": { - "description": "The remotes map which should be initialized in the git project. Must have at least one remote configured", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "name": { - "description": "Project name", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "zip": { - "description": "Project's Zip source", - "type": "object", - "properties": { - "location": { - "description": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "registryUrl": { - "description": "Registry URL to pull the parent devfile from when using id in the parent reference. To ensure the parent devfile gets resolved consistently in different environments, it is recommended to always specify the `regsitryURL` when `Id` is used.", - "type": "string" - }, - "starterProjects": { - "description": "Overrides of starterProjects encapsulated in a parent devfile. Overriding is done according to K8S strategic merge patch standard rules.", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "git" - ] - }, - { - "required": [ - "zip" - ] - } - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "description": { - "description": "Description of a starter project", - "type": "string" - }, - "git": { - "description": "Project's Git source", - "type": "object", - "properties": { - "checkoutFrom": { - "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", - "type": "object", - "properties": { - "remote": { - "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string" - }, - "revision": { - "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string" - } - }, - "additionalProperties": false - }, - "remotes": { - "description": "The remotes map which should be initialized in the git project. Must have at least one remote configured", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "name": { - "description": "Project name", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "subDir": { - "description": "Sub-directory from a starter project to be used as root for starter project.", - "type": "string" - }, - "zip": { - "description": "Project's Zip source", - "type": "object", - "properties": { - "location": { - "description": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "uri": { - "description": "URI Reference of a parent devfile YAML file. It can be a full URL or a relative URI with the current devfile as the base URI.", - "type": "string" - }, - "variables": { - "description": "Overrides of variables encapsulated in a parent devfile. Overriding is done according to K8S strategic merge patch standard rules.", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "projects": { - "description": "Projects worked on in the devworkspace, containing names and sources locations", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "git" - ] - }, - { - "required": [ - "zip" - ] - } - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "clonePath": { - "description": "Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name.", - "type": "string" - }, - "git": { - "description": "Project's Git source", - "type": "object", - "required": [ - "remotes" - ], - "properties": { - "checkoutFrom": { - "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", - "type": "object", - "properties": { - "remote": { - "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string" - }, - "revision": { - "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string" - } - }, - "additionalProperties": false - }, - "remotes": { - "description": "The remotes map which should be initialized in the git project. Must have at least one remote configured", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "name": { - "description": "Project name", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "zip": { - "description": "Project's Zip source", - "type": "object", - "properties": { - "location": { - "description": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "schemaVersion": { - "description": "Devfile schema version", - "type": "string", - "pattern": "^2\\.1\\.0$" - }, - "starterProjects": { - "description": "StarterProjects is a project that can be used as a starting point when bootstrapping new projects", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "git" - ] - }, - { - "required": [ - "zip" - ] - } - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "description": { - "description": "Description of a starter project", - "type": "string" - }, - "git": { - "description": "Project's Git source", - "type": "object", - "required": [ - "remotes" - ], - "properties": { - "checkoutFrom": { - "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", - "type": "object", - "properties": { - "remote": { - "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string" - }, - "revision": { - "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string" - } - }, - "additionalProperties": false - }, - "remotes": { - "description": "The remotes map which should be initialized in the git project. Must have at least one remote configured", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "name": { - "description": "Project name", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "subDir": { - "description": "Sub-directory from a starter project to be used as root for starter project.", - "type": "string" - }, - "zip": { - "description": "Project's Zip source", - "type": "object", - "properties": { - "location": { - "description": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "variables": { - "description": "Map of key-value variables used for string replacement in the devfile. Values can can be referenced via {{variable-key}} to replace the corresponding value in string fields in the devfile. Replacement cannot be used for\n\n - schemaVersion, metadata, parent source - element identifiers, e.g. command id, component name, endpoint name, project name - references to identifiers, e.g. in events, a command's component, container's volume mount name - string enums, e.g. command group kind, endpoint exposure", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false -} diff --git a/wsmaster/che-core-api-workspace/src/main/resources/schema/2.2.0/devfile.json b/wsmaster/che-core-api-workspace/src/main/resources/schema/2.2.0/devfile.json deleted file mode 100644 index 4c6f354110..0000000000 --- a/wsmaster/che-core-api-workspace/src/main/resources/schema/2.2.0/devfile.json +++ /dev/null @@ -1,2304 +0,0 @@ -{ - "description": "Devfile describes the structure of a cloud-native devworkspace and development environment.\n\nIDE-targeted variants of the schemas provide the following difference compared to the main schemas:\n- They contain additional non-standard `markdownDescription` attributes that are used by IDEs such a VSCode\nto provide markdown-rendered documentation hovers. \n- They don't contain `default` attributes, since this triggers unwanted addition of defaulted fields during completion in IDEs.", - "type": "object", - "title": "Devfile schema - Version 2.2.0 - IDE-targeted variant", - "required": [ - "schemaVersion" - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true, - "markdownDescription": "Map of implementation-dependant free-form YAML attributes." - }, - "commands": { - "description": "Predefined, ready-to-use, devworkspace-related commands", - "type": "array", - "items": { - "type": "object", - "required": [ - "id" - ], - "oneOf": [ - { - "required": [ - "exec" - ] - }, - { - "required": [ - "apply" - ] - }, - { - "required": [ - "composite" - ] - } - ], - "properties": { - "apply": { - "description": "Command that consists in applying a given component definition, typically bound to a devworkspace event.\n\nFor example, when an `apply` command is bound to a `preStart` event, and references a `container` component, it will start the container as a K8S initContainer in the devworkspace POD, unless the component has its `dedicatedPod` field set to `true`.\n\nWhen no `apply` command exist for a given component, it is assumed the component will be applied at devworkspace start by default, unless `deployByDefault` for that component is set to false.", - "type": "object", - "required": [ - "component" - ], - "properties": { - "component": { - "description": "Describes component that will be applied", - "type": "string", - "markdownDescription": "Describes component that will be applied" - }, - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "required": [ - "kind" - ], - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean", - "markdownDescription": "Identifies the default command for a given group kind" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug", - "deploy" - ], - "markdownDescription": "Kind of group the command is part of" - } - }, - "additionalProperties": false, - "markdownDescription": "Defines the group this command is part of" - }, - "label": { - "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string", - "markdownDescription": "Optional label that provides a label for this command to be used in Editor UI menus for example" - } - }, - "additionalProperties": false, - "markdownDescription": "Command that consists in applying a given component definition, typically bound to a devworkspace event.\n\nFor example, when an `apply` command is bound to a `preStart` event, and references a `container` component, it will start the container as a K8S initContainer in the devworkspace POD, unless the component has its `dedicatedPod` field set to `true`.\n\nWhen no `apply` command exist for a given component, it is assumed the component will be applied at devworkspace start by default, unless `deployByDefault` for that component is set to false." - }, - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true, - "markdownDescription": "Map of implementation-dependant free-form YAML attributes." - }, - "composite": { - "description": "Composite command that allows executing several sub-commands either sequentially or concurrently", - "type": "object", - "properties": { - "commands": { - "description": "The commands that comprise this composite command", - "type": "array", - "items": { - "type": "string" - }, - "markdownDescription": "The commands that comprise this composite command" - }, - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "required": [ - "kind" - ], - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean", - "markdownDescription": "Identifies the default command for a given group kind" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug", - "deploy" - ], - "markdownDescription": "Kind of group the command is part of" - } - }, - "additionalProperties": false, - "markdownDescription": "Defines the group this command is part of" - }, - "label": { - "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string", - "markdownDescription": "Optional label that provides a label for this command to be used in Editor UI menus for example" - }, - "parallel": { - "description": "Indicates if the sub-commands should be executed concurrently", - "type": "boolean", - "markdownDescription": "Indicates if the sub-commands should be executed concurrently" - } - }, - "additionalProperties": false, - "markdownDescription": "Composite command that allows executing several sub-commands either sequentially or concurrently" - }, - "exec": { - "description": "CLI Command executed in an existing component container", - "type": "object", - "required": [ - "commandLine", - "component" - ], - "properties": { - "commandLine": { - "description": "The actual command-line string\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/\u003cproject-name\u003e). If there are multiple projects, this will point to the directory of the first one.", - "type": "string", - "markdownDescription": "The actual command-line string\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/\u003cproject-name\u003e). If there are multiple projects, this will point to the directory of the first one." - }, - "component": { - "description": "Describes component to which given action relates", - "type": "string", - "markdownDescription": "Describes component to which given action relates" - }, - "env": { - "description": "Optional list of environment variables that have to be set before running the command", - "type": "array", - "items": { - "type": "object", - "required": [ - "name", - "value" - ], - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false - }, - "markdownDescription": "Optional list of environment variables that have to be set before running the command" - }, - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "required": [ - "kind" - ], - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean", - "markdownDescription": "Identifies the default command for a given group kind" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug", - "deploy" - ], - "markdownDescription": "Kind of group the command is part of" - } - }, - "additionalProperties": false, - "markdownDescription": "Defines the group this command is part of" - }, - "hotReloadCapable": { - "description": "Whether the command is capable to reload itself when source code changes. If set to `true` the command won't be restarted and it is expected to handle file changes on its own.\n\nDefault value is `false`", - "type": "boolean", - "markdownDescription": "Whether the command is capable to reload itself when source code changes. If set to `true` the command won't be restarted and it is expected to handle file changes on its own.\n\nDefault value is `false`" - }, - "label": { - "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string", - "markdownDescription": "Optional label that provides a label for this command to be used in Editor UI menus for example" - }, - "workingDir": { - "description": "Working directory where the command should be executed\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/\u003cproject-name\u003e). If there are multiple projects, this will point to the directory of the first one.", - "type": "string", - "markdownDescription": "Working directory where the command should be executed\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/\u003cproject-name\u003e). If there are multiple projects, this will point to the directory of the first one." - } - }, - "additionalProperties": false, - "markdownDescription": "CLI Command executed in an existing component container" - }, - "id": { - "description": "Mandatory identifier that allows referencing this command in composite commands, from a parent, or in events.", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$", - "markdownDescription": "Mandatory identifier that allows referencing this command in composite commands, from a parent, or in events." - } - }, - "additionalProperties": false - }, - "markdownDescription": "Predefined, ready-to-use, devworkspace-related commands" - }, - "components": { - "description": "List of the devworkspace components, such as editor and plugins, user-provided containers, or other types of components", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "container" - ] - }, - { - "required": [ - "kubernetes" - ] - }, - { - "required": [ - "openshift" - ] - }, - { - "required": [ - "volume" - ] - }, - { - "required": [ - "image" - ] - } - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true, - "markdownDescription": "Map of implementation-dependant free-form YAML attributes." - }, - "container": { - "description": "Allows adding and configuring devworkspace-related containers", - "type": "object", - "required": [ - "image" - ], - "properties": { - "annotation": { - "description": "Annotations that should be added to specific resources for this container", - "type": "object", - "properties": { - "deployment": { - "description": "Annotations to be added to deployment", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "markdownDescription": "Annotations to be added to deployment" - }, - "service": { - "description": "Annotations to be added to service", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "markdownDescription": "Annotations to be added to service" - } - }, - "additionalProperties": false, - "markdownDescription": "Annotations that should be added to specific resources for this container" - }, - "args": { - "description": "The arguments to supply to the command running the dockerimage component. The arguments are supplied either to the default command provided in the image or to the overridden command.\n\nDefaults to an empty array, meaning use whatever is defined in the image.", - "type": "array", - "items": { - "type": "string" - }, - "markdownDescription": "The arguments to supply to the command running the dockerimage component. The arguments are supplied either to the default command provided in the image or to the overridden command.\n\nDefaults to an empty array, meaning use whatever is defined in the image." - }, - "command": { - "description": "The command to run in the dockerimage component instead of the default one provided in the image.\n\nDefaults to an empty array, meaning use whatever is defined in the image.", - "type": "array", - "items": { - "type": "string" - }, - "markdownDescription": "The command to run in the dockerimage component instead of the default one provided in the image.\n\nDefaults to an empty array, meaning use whatever is defined in the image." - }, - "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\nDefault value is `false`", - "type": "boolean", - "markdownDescription": "Specify if a container should run in its own separated pod, instead of running as part of the main development environment pod.\n\nDefault value is `false`" - }, - "endpoints": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name", - "targetPort" - ], - "properties": { - "annotation": { - "description": "Annotations to be added to Kubernetes Ingress or Openshift Route", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "markdownDescription": "Annotations to be added to Kubernetes Ingress or Openshift Route" - }, - "attributes": { - "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", - "type": "object", - "additionalProperties": true, - "markdownDescription": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\"," - }, - "exposure": { - "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`", - "type": "string", - "enum": [ - "public", - "internal", - "none" - ], - "markdownDescription": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`" - }, - "name": { - "type": "string", - "maxLength": 15, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "Path of the endpoint URL", - "type": "string", - "markdownDescription": "Path of the endpoint URL" - }, - "protocol": { - "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\nDefault value is `http`", - "type": "string", - "enum": [ - "http", - "https", - "ws", - "wss", - "tcp", - "udp" - ], - "markdownDescription": "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\nDefault value is `http`" - }, - "secure": { - "description": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`.", - "type": "boolean", - "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." - }, - "targetPort": { - "description": "Port number to be used within the container component. The same port cannot be used by two different container components.", - "type": "integer", - "markdownDescription": "Port number to be used within the container component. The same port cannot be used by two different container components." - } - }, - "additionalProperties": false - } - }, - "env": { - "description": "Environment variables used in this container.\n\nThe following variables are reserved and cannot be overridden via env:\n\n - `$PROJECTS_ROOT`\n\n - `$PROJECT_SOURCE`", - "type": "array", - "items": { - "type": "object", - "required": [ - "name", - "value" - ], - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false - }, - "markdownDescription": "Environment variables used in this container.\n\nThe following variables are reserved and cannot be overridden via env:\n\n - `$PROJECTS_ROOT`\n\n - `$PROJECT_SOURCE`" - }, - "image": { - "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\nDefaults to true for all component types except plugins and components that set `dedicatedPod` to true.", - "type": "boolean", - "markdownDescription": "Toggles whether or not the project source code should be mounted in the component.\n\nDefaults to true for all component types except plugins and components that set `dedicatedPod` to true." - }, - "sourceMapping": { - "description": "Optional specification of the path in the container where project sources should be transferred/mounted when `mountSources` is `true`. When omitted, the default value of /projects is used.", - "type": "string", - "markdownDescription": "Optional specification of the path in the container where project sources should be transferred/mounted when `mountSources` is `true`. When omitted, the default value of /projects is used." - }, - "volumeMounts": { - "description": "List of volumes mounts that should be mounted is this container.", - "type": "array", - "items": { - "description": "Volume that should be mounted to a component container", - "type": "object", - "required": [ - "name" - ], - "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.", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$", - "markdownDescription": "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." - }, - "path": { - "description": "The path in the component container where the volume should be mounted. If not path is mentioned, default path is the is `/\u003cname\u003e`.", - "type": "string", - "markdownDescription": "The path in the component container where the volume should be mounted. If not path is mentioned, default path is the is `/\u003cname\u003e`." - } - }, - "additionalProperties": false, - "markdownDescription": "Volume that should be mounted to a component container" - }, - "markdownDescription": "List of volumes mounts that should be mounted is this container." - } - }, - "additionalProperties": false, - "markdownDescription": "Allows adding and configuring devworkspace-related containers" - }, - "image": { - "description": "Allows specifying the definition of an image for outer loop builds", - "type": "object", - "required": [ - "imageName" - ], - "oneOf": [ - { - "required": [ - "dockerfile" - ] - } - ], - "properties": { - "autoBuild": { - "description": "Defines if the image should be built during startup.\n\nDefault value is `false`", - "type": "boolean", - "markdownDescription": "Defines if the image should be built during startup.\n\nDefault value is `false`" - }, - "dockerfile": { - "description": "Allows specifying dockerfile type build", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "devfileRegistry" - ] - }, - { - "required": [ - "git" - ] - } - ], - "properties": { - "args": { - "description": "The arguments to supply to the dockerfile build.", - "type": "array", - "items": { - "type": "string" - }, - "markdownDescription": "The arguments to supply to the dockerfile build." - }, - "buildContext": { - "description": "Path of source directory to establish build context. Defaults to ${PROJECT_SOURCE} in the container", - "type": "string", - "markdownDescription": "Path of source directory to establish build context. Defaults to ${PROJECT_SOURCE} in the container" - }, - "devfileRegistry": { - "description": "Dockerfile's Devfile Registry source", - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", - "type": "string", - "markdownDescription": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image." - }, - "registryUrl": { - "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", - "type": "string", - "markdownDescription": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used." - } - }, - "additionalProperties": false, - "markdownDescription": "Dockerfile's Devfile Registry source" - }, - "git": { - "description": "Dockerfile's Git source", - "type": "object", - "required": [ - "remotes" - ], - "properties": { - "checkoutFrom": { - "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", - "type": "object", - "properties": { - "remote": { - "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string", - "markdownDescription": "The remote name should be used as init. Required if there are more than one remote configured" - }, - "revision": { - "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string", - "markdownDescription": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found." - } - }, - "additionalProperties": false, - "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" - }, - "fileLocation": { - "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", - "type": "string", - "markdownDescription": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile." - }, - "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." - } - }, - "additionalProperties": false, - "markdownDescription": "Dockerfile's Git source" - }, - "rootRequired": { - "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", - "type": "boolean", - "markdownDescription": "Specify if a privileged builder pod is required.\n\nDefault value is `false`" - }, - "uri": { - "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", - "type": "string", - "markdownDescription": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI." - } - }, - "additionalProperties": false, - "markdownDescription": "Allows specifying dockerfile type build" - }, - "imageName": { - "description": "Name of the image for the resulting outerloop build", - "type": "string", - "markdownDescription": "Name of the image for the resulting outerloop build" - } - }, - "additionalProperties": false, - "markdownDescription": "Allows specifying the definition of an image for outer loop builds" - }, - "kubernetes": { - "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "inlined" - ] - } - ], - "properties": { - "deployByDefault": { - "description": "Defines if the component should be deployed during startup.\n\nDefault value is `false`", - "type": "boolean", - "markdownDescription": "Defines if the component should be deployed during startup.\n\nDefault value is `false`" - }, - "endpoints": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name", - "targetPort" - ], - "properties": { - "annotation": { - "description": "Annotations to be added to Kubernetes Ingress or Openshift Route", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "markdownDescription": "Annotations to be added to Kubernetes Ingress or Openshift Route" - }, - "attributes": { - "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", - "type": "object", - "additionalProperties": true, - "markdownDescription": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\"," - }, - "exposure": { - "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`", - "type": "string", - "enum": [ - "public", - "internal", - "none" - ], - "markdownDescription": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`" - }, - "name": { - "type": "string", - "maxLength": 15, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "Path of the endpoint URL", - "type": "string", - "markdownDescription": "Path of the endpoint URL" - }, - "protocol": { - "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\nDefault value is `http`", - "type": "string", - "enum": [ - "http", - "https", - "ws", - "wss", - "tcp", - "udp" - ], - "markdownDescription": "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\nDefault value is `http`" - }, - "secure": { - "description": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`.", - "type": "boolean", - "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." - }, - "targetPort": { - "description": "Port number to be used within the container component. The same port cannot be used by two different container components.", - "type": "integer", - "markdownDescription": "Port number to be used within the container component. The same port cannot be used by two different container components." - } - }, - "additionalProperties": false - } - }, - "inlined": { - "description": "Inlined manifest", - "type": "string", - "markdownDescription": "Inlined manifest" - }, - "uri": { - "description": "Location in a file fetched from a uri.", - "type": "string", - "markdownDescription": "Location in a file fetched from a uri." - } - }, - "additionalProperties": false, - "markdownDescription": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production." - }, - "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.", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$", - "markdownDescription": "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." - }, - "openshift": { - "description": "Allows importing into the devworkspace the OpenShift resources defined in a given manifest. For example this allows reusing the OpenShift definitions used to deploy some runtime components in production.", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "inlined" - ] - } - ], - "properties": { - "deployByDefault": { - "description": "Defines if the component should be deployed during startup.\n\nDefault value is `false`", - "type": "boolean", - "markdownDescription": "Defines if the component should be deployed during startup.\n\nDefault value is `false`" - }, - "endpoints": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name", - "targetPort" - ], - "properties": { - "annotation": { - "description": "Annotations to be added to Kubernetes Ingress or Openshift Route", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "markdownDescription": "Annotations to be added to Kubernetes Ingress or Openshift Route" - }, - "attributes": { - "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", - "type": "object", - "additionalProperties": true, - "markdownDescription": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\"," - }, - "exposure": { - "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`", - "type": "string", - "enum": [ - "public", - "internal", - "none" - ], - "markdownDescription": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`" - }, - "name": { - "type": "string", - "maxLength": 15, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "Path of the endpoint URL", - "type": "string", - "markdownDescription": "Path of the endpoint URL" - }, - "protocol": { - "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\nDefault value is `http`", - "type": "string", - "enum": [ - "http", - "https", - "ws", - "wss", - "tcp", - "udp" - ], - "markdownDescription": "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\nDefault value is `http`" - }, - "secure": { - "description": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`.", - "type": "boolean", - "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." - }, - "targetPort": { - "description": "Port number to be used within the container component. The same port cannot be used by two different container components.", - "type": "integer", - "markdownDescription": "Port number to be used within the container component. The same port cannot be used by two different container components." - } - }, - "additionalProperties": false - } - }, - "inlined": { - "description": "Inlined manifest", - "type": "string", - "markdownDescription": "Inlined manifest" - }, - "uri": { - "description": "Location in a file fetched from a uri.", - "type": "string", - "markdownDescription": "Location in a file fetched from a uri." - } - }, - "additionalProperties": false, - "markdownDescription": "Allows importing into the devworkspace the OpenShift resources defined in a given manifest. For example this allows reusing the OpenShift definitions used to deploy some runtime components in production." - }, - "volume": { - "description": "Allows specifying the definition of a volume shared by several other components", - "type": "object", - "properties": { - "ephemeral": { - "description": "Ephemeral volumes are not stored persistently across restarts. Defaults to false", - "type": "boolean", - "markdownDescription": "Ephemeral volumes are not stored persistently across restarts. Defaults to false" - }, - "size": { - "description": "Size of the volume", - "type": "string", - "markdownDescription": "Size of the volume" - } - }, - "additionalProperties": false, - "markdownDescription": "Allows specifying the definition of a volume shared by several other components" - } - }, - "additionalProperties": false - }, - "markdownDescription": "List of the devworkspace components, such as editor and plugins, user-provided containers, or other types of components" - }, - "events": { - "description": "Bindings of commands to events. Each command is referred-to by its name.", - "type": "object", - "properties": { - "postStart": { - "description": "IDs of commands that should be executed after the devworkspace is completely started. In the case of Che-Theia, these commands should be executed after all plugins and extensions have started, including project cloning. This means that those commands are not triggered until the user opens the IDE in his browser.", - "type": "array", - "items": { - "type": "string" - }, - "markdownDescription": "IDs of commands that should be executed after the devworkspace is completely started. In the case of Che-Theia, these commands should be executed after all plugins and extensions have started, including project cloning. This means that those commands are not triggered until the user opens the IDE in his browser." - }, - "postStop": { - "description": "IDs of commands that should be executed after stopping the devworkspace.", - "type": "array", - "items": { - "type": "string" - }, - "markdownDescription": "IDs of commands that should be executed after stopping the devworkspace." - }, - "preStart": { - "description": "IDs of commands that should be executed before the devworkspace start. Kubernetes-wise, these commands would typically be executed in init containers of the devworkspace POD.", - "type": "array", - "items": { - "type": "string" - }, - "markdownDescription": "IDs of commands that should be executed before the devworkspace start. Kubernetes-wise, these commands would typically be executed in init containers of the devworkspace POD." - }, - "preStop": { - "description": "IDs of commands that should be executed before stopping the devworkspace.", - "type": "array", - "items": { - "type": "string" - }, - "markdownDescription": "IDs of commands that should be executed before stopping the devworkspace." - } - }, - "additionalProperties": false, - "markdownDescription": "Bindings of commands to events. Each command is referred-to by its name." - }, - "metadata": { - "description": "Optional metadata", - "type": "object", - "properties": { - "architectures": { - "description": "Optional list of processor architectures that the devfile supports, empty list suggests that the devfile can be used on any architecture", - "type": "array", - "uniqueItems": true, - "items": { - "description": "Architecture describes the architecture type", - "type": "string", - "enum": [ - "amd64", - "arm64", - "ppc64le", - "s390x" - ], - "markdownDescription": "Architecture describes the architecture type" - }, - "markdownDescription": "Optional list of processor architectures that the devfile supports, empty list suggests that the devfile can be used on any architecture" - }, - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes. Deprecated, use the top-level attributes field instead.", - "type": "object", - "additionalProperties": true, - "markdownDescription": "Map of implementation-dependant free-form YAML attributes. Deprecated, use the top-level attributes field instead." - }, - "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, can be a URI or a relative path in the project", - "type": "string", - "markdownDescription": "Optional devfile icon, can be a URI or a relative path in the project" - }, - "language": { - "description": "Optional devfile language", - "type": "string", - "markdownDescription": "Optional devfile language" - }, - "name": { - "description": "Optional devfile name", - "type": "string", - "markdownDescription": "Optional devfile name" - }, - "projectType": { - "description": "Optional devfile project type", - "type": "string", - "markdownDescription": "Optional devfile project type" - }, - "provider": { - "description": "Optional devfile provider information", - "type": "string", - "markdownDescription": "Optional devfile provider information" - }, - "supportUrl": { - "description": "Optional link to a page that provides support information", - "type": "string", - "markdownDescription": "Optional link to a page that provides support information" - }, - "tags": { - "description": "Optional devfile tags", - "type": "array", - "items": { - "type": "string" - }, - "markdownDescription": "Optional devfile tags" - }, - "version": { - "description": "Optional semver-compatible version", - "type": "string", - "pattern": "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(\\-[0-9a-z-]+(\\.[0-9a-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$", - "markdownDescription": "Optional semver-compatible version" - }, - "website": { - "description": "Optional devfile website", - "type": "string", - "markdownDescription": "Optional devfile website" - } - }, - "additionalProperties": true, - "markdownDescription": "Optional metadata" - }, - "parent": { - "description": "Parent devworkspace template", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "id" - ] - }, - { - "required": [ - "kubernetes" - ] - } - ], - "properties": { - "attributes": { - "description": "Overrides of attributes encapsulated in a parent devfile. Overriding is done according to K8S strategic merge patch standard rules.", - "type": "object", - "additionalProperties": true, - "markdownDescription": "Overrides of attributes encapsulated in a parent devfile. Overriding is done according to K8S strategic merge patch standard rules." - }, - "commands": { - "description": "Overrides of commands encapsulated in a parent devfile or a plugin. Overriding is done according to K8S strategic merge patch standard rules.", - "type": "array", - "items": { - "type": "object", - "required": [ - "id" - ], - "oneOf": [ - { - "required": [ - "exec" - ] - }, - { - "required": [ - "apply" - ] - }, - { - "required": [ - "composite" - ] - } - ], - "properties": { - "apply": { - "description": "Command that consists in applying a given component definition, typically bound to a devworkspace event.\n\nFor example, when an `apply` command is bound to a `preStart` event, and references a `container` component, it will start the container as a K8S initContainer in the devworkspace POD, unless the component has its `dedicatedPod` field set to `true`.\n\nWhen no `apply` command exist for a given component, it is assumed the component will be applied at devworkspace start by default, unless `deployByDefault` for that component is set to false.", - "type": "object", - "properties": { - "component": { - "description": "Describes component that will be applied", - "type": "string", - "markdownDescription": "Describes component that will be applied" - }, - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean", - "markdownDescription": "Identifies the default command for a given group kind" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug", - "deploy" - ], - "markdownDescription": "Kind of group the command is part of" - } - }, - "additionalProperties": false, - "markdownDescription": "Defines the group this command is part of" - }, - "label": { - "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string", - "markdownDescription": "Optional label that provides a label for this command to be used in Editor UI menus for example" - } - }, - "additionalProperties": false, - "markdownDescription": "Command that consists in applying a given component definition, typically bound to a devworkspace event.\n\nFor example, when an `apply` command is bound to a `preStart` event, and references a `container` component, it will start the container as a K8S initContainer in the devworkspace POD, unless the component has its `dedicatedPod` field set to `true`.\n\nWhen no `apply` command exist for a given component, it is assumed the component will be applied at devworkspace start by default, unless `deployByDefault` for that component is set to false." - }, - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true, - "markdownDescription": "Map of implementation-dependant free-form YAML attributes." - }, - "composite": { - "description": "Composite command that allows executing several sub-commands either sequentially or concurrently", - "type": "object", - "properties": { - "commands": { - "description": "The commands that comprise this composite command", - "type": "array", - "items": { - "type": "string" - }, - "markdownDescription": "The commands that comprise this composite command" - }, - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean", - "markdownDescription": "Identifies the default command for a given group kind" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug", - "deploy" - ], - "markdownDescription": "Kind of group the command is part of" - } - }, - "additionalProperties": false, - "markdownDescription": "Defines the group this command is part of" - }, - "label": { - "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string", - "markdownDescription": "Optional label that provides a label for this command to be used in Editor UI menus for example" - }, - "parallel": { - "description": "Indicates if the sub-commands should be executed concurrently", - "type": "boolean", - "markdownDescription": "Indicates if the sub-commands should be executed concurrently" - } - }, - "additionalProperties": false, - "markdownDescription": "Composite command that allows executing several sub-commands either sequentially or concurrently" - }, - "exec": { - "description": "CLI Command executed in an existing component container", - "type": "object", - "properties": { - "commandLine": { - "description": "The actual command-line string\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/\u003cproject-name\u003e). If there are multiple projects, this will point to the directory of the first one.", - "type": "string", - "markdownDescription": "The actual command-line string\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/\u003cproject-name\u003e). If there are multiple projects, this will point to the directory of the first one." - }, - "component": { - "description": "Describes component to which given action relates", - "type": "string", - "markdownDescription": "Describes component to which given action relates" - }, - "env": { - "description": "Optional list of environment variables that have to be set before running the command", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false - }, - "markdownDescription": "Optional list of environment variables that have to be set before running the command" - }, - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean", - "markdownDescription": "Identifies the default command for a given group kind" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug", - "deploy" - ], - "markdownDescription": "Kind of group the command is part of" - } - }, - "additionalProperties": false, - "markdownDescription": "Defines the group this command is part of" - }, - "hotReloadCapable": { - "description": "Whether the command is capable to reload itself when source code changes. If set to `true` the command won't be restarted and it is expected to handle file changes on its own.\n\nDefault value is `false`", - "type": "boolean", - "markdownDescription": "Whether the command is capable to reload itself when source code changes. If set to `true` the command won't be restarted and it is expected to handle file changes on its own.\n\nDefault value is `false`" - }, - "label": { - "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string", - "markdownDescription": "Optional label that provides a label for this command to be used in Editor UI menus for example" - }, - "workingDir": { - "description": "Working directory where the command should be executed\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/\u003cproject-name\u003e). If there are multiple projects, this will point to the directory of the first one.", - "type": "string", - "markdownDescription": "Working directory where the command should be executed\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/\u003cproject-name\u003e). If there are multiple projects, this will point to the directory of the first one." - } - }, - "additionalProperties": false, - "markdownDescription": "CLI Command executed in an existing component container" - }, - "id": { - "description": "Mandatory identifier that allows referencing this command in composite commands, from a parent, or in events.", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$", - "markdownDescription": "Mandatory identifier that allows referencing this command in composite commands, from a parent, or in events." - } - }, - "additionalProperties": false - }, - "markdownDescription": "Overrides of commands encapsulated in a parent devfile or a plugin. Overriding is done according to K8S strategic merge patch standard rules." - }, - "components": { - "description": "Overrides of components encapsulated in a parent devfile or a plugin. Overriding is done according to K8S strategic merge patch standard rules.", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "container" - ] - }, - { - "required": [ - "kubernetes" - ] - }, - { - "required": [ - "openshift" - ] - }, - { - "required": [ - "volume" - ] - }, - { - "required": [ - "image" - ] - } - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true, - "markdownDescription": "Map of implementation-dependant free-form YAML attributes." - }, - "container": { - "description": "Allows adding and configuring devworkspace-related containers", - "type": "object", - "properties": { - "annotation": { - "description": "Annotations that should be added to specific resources for this container", - "type": "object", - "properties": { - "deployment": { - "description": "Annotations to be added to deployment", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "markdownDescription": "Annotations to be added to deployment" - }, - "service": { - "description": "Annotations to be added to service", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "markdownDescription": "Annotations to be added to service" - } - }, - "additionalProperties": false, - "markdownDescription": "Annotations that should be added to specific resources for this container" - }, - "args": { - "description": "The arguments to supply to the command running the dockerimage component. The arguments are supplied either to the default command provided in the image or to the overridden command.\n\nDefaults to an empty array, meaning use whatever is defined in the image.", - "type": "array", - "items": { - "type": "string" - }, - "markdownDescription": "The arguments to supply to the command running the dockerimage component. The arguments are supplied either to the default command provided in the image or to the overridden command.\n\nDefaults to an empty array, meaning use whatever is defined in the image." - }, - "command": { - "description": "The command to run in the dockerimage component instead of the default one provided in the image.\n\nDefaults to an empty array, meaning use whatever is defined in the image.", - "type": "array", - "items": { - "type": "string" - }, - "markdownDescription": "The command to run in the dockerimage component instead of the default one provided in the image.\n\nDefaults to an empty array, meaning use whatever is defined in the image." - }, - "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\nDefault value is `false`", - "type": "boolean", - "markdownDescription": "Specify if a container should run in its own separated pod, instead of running as part of the main development environment pod.\n\nDefault value is `false`" - }, - "endpoints": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "annotation": { - "description": "Annotations to be added to Kubernetes Ingress or Openshift Route", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "markdownDescription": "Annotations to be added to Kubernetes Ingress or Openshift Route" - }, - "attributes": { - "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", - "type": "object", - "additionalProperties": true, - "markdownDescription": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\"," - }, - "exposure": { - "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`", - "type": "string", - "enum": [ - "public", - "internal", - "none" - ], - "markdownDescription": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`" - }, - "name": { - "type": "string", - "maxLength": 15, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "Path of the endpoint URL", - "type": "string", - "markdownDescription": "Path of the endpoint URL" - }, - "protocol": { - "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\nDefault value is `http`", - "type": "string", - "enum": [ - "http", - "https", - "ws", - "wss", - "tcp", - "udp" - ], - "markdownDescription": "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\nDefault value is `http`" - }, - "secure": { - "description": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`.", - "type": "boolean", - "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." - }, - "targetPort": { - "description": "Port number to be used within the container component. The same port cannot be used by two different container components.", - "type": "integer", - "markdownDescription": "Port number to be used within the container component. The same port cannot be used by two different container components." - } - }, - "additionalProperties": false - } - }, - "env": { - "description": "Environment variables used in this container.\n\nThe following variables are reserved and cannot be overridden via env:\n\n - `$PROJECTS_ROOT`\n\n - `$PROJECT_SOURCE`", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false - }, - "markdownDescription": "Environment variables used in this container.\n\nThe following variables are reserved and cannot be overridden via env:\n\n - `$PROJECTS_ROOT`\n\n - `$PROJECT_SOURCE`" - }, - "image": { - "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\nDefaults to true for all component types except plugins and components that set `dedicatedPod` to true.", - "type": "boolean", - "markdownDescription": "Toggles whether or not the project source code should be mounted in the component.\n\nDefaults to true for all component types except plugins and components that set `dedicatedPod` to true." - }, - "sourceMapping": { - "description": "Optional specification of the path in the container where project sources should be transferred/mounted when `mountSources` is `true`. When omitted, the default value of /projects is used.", - "type": "string", - "markdownDescription": "Optional specification of the path in the container where project sources should be transferred/mounted when `mountSources` is `true`. When omitted, the default value of /projects is used." - }, - "volumeMounts": { - "description": "List of volumes mounts that should be mounted is this container.", - "type": "array", - "items": { - "description": "Volume that should be mounted to a component container", - "type": "object", - "required": [ - "name" - ], - "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.", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$", - "markdownDescription": "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." - }, - "path": { - "description": "The path in the component container where the volume should be mounted. If not path is mentioned, default path is the is `/\u003cname\u003e`.", - "type": "string", - "markdownDescription": "The path in the component container where the volume should be mounted. If not path is mentioned, default path is the is `/\u003cname\u003e`." - } - }, - "additionalProperties": false, - "markdownDescription": "Volume that should be mounted to a component container" - }, - "markdownDescription": "List of volumes mounts that should be mounted is this container." - } - }, - "additionalProperties": false, - "markdownDescription": "Allows adding and configuring devworkspace-related containers" - }, - "image": { - "description": "Allows specifying the definition of an image for outer loop builds", - "type": "object", - "oneOf": [ - { - "required": [ - "dockerfile" - ] - }, - { - "required": [ - "autoBuild" - ] - } - ], - "properties": { - "autoBuild": { - "description": "Defines if the image should be built during startup.\n\nDefault value is `false`", - "type": "boolean", - "markdownDescription": "Defines if the image should be built during startup.\n\nDefault value is `false`" - }, - "dockerfile": { - "description": "Allows specifying dockerfile type build", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "devfileRegistry" - ] - }, - { - "required": [ - "git" - ] - } - ], - "properties": { - "args": { - "description": "The arguments to supply to the dockerfile build.", - "type": "array", - "items": { - "type": "string" - }, - "markdownDescription": "The arguments to supply to the dockerfile build." - }, - "buildContext": { - "description": "Path of source directory to establish build context. Defaults to ${PROJECT_SOURCE} in the container", - "type": "string", - "markdownDescription": "Path of source directory to establish build context. Defaults to ${PROJECT_SOURCE} in the container" - }, - "devfileRegistry": { - "description": "Dockerfile's Devfile Registry source", - "type": "object", - "properties": { - "id": { - "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", - "type": "string", - "markdownDescription": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image." - }, - "registryUrl": { - "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", - "type": "string", - "markdownDescription": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used." - } - }, - "additionalProperties": false, - "markdownDescription": "Dockerfile's Devfile Registry source" - }, - "git": { - "description": "Dockerfile's Git source", - "type": "object", - "properties": { - "checkoutFrom": { - "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", - "type": "object", - "properties": { - "remote": { - "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string", - "markdownDescription": "The remote name should be used as init. Required if there are more than one remote configured" - }, - "revision": { - "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string", - "markdownDescription": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found." - } - }, - "additionalProperties": false, - "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" - }, - "fileLocation": { - "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", - "type": "string", - "markdownDescription": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile." - }, - "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." - } - }, - "additionalProperties": false, - "markdownDescription": "Dockerfile's Git source" - }, - "rootRequired": { - "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", - "type": "boolean", - "markdownDescription": "Specify if a privileged builder pod is required.\n\nDefault value is `false`" - }, - "uri": { - "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", - "type": "string", - "markdownDescription": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI." - } - }, - "additionalProperties": false, - "markdownDescription": "Allows specifying dockerfile type build" - }, - "imageName": { - "description": "Name of the image for the resulting outerloop build", - "type": "string", - "markdownDescription": "Name of the image for the resulting outerloop build" - } - }, - "additionalProperties": false, - "markdownDescription": "Allows specifying the definition of an image for outer loop builds" - }, - "kubernetes": { - "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "inlined" - ] - } - ], - "properties": { - "deployByDefault": { - "description": "Defines if the component should be deployed during startup.\n\nDefault value is `false`", - "type": "boolean", - "markdownDescription": "Defines if the component should be deployed during startup.\n\nDefault value is `false`" - }, - "endpoints": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "annotation": { - "description": "Annotations to be added to Kubernetes Ingress or Openshift Route", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "markdownDescription": "Annotations to be added to Kubernetes Ingress or Openshift Route" - }, - "attributes": { - "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", - "type": "object", - "additionalProperties": true, - "markdownDescription": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\"," - }, - "exposure": { - "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`", - "type": "string", - "enum": [ - "public", - "internal", - "none" - ], - "markdownDescription": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`" - }, - "name": { - "type": "string", - "maxLength": 15, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "Path of the endpoint URL", - "type": "string", - "markdownDescription": "Path of the endpoint URL" - }, - "protocol": { - "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\nDefault value is `http`", - "type": "string", - "enum": [ - "http", - "https", - "ws", - "wss", - "tcp", - "udp" - ], - "markdownDescription": "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\nDefault value is `http`" - }, - "secure": { - "description": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`.", - "type": "boolean", - "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." - }, - "targetPort": { - "description": "Port number to be used within the container component. The same port cannot be used by two different container components.", - "type": "integer", - "markdownDescription": "Port number to be used within the container component. The same port cannot be used by two different container components." - } - }, - "additionalProperties": false - } - }, - "inlined": { - "description": "Inlined manifest", - "type": "string", - "markdownDescription": "Inlined manifest" - }, - "uri": { - "description": "Location in a file fetched from a uri.", - "type": "string", - "markdownDescription": "Location in a file fetched from a uri." - } - }, - "additionalProperties": false, - "markdownDescription": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production." - }, - "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.", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$", - "markdownDescription": "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." - }, - "openshift": { - "description": "Allows importing into the devworkspace the OpenShift resources defined in a given manifest. For example this allows reusing the OpenShift definitions used to deploy some runtime components in production.", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "inlined" - ] - } - ], - "properties": { - "deployByDefault": { - "description": "Defines if the component should be deployed during startup.\n\nDefault value is `false`", - "type": "boolean", - "markdownDescription": "Defines if the component should be deployed during startup.\n\nDefault value is `false`" - }, - "endpoints": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "annotation": { - "description": "Annotations to be added to Kubernetes Ingress or Openshift Route", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "markdownDescription": "Annotations to be added to Kubernetes Ingress or Openshift Route" - }, - "attributes": { - "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", - "type": "object", - "additionalProperties": true, - "markdownDescription": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\"," - }, - "exposure": { - "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`", - "type": "string", - "enum": [ - "public", - "internal", - "none" - ], - "markdownDescription": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`" - }, - "name": { - "type": "string", - "maxLength": 15, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "Path of the endpoint URL", - "type": "string", - "markdownDescription": "Path of the endpoint URL" - }, - "protocol": { - "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\nDefault value is `http`", - "type": "string", - "enum": [ - "http", - "https", - "ws", - "wss", - "tcp", - "udp" - ], - "markdownDescription": "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\nDefault value is `http`" - }, - "secure": { - "description": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`.", - "type": "boolean", - "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." - }, - "targetPort": { - "description": "Port number to be used within the container component. The same port cannot be used by two different container components.", - "type": "integer", - "markdownDescription": "Port number to be used within the container component. The same port cannot be used by two different container components." - } - }, - "additionalProperties": false - } - }, - "inlined": { - "description": "Inlined manifest", - "type": "string", - "markdownDescription": "Inlined manifest" - }, - "uri": { - "description": "Location in a file fetched from a uri.", - "type": "string", - "markdownDescription": "Location in a file fetched from a uri." - } - }, - "additionalProperties": false, - "markdownDescription": "Allows importing into the devworkspace the OpenShift resources defined in a given manifest. For example this allows reusing the OpenShift definitions used to deploy some runtime components in production." - }, - "volume": { - "description": "Allows specifying the definition of a volume shared by several other components", - "type": "object", - "properties": { - "ephemeral": { - "description": "Ephemeral volumes are not stored persistently across restarts. Defaults to false", - "type": "boolean", - "markdownDescription": "Ephemeral volumes are not stored persistently across restarts. Defaults to false" - }, - "size": { - "description": "Size of the volume", - "type": "string", - "markdownDescription": "Size of the volume" - } - }, - "additionalProperties": false, - "markdownDescription": "Allows specifying the definition of a volume shared by several other components" - } - }, - "additionalProperties": false - }, - "markdownDescription": "Overrides of components encapsulated in a parent devfile or a plugin. Overriding is done according to K8S strategic merge patch standard rules." - }, - "id": { - "description": "Id in a registry that contains a Devfile yaml file", - "type": "string", - "markdownDescription": "Id in a registry that contains a Devfile yaml file" - }, - "kubernetes": { - "description": "Reference to a Kubernetes CRD of type DevWorkspaceTemplate", - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "namespace": { - "type": "string" - } - }, - "additionalProperties": false, - "markdownDescription": "Reference to a Kubernetes CRD of type DevWorkspaceTemplate" - }, - "projects": { - "description": "Overrides of projects encapsulated in a parent devfile. Overriding is done according to K8S strategic merge patch standard rules.", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "git" - ] - }, - { - "required": [ - "zip" - ] - } - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true, - "markdownDescription": "Map of implementation-dependant free-form YAML attributes." - }, - "clonePath": { - "description": "Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name.", - "type": "string", - "markdownDescription": "Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name." - }, - "git": { - "description": "Project's Git source", - "type": "object", - "properties": { - "checkoutFrom": { - "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", - "type": "object", - "properties": { - "remote": { - "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string", - "markdownDescription": "The remote name should be used as init. Required if there are more than one remote configured" - }, - "revision": { - "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string", - "markdownDescription": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found." - } - }, - "additionalProperties": false, - "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" - }, - "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." - } - }, - "additionalProperties": false, - "markdownDescription": "Project's Git source" - }, - "name": { - "description": "Project name", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$", - "markdownDescription": "Project name" - }, - "zip": { - "description": "Project's Zip source", - "type": "object", - "properties": { - "location": { - "description": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH", - "type": "string", - "markdownDescription": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH" - } - }, - "additionalProperties": false, - "markdownDescription": "Project's Zip source" - } - }, - "additionalProperties": false - }, - "markdownDescription": "Overrides of projects encapsulated in a parent devfile. Overriding is done according to K8S strategic merge patch standard rules." - }, - "registryUrl": { - "description": "Registry URL to pull the parent devfile from when using id in the parent reference. To ensure the parent devfile gets resolved consistently in different environments, it is recommended to always specify the `registryUrl` when `id` is used.", - "type": "string", - "markdownDescription": "Registry URL to pull the parent devfile from when using id in the parent reference. To ensure the parent devfile gets resolved consistently in different environments, it is recommended to always specify the `registryUrl` when `id` is used." - }, - "starterProjects": { - "description": "Overrides of starterProjects encapsulated in a parent devfile. Overriding is done according to K8S strategic merge patch standard rules.", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "git" - ] - }, - { - "required": [ - "zip" - ] - } - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true, - "markdownDescription": "Map of implementation-dependant free-form YAML attributes." - }, - "description": { - "description": "Description of a starter project", - "type": "string", - "markdownDescription": "Description of a starter project" - }, - "git": { - "description": "Project's Git source", - "type": "object", - "properties": { - "checkoutFrom": { - "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", - "type": "object", - "properties": { - "remote": { - "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string", - "markdownDescription": "The remote name should be used as init. Required if there are more than one remote configured" - }, - "revision": { - "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string", - "markdownDescription": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found." - } - }, - "additionalProperties": false, - "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" - }, - "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." - } - }, - "additionalProperties": false, - "markdownDescription": "Project's Git source" - }, - "name": { - "description": "Project name", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$", - "markdownDescription": "Project name" - }, - "subDir": { - "description": "Sub-directory from a starter project to be used as root for starter project.", - "type": "string", - "markdownDescription": "Sub-directory from a starter project to be used as root for starter project." - }, - "zip": { - "description": "Project's Zip source", - "type": "object", - "properties": { - "location": { - "description": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH", - "type": "string", - "markdownDescription": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH" - } - }, - "additionalProperties": false, - "markdownDescription": "Project's Zip source" - } - }, - "additionalProperties": false - }, - "markdownDescription": "Overrides of starterProjects encapsulated in a parent devfile. Overriding is done according to K8S strategic merge patch standard rules." - }, - "uri": { - "description": "URI Reference of a parent devfile YAML file. It can be a full URL or a relative URI with the current devfile as the base URI.", - "type": "string", - "markdownDescription": "URI Reference of a parent devfile YAML file. It can be a full URL or a relative URI with the current devfile as the base URI." - }, - "variables": { - "description": "Overrides of variables encapsulated in a parent devfile. Overriding is done according to K8S strategic merge patch standard rules.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "markdownDescription": "Overrides of variables encapsulated in a parent devfile. Overriding is done according to K8S strategic merge patch standard rules." - }, - "version": { - "description": "Specific stack/sample version to pull the parent devfile from, when using id in the parent reference. To specify `version`, `id` must be defined and used as the import reference source. `version` can be either a specific stack version, or `latest`. If no `version` specified, default version will be used.", - "type": "string", - "pattern": "^(latest)|(([1-9])\\.([0-9]+)\\.([0-9]+)(\\-[0-9a-z-]+(\\.[0-9a-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?)$", - "markdownDescription": "Specific stack/sample version to pull the parent devfile from, when using id in the parent reference. To specify `version`, `id` must be defined and used as the import reference source. `version` can be either a specific stack version, or `latest`. If no `version` specified, default version will be used." - } - }, - "additionalProperties": false, - "markdownDescription": "Parent devworkspace template" - }, - "projects": { - "description": "Projects worked on in the devworkspace, containing names and sources locations", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "git" - ] - }, - { - "required": [ - "zip" - ] - } - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true, - "markdownDescription": "Map of implementation-dependant free-form YAML attributes." - }, - "clonePath": { - "description": "Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name.", - "type": "string", - "markdownDescription": "Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name." - }, - "git": { - "description": "Project's Git source", - "type": "object", - "required": [ - "remotes" - ], - "properties": { - "checkoutFrom": { - "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", - "type": "object", - "properties": { - "remote": { - "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string", - "markdownDescription": "The remote name should be used as init. Required if there are more than one remote configured" - }, - "revision": { - "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string", - "markdownDescription": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found." - } - }, - "additionalProperties": false, - "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" - }, - "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." - } - }, - "additionalProperties": false, - "markdownDescription": "Project's Git source" - }, - "name": { - "description": "Project name", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$", - "markdownDescription": "Project name" - }, - "zip": { - "description": "Project's Zip source", - "type": "object", - "properties": { - "location": { - "description": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH", - "type": "string", - "markdownDescription": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH" - } - }, - "additionalProperties": false, - "markdownDescription": "Project's Zip source" - } - }, - "additionalProperties": false - }, - "markdownDescription": "Projects worked on in the devworkspace, containing names and sources locations" - }, - "schemaVersion": { - "description": "Devfile schema version", - "type": "string", - "pattern": "^([2-9])\\.([0-9]+)\\.([0-9]+)(\\-[0-9a-z-]+(\\.[0-9a-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$", - "markdownDescription": "Devfile schema version" - }, - "starterProjects": { - "description": "StarterProjects is a project that can be used as a starting point when bootstrapping new projects", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "git" - ] - }, - { - "required": [ - "zip" - ] - } - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true, - "markdownDescription": "Map of implementation-dependant free-form YAML attributes." - }, - "description": { - "description": "Description of a starter project", - "type": "string", - "markdownDescription": "Description of a starter project" - }, - "git": { - "description": "Project's Git source", - "type": "object", - "required": [ - "remotes" - ], - "properties": { - "checkoutFrom": { - "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", - "type": "object", - "properties": { - "remote": { - "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string", - "markdownDescription": "The remote name should be used as init. Required if there are more than one remote configured" - }, - "revision": { - "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string", - "markdownDescription": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found." - } - }, - "additionalProperties": false, - "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" - }, - "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." - } - }, - "additionalProperties": false, - "markdownDescription": "Project's Git source" - }, - "name": { - "description": "Project name", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$", - "markdownDescription": "Project name" - }, - "subDir": { - "description": "Sub-directory from a starter project to be used as root for starter project.", - "type": "string", - "markdownDescription": "Sub-directory from a starter project to be used as root for starter project." - }, - "zip": { - "description": "Project's Zip source", - "type": "object", - "properties": { - "location": { - "description": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH", - "type": "string", - "markdownDescription": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH" - } - }, - "additionalProperties": false, - "markdownDescription": "Project's Zip source" - } - }, - "additionalProperties": false - }, - "markdownDescription": "StarterProjects is a project that can be used as a starting point when bootstrapping new projects" - }, - "variables": { - "description": "Map of key-value variables used for string replacement in the devfile. Values can be referenced via {{variable-key}} to replace the corresponding value in string fields in the devfile. Replacement cannot be used for\n\n - schemaVersion, metadata, parent source\n\n - element identifiers, e.g. command id, component name, endpoint name, project name\n\n - references to identifiers, e.g. in events, a command's component, container's volume mount name\n\n - string enums, e.g. command group kind, endpoint exposure", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "markdownDescription": "Map of key-value variables used for string replacement in the devfile. Values can be referenced via {{variable-key}} to replace the corresponding value in string fields in the devfile. Replacement cannot be used for\n\n - schemaVersion, metadata, parent source\n\n - element identifiers, e.g. command id, component name, endpoint name, project name\n\n - references to identifiers, e.g. in events, a command's component, container's volume mount name\n\n - string enums, e.g. command group kind, endpoint exposure" - } - }, - "additionalProperties": false, - "markdownDescription": "Devfile describes the structure of a cloud-native devworkspace and development environment.\n\nIDE-targeted variants of the schemas provide the following difference compared to the main schemas:\n- They contain additional non-standard `markdownDescription` attributes that are used by IDEs such a VSCode\nto provide markdown-rendered documentation hovers. \n- They don't contain `default` attributes, since this triggers unwanted addition of defaulted fields during completion in IDEs." -} diff --git a/wsmaster/che-core-api-workspace/src/main/resources/schema/2.2.1/devfile.json b/wsmaster/che-core-api-workspace/src/main/resources/schema/2.2.1/devfile.json deleted file mode 100644 index 54f8342a43..0000000000 --- a/wsmaster/che-core-api-workspace/src/main/resources/schema/2.2.1/devfile.json +++ /dev/null @@ -1,2048 +0,0 @@ -{ - "description": "Devfile describes the structure of a cloud-native devworkspace and development environment.", - "type": "object", - "title": "Devfile schema - Version 2.2.1", - "required": [ - "schemaVersion" - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "commands": { - "description": "Predefined, ready-to-use, devworkspace-related commands", - "type": "array", - "items": { - "type": "object", - "required": [ - "id" - ], - "oneOf": [ - { - "required": [ - "exec" - ] - }, - { - "required": [ - "apply" - ] - }, - { - "required": [ - "composite" - ] - } - ], - "properties": { - "apply": { - "description": "Command that consists in applying a given component definition, typically bound to a devworkspace event.\n\nFor example, when an `apply` command is bound to a `preStart` event, and references a `container` component, it will start the container as a K8S initContainer in the devworkspace POD, unless the component has its `dedicatedPod` field set to `true`.\n\nWhen no `apply` command exist for a given component, it is assumed the component will be applied at devworkspace start by default, unless `deployByDefault` for that component is set to false.", - "type": "object", - "required": [ - "component" - ], - "properties": { - "component": { - "description": "Describes component that will be applied", - "type": "string" - }, - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "required": [ - "kind" - ], - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug", - "deploy" - ] - } - }, - "additionalProperties": false - }, - "label": { - "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string" - } - }, - "additionalProperties": false - }, - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "composite": { - "description": "Composite command that allows executing several sub-commands either sequentially or concurrently", - "type": "object", - "properties": { - "commands": { - "description": "The commands that comprise this composite command", - "type": "array", - "items": { - "type": "string" - } - }, - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "required": [ - "kind" - ], - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug", - "deploy" - ] - } - }, - "additionalProperties": false - }, - "label": { - "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string" - }, - "parallel": { - "description": "Indicates if the sub-commands should be executed concurrently", - "type": "boolean" - } - }, - "additionalProperties": false - }, - "exec": { - "description": "CLI Command executed in an existing component container", - "type": "object", - "required": [ - "commandLine", - "component" - ], - "properties": { - "commandLine": { - "description": "The actual command-line string\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/). If there are multiple projects, this will point to the directory of the first one.", - "type": "string" - }, - "component": { - "description": "Describes component to which given action relates", - "type": "string" - }, - "env": { - "description": "Optional list of environment variables that have to be set before running the command", - "type": "array", - "items": { - "type": "object", - "required": [ - "name", - "value" - ], - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "required": [ - "kind" - ], - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug", - "deploy" - ] - } - }, - "additionalProperties": false - }, - "hotReloadCapable": { - "description": "Specify whether the command is restarted or not when the source code changes. If set to `true` the command won't be restarted. A *hotReloadCapable* `run` or `debug` command is expected to handle file changes on its own and won't be restarted. A *hotReloadCapable* `build` command is expected to be executed only once and won't be executed again. This field is taken into account only for commands `build`, `run` and `debug` with `isDefault` set to `true`.\n\nDefault value is `false`", - "type": "boolean" - }, - "label": { - "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string" - }, - "workingDir": { - "description": "Working directory where the command should be executed\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/). If there are multiple projects, this will point to the directory of the first one.", - "type": "string" - } - }, - "additionalProperties": false - }, - "id": { - "description": "Mandatory identifier that allows referencing this command in composite commands, from a parent, or in events.", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - } - }, - "additionalProperties": false - } - }, - "components": { - "description": "List of the devworkspace components, such as editor and plugins, user-provided containers, or other types of components", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "container" - ] - }, - { - "required": [ - "kubernetes" - ] - }, - { - "required": [ - "openshift" - ] - }, - { - "required": [ - "volume" - ] - }, - { - "required": [ - "image" - ] - } - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "container": { - "description": "Allows adding and configuring devworkspace-related containers", - "type": "object", - "required": [ - "image" - ], - "properties": { - "annotation": { - "description": "Annotations that should be added to specific resources for this container", - "type": "object", - "properties": { - "deployment": { - "description": "Annotations to be added to deployment", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "service": { - "description": "Annotations to be added to service", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "args": { - "description": "The arguments to supply to the command running the dockerimage component. The arguments are supplied either to the default command provided in the image or to the overridden command.\n\nDefaults to an empty array, meaning use whatever is defined in the image.", - "type": "array", - "items": { - "type": "string" - } - }, - "command": { - "description": "The command to run in the dockerimage component instead of the default one provided in the image.\n\nDefaults to an empty array, meaning use whatever is defined in the image.", - "type": "array", - "items": { - "type": "string" - } - }, - "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\nDefault value is `false`", - "type": "boolean" - }, - "endpoints": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name", - "targetPort" - ], - "properties": { - "annotation": { - "description": "Annotations to be added to Kubernetes Ingress or Openshift Route", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "attributes": { - "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", - "type": "object", - "additionalProperties": true - }, - "exposure": { - "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`", - "type": "string", - "default": "public", - "enum": [ - "public", - "internal", - "none" - ] - }, - "name": { - "type": "string", - "maxLength": 15, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "Path of the endpoint URL", - "type": "string" - }, - "protocol": { - "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\nDefault value is `http`", - "type": "string", - "default": "http", - "enum": [ - "http", - "https", - "ws", - "wss", - "tcp", - "udp" - ] - }, - "secure": { - "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": { - "description": "Port number to be used within the container component. The same port cannot be used by two different container components.", - "type": "integer" - } - }, - "additionalProperties": false - } - }, - "env": { - "description": "Environment variables used in this container.\n\nThe following variables are reserved and cannot be overridden via env:\n\n - `$PROJECTS_ROOT`\n\n - `$PROJECT_SOURCE`", - "type": "array", - "items": { - "type": "object", - "required": [ - "name", - "value" - ], - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "image": { - "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\nDefaults to true for all component types except plugins and components that set `dedicatedPod` to true.", - "type": "boolean" - }, - "sourceMapping": { - "description": "Optional specification of the path in the container where project sources should be transferred/mounted when `mountSources` is `true`. When omitted, the default value of /projects is used.", - "type": "string", - "default": "/projects" - }, - "volumeMounts": { - "description": "List of volumes mounts that should be mounted is this container.", - "type": "array", - "items": { - "description": "Volume that should be mounted to a component container", - "type": "object", - "required": [ - "name" - ], - "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.", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "The path in the component container where the volume should be mounted. If not path is mentioned, default path is the is `/`.", - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "additionalProperties": false - }, - "image": { - "description": "Allows specifying the definition of an image for outer loop builds", - "type": "object", - "required": [ - "imageName" - ], - "oneOf": [ - { - "required": [ - "dockerfile" - ] - } - ], - "properties": { - "autoBuild": { - "description": "Defines if the image should be built during startup.\n\nDefault value is `false`", - "type": "boolean" - }, - "dockerfile": { - "description": "Allows specifying dockerfile type build", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "devfileRegistry" - ] - }, - { - "required": [ - "git" - ] - } - ], - "properties": { - "args": { - "description": "The arguments to supply to the dockerfile build.", - "type": "array", - "items": { - "type": "string" - } - }, - "buildContext": { - "description": "Path of source directory to establish build context. Defaults to ${PROJECT_SOURCE} in the container", - "type": "string" - }, - "devfileRegistry": { - "description": "Dockerfile's Devfile Registry source", - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", - "type": "string" - }, - "registryUrl": { - "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", - "type": "string" - } - }, - "additionalProperties": false - }, - "git": { - "description": "Dockerfile's Git source", - "type": "object", - "required": [ - "remotes" - ], - "properties": { - "checkoutFrom": { - "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", - "type": "object", - "properties": { - "remote": { - "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string" - }, - "revision": { - "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string" - } - }, - "additionalProperties": false - }, - "fileLocation": { - "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", - "type": "string" - }, - "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects & Image Component's Git source can only have at most one remote configured.", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "rootRequired": { - "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", - "type": "boolean" - }, - "uri": { - "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", - "type": "string" - } - }, - "additionalProperties": false - }, - "imageName": { - "description": "Name of the image for the resulting outerloop build", - "type": "string" - } - }, - "additionalProperties": false - }, - "kubernetes": { - "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "inlined" - ] - } - ], - "properties": { - "deployByDefault": { - "description": "Defines if the component should be deployed during startup.\n\nDefault value is `false`", - "type": "boolean" - }, - "endpoints": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name", - "targetPort" - ], - "properties": { - "annotation": { - "description": "Annotations to be added to Kubernetes Ingress or Openshift Route", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "attributes": { - "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", - "type": "object", - "additionalProperties": true - }, - "exposure": { - "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`", - "type": "string", - "default": "public", - "enum": [ - "public", - "internal", - "none" - ] - }, - "name": { - "type": "string", - "maxLength": 15, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "Path of the endpoint URL", - "type": "string" - }, - "protocol": { - "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\nDefault value is `http`", - "type": "string", - "default": "http", - "enum": [ - "http", - "https", - "ws", - "wss", - "tcp", - "udp" - ] - }, - "secure": { - "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": { - "description": "Port number to be used within the container component. The same port cannot be used by two different container components.", - "type": "integer" - } - }, - "additionalProperties": false - } - }, - "inlined": { - "description": "Inlined manifest", - "type": "string" - }, - "uri": { - "description": "Location in a file fetched from a uri.", - "type": "string" - } - }, - "additionalProperties": false - }, - "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.", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "openshift": { - "description": "Allows importing into the devworkspace the OpenShift resources defined in a given manifest. For example this allows reusing the OpenShift definitions used to deploy some runtime components in production.", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "inlined" - ] - } - ], - "properties": { - "deployByDefault": { - "description": "Defines if the component should be deployed during startup.\n\nDefault value is `false`", - "type": "boolean" - }, - "endpoints": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name", - "targetPort" - ], - "properties": { - "annotation": { - "description": "Annotations to be added to Kubernetes Ingress or Openshift Route", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "attributes": { - "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", - "type": "object", - "additionalProperties": true - }, - "exposure": { - "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`", - "type": "string", - "default": "public", - "enum": [ - "public", - "internal", - "none" - ] - }, - "name": { - "type": "string", - "maxLength": 15, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "Path of the endpoint URL", - "type": "string" - }, - "protocol": { - "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\nDefault value is `http`", - "type": "string", - "default": "http", - "enum": [ - "http", - "https", - "ws", - "wss", - "tcp", - "udp" - ] - }, - "secure": { - "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": { - "description": "Port number to be used within the container component. The same port cannot be used by two different container components.", - "type": "integer" - } - }, - "additionalProperties": false - } - }, - "inlined": { - "description": "Inlined manifest", - "type": "string" - }, - "uri": { - "description": "Location in a file fetched from a uri.", - "type": "string" - } - }, - "additionalProperties": false - }, - "volume": { - "description": "Allows specifying the definition of a volume shared by several other components", - "type": "object", - "properties": { - "ephemeral": { - "description": "Ephemeral volumes are not stored persistently across restarts. Defaults to false", - "type": "boolean" - }, - "size": { - "description": "Size of the volume", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "events": { - "description": "Bindings of commands to events. Each command is referred-to by its name.", - "type": "object", - "properties": { - "postStart": { - "description": "IDs of commands that should be executed after the devworkspace is completely started. In the case of Che-Theia, these commands should be executed after all plugins and extensions have started, including project cloning. This means that those commands are not triggered until the user opens the IDE in his browser.", - "type": "array", - "items": { - "type": "string" - } - }, - "postStop": { - "description": "IDs of commands that should be executed after stopping the devworkspace.", - "type": "array", - "items": { - "type": "string" - } - }, - "preStart": { - "description": "IDs of commands that should be executed before the devworkspace start. Kubernetes-wise, these commands would typically be executed in init containers of the devworkspace POD.", - "type": "array", - "items": { - "type": "string" - } - }, - "preStop": { - "description": "IDs of commands that should be executed before stopping the devworkspace.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "metadata": { - "description": "Optional metadata", - "type": "object", - "properties": { - "architectures": { - "description": "Optional list of processor architectures that the devfile supports, empty list suggests that the devfile can be used on any architecture", - "type": "array", - "uniqueItems": true, - "items": { - "description": "Architecture describes the architecture type", - "type": "string", - "enum": [ - "amd64", - "arm64", - "ppc64le", - "s390x" - ] - } - }, - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes. Deprecated, use the top-level attributes field instead.", - "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, can be a URI or a relative path in the project", - "type": "string" - }, - "language": { - "description": "Optional devfile language", - "type": "string" - }, - "name": { - "description": "Optional devfile name", - "type": "string" - }, - "projectType": { - "description": "Optional devfile project type", - "type": "string" - }, - "provider": { - "description": "Optional devfile provider information", - "type": "string" - }, - "supportUrl": { - "description": "Optional link to a page that provides support information", - "type": "string" - }, - "tags": { - "description": "Optional devfile tags", - "type": "array", - "items": { - "type": "string" - } - }, - "version": { - "description": "Optional semver-compatible version", - "type": "string", - "pattern": "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(\\-[0-9a-z-]+(\\.[0-9a-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$" - }, - "website": { - "description": "Optional devfile website", - "type": "string" - } - }, - "additionalProperties": true - }, - "parent": { - "description": "Parent devworkspace template", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "id" - ] - }, - { - "required": [ - "kubernetes" - ] - } - ], - "properties": { - "attributes": { - "description": "Overrides of attributes encapsulated in a parent devfile. Overriding is done according to K8S strategic merge patch standard rules.", - "type": "object", - "additionalProperties": true - }, - "commands": { - "description": "Overrides of commands encapsulated in a parent devfile or a plugin. Overriding is done according to K8S strategic merge patch standard rules.", - "type": "array", - "items": { - "type": "object", - "required": [ - "id" - ], - "oneOf": [ - { - "required": [ - "exec" - ] - }, - { - "required": [ - "apply" - ] - }, - { - "required": [ - "composite" - ] - } - ], - "properties": { - "apply": { - "description": "Command that consists in applying a given component definition, typically bound to a devworkspace event.\n\nFor example, when an `apply` command is bound to a `preStart` event, and references a `container` component, it will start the container as a K8S initContainer in the devworkspace POD, unless the component has its `dedicatedPod` field set to `true`.\n\nWhen no `apply` command exist for a given component, it is assumed the component will be applied at devworkspace start by default, unless `deployByDefault` for that component is set to false.", - "type": "object", - "properties": { - "component": { - "description": "Describes component that will be applied", - "type": "string" - }, - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug", - "deploy" - ] - } - }, - "additionalProperties": false - }, - "label": { - "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string" - } - }, - "additionalProperties": false - }, - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "composite": { - "description": "Composite command that allows executing several sub-commands either sequentially or concurrently", - "type": "object", - "properties": { - "commands": { - "description": "The commands that comprise this composite command", - "type": "array", - "items": { - "type": "string" - } - }, - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug", - "deploy" - ] - } - }, - "additionalProperties": false - }, - "label": { - "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string" - }, - "parallel": { - "description": "Indicates if the sub-commands should be executed concurrently", - "type": "boolean" - } - }, - "additionalProperties": false - }, - "exec": { - "description": "CLI Command executed in an existing component container", - "type": "object", - "properties": { - "commandLine": { - "description": "The actual command-line string\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/). If there are multiple projects, this will point to the directory of the first one.", - "type": "string" - }, - "component": { - "description": "Describes component to which given action relates", - "type": "string" - }, - "env": { - "description": "Optional list of environment variables that have to be set before running the command", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug", - "deploy" - ] - } - }, - "additionalProperties": false - }, - "hotReloadCapable": { - "description": "Specify whether the command is restarted or not when the source code changes. If set to `true` the command won't be restarted. A *hotReloadCapable* `run` or `debug` command is expected to handle file changes on its own and won't be restarted. A *hotReloadCapable* `build` command is expected to be executed only once and won't be executed again. This field is taken into account only for commands `build`, `run` and `debug` with `isDefault` set to `true`.\n\nDefault value is `false`", - "type": "boolean" - }, - "label": { - "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string" - }, - "workingDir": { - "description": "Working directory where the command should be executed\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/). If there are multiple projects, this will point to the directory of the first one.", - "type": "string" - } - }, - "additionalProperties": false - }, - "id": { - "description": "Mandatory identifier that allows referencing this command in composite commands, from a parent, or in events.", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - } - }, - "additionalProperties": false - } - }, - "components": { - "description": "Overrides of components encapsulated in a parent devfile or a plugin. Overriding is done according to K8S strategic merge patch standard rules.", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "container" - ] - }, - { - "required": [ - "kubernetes" - ] - }, - { - "required": [ - "openshift" - ] - }, - { - "required": [ - "volume" - ] - }, - { - "required": [ - "image" - ] - } - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "container": { - "description": "Allows adding and configuring devworkspace-related containers", - "type": "object", - "properties": { - "annotation": { - "description": "Annotations that should be added to specific resources for this container", - "type": "object", - "properties": { - "deployment": { - "description": "Annotations to be added to deployment", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "service": { - "description": "Annotations to be added to service", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "args": { - "description": "The arguments to supply to the command running the dockerimage component. The arguments are supplied either to the default command provided in the image or to the overridden command.\n\nDefaults to an empty array, meaning use whatever is defined in the image.", - "type": "array", - "items": { - "type": "string" - } - }, - "command": { - "description": "The command to run in the dockerimage component instead of the default one provided in the image.\n\nDefaults to an empty array, meaning use whatever is defined in the image.", - "type": "array", - "items": { - "type": "string" - } - }, - "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\nDefault value is `false`", - "type": "boolean" - }, - "endpoints": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "annotation": { - "description": "Annotations to be added to Kubernetes Ingress or Openshift Route", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "attributes": { - "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", - "type": "object", - "additionalProperties": true - }, - "exposure": { - "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`", - "type": "string", - "enum": [ - "public", - "internal", - "none" - ] - }, - "name": { - "type": "string", - "maxLength": 15, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "Path of the endpoint URL", - "type": "string" - }, - "protocol": { - "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\nDefault value is `http`", - "type": "string", - "enum": [ - "http", - "https", - "ws", - "wss", - "tcp", - "udp" - ] - }, - "secure": { - "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": { - "description": "Port number to be used within the container component. The same port cannot be used by two different container components.", - "type": "integer" - } - }, - "additionalProperties": false - } - }, - "env": { - "description": "Environment variables used in this container.\n\nThe following variables are reserved and cannot be overridden via env:\n\n - `$PROJECTS_ROOT`\n\n - `$PROJECT_SOURCE`", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "image": { - "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\nDefaults to true for all component types except plugins and components that set `dedicatedPod` to true.", - "type": "boolean" - }, - "sourceMapping": { - "description": "Optional specification of the path in the container where project sources should be transferred/mounted when `mountSources` is `true`. When omitted, the default value of /projects is used.", - "type": "string" - }, - "volumeMounts": { - "description": "List of volumes mounts that should be mounted is this container.", - "type": "array", - "items": { - "description": "Volume that should be mounted to a component container", - "type": "object", - "required": [ - "name" - ], - "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.", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "The path in the component container where the volume should be mounted. If not path is mentioned, default path is the is `/`.", - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "additionalProperties": false - }, - "image": { - "description": "Allows specifying the definition of an image for outer loop builds", - "type": "object", - "oneOf": [ - { - "required": [ - "dockerfile" - ] - }, - { - "required": [ - "autoBuild" - ] - } - ], - "properties": { - "autoBuild": { - "description": "Defines if the image should be built during startup.\n\nDefault value is `false`", - "type": "boolean" - }, - "dockerfile": { - "description": "Allows specifying dockerfile type build", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "devfileRegistry" - ] - }, - { - "required": [ - "git" - ] - } - ], - "properties": { - "args": { - "description": "The arguments to supply to the dockerfile build.", - "type": "array", - "items": { - "type": "string" - } - }, - "buildContext": { - "description": "Path of source directory to establish build context. Defaults to ${PROJECT_SOURCE} in the container", - "type": "string" - }, - "devfileRegistry": { - "description": "Dockerfile's Devfile Registry source", - "type": "object", - "properties": { - "id": { - "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", - "type": "string" - }, - "registryUrl": { - "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", - "type": "string" - } - }, - "additionalProperties": false - }, - "git": { - "description": "Dockerfile's Git source", - "type": "object", - "properties": { - "checkoutFrom": { - "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", - "type": "object", - "properties": { - "remote": { - "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string" - }, - "revision": { - "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string" - } - }, - "additionalProperties": false - }, - "fileLocation": { - "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", - "type": "string" - }, - "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects & Image Component's Git source can only have at most one remote configured.", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "rootRequired": { - "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", - "type": "boolean" - }, - "uri": { - "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", - "type": "string" - } - }, - "additionalProperties": false - }, - "imageName": { - "description": "Name of the image for the resulting outerloop build", - "type": "string" - } - }, - "additionalProperties": false - }, - "kubernetes": { - "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "inlined" - ] - } - ], - "properties": { - "deployByDefault": { - "description": "Defines if the component should be deployed during startup.\n\nDefault value is `false`", - "type": "boolean" - }, - "endpoints": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "annotation": { - "description": "Annotations to be added to Kubernetes Ingress or Openshift Route", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "attributes": { - "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", - "type": "object", - "additionalProperties": true - }, - "exposure": { - "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`", - "type": "string", - "enum": [ - "public", - "internal", - "none" - ] - }, - "name": { - "type": "string", - "maxLength": 15, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "Path of the endpoint URL", - "type": "string" - }, - "protocol": { - "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\nDefault value is `http`", - "type": "string", - "enum": [ - "http", - "https", - "ws", - "wss", - "tcp", - "udp" - ] - }, - "secure": { - "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": { - "description": "Port number to be used within the container component. The same port cannot be used by two different container components.", - "type": "integer" - } - }, - "additionalProperties": false - } - }, - "inlined": { - "description": "Inlined manifest", - "type": "string" - }, - "uri": { - "description": "Location in a file fetched from a uri.", - "type": "string" - } - }, - "additionalProperties": false - }, - "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.", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "openshift": { - "description": "Allows importing into the devworkspace the OpenShift resources defined in a given manifest. For example this allows reusing the OpenShift definitions used to deploy some runtime components in production.", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "inlined" - ] - } - ], - "properties": { - "deployByDefault": { - "description": "Defines if the component should be deployed during startup.\n\nDefault value is `false`", - "type": "boolean" - }, - "endpoints": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "annotation": { - "description": "Annotations to be added to Kubernetes Ingress or Openshift Route", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "attributes": { - "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", - "type": "object", - "additionalProperties": true - }, - "exposure": { - "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`", - "type": "string", - "enum": [ - "public", - "internal", - "none" - ] - }, - "name": { - "type": "string", - "maxLength": 15, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "Path of the endpoint URL", - "type": "string" - }, - "protocol": { - "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\nDefault value is `http`", - "type": "string", - "enum": [ - "http", - "https", - "ws", - "wss", - "tcp", - "udp" - ] - }, - "secure": { - "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": { - "description": "Port number to be used within the container component. The same port cannot be used by two different container components.", - "type": "integer" - } - }, - "additionalProperties": false - } - }, - "inlined": { - "description": "Inlined manifest", - "type": "string" - }, - "uri": { - "description": "Location in a file fetched from a uri.", - "type": "string" - } - }, - "additionalProperties": false - }, - "volume": { - "description": "Allows specifying the definition of a volume shared by several other components", - "type": "object", - "properties": { - "ephemeral": { - "description": "Ephemeral volumes are not stored persistently across restarts. Defaults to false", - "type": "boolean" - }, - "size": { - "description": "Size of the volume", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "id": { - "description": "Id in a registry that contains a Devfile yaml file", - "type": "string" - }, - "kubernetes": { - "description": "Reference to a Kubernetes CRD of type DevWorkspaceTemplate", - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "namespace": { - "type": "string" - } - }, - "additionalProperties": false - }, - "projects": { - "description": "Overrides of projects encapsulated in a parent devfile. Overriding is done according to K8S strategic merge patch standard rules.", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "git" - ] - }, - { - "required": [ - "zip" - ] - } - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "clonePath": { - "description": "Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name.", - "type": "string" - }, - "git": { - "description": "Project's Git source", - "type": "object", - "properties": { - "checkoutFrom": { - "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", - "type": "object", - "properties": { - "remote": { - "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string" - }, - "revision": { - "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string" - } - }, - "additionalProperties": false - }, - "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects & Image Component's Git source can only have at most one remote configured.", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "name": { - "description": "Project name", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "zip": { - "description": "Project's Zip source", - "type": "object", - "properties": { - "location": { - "description": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "registryUrl": { - "description": "Registry URL to pull the parent devfile from when using id in the parent reference. To ensure the parent devfile gets resolved consistently in different environments, it is recommended to always specify the `registryUrl` when `id` is used.", - "type": "string" - }, - "starterProjects": { - "description": "Overrides of starterProjects encapsulated in a parent devfile. Overriding is done according to K8S strategic merge patch standard rules.", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "git" - ] - }, - { - "required": [ - "zip" - ] - } - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "description": { - "description": "Description of a starter project", - "type": "string" - }, - "git": { - "description": "Project's Git source", - "type": "object", - "properties": { - "checkoutFrom": { - "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", - "type": "object", - "properties": { - "remote": { - "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string" - }, - "revision": { - "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string" - } - }, - "additionalProperties": false - }, - "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects & Image Component's Git source can only have at most one remote configured.", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "name": { - "description": "Project name", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "subDir": { - "description": "Sub-directory from a starter project to be used as root for starter project.", - "type": "string" - }, - "zip": { - "description": "Project's Zip source", - "type": "object", - "properties": { - "location": { - "description": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "uri": { - "description": "URI Reference of a parent devfile YAML file. It can be a full URL or a relative URI with the current devfile as the base URI.", - "type": "string" - }, - "variables": { - "description": "Overrides of variables encapsulated in a parent devfile. Overriding is done according to K8S strategic merge patch standard rules.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "version": { - "description": "Specific stack/sample version to pull the parent devfile from, when using id in the parent reference. To specify `version`, `id` must be defined and used as the import reference source. `version` can be either a specific stack version, or `latest`. If no `version` specified, default version will be used.", - "type": "string", - "pattern": "^(latest)|(([1-9])\\.([0-9]+)\\.([0-9]+)(\\-[0-9a-z-]+(\\.[0-9a-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?)$" - } - }, - "additionalProperties": false - }, - "projects": { - "description": "Projects worked on in the devworkspace, containing names and sources locations", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "git" - ] - }, - { - "required": [ - "zip" - ] - } - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "clonePath": { - "description": "Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name.", - "type": "string" - }, - "git": { - "description": "Project's Git source", - "type": "object", - "required": [ - "remotes" - ], - "properties": { - "checkoutFrom": { - "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", - "type": "object", - "properties": { - "remote": { - "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string" - }, - "revision": { - "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string" - } - }, - "additionalProperties": false - }, - "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects & Image Component's Git source can only have at most one remote configured.", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "name": { - "description": "Project name", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "zip": { - "description": "Project's Zip source", - "type": "object", - "properties": { - "location": { - "description": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "schemaVersion": { - "description": "Devfile schema version", - "type": "string", - "pattern": "^([2-9])\\.([0-9]+)\\.([0-9]+)(\\-[0-9a-z-]+(\\.[0-9a-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$" - }, - "starterProjects": { - "description": "StarterProjects is a project that can be used as a starting point when bootstrapping new projects", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "git" - ] - }, - { - "required": [ - "zip" - ] - } - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "description": { - "description": "Description of a starter project", - "type": "string" - }, - "git": { - "description": "Project's Git source", - "type": "object", - "required": [ - "remotes" - ], - "properties": { - "checkoutFrom": { - "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", - "type": "object", - "properties": { - "remote": { - "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string" - }, - "revision": { - "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string" - } - }, - "additionalProperties": false - }, - "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects & Image Component's Git source can only have at most one remote configured.", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "name": { - "description": "Project name", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "subDir": { - "description": "Sub-directory from a starter project to be used as root for starter project.", - "type": "string" - }, - "zip": { - "description": "Project's Zip source", - "type": "object", - "properties": { - "location": { - "description": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "variables": { - "description": "Map of key-value variables used for string replacement in the devfile. Values can be referenced via {{variable-key}} to replace the corresponding value in string fields in the devfile. Replacement cannot be used for\n\n - schemaVersion, metadata, parent source\n\n - element identifiers, e.g. command id, component name, endpoint name, project name\n\n - references to identifiers, e.g. in events, a command's component, container's volume mount name\n\n - string enums, e.g. command group kind, endpoint exposure", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false -} diff --git a/wsmaster/che-core-api-workspace/src/main/resources/schema/2.2.2/devfile.json b/wsmaster/che-core-api-workspace/src/main/resources/schema/2.2.2/devfile.json deleted file mode 100644 index 8f4f5394e5..0000000000 --- a/wsmaster/che-core-api-workspace/src/main/resources/schema/2.2.2/devfile.json +++ /dev/null @@ -1,2211 +0,0 @@ -{ - "description": "Devfile describes the structure of a cloud-native devworkspace and development environment.", - "type": "object", - "title": "Devfile schema - Version 2.2.2", - "required": [ - "schemaVersion" - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "commands": { - "description": "Predefined, ready-to-use, devworkspace-related commands", - "type": "array", - "items": { - "type": "object", - "required": [ - "id" - ], - "oneOf": [ - { - "required": [ - "exec" - ] - }, - { - "required": [ - "apply" - ] - }, - { - "required": [ - "composite" - ] - } - ], - "properties": { - "apply": { - "description": "Command that consists in applying a given component definition, typically bound to a devworkspace event.\n\nFor example, when an `apply` command is bound to a `preStart` event, and references a `container` component, it will start the container as a K8S initContainer in the devworkspace POD, unless the component has its `dedicatedPod` field set to `true`.\n\nWhen no `apply` command exist for a given component, it is assumed the component will be applied at devworkspace start by default, unless `deployByDefault` for that component is set to false.", - "type": "object", - "required": [ - "component" - ], - "properties": { - "component": { - "description": "Describes component that will be applied", - "type": "string" - }, - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "required": [ - "kind" - ], - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug", - "deploy" - ] - } - }, - "additionalProperties": false - }, - "label": { - "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string" - } - }, - "additionalProperties": false - }, - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "composite": { - "description": "Composite command that allows executing several sub-commands either sequentially or concurrently", - "type": "object", - "properties": { - "commands": { - "description": "The commands that comprise this composite command", - "type": "array", - "items": { - "type": "string" - } - }, - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "required": [ - "kind" - ], - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug", - "deploy" - ] - } - }, - "additionalProperties": false - }, - "label": { - "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string" - }, - "parallel": { - "description": "Indicates if the sub-commands should be executed concurrently", - "type": "boolean" - } - }, - "additionalProperties": false - }, - "exec": { - "description": "CLI Command executed in an existing component container", - "type": "object", - "required": [ - "commandLine", - "component" - ], - "properties": { - "commandLine": { - "description": "The actual command-line string\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/). If there are multiple projects, this will point to the directory of the first one.", - "type": "string" - }, - "component": { - "description": "Describes component to which given action relates", - "type": "string" - }, - "env": { - "description": "Optional list of environment variables that have to be set before running the command", - "type": "array", - "items": { - "type": "object", - "required": [ - "name", - "value" - ], - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "required": [ - "kind" - ], - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug", - "deploy" - ] - } - }, - "additionalProperties": false - }, - "hotReloadCapable": { - "description": "Specify whether the command is restarted or not when the source code changes. If set to `true` the command won't be restarted. A *hotReloadCapable* `run` or `debug` command is expected to handle file changes on its own and won't be restarted. A *hotReloadCapable* `build` command is expected to be executed only once and won't be executed again. This field is taken into account only for commands `build`, `run` and `debug` with `isDefault` set to `true`.\n\nDefault value is `false`", - "type": "boolean" - }, - "label": { - "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string" - }, - "workingDir": { - "description": "Working directory where the command should be executed\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/). If there are multiple projects, this will point to the directory of the first one.", - "type": "string" - } - }, - "additionalProperties": false - }, - "id": { - "description": "Mandatory identifier that allows referencing this command in composite commands, from a parent, or in events.", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - } - }, - "additionalProperties": false - } - }, - "components": { - "description": "List of the devworkspace components, such as editor and plugins, user-provided containers, or other types of components", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "container" - ] - }, - { - "required": [ - "kubernetes" - ] - }, - { - "required": [ - "openshift" - ] - }, - { - "required": [ - "volume" - ] - }, - { - "required": [ - "image" - ] - } - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "container": { - "description": "Allows adding and configuring devworkspace-related containers", - "type": "object", - "required": [ - "image" - ], - "properties": { - "annotation": { - "description": "Annotations that should be added to specific resources for this container", - "type": "object", - "properties": { - "deployment": { - "description": "Annotations to be added to deployment", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "service": { - "description": "Annotations to be added to service", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "args": { - "description": "The arguments to supply to the command running the dockerimage component. The arguments are supplied either to the default command provided in the image or to the overridden command.\n\nDefaults to an empty array, meaning use whatever is defined in the image.", - "type": "array", - "items": { - "type": "string" - } - }, - "command": { - "description": "The command to run in the dockerimage component instead of the default one provided in the image.\n\nDefaults to an empty array, meaning use whatever is defined in the image.", - "type": "array", - "items": { - "type": "string" - } - }, - "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\nDefault value is `false`", - "type": "boolean" - }, - "endpoints": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name", - "targetPort" - ], - "properties": { - "annotation": { - "description": "Annotations to be added to Kubernetes Ingress or Openshift Route", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "attributes": { - "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", - "type": "object", - "additionalProperties": true - }, - "exposure": { - "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`", - "type": "string", - "default": "public", - "enum": [ - "public", - "internal", - "none" - ] - }, - "name": { - "type": "string", - "maxLength": 15, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "Path of the endpoint URL", - "type": "string" - }, - "protocol": { - "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\nDefault value is `http`", - "type": "string", - "default": "http", - "enum": [ - "http", - "https", - "ws", - "wss", - "tcp", - "udp" - ] - }, - "secure": { - "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": { - "description": "Port number to be used within the container component. The same port cannot be used by two different container components.", - "type": "integer" - } - }, - "additionalProperties": false - } - }, - "env": { - "description": "Environment variables used in this container.\n\nThe following variables are reserved and cannot be overridden via env:\n\n - `$PROJECTS_ROOT`\n\n - `$PROJECT_SOURCE`", - "type": "array", - "items": { - "type": "object", - "required": [ - "name", - "value" - ], - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "image": { - "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\nDefaults to true for all component types except plugins and components that set `dedicatedPod` to true.", - "type": "boolean" - }, - "sourceMapping": { - "description": "Optional specification of the path in the container where project sources should be transferred/mounted when `mountSources` is `true`. When omitted, the default value of /projects is used.", - "type": "string", - "default": "/projects" - }, - "volumeMounts": { - "description": "List of volumes mounts that should be mounted is this container.", - "type": "array", - "items": { - "description": "Volume that should be mounted to a component container", - "type": "object", - "required": [ - "name" - ], - "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.", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "The path in the component container where the volume should be mounted. If not path is mentioned, default path is the is `/`.", - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "additionalProperties": false - }, - "image": { - "description": "Allows specifying the definition of an image for outer loop builds", - "type": "object", - "required": [ - "imageName" - ], - "oneOf": [ - { - "required": [ - "dockerfile" - ] - } - ], - "properties": { - "autoBuild": { - "description": "Defines if the image should be built during startup.\n\nDefault value is `false`", - "type": "boolean" - }, - "dockerfile": { - "description": "Allows specifying dockerfile type build", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "devfileRegistry" - ] - }, - { - "required": [ - "git" - ] - } - ], - "properties": { - "args": { - "description": "The arguments to supply to the dockerfile build.", - "type": "array", - "items": { - "type": "string" - } - }, - "buildContext": { - "description": "Path of source directory to establish build context. Defaults to ${PROJECT_SOURCE} in the container", - "type": "string" - }, - "devfileRegistry": { - "description": "Dockerfile's Devfile Registry source", - "type": "object", - "required": [ - "id" - ], - "properties": { - "id": { - "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", - "type": "string" - }, - "registryUrl": { - "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", - "type": "string" - } - }, - "additionalProperties": false - }, - "git": { - "description": "Dockerfile's Git source", - "type": "object", - "required": [ - "remotes" - ], - "properties": { - "checkoutFrom": { - "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", - "type": "object", - "properties": { - "remote": { - "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string" - }, - "revision": { - "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string" - } - }, - "additionalProperties": false - }, - "fileLocation": { - "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", - "type": "string" - }, - "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects & Image Component's Git source can only have at most one remote configured.", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "rootRequired": { - "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", - "type": "boolean" - }, - "uri": { - "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", - "type": "string" - } - }, - "additionalProperties": false - }, - "imageName": { - "description": "Name of the image for the resulting outerloop build", - "type": "string" - } - }, - "additionalProperties": false - }, - "kubernetes": { - "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "inlined" - ] - } - ], - "properties": { - "deployByDefault": { - "description": "Defines if the component should be deployed during startup.\n\nDefault value is `false`", - "type": "boolean" - }, - "endpoints": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name", - "targetPort" - ], - "properties": { - "annotation": { - "description": "Annotations to be added to Kubernetes Ingress or Openshift Route", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "attributes": { - "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", - "type": "object", - "additionalProperties": true - }, - "exposure": { - "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`", - "type": "string", - "default": "public", - "enum": [ - "public", - "internal", - "none" - ] - }, - "name": { - "type": "string", - "maxLength": 15, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "Path of the endpoint URL", - "type": "string" - }, - "protocol": { - "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\nDefault value is `http`", - "type": "string", - "default": "http", - "enum": [ - "http", - "https", - "ws", - "wss", - "tcp", - "udp" - ] - }, - "secure": { - "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": { - "description": "Port number to be used within the container component. The same port cannot be used by two different container components.", - "type": "integer" - } - }, - "additionalProperties": false - } - }, - "inlined": { - "description": "Inlined manifest", - "type": "string" - }, - "uri": { - "description": "Location in a file fetched from a uri.", - "type": "string" - } - }, - "additionalProperties": false - }, - "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.", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "openshift": { - "description": "Allows importing into the devworkspace the OpenShift resources defined in a given manifest. For example this allows reusing the OpenShift definitions used to deploy some runtime components in production.", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "inlined" - ] - } - ], - "properties": { - "deployByDefault": { - "description": "Defines if the component should be deployed during startup.\n\nDefault value is `false`", - "type": "boolean" - }, - "endpoints": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name", - "targetPort" - ], - "properties": { - "annotation": { - "description": "Annotations to be added to Kubernetes Ingress or Openshift Route", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "attributes": { - "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", - "type": "object", - "additionalProperties": true - }, - "exposure": { - "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`", - "type": "string", - "default": "public", - "enum": [ - "public", - "internal", - "none" - ] - }, - "name": { - "type": "string", - "maxLength": 15, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "Path of the endpoint URL", - "type": "string" - }, - "protocol": { - "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\nDefault value is `http`", - "type": "string", - "default": "http", - "enum": [ - "http", - "https", - "ws", - "wss", - "tcp", - "udp" - ] - }, - "secure": { - "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": { - "description": "Port number to be used within the container component. The same port cannot be used by two different container components.", - "type": "integer" - } - }, - "additionalProperties": false - } - }, - "inlined": { - "description": "Inlined manifest", - "type": "string" - }, - "uri": { - "description": "Location in a file fetched from a uri.", - "type": "string" - } - }, - "additionalProperties": false - }, - "volume": { - "description": "Allows specifying the definition of a volume shared by several other components", - "type": "object", - "properties": { - "ephemeral": { - "description": "Ephemeral volumes are not stored persistently across restarts. Defaults to false", - "type": "boolean" - }, - "size": { - "description": "Size of the volume", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "dependentProjects": { - "description": "Additional projects related to the main project in the devfile, contianing names and sources locations", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "git" - ] - }, - { - "required": [ - "zip" - ] - } - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "clonePath": { - "description": "Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name.", - "type": "string" - }, - "git": { - "description": "Project's Git source", - "type": "object", - "required": [ - "remotes" - ], - "properties": { - "checkoutFrom": { - "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", - "type": "object", - "properties": { - "remote": { - "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string" - }, - "revision": { - "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string" - } - }, - "additionalProperties": false - }, - "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects & Image Component's Git source can only have at most one remote configured.", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "name": { - "description": "Project name", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "zip": { - "description": "Project's Zip source", - "type": "object", - "properties": { - "location": { - "description": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "events": { - "description": "Bindings of commands to events. Each command is referred-to by its name.", - "type": "object", - "properties": { - "postStart": { - "description": "IDs of commands that should be executed after the devworkspace is completely started. In the case of Che-Theia, these commands should be executed after all plugins and extensions have started, including project cloning. This means that those commands are not triggered until the user opens the IDE in his browser.", - "type": "array", - "items": { - "type": "string" - } - }, - "postStop": { - "description": "IDs of commands that should be executed after stopping the devworkspace.", - "type": "array", - "items": { - "type": "string" - } - }, - "preStart": { - "description": "IDs of commands that should be executed before the devworkspace start. Kubernetes-wise, these commands would typically be executed in init containers of the devworkspace POD.", - "type": "array", - "items": { - "type": "string" - } - }, - "preStop": { - "description": "IDs of commands that should be executed before stopping the devworkspace.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "metadata": { - "description": "Optional metadata", - "type": "object", - "properties": { - "architectures": { - "description": "Optional list of processor architectures that the devfile supports, empty list suggests that the devfile can be used on any architecture", - "type": "array", - "uniqueItems": true, - "items": { - "description": "Architecture describes the architecture type", - "type": "string", - "enum": [ - "amd64", - "arm64", - "ppc64le", - "s390x" - ] - } - }, - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes. Deprecated, use the top-level attributes field instead.", - "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, can be a URI or a relative path in the project", - "type": "string" - }, - "language": { - "description": "Optional devfile language", - "type": "string" - }, - "name": { - "description": "Optional devfile name", - "type": "string" - }, - "projectType": { - "description": "Optional devfile project type", - "type": "string" - }, - "provider": { - "description": "Optional devfile provider information", - "type": "string" - }, - "supportUrl": { - "description": "Optional link to a page that provides support information", - "type": "string" - }, - "tags": { - "description": "Optional devfile tags", - "type": "array", - "items": { - "type": "string" - } - }, - "version": { - "description": "Optional semver-compatible version", - "type": "string", - "pattern": "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(\\-[0-9a-z-]+(\\.[0-9a-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$" - }, - "website": { - "description": "Optional devfile website", - "type": "string" - } - }, - "additionalProperties": true - }, - "parent": { - "description": "Parent devworkspace template", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "id" - ] - }, - { - "required": [ - "kubernetes" - ] - } - ], - "properties": { - "attributes": { - "description": "Overrides of attributes encapsulated in a parent devfile. Overriding is done according to K8S strategic merge patch standard rules.", - "type": "object", - "additionalProperties": true - }, - "commands": { - "description": "Overrides of commands encapsulated in a parent devfile or a plugin. Overriding is done according to K8S strategic merge patch standard rules.", - "type": "array", - "items": { - "type": "object", - "required": [ - "id" - ], - "oneOf": [ - { - "required": [ - "exec" - ] - }, - { - "required": [ - "apply" - ] - }, - { - "required": [ - "composite" - ] - } - ], - "properties": { - "apply": { - "description": "Command that consists in applying a given component definition, typically bound to a devworkspace event.\n\nFor example, when an `apply` command is bound to a `preStart` event, and references a `container` component, it will start the container as a K8S initContainer in the devworkspace POD, unless the component has its `dedicatedPod` field set to `true`.\n\nWhen no `apply` command exist for a given component, it is assumed the component will be applied at devworkspace start by default, unless `deployByDefault` for that component is set to false.", - "type": "object", - "properties": { - "component": { - "description": "Describes component that will be applied", - "type": "string" - }, - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug", - "deploy" - ] - } - }, - "additionalProperties": false - }, - "label": { - "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string" - } - }, - "additionalProperties": false - }, - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "composite": { - "description": "Composite command that allows executing several sub-commands either sequentially or concurrently", - "type": "object", - "properties": { - "commands": { - "description": "The commands that comprise this composite command", - "type": "array", - "items": { - "type": "string" - } - }, - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug", - "deploy" - ] - } - }, - "additionalProperties": false - }, - "label": { - "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string" - }, - "parallel": { - "description": "Indicates if the sub-commands should be executed concurrently", - "type": "boolean" - } - }, - "additionalProperties": false - }, - "exec": { - "description": "CLI Command executed in an existing component container", - "type": "object", - "properties": { - "commandLine": { - "description": "The actual command-line string\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/). If there are multiple projects, this will point to the directory of the first one.", - "type": "string" - }, - "component": { - "description": "Describes component to which given action relates", - "type": "string" - }, - "env": { - "description": "Optional list of environment variables that have to be set before running the command", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "group": { - "description": "Defines the group this command is part of", - "type": "object", - "properties": { - "isDefault": { - "description": "Identifies the default command for a given group kind", - "type": "boolean" - }, - "kind": { - "description": "Kind of group the command is part of", - "type": "string", - "enum": [ - "build", - "run", - "test", - "debug", - "deploy" - ] - } - }, - "additionalProperties": false - }, - "hotReloadCapable": { - "description": "Specify whether the command is restarted or not when the source code changes. If set to `true` the command won't be restarted. A *hotReloadCapable* `run` or `debug` command is expected to handle file changes on its own and won't be restarted. A *hotReloadCapable* `build` command is expected to be executed only once and won't be executed again. This field is taken into account only for commands `build`, `run` and `debug` with `isDefault` set to `true`.\n\nDefault value is `false`", - "type": "boolean" - }, - "label": { - "description": "Optional label that provides a label for this command to be used in Editor UI menus for example", - "type": "string" - }, - "workingDir": { - "description": "Working directory where the command should be executed\n\nSpecial variables that can be used:\n\n - `$PROJECTS_ROOT`: A path where projects sources are mounted as defined by container component's sourceMapping.\n\n - `$PROJECT_SOURCE`: A path to a project source ($PROJECTS_ROOT/). If there are multiple projects, this will point to the directory of the first one.", - "type": "string" - } - }, - "additionalProperties": false - }, - "id": { - "description": "Mandatory identifier that allows referencing this command in composite commands, from a parent, or in events.", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - } - }, - "additionalProperties": false - } - }, - "components": { - "description": "Overrides of components encapsulated in a parent devfile or a plugin. Overriding is done according to K8S strategic merge patch standard rules.", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "container" - ] - }, - { - "required": [ - "kubernetes" - ] - }, - { - "required": [ - "openshift" - ] - }, - { - "required": [ - "volume" - ] - }, - { - "required": [ - "image" - ] - } - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "container": { - "description": "Allows adding and configuring devworkspace-related containers", - "type": "object", - "properties": { - "annotation": { - "description": "Annotations that should be added to specific resources for this container", - "type": "object", - "properties": { - "deployment": { - "description": "Annotations to be added to deployment", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "service": { - "description": "Annotations to be added to service", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "args": { - "description": "The arguments to supply to the command running the dockerimage component. The arguments are supplied either to the default command provided in the image or to the overridden command.\n\nDefaults to an empty array, meaning use whatever is defined in the image.", - "type": "array", - "items": { - "type": "string" - } - }, - "command": { - "description": "The command to run in the dockerimage component instead of the default one provided in the image.\n\nDefaults to an empty array, meaning use whatever is defined in the image.", - "type": "array", - "items": { - "type": "string" - } - }, - "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\nDefault value is `false`", - "type": "boolean" - }, - "endpoints": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "annotation": { - "description": "Annotations to be added to Kubernetes Ingress or Openshift Route", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "attributes": { - "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", - "type": "object", - "additionalProperties": true - }, - "exposure": { - "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`", - "type": "string", - "enum": [ - "public", - "internal", - "none" - ] - }, - "name": { - "type": "string", - "maxLength": 15, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "Path of the endpoint URL", - "type": "string" - }, - "protocol": { - "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\nDefault value is `http`", - "type": "string", - "enum": [ - "http", - "https", - "ws", - "wss", - "tcp", - "udp" - ] - }, - "secure": { - "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": { - "description": "Port number to be used within the container component. The same port cannot be used by two different container components.", - "type": "integer" - } - }, - "additionalProperties": false - } - }, - "env": { - "description": "Environment variables used in this container.\n\nThe following variables are reserved and cannot be overridden via env:\n\n - `$PROJECTS_ROOT`\n\n - `$PROJECT_SOURCE`", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "image": { - "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\nDefaults to true for all component types except plugins and components that set `dedicatedPod` to true.", - "type": "boolean" - }, - "sourceMapping": { - "description": "Optional specification of the path in the container where project sources should be transferred/mounted when `mountSources` is `true`. When omitted, the default value of /projects is used.", - "type": "string" - }, - "volumeMounts": { - "description": "List of volumes mounts that should be mounted is this container.", - "type": "array", - "items": { - "description": "Volume that should be mounted to a component container", - "type": "object", - "required": [ - "name" - ], - "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.", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "The path in the component container where the volume should be mounted. If not path is mentioned, default path is the is `/`.", - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "additionalProperties": false - }, - "image": { - "description": "Allows specifying the definition of an image for outer loop builds", - "type": "object", - "oneOf": [ - { - "required": [ - "dockerfile" - ] - }, - { - "required": [ - "autoBuild" - ] - } - ], - "properties": { - "autoBuild": { - "description": "Defines if the image should be built during startup.\n\nDefault value is `false`", - "type": "boolean" - }, - "dockerfile": { - "description": "Allows specifying dockerfile type build", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "devfileRegistry" - ] - }, - { - "required": [ - "git" - ] - } - ], - "properties": { - "args": { - "description": "The arguments to supply to the dockerfile build.", - "type": "array", - "items": { - "type": "string" - } - }, - "buildContext": { - "description": "Path of source directory to establish build context. Defaults to ${PROJECT_SOURCE} in the container", - "type": "string" - }, - "devfileRegistry": { - "description": "Dockerfile's Devfile Registry source", - "type": "object", - "properties": { - "id": { - "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", - "type": "string" - }, - "registryUrl": { - "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", - "type": "string" - } - }, - "additionalProperties": false - }, - "git": { - "description": "Dockerfile's Git source", - "type": "object", - "properties": { - "checkoutFrom": { - "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", - "type": "object", - "properties": { - "remote": { - "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string" - }, - "revision": { - "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string" - } - }, - "additionalProperties": false - }, - "fileLocation": { - "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", - "type": "string" - }, - "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects & Image Component's Git source can only have at most one remote configured.", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "rootRequired": { - "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", - "type": "boolean" - }, - "uri": { - "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", - "type": "string" - } - }, - "additionalProperties": false - }, - "imageName": { - "description": "Name of the image for the resulting outerloop build", - "type": "string" - } - }, - "additionalProperties": false - }, - "kubernetes": { - "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "inlined" - ] - } - ], - "properties": { - "deployByDefault": { - "description": "Defines if the component should be deployed during startup.\n\nDefault value is `false`", - "type": "boolean" - }, - "endpoints": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "annotation": { - "description": "Annotations to be added to Kubernetes Ingress or Openshift Route", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "attributes": { - "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", - "type": "object", - "additionalProperties": true - }, - "exposure": { - "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`", - "type": "string", - "enum": [ - "public", - "internal", - "none" - ] - }, - "name": { - "type": "string", - "maxLength": 15, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "Path of the endpoint URL", - "type": "string" - }, - "protocol": { - "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\nDefault value is `http`", - "type": "string", - "enum": [ - "http", - "https", - "ws", - "wss", - "tcp", - "udp" - ] - }, - "secure": { - "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": { - "description": "Port number to be used within the container component. The same port cannot be used by two different container components.", - "type": "integer" - } - }, - "additionalProperties": false - } - }, - "inlined": { - "description": "Inlined manifest", - "type": "string" - }, - "uri": { - "description": "Location in a file fetched from a uri.", - "type": "string" - } - }, - "additionalProperties": false - }, - "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.", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "openshift": { - "description": "Allows importing into the devworkspace the OpenShift resources defined in a given manifest. For example this allows reusing the OpenShift definitions used to deploy some runtime components in production.", - "type": "object", - "oneOf": [ - { - "required": [ - "uri" - ] - }, - { - "required": [ - "inlined" - ] - } - ], - "properties": { - "deployByDefault": { - "description": "Defines if the component should be deployed during startup.\n\nDefault value is `false`", - "type": "boolean" - }, - "endpoints": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "annotation": { - "description": "Annotations to be added to Kubernetes Ingress or Openshift Route", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "attributes": { - "description": "Map of implementation-dependant string-based free-form attributes.\n\nExamples of Che-specific attributes:\n- cookiesAuthEnabled: \"true\" / \"false\",\n- type: \"terminal\" / \"ide\" / \"ide-dev\",", - "type": "object", - "additionalProperties": true - }, - "exposure": { - "description": "Describes how the endpoint should be exposed on the network.\n- `public` means that the endpoint will be exposed on the public network, typically through a K8S ingress or an OpenShift route.\n- `internal` means that the endpoint will be exposed internally outside of the main devworkspace POD, typically by K8S services, to be consumed by other elements running on the same cloud internal network.\n- `none` means that the endpoint will not be exposed and will only be accessible inside the main devworkspace POD, on a local address.\n\nDefault value is `public`", - "type": "string", - "enum": [ - "public", - "internal", - "none" - ] - }, - "name": { - "type": "string", - "maxLength": 15, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "path": { - "description": "Path of the endpoint URL", - "type": "string" - }, - "protocol": { - "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\nDefault value is `http`", - "type": "string", - "enum": [ - "http", - "https", - "ws", - "wss", - "tcp", - "udp" - ] - }, - "secure": { - "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": { - "description": "Port number to be used within the container component. The same port cannot be used by two different container components.", - "type": "integer" - } - }, - "additionalProperties": false - } - }, - "inlined": { - "description": "Inlined manifest", - "type": "string" - }, - "uri": { - "description": "Location in a file fetched from a uri.", - "type": "string" - } - }, - "additionalProperties": false - }, - "volume": { - "description": "Allows specifying the definition of a volume shared by several other components", - "type": "object", - "properties": { - "ephemeral": { - "description": "Ephemeral volumes are not stored persistently across restarts. Defaults to false", - "type": "boolean" - }, - "size": { - "description": "Size of the volume", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "dependentProjects": { - "description": "Overrides of dependentProjects encapsulated in a parent devfile. Overriding is done according to K8S strategic merge patch standard rules.", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "git" - ] - }, - { - "required": [ - "zip" - ] - } - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "clonePath": { - "description": "Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name.", - "type": "string" - }, - "git": { - "description": "Project's Git source", - "type": "object", - "properties": { - "checkoutFrom": { - "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", - "type": "object", - "properties": { - "remote": { - "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string" - }, - "revision": { - "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string" - } - }, - "additionalProperties": false - }, - "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects & Image Component's Git source can only have at most one remote configured.", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "name": { - "description": "Project name", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "zip": { - "description": "Project's Zip source", - "type": "object", - "properties": { - "location": { - "description": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "id": { - "description": "Id in a registry that contains a Devfile yaml file", - "type": "string" - }, - "kubernetes": { - "description": "Reference to a Kubernetes CRD of type DevWorkspaceTemplate", - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "namespace": { - "type": "string" - } - }, - "additionalProperties": false - }, - "projects": { - "description": "Overrides of projects encapsulated in a parent devfile. Overriding is done according to K8S strategic merge patch standard rules.", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "git" - ] - }, - { - "required": [ - "zip" - ] - } - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "clonePath": { - "description": "Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name.", - "type": "string" - }, - "git": { - "description": "Project's Git source", - "type": "object", - "properties": { - "checkoutFrom": { - "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", - "type": "object", - "properties": { - "remote": { - "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string" - }, - "revision": { - "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string" - } - }, - "additionalProperties": false - }, - "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects & Image Component's Git source can only have at most one remote configured.", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "name": { - "description": "Project name", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "zip": { - "description": "Project's Zip source", - "type": "object", - "properties": { - "location": { - "description": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "registryUrl": { - "description": "Registry URL to pull the parent devfile from when using id in the parent reference. To ensure the parent devfile gets resolved consistently in different environments, it is recommended to always specify the `registryUrl` when `id` is used.", - "type": "string" - }, - "starterProjects": { - "description": "Overrides of starterProjects encapsulated in a parent devfile. Overriding is done according to K8S strategic merge patch standard rules.", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "git" - ] - }, - { - "required": [ - "zip" - ] - } - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "description": { - "description": "Description of a starter project", - "type": "string" - }, - "git": { - "description": "Project's Git source", - "type": "object", - "properties": { - "checkoutFrom": { - "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", - "type": "object", - "properties": { - "remote": { - "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string" - }, - "revision": { - "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string" - } - }, - "additionalProperties": false - }, - "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects & Image Component's Git source can only have at most one remote configured.", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "name": { - "description": "Project name", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "subDir": { - "description": "Sub-directory from a starter project to be used as root for starter project.", - "type": "string" - }, - "zip": { - "description": "Project's Zip source", - "type": "object", - "properties": { - "location": { - "description": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "uri": { - "description": "URI Reference of a parent devfile YAML file. It can be a full URL or a relative URI with the current devfile as the base URI.", - "type": "string" - }, - "variables": { - "description": "Overrides of variables encapsulated in a parent devfile. Overriding is done according to K8S strategic merge patch standard rules.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "version": { - "description": "Specific stack/sample version to pull the parent devfile from, when using id in the parent reference. To specify `version`, `id` must be defined and used as the import reference source. `version` can be either a specific stack version, or `latest`. If no `version` specified, default version will be used.", - "type": "string", - "pattern": "^(latest)|(([1-9])\\.([0-9]+)\\.([0-9]+)(\\-[0-9a-z-]+(\\.[0-9a-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?)$" - } - }, - "additionalProperties": false - }, - "projects": { - "description": "Projects worked on in the devworkspace, containing names and sources locations", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "git" - ] - }, - { - "required": [ - "zip" - ] - } - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "clonePath": { - "description": "Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name.", - "type": "string" - }, - "git": { - "description": "Project's Git source", - "type": "object", - "required": [ - "remotes" - ], - "properties": { - "checkoutFrom": { - "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", - "type": "object", - "properties": { - "remote": { - "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string" - }, - "revision": { - "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string" - } - }, - "additionalProperties": false - }, - "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects & Image Component's Git source can only have at most one remote configured.", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "name": { - "description": "Project name", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "zip": { - "description": "Project's Zip source", - "type": "object", - "properties": { - "location": { - "description": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "schemaVersion": { - "description": "Devfile schema version", - "type": "string", - "pattern": "^([2-9])\\.([0-9]+)\\.([0-9]+)(\\-[0-9a-z-]+(\\.[0-9a-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$" - }, - "starterProjects": { - "description": "StarterProjects is a project that can be used as a starting point when bootstrapping new projects", - "type": "array", - "items": { - "type": "object", - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "git" - ] - }, - { - "required": [ - "zip" - ] - } - ], - "properties": { - "attributes": { - "description": "Map of implementation-dependant free-form YAML attributes.", - "type": "object", - "additionalProperties": true - }, - "description": { - "description": "Description of a starter project", - "type": "string" - }, - "git": { - "description": "Project's Git source", - "type": "object", - "required": [ - "remotes" - ], - "properties": { - "checkoutFrom": { - "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", - "type": "object", - "properties": { - "remote": { - "description": "The remote name should be used as init. Required if there are more than one remote configured", - "type": "string" - }, - "revision": { - "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", - "type": "string" - } - }, - "additionalProperties": false - }, - "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects & Image Component's Git source can only have at most one remote configured.", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false - }, - "name": { - "description": "Project name", - "type": "string", - "maxLength": 63, - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - }, - "subDir": { - "description": "Sub-directory from a starter project to be used as root for starter project.", - "type": "string" - }, - "zip": { - "description": "Project's Zip source", - "type": "object", - "properties": { - "location": { - "description": "Zip project's source location address. Should be file path of the archive, e.g. file://$FILE_PATH", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "variables": { - "description": "Map of key-value variables used for string replacement in the devfile. Values can be referenced via {{variable-key}} to replace the corresponding value in string fields in the devfile. Replacement cannot be used for\n\n - schemaVersion, metadata, parent source\n\n - element identifiers, e.g. command id, component name, endpoint name, project name\n\n - references to identifiers, e.g. in events, a command's component, container's volume mount name\n\n - string enums, e.g. command group kind, endpoint exposure", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false -} diff --git a/wsmaster/che-core-api-workspace/src/test/java/org/eclipse/che/api/workspace/server/WorkspaceServiceTest.java b/wsmaster/che-core-api-workspace/src/test/java/org/eclipse/che/api/workspace/server/WorkspaceServiceTest.java index 920ed164aa..4d72ba555b 100644 --- a/wsmaster/che-core-api-workspace/src/test/java/org/eclipse/che/api/workspace/server/WorkspaceServiceTest.java +++ b/wsmaster/che-core-api-workspace/src/test/java/org/eclipse/che/api/workspace/server/WorkspaceServiceTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2023 Red Hat, Inc. + * Copyright (c) 2012-2024 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -73,11 +73,8 @@ import org.eclipse.che.api.core.rest.CheJsonProvider; import org.eclipse.che.api.core.rest.shared.dto.ServiceError; import org.eclipse.che.api.workspace.server.devfile.DevfileEntityProvider; import org.eclipse.che.api.workspace.server.devfile.DevfileParser; -import org.eclipse.che.api.workspace.server.devfile.DevfileVersionDetector; import org.eclipse.che.api.workspace.server.devfile.URLFetcher; -import org.eclipse.che.api.workspace.server.devfile.schema.DevfileSchemaProvider; import org.eclipse.che.api.workspace.server.devfile.validator.DevfileIntegrityValidator; -import org.eclipse.che.api.workspace.server.devfile.validator.DevfileSchemaValidator; import org.eclipse.che.api.workspace.server.model.impl.CommandImpl; import org.eclipse.che.api.workspace.server.model.impl.EnvironmentImpl; import org.eclipse.che.api.workspace.server.model.impl.MachineConfigImpl; @@ -158,9 +155,7 @@ public class WorkspaceServiceTest { @SuppressWarnings("unused") // is declared for deploying by everrest-assured private DevfileEntityProvider devfileEntityProvider = new DevfileEntityProvider( - new DevfileParser( - new DevfileSchemaValidator(new DevfileSchemaProvider(), new DevfileVersionDetector()), - new DevfileIntegrityValidator(Collections.emptyMap()))); + new DevfileParser(new DevfileIntegrityValidator(Collections.emptyMap()))); @Mock private WorkspaceManager wsManager; @Mock private MachineTokenProvider machineTokenProvider; diff --git a/wsmaster/che-core-api-workspace/src/test/java/org/eclipse/che/api/workspace/server/devfile/DevfileParserTest.java b/wsmaster/che-core-api-workspace/src/test/java/org/eclipse/che/api/workspace/server/devfile/DevfileParserTest.java index 5ec37bbecc..0d5b1c6141 100644 --- a/wsmaster/che-core-api-workspace/src/test/java/org/eclipse/che/api/workspace/server/devfile/DevfileParserTest.java +++ b/wsmaster/che-core-api-workspace/src/test/java/org/eclipse/che/api/workspace/server/devfile/DevfileParserTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2023 Red Hat, Inc. + * Copyright (c) 2012-2024 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -31,7 +31,6 @@ import java.io.IOException; import org.eclipse.che.api.workspace.server.devfile.exception.DevfileException; import org.eclipse.che.api.workspace.server.devfile.exception.DevfileFormatException; import org.eclipse.che.api.workspace.server.devfile.validator.DevfileIntegrityValidator; -import org.eclipse.che.api.workspace.server.devfile.validator.DevfileSchemaValidator; import org.eclipse.che.api.workspace.server.model.impl.devfile.ActionImpl; import org.eclipse.che.api.workspace.server.model.impl.devfile.CommandImpl; import org.eclipse.che.api.workspace.server.model.impl.devfile.ComponentImpl; @@ -47,8 +46,6 @@ import org.testng.annotations.Test; public class DevfileParserTest { private static final String DEVFILE_YAML_CONTENT = "devfile yaml stub"; - - @Mock private DevfileSchemaValidator schemaValidator; @Mock private DevfileIntegrityValidator integrityValidator; @Mock private ObjectMapper jsonMapper; @Mock private ObjectMapper yamlMapper; @@ -62,7 +59,7 @@ public class DevfileParserTest { @BeforeMethod public void setUp() throws Exception { devfile = new DevfileImpl(); - devfileParser = new DevfileParser(schemaValidator, integrityValidator, yamlMapper, jsonMapper); + devfileParser = new DevfileParser(integrityValidator, yamlMapper, jsonMapper); lenient().when(jsonMapper.treeToValue(any(), eq(DevfileImpl.class))).thenReturn(devfile); lenient().when(yamlMapper.treeToValue(any(), eq(DevfileImpl.class))).thenReturn(devfile); @@ -77,7 +74,6 @@ public class DevfileParserTest { // then assertEquals(parsed, devfile); verify(yamlMapper).treeToValue(devfileJsonNode, DevfileImpl.class); - verify(schemaValidator).validate(eq(devfileJsonNode)); verify(integrityValidator).validateDevfile(devfile); } @@ -175,17 +171,6 @@ public class DevfileParserTest { // then exception is thrown } - @Test( - expectedExceptions = DevfileFormatException.class, - expectedExceptionsMessageRegExp = "non valid") - public void shouldThrowExceptionWhenExceptionOccurredDuringSchemaValidation() throws Exception { - // given - doThrow(new DevfileFormatException("non valid")).when(schemaValidator).validate(any()); - - // when - devfileParser.parseYaml(DEVFILE_YAML_CONTENT); - } - @Test( expectedExceptions = DevfileFormatException.class, expectedExceptionsMessageRegExp = "non valid") @@ -206,7 +191,6 @@ public class DevfileParserTest { devfileParser.convertYamlToMap(devfileJsonNode); // then - verify(schemaValidator).validate(eq(devfileJsonNode)); verify(yamlMapper).convertValue(eq(devfileJsonNode), any(TypeReference.class)); } } diff --git a/wsmaster/che-core-api-workspace/src/test/java/org/eclipse/che/api/workspace/server/devfile/convert/DevfileConverterTest.java b/wsmaster/che-core-api-workspace/src/test/java/org/eclipse/che/api/workspace/server/devfile/convert/DevfileConverterTest.java index 6a9c8025b2..41c8c44828 100644 --- a/wsmaster/che-core-api-workspace/src/test/java/org/eclipse/che/api/workspace/server/devfile/convert/DevfileConverterTest.java +++ b/wsmaster/che-core-api-workspace/src/test/java/org/eclipse/che/api/workspace/server/devfile/convert/DevfileConverterTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2021 Red Hat, Inc. + * Copyright (c) 2012-2024 Red Hat, Inc. * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ @@ -32,7 +32,6 @@ import org.eclipse.che.api.workspace.server.devfile.FileContentProvider; import org.eclipse.che.api.workspace.server.devfile.URLFetcher; import org.eclipse.che.api.workspace.server.devfile.convert.component.ComponentToWorkspaceApplier; import org.eclipse.che.api.workspace.server.devfile.exception.DevfileException; -import org.eclipse.che.api.workspace.server.devfile.exception.DevfileFormatException; import org.eclipse.che.api.workspace.server.model.impl.ProjectConfigImpl; import org.eclipse.che.api.workspace.server.model.impl.WorkspaceConfigImpl; import org.eclipse.che.api.workspace.server.model.impl.devfile.CommandImpl; @@ -177,38 +176,6 @@ public class DevfileConverterTest { verify(componentToWorkspaceApplier).apply(workspaceConfig, component, fileContentProvider); } - @Test( - expectedExceptions = DevfileFormatException.class, - expectedExceptionsMessageRegExp = "Provided Devfile has no API version specified") - public void - shouldThrowAnExceptionIfDevfileApiVersionIsMissingDuringConvertingDevfileToWorkspaceConfig() - throws Exception { - // given - FileContentProvider fileContentProvider = mock(FileContentProvider.class); - DevfileImpl devfile = new DevfileImpl(); - devfile.setName("petclinic"); - - // when - devfileConverter.devFileToWorkspaceConfig(devfile, fileContentProvider); - } - - @Test( - expectedExceptions = DevfileFormatException.class, - expectedExceptionsMessageRegExp = - "Provided Devfile has unsupported version '1\\.0\\.0-non-supported'. The following versions are supported: .*") - public void - shouldThrowAnExceptionIfDevfileApiVersionIsNotSupportedDuringConvertingDevfileToWorkspaceConfig() - throws Exception { - // given - FileContentProvider fileContentProvider = mock(FileContentProvider.class); - DevfileImpl devfile = new DevfileImpl(); - devfile.setApiVersion("1.0.0-non-supported"); - devfile.setName("petclinic"); - - // when - devfileConverter.devFileToWorkspaceConfig(devfile, fileContentProvider); - } - @Test public void shouldConvertDevfileToWorkspaceConfig() throws Exception { devfileConverter = spy(devfileConverter); diff --git a/wsmaster/che-core-api-workspace/src/test/java/org/eclipse/che/api/workspace/server/devfile/schema/DevfileSchemaProviderTest.java b/wsmaster/che-core-api-workspace/src/test/java/org/eclipse/che/api/workspace/server/devfile/schema/DevfileSchemaProviderTest.java deleted file mode 100644 index a1a16f5645..0000000000 --- a/wsmaster/che-core-api-workspace/src/test/java/org/eclipse/che/api/workspace/server/devfile/schema/DevfileSchemaProviderTest.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2012-2021 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.api.workspace.server.devfile.schema; - -import static org.eclipse.che.api.workspace.server.devfile.Constants.CURRENT_API_VERSION; -import static org.testng.Assert.assertNotNull; -import static org.testng.Assert.assertTrue; - -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.StringReader; -import org.testng.annotations.Test; - -public class DevfileSchemaProviderTest { - - private final DevfileSchemaProvider devfileSchemaProvider = new DevfileSchemaProvider(); - - @Test - public void shouldGetProperDevfileSchemaContent() throws IOException { - String content = devfileSchemaProvider.getSchemaContent(CURRENT_API_VERSION); - assertNotNull(content); - assertTrue(content.contains("This schema describes the structure of the devfile object")); - } - - @Test - public void shouldGetProperDevfileSchemaContentAsReader() throws IOException { - StringReader contentReader = devfileSchemaProvider.getAsReader(CURRENT_API_VERSION); - assertNotNull(contentReader); - - StringBuilder contentBuilder = new StringBuilder(); - int c; - while ((c = contentReader.read()) != -1) { - contentBuilder.append((char) c); - } - assertTrue( - contentBuilder - .toString() - .contains("This schema describes the structure of the devfile object")); - } - - @Test(expectedExceptions = FileNotFoundException.class) - public void shouldThrowExceptionWhenInvalidVersionRequested() throws IOException { - devfileSchemaProvider.getSchemaContent("this_is_clearly_not_a_valid_schema_version"); - } -} diff --git a/wsmaster/che-core-api-workspace/src/test/java/org/eclipse/che/api/workspace/server/devfile/validator/DevfileSchemaValidatorTest.java b/wsmaster/che-core-api-workspace/src/test/java/org/eclipse/che/api/workspace/server/devfile/validator/DevfileSchemaValidatorTest.java deleted file mode 100644 index 4963951317..0000000000 --- a/wsmaster/che-core-api-workspace/src/test/java/org/eclipse/che/api/workspace/server/devfile/validator/DevfileSchemaValidatorTest.java +++ /dev/null @@ -1,293 +0,0 @@ -/* - * Copyright (c) 2012-2024 Red Hat, Inc. - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - */ -package org.eclipse.che.api.workspace.server.devfile.validator; - -import static java.lang.String.format; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.fail; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; -import java.io.IOException; -import org.eclipse.che.api.workspace.server.devfile.Constants; -import org.eclipse.che.api.workspace.server.devfile.DevfileVersionDetector; -import org.eclipse.che.api.workspace.server.devfile.exception.DevfileFormatException; -import org.eclipse.che.api.workspace.server.devfile.schema.DevfileSchemaProvider; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; -import org.testng.reporters.Files; - -public class DevfileSchemaValidatorTest { - - private DevfileSchemaValidator schemaValidator; - private ObjectMapper yamlMapper; - - @BeforeClass - public void setUp() { - yamlMapper = new ObjectMapper(new YAMLFactory()); - schemaValidator = - new DevfileSchemaValidator(new DevfileSchemaProvider(), new DevfileVersionDetector()); - } - - @Test(dataProvider = "validDevfiles") - public void shouldNotThrowExceptionOnValidationOfValidDevfile(String resourceFilePath) - throws Exception { - schemaValidator.validate(yamlMapper.readTree(getResource(resourceFilePath))); - } - - @DataProvider - public Object[][] validDevfiles() { - return new Object[][] { - {"editor_plugin_component/devfile_editor_plugins.yaml"}, - {"editor_plugin_component/devfile_editor_component_with_custom_registry.yaml"}, - {"editor_plugin_component/devfile_editor_plugins_components_with_resource_limits.yaml"}, - {"editor_plugin_component/devfile_plugin_components_with_preferences.yaml"}, - {"kubernetes_openshift_component/devfile_kubernetes_component.yaml"}, - {"kubernetes_openshift_component/devfile_kubernetes_component_absolute_reference.yaml"}, - {"component/devfile_without_any_component.yaml"}, - {"component/devfile_component_with_automount_secrets.yaml"}, - { - "kubernetes_openshift_component/devfile_kubernetes_component_reference_and_content_as_block.yaml" - }, - {"kubernetes_openshift_component/devfile_openshift_component.yaml"}, - {"kubernetes_openshift_component/devfile_openshift_component_reference_and_content.yaml"}, - { - "kubernetes_openshift_component/devfile_openshift_component_reference_and_content_as_block.yaml" - }, - {"kubernetes_openshift_component/devfile_k8s_openshift_component_with_env.yaml"}, - {"kubernetes_openshift_component/devfile_k8s_openshift_component_with_endpoints.yaml"}, - {"kubernetes_openshift_component/devfile_openshift_component_content_without_reference.yaml"}, - { - "kubernetes_openshift_component/devfile_kubernetes_component_content_without_reference.yaml" - }, - {"dockerimage_component/devfile_dockerimage_component.yaml"}, - {"dockerimage_component/devfile_dockerimage_component_without_entry_point.yaml"}, - {"editor_plugin_component/devfile_editor_component_with_custom_registry.yaml"}, - {"editor_plugin_component/devfile_plugin_component_with_reference.yaml"}, - {"devfile/devfile_just_generatename.yaml"}, - {"devfile/devfile_name_and_generatename.yaml"}, - {"devfile/devfile_with_sparse_checkout_dir.yaml"}, - {"devfile/devfile_name_and_generatename.yaml"}, - {"command/devfile_command_with_preview_url.yaml"}, - {"command/devfile_command_with_preview_url_only_port.yaml"}, - {"devfile/devfile_v2_just_schemaVersion.yaml"}, - {"devfile/devfile_v2_sample-devfile.yaml"}, - {"devfile/devfile_v2_simple-devfile.yaml"}, - {"devfile/devfile_v2_spring-boot-http-booster-devfile.yaml"}, - {"devfile/devfile_v2-1-0_just_schemaVersion.yaml"}, - {"devfile/devfile_v2-1-0_simple-devfile.yaml"}, - {"devfile/devfile_v2-2-0-simple-devfile.yaml"}, - {"devfile/devfile_v2-2-0-quarkus.yaml"}, - {"devfile/devfile_v2-2-0-basic-nodejs.yaml"}, - {"devfile/devfile_v2-2-0-basic-python.yaml"}, - {"devfile/devfile_v2-2-0-basic-quarkus.yaml"}, - {"devfile/devfile_v2-2-0-basic-springboot.yaml"} - }; - } - - @Test(dataProvider = "invalidDevfiles") - public void shouldThrowExceptionOnValidationOfNonValidDevfile( - String resourceFilePath, String expectedMessage) throws Exception { - try { - schemaValidator.validate(yamlMapper.readTree(getResource(resourceFilePath))); - } catch (DevfileFormatException e) { - assertEquals( - e.getMessage(), - format("Devfile schema validation failed. Error: %s", expectedMessage), - "DevfileFormatException thrown with message that doesn't match expected message:"); - return; - } - fail("DevfileFormatException expected to be thrown but is was not"); - } - - @Test - public void shouldThrowExceptionWhenDevfileHasUnsupportedApiVersion() throws Exception { - try { - String devfile = - "---\n" + "apiVersion: 111.111\n" + "metadata:\n" + " name: test-invalid-apiversion\n"; - schemaValidator.validate(yamlMapper.readTree(devfile)); - } catch (DevfileFormatException e) { - assertEquals( - e.getMessage(), - "Devfile schema validation failed. Error: Version '111.111' of the devfile is not supported. " - + "Supported versions are '" - + Constants.SUPPORTED_VERSIONS - + "'."); - return; - } - fail("DevfileFormatException expected to be thrown but is was not"); - } - - @DataProvider - public Object[][] invalidDevfiles() { - return new Object[][] { - // Devfile model testing - { - "devfile/devfile_empty_metadata.yaml", - "At least one of the following sets of problems must be resolved.: [(/metadata):The object must have a property whose name is \"name\".(/metadata):The object must have a property whose name is \"generateName\".]" - }, - { - "devfile/devfile_null_metadata.yaml", - "(/metadata):The value must be of object type, but actual type is null." - }, - { - "devfile/devfile_missing_metadata.yaml", - "The object must have a property whose name is \"metadata\"." - }, - { - "devfile/devfile_missing_name_and_generatename.yaml", - "(/metadata/something):The object must not have a property whose name is \"something\".At least one of the following sets of problems must be resolved.: [(/metadata):The object must have a property whose name is \"name\".(/metadata):The object must have a property whose name is \"generateName\".]" - }, - { - "devfile/devfile_missing_api_version.yaml", - "Neither of `apiVersion` or `schemaVersion` found. This is not a valid devfile." - }, - { - "devfile/devfile_with_undeclared_field.yaml", - "(/unknown):The object must not have a property whose name is \"unknown\"." - }, - // component model testing - { - "component/devfile_missing_component_type.yaml", - "(/components/0):The object must have a property whose name is \"type\"." - }, - { - "component/devfile_unknown_component_type.yaml", - "(/components/0/type):The value must be one of [\"cheEditor\", \"chePlugin\", \"kubernetes\", \"openshift\", \"dockerimage\"]." - }, - { - "component/devfile_component_with_undeclared_field.yaml", - "(/components/0/unknown):The object must not have a property whose name is \"unknown\"." - }, - // Command model testing - { - "command/devfile_missing_command_name.yaml", - "(/commands/0):The object must have a property whose name is \"name\"." - }, - { - "command/devfile_missing_command_actions.yaml", - "(/commands/0):The object must have a property whose name is \"actions\"." - }, - { - "command/devfile_multiple_commands_actions.yaml", - "(/commands/0/actions):The array must have at most 1 element(s), but actual number is 2." - }, - { - "command/devfile_action_without_commandline_and_reference.yaml", - "Exactly one of the following sets of problems must be resolved.: [(/commands/0/actions/0):The object must have a property whose name is \"component\".(/commands/0/actions/0):The object must have a property whose name is \"command\".At least one of the following sets of problems must be resolved.: [(/commands/0/actions/0):The object must have a property whose name is \"reference\".(/commands/0/actions/0):The object must have a property whose name is \"referenceContent\".]]" - }, - // cheEditor/chePlugin component model testing - { - "editor_plugin_component/devfile_editor_component_with_missing_id.yaml", - "Exactly one of the following sets of problems must be resolved.: [(/components/0):The object must have a property whose name is \"id\".(/components/0):The object must have a property whose name is \"reference\".]" - }, - { - "editor_plugin_component/devfile_editor_component_with_id_and_reference.yaml", - "Exactly one of the following sets of problems must be resolved.: " - + "[(/components/0):The object must not have a property whose name is \"reference\"." - + "(/components/0):The object must not have a property whose name is \"id\".]" - }, - { - "editor_plugin_component/devfile_editor_component_with_indistinctive_field.yaml", - "(/components/0/unknown):The object must not have a property whose name is \"unknown\"." - }, - { - "editor_plugin_component/devfile_editor_component_without_version.yaml", - "(/components/0/id):The string value must match the pattern \"[a-z0-9_\\-.]+/[a-z0-9_\\-.]+/[a-z0-9_\\-.]+\\z\"." - }, - { - "editor_plugin_component/devfile_editor_plugins_components_with_invalid_memory_limit.yaml", - "At least one of the following sets of problems must be resolved.: [(/components/0/memoryLimit):The value must be of string type, but actual type is integer.(/components/0/memoryLimit):The numeric value must be greater than 0.]At least one of the following sets of problems must be resolved.: [(/components/1/memoryLimit):The value must be of string type, but actual type is integer.(/components/1/memoryLimit):The numeric value must be greater than 0.]" - }, - { - "editor_plugin_component/devfile_editor_component_with_multiple_colons_in_id.yaml", - "(/components/0/id):The string value must match the pattern \"[a-z0-9_\\-.]+/[a-z0-9_\\-.]+/[a-z0-9_\\-.]+\\z\"." - }, - { - "editor_plugin_component/devfile_editor_component_with_registry_in_id.yaml", - "(/components/0/id):The string value must match the pattern \"[a-z0-9_\\-.]+/[a-z0-9_\\-.]+/[a-z0-9_\\-.]+\\z\"." - }, - { - "editor_plugin_component/devfile_editor_component_with_bad_registry.yaml", - "(/components/0/registryUrl):The string value must match the pattern \"^(https?://)[a-zA-Z0-9_\\-./]+\"." - }, - // kubernetes/openshift component model testing - { - "kubernetes_openshift_component/devfile_openshift_component_with_missing_reference_and_referenceContent.yaml", - "At least one of the following sets of problems must be resolved.: [(/components/0):The object must have a property whose name is \"reference\".(/components/0):The object must have a property whose name is \"referenceContent\".]" - }, - { - "kubernetes_openshift_component/devfile_openshift_component_with_indistinctive_field_id.yaml", - "(/components/0/id):The object must not have a property whose name is \"id\"." - }, - // Dockerimage component model testing - { - "dockerimage_component/devfile_dockerimage_component_with_missing_image.yaml", - "(/components/0):The object must have a property whose name is \"image\"." - }, - { - "dockerimage_component/devfile_dockerimage_component_with_missing_memory_limit.yaml", - "(/components/0):The object must have a property whose name is \"memoryLimit\"." - }, - { - "dockerimage_component/devfile_dockerimage_component_with_invalid_memory_limit.yaml", - "At least one of the following sets of problems must be resolved.: [(/components/0/memoryLimit):The value must be of string type, but actual type is integer.(/components/0/memoryLimit):The numeric value must be greater than 0.]" - }, - { - "dockerimage_component/devfile_dockerimage_component_with_indistinctive_field_selector.yaml", - "(/components/0/selector):The object must not have a property whose name is \"selector\"." - }, - { - "command/devfile_command_with_empty_preview_url.yaml", - "(/commands/0/previewUrl):The value must be of object type, but actual type is null." - }, - { - "command/devfile_command_with_preview_url_port_is_string.yaml", - "(/commands/0/previewUrl/port):The value must be of number type, but actual type is string." - }, - { - "command/devfile_command_with_preview_url_port_is_too_high.yaml", - "(/commands/0/previewUrl/port):The numeric value must be less than or equal to 65535." - }, - { - "command/devfile_command_with_preview_url_port_is_negative.yaml", - "(/commands/0/previewUrl/port):The numeric value must be greater than or equal to 0." - }, - { - "command/devfile_command_with_preview_url_only_path.yaml", - "(/commands/0/previewUrl):The object must have a property whose name is \"port\"." - }, - { - "devfile/devfile_v2_invalid_schemaVersion.yaml", - "Version 'a.b.c' of the devfile is not supported. Supported versions are '[1.0.0, 2.0.0, 2.1.0, 2.2.0, 2.2.1, 2.2.2]'." - }, - { - "devfile/devfile_v2_unsupported_schemaVersion.yaml", - "Version '22.33.44' of the devfile is not supported. Supported versions are '[1.0.0, 2.0.0, 2.1.0, 2.2.0, 2.2.1, 2.2.2]'." - }, - { - "devfile/devfile_v2-1-0_unsupported_schemaVersion.yaml", - "Version '2.1.0-beta' of the devfile is not supported. Supported versions are '[1.0.0, 2.0.0, 2.1.0, 2.2.0, 2.2.1, 2.2.2]'." - }, - { - "devfile/devfile_v2-1-0_with_invalid_plugin_definition.yaml", - "(/components/0/plugin):The object must not have a property whose name is \"plugin\".(/components/0):The object must have a property whose name is \"name\".Exactly one of the following sets of problems must be resolved.: [(/components/0):The object must have a property whose name is \"container\".(/components/0):The object must have a property whose name is \"kubernetes\".(/components/0):The object must have a property whose name is \"openshift\".(/components/0):The object must have a property whose name is \"volume\".]" - } - }; - } - - private String getResource(String name) throws IOException { - return Files.readFile( - getClass().getClassLoader().getResourceAsStream("devfile/schema_test/" + name)); - } -}