Skip to content

Commit 1a8ee6a

Browse files
committed
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 <[email protected]>
1 parent 11f90ad commit 1a8ee6a

File tree

4 files changed

+28
-4
lines changed

4 files changed

+28
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
.DS_Store
1616
.vale.ini
1717
.yarnrc
18+
.idea/
1819
/build/
1920
/out/
2021
/node_modules/

docs/modules/user-guide/partials/proc_adding-a-container-component-to-a-devfile.adoc

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ A devfile can contain one or more components of the `container` type. The `compo
4646
.A minimal `container` component
4747
[source,yaml]
4848
----
49-
schemaVersion: 2.2.0
49+
schemaVersion: 2.1.0
5050
metadata:
5151
name: mydevfile
5252
components:
@@ -67,7 +67,7 @@ For the `container` component to have access to the project sources, you must se
6767
+
6868
[source,yaml]
6969
----
70-
schemaVersion: 2.2.0
70+
schemaVersion: 2.1.0
7171
metadata:
7272
name: mydevfile
7373
components:
@@ -81,6 +81,26 @@ components:
8181
+
8282
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`.
8383

84+
. Specify a volume
85+
+
86+
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[]
87+
+
88+
[source,yaml]
89+
----
90+
components:
91+
- name: mycontainer
92+
container:
93+
image: java11-maven:next
94+
memoryLimit: 768Mi
95+
mountSources: true
96+
volumeMounts:
97+
- name: m2
98+
path: /home/user/.m2
99+
- name: m2
100+
volume:
101+
size: 1Gi
102+
----
103+
84104
. Container Entrypoint
85105
+
86106
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.

docs/modules/user-guide/partials/proc_adding-a-kubernetes-or-openshift-component-to-a-devfile.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,7 @@ You can add either a `kubernetes` or `openshift` component to a devfile.
5252
+
5353
. Specify the endpoint through the endpoint property with `kubernetes` or `openshift` components.
5454

55-
. Associate `kubernetes` or `openshift` components with `Apply` commands. If you do not associate `Apply` commands, they are assumed to be applied at start up.
55+
. 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.
56+
57+
. 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[]
5658
+

docs/modules/user-guide/partials/proc_referring-to-a-parent-devfile-in-a-devfile.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ You can refer to a parent devfile in three different ways:
2121
+
2222
.Parent referred by registry
2323
====
24-
Using the `id` when published in a registry.
24+
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.
2525
2626
[source,yaml]
2727
----
@@ -31,6 +31,7 @@ metadata:
3131
parent:
3232
id: redhat/nodejs
3333
registryUrl: https://devfile-registry.io/
34+
version: 1.2.0
3435
----
3536
====
3637
+

0 commit comments

Comments
 (0)