Skip to content

Commit aa78965

Browse files
authored
modified docs to adhere to schema_3rd PR (#45)
minor tweaks to yaml and content more content and yaml changes modified yaml in limiting resources doc more minor changes to grammar and word choice
1 parent 8a8e1d4 commit aa78965

File tree

3 files changed

+31
-119
lines changed

3 files changed

+31
-119
lines changed

Diff for: docs/modules/user-guide/partials/proc_defining-kubernetes-resources.adoc

+3-28
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ Complex deployments can be described using Kubernetes or OpenShift resource list
2121
----
2222
schemaVersion: 2.0.0
2323
metadata:
24-
name: MyDevfile
24+
name: mydevfile
2525
projects:
2626
- name: my-go-project
2727
clonePath: go/src/github.com/acme/my-go-project
2828
git:
2929
remotes:
3030
origin: "https://github.com/acme/my-go-project.git"
3131
components:
32-
- name: MyDevfile
32+
- name: mydevfile
3333
kubernetes:
34-
reference: ../relative/path/postgres.yaml
34+
uri: ../relative/path/postgres.yaml
3535
----
3636

3737
The preceding component references a file that is relative to the location of the devfile itself. Meaning, this devfile is only loadable by a {prod-short} factory to which you supply the location of the devfile and therefore it is able to figure out the location of the referenced Kubernetes resource list.
@@ -82,8 +82,6 @@ items:
8282
ports:
8383
- port: 5432
8484
targetPort: 5432
85-
selector:
86-
app: postgres
8785
-
8886
apiVersion: v1
8987
kind: PersistentVolumeClaim
@@ -100,26 +98,3 @@ items:
10098
----
10199

102100
For a basic example of a devfile with an associated Kubernetes or OpenShift list, see link:https://github.com/redhat-developer/devfile/tree/master/samples/web-nodejs-with-db-sample[web-nodejs-with-db-sample] on redhat-developer GitHub.
103-
104-
If you use generic or large resource lists from which you will only need a subset of resources, you can select particular resources from the list using a selector (which, as the usual Kubernetes selectors, works on the labels of the resources in the list).
105-
106-
[source,yaml]
107-
----
108-
schemaVersion: 2.0.0
109-
metadata:
110-
name: MyDevfile
111-
projects:
112-
- name: my-go-project
113-
clonePath: go/src/github.com/acme/my-go-project
114-
git:
115-
remotes:
116-
origin: "https://github.com/acme/my-go-project.git"
117-
components:
118-
- name: MyDevfile
119-
kubernetes:
120-
reference: ../relative/path/postgres.yaml
121-
selector:
122-
app: postgres
123-
----
124-
125-
Additionally, it is also possible to modify the entrypoints (command and arguments) of the containers present in the resource list. For details of the advanced use case, see the reference (TODO: link).

Diff for: docs/modules/user-guide/partials/proc_limiting-resources-usage.adoc

+9-73
Original file line numberDiff line numberDiff line change
@@ -6,45 +6,15 @@
66

77
.Procedure
88

9-
. Specify container memory limit for components
9+
. Specify container memory limit and memory request for components
1010
+
11-
To specify a container(s) memory limit for `container`, `plugin`, use the `memoryLimit` parameter:
11+
To specify a container memory limit for `container`, use the `memoryLimit` parameter, and to specify a container memory request, use the `memoryRequest` parameter:
1212
+
13-
.Specify container memory limit for components
13+
.Specify container memory limit and memory request for components
1414
====
1515
[source,yaml]
1616
----
1717
components:
18-
- name: exec-plugin
19-
plugin:
20-
id: eclipse/machine-exec-plugin/0.0.1
21-
memoryLimit: 1Gi
22-
- name: maven
23-
container:
24-
image: eclipe/maven-jdk8:latest
25-
memoryLimit: 512M
26-
----
27-
====
28-
+
29-
This limit will be applied to every container of the given component.
30-
+
31-
For `plugin` components, RAM limits can be described in the plug-in descriptor file, typically named `meta.yaml`.
32-
+
33-
34-
. Specify container memory request for components
35-
+
36-
To specify a container(s) memory request for `plugin` use the `memoryRequest` parameter:
37-
+
38-
.Specify container memory request for components
39-
====
40-
[source,yaml]
41-
----
42-
components:
43-
- name: exec-plugin
44-
plugin:
45-
id: eclipse/machine-exec-plugin/0.0.1
46-
memoryLimit: 1Gi
47-
memoryRequest: 512M
4818
- name: maven
4919
container:
5020
image: eclipe/maven-jdk8:latest
@@ -53,54 +23,21 @@ To specify a container(s) memory request for `plugin` use the `memoryRequest` pa
5323
----
5424
====
5525
+
56-
This limit will be applied to every container of the given component.
57-
+
58-
For `plugin` components, RAM requests can be described in the plug-in descriptor file, typically named `meta.yaml`.
59-
+
60-
If they are not specified, the values are undetermined: they may or may not be inferred from the application that consumes the devfile or from Kubernetes.
26+
This limit applies to every container of the given component.
6127
+
6228

63-
. Specify container CPU limit for components
64-
+
65-
To specify a container(s) CPU limit for `plugin` or `container` use the `cpuLimit` parameter:
66-
+
67-
.Specify container CPU limit for components
68-
====
69-
[source,yaml]
70-
----
71-
components:
72-
- name: exec-plugin
73-
plugin:
74-
id: eclipse/machine-exec-plugin/0.0.1
75-
cpuLimit: 1.5
76-
- name: maven
77-
container:
78-
image: eclipe/maven-jdk8:latest
79-
cpuLimit: 750m
80-
----
81-
====
82-
+
83-
This limit will be applied to every container of the given component.
84-
+
85-
For the `plugin` components, CPU limits can be described in the plug-in descriptor file, typically named `meta.yaml`.
86-
+
8729
If they are not specified, the values are undetermined: they may or may not be inferred from the application that consumes the devfile or from Kubernetes.
8830
+
8931

90-
. Specify container CPU request for components
32+
. Specify container CPU limit and container CPU request for components
9133
+
92-
To specify a container(s) CPU request for `plugin` or `container` use the `cpuRequest` parameter:
34+
To specify a container CPU limit for `container`, use the `cpuLimit` parameter, and to specify a container CPU request for `container`, use the `cpuRequest` parameter:
9335
+
94-
.Specify container CPU request for components
36+
.Specify container CPU limit and CPU request for components
9537
====
9638
[source,yaml]
9739
----
9840
components:
99-
- name: exec-plugin
100-
plugin:
101-
id: eclipse/machine-exec-plugin/0.0.1
102-
cpuLimit: 1.5
103-
cpuRequest: 0.225
10441
- name: maven
10542
container:
10643
image: eclipe/maven-jdk8:latest
@@ -109,9 +46,8 @@ To specify a container(s) CPU request for `plugin` or `container` use the `cpuRe
10946
----
11047
====
11148
+
112-
This limit will be applied to every container of the given component.
113-
+
114-
For the `plugin` component type, CPU requests can be described in the plug-in descriptor file, typically named `meta.yaml`.
49+
This limit applies to every container of the given component.
11550
+
51+
11652
If they are not specified, the values are undetermined: they may or may not be inferred from the application that consumes the devfile or from Kubernetes.
11753
+

Diff for: docs/modules/user-guide/partials/proc_migrating-components.adoc

+19-18
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This section describes how to migrate components to devfile v2. There ARE major
66

77
.Procedure
88

9-
. Component is a polymophic type
9+
. Component is a polymorphic type
1010
+
1111
For a better syntax validation component now is defined as a polymorphic type and can be implemented as `container`, `kubernetes`, `openshift`, `plugin` or `volume`.
1212
+
@@ -15,42 +15,43 @@ For a better syntax validation component now is defined as a polymorphic type an
1515
v2.0
1616
---
1717
components:
18+
- name: mydevfile
1819
- container:
1920
image: maven
2021
...
2122
- container:
2223
image: nodejs
2324
...
2425
- kubernetes:
25-
reference: https://.../mongo.yaml
26+
uri: https://.../mongo.yaml
2627
----
2728
+
28-
See https://github.com/che-incubator/devworkspace-api/issues/4[corresponding issue].
29+
See https://github.com/devfile/api/issues/4[corresponding issue].
2930

30-
. Shared Volumes Across Components. See https://github.com/che-incubator/devworkspace-api/issues/19[corresponding issue].
31+
. Shared Volumes Across Components. See https://github.com/devfile/api/issues/19[corresponding issue].
3132

32-
. Out of Main Pod Compoenents. See https://github.com/devfile/api/issues/48[corresponding issue].
33+
. Out of Main Pod Components. See https://github.com/devfile/api/issues/48[corresponding issue].
3334

34-
. Replace Alias with Name. See https://github.com/che-incubator/devworkspace-api/issues/9[corresponding issue].
35+
. Replace Alias with Name. See https://github.com/devfile/api/issues/9[corresponding issue].
3536

36-
. Renaming dockerimage component type. See https://github.com/che-incubator/devworkspace-api/issues/8[corresponding issue].
37+
. Renaming dockerimage component type. See https://github.com/devfile/api/issues/8[corresponding issue].
3738

38-
. Specify sources path for containers. See https://github.com/che-incubator/devworkspace-api/issues/17[corresponding issue].
39+
. Specify sources path for containers. See https://github.com/devfile/api/issues/17[corresponding issue].
3940

40-
. Specify size of volume for component. See https://github.com/che-incubator/devworkspace-api/issues/14[corresponding issue].
41+
. Specify size of volume for component. See https://github.com/devfile/api/issues/14[corresponding issue].
4142

42-
. Containers endpoints (routes/ingresses). See https://github.com/che-incubator/devworkspace-api/issues/33[corresponding issue].
43+
. Containers endpoints (routes/ingresses). See https://github.com/devfile/api/issues/33[corresponding issue].
4344

4445

4546
[role="_additional-resources"]
4647
.Additional resources
4748

4849

49-
* Component is a polymophic type. See https://github.com/che-incubator/devworkspace-api/issues/4[corresponding issue].
50-
* Shared Volumes Across Components. See https://github.com/che-incubator/devworkspace-api/issues/19[corresponding issue].
51-
* Out of Main Pod Compoenents. See https://github.com/devfile/api/issues/48[corresponding issue].
52-
* Replace Alias with Name. See https://github.com/che-incubator/devworkspace-api/issues/9[corresponding issue].
53-
* Renaming dockerimage component type. See https://github.com/che-incubator/devworkspace-api/issues/8[corresponding issue].
54-
* Specify sources path for containers. See https://github.com/che-incubator/devworkspace-api/issues/17[corresponding issue].
55-
* Specify size of volume for component. See https://github.com/che-incubator/devworkspace-api/issues/14[corresponding issue].
56-
* Containers endpoints (routes/ingresses). See https://github.com/che-incubator/devworkspace-api/issues/33[corresponding issue].
50+
* Component is a polymorphic type. See https://github.com/devfile/api/issues/4[corresponding issue].
51+
* Shared Volumes Across Components. See https://github.com/devfile/api/issues/19[corresponding issue].
52+
* Out of Main Pod Components. See https://github.com/devfile/api/issues/48[corresponding issue].
53+
* Replace Alias with Name. See https://github.com/devfile/api/issues/9[corresponding issue].
54+
* Renaming dockerimage component type. See https://github.com/devfile/api/issues/8[corresponding issue].
55+
* Specify sources path for containers. See https://github.com/devfile/api/issues/17[corresponding issue].
56+
* Specify size of volume for component. See https://github.com/devfile/api/issues/14[corresponding issue].
57+
* Containers endpoints (routes/ingresses). See https://github.com/devfile/api/issues/27[corresponding issue].

0 commit comments

Comments
 (0)