From 1a8ee6aff520c53c09fdf149c8eee298de924cdc Mon Sep 17 00:00:00 2001 From: Stephanie Date: Wed, 30 Mar 2022 15:46:22 -0400 Subject: [PATCH] update kubernetes component to include deployByDefault information, update container component on sprcifying a volumeMount, update parent id reference with version specified Signed-off-by: Stephanie --- .gitignore | 1 + ...ng-a-container-component-to-a-devfile.adoc | 24 +++++++++++++++++-- ...s-or-openshift-component-to-a-devfile.adoc | 4 +++- ...ring-to-a-parent-devfile-in-a-devfile.adoc | 3 ++- 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 2da35b77..4ec95bc7 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ .DS_Store .vale.ini .yarnrc +.idea/ /build/ /out/ /node_modules/ diff --git a/docs/modules/user-guide/partials/proc_adding-a-container-component-to-a-devfile.adoc b/docs/modules/user-guide/partials/proc_adding-a-container-component-to-a-devfile.adoc index a07f52cd..79e004fc 100644 --- a/docs/modules/user-guide/partials/proc_adding-a-container-component-to-a-devfile.adoc +++ b/docs/modules/user-guide/partials/proc_adding-a-container-component-to-a-devfile.adoc @@ -46,7 +46,7 @@ A devfile can contain one or more components of the `container` type. The `compo .A minimal `container` component [source,yaml] ---- -schemaVersion: 2.2.0 +schemaVersion: 2.1.0 metadata: name: mydevfile components: @@ -67,7 +67,7 @@ For the `container` component to have access to the project sources, you must se + [source,yaml] ---- -schemaVersion: 2.2.0 +schemaVersion: 2.1.0 metadata: name: mydevfile components: @@ -81,6 +81,26 @@ components: + The sources are mounted on a location stored in the `PROJECTS_ROOT` environment variable that is made available in the running container of the image. This location defaults to `/projects`. If `sourceMapping` is defined in the container, it overrides the `PROJECT_ROOT` value and mounts the source to the path defined by `sourceMapping`. +. Specify a volume ++ +For the `container` component to have a shared volume. You must define a volume component in the devfile, and reference the volume using `volumeMount` in container component. For more information on volume component, see xref:adding-a-volume-component-to-a-devfile.adoc[] ++ +[source,yaml] +---- +components: + - name: mycontainer + container: + image: java11-maven:next + memoryLimit: 768Mi + mountSources: true + volumeMounts: + - name: m2 + path: /home/user/.m2 + - name: m2 + volume: + size: 1Gi +---- + . Container Entrypoint + Use the `command` attribute of the `container` type to modify the `entrypoint` command of the container created from the image. The availability of the `sleep` command and the support for the `infinity` argument depend on the base image used in the particular images. diff --git a/docs/modules/user-guide/partials/proc_adding-a-kubernetes-or-openshift-component-to-a-devfile.adoc b/docs/modules/user-guide/partials/proc_adding-a-kubernetes-or-openshift-component-to-a-devfile.adoc index 2fea82f0..679aea62 100644 --- a/docs/modules/user-guide/partials/proc_adding-a-kubernetes-or-openshift-component-to-a-devfile.adoc +++ b/docs/modules/user-guide/partials/proc_adding-a-kubernetes-or-openshift-component-to-a-devfile.adoc @@ -52,5 +52,7 @@ You can add either a `kubernetes` or `openshift` component to a devfile. + . Specify the endpoint through the endpoint property with `kubernetes` or `openshift` components. -. Associate `kubernetes` or `openshift` components with `Apply` commands. If you do not associate `Apply` commands, they are assumed to be applied at start up. +. By default `kubernetes` or `openshift` components are not going to be deployed. Specify `deployByDefault=true` if you want to apply the component at start up. + +. Associate `kubernetes` or `openshift` components with `Apply` commands wth `deploy` command group kind. If the `kubernetes` or `openshift` component uses an image built by an image component defined in the devfile, you can create a composite command to build the image and deploy the Kubernetes or openshift component. For more information on `Apply` commands, see xref:adding-apply-commands-to-a-devfile.adoc[] + diff --git a/docs/modules/user-guide/partials/proc_referring-to-a-parent-devfile-in-a-devfile.adoc b/docs/modules/user-guide/partials/proc_referring-to-a-parent-devfile-in-a-devfile.adoc index d8b53bcf..f0de056d 100644 --- a/docs/modules/user-guide/partials/proc_referring-to-a-parent-devfile-in-a-devfile.adoc +++ b/docs/modules/user-guide/partials/proc_referring-to-a-parent-devfile-in-a-devfile.adoc @@ -21,7 +21,7 @@ You can refer to a parent devfile in three different ways: + .Parent referred by registry ==== -Using the `id` when published in a registry. +Using the `id` when published in a registry. Provide the `registryUrl` as well as `version`. `version` can be either the stack version string, or `latest`. If no `version` is provided, the default version for the stack will be used. [source,yaml] ---- @@ -31,6 +31,7 @@ metadata: parent: id: redhat/nodejs registryUrl: https://devfile-registry.io/ + version: 1.2.0 ---- ==== +