Skip to content

Commit 8a8e1d4

Browse files
jc-bergerRobert Krátký
andauthored
Modified docs to adhere to schema_2nd PR (#44)
* modified content to adhere to schema minor tweaks to the yaml more content and yaml changes restructured and cut content from attributes doc minor change to attributes doc more minor changes to grammar and word choice * Update docs/modules/user-guide/partials/proc_adding-attributes-to-a-devfile.adoc Co-authored-by: Robert Krátký <[email protected]> Co-authored-by: Robert Krátký <[email protected]>
1 parent 3bbf559 commit 8a8e1d4

File tree

3 files changed

+14
-40
lines changed

3 files changed

+14
-40
lines changed

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

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
= Adding attributes to a devfile
33

44
[role="_abstract"]
5-
Devfile attributes can be used to configure various features.
5+
Devfile attributes can be used to configure various features and properties according to user and tooling needs. Attributes are implementation-dependant, free-form YAML and can be defined for the following devfile objects: `metadata`, `components`, `commands`, `projects`, and `starterProjects`.
66

77
.Prerequisites
88

@@ -13,9 +13,9 @@ Devfile attributes can be used to configure various features.
1313
.Procedure
1414

1515

16-
. Define the optional `editorFree` attribute
16+
. Define a custom attribute
1717
+
18-
When an editor is not specified in a devfile, a default is provided. When no editor is needed, use the `editorFree` attribute. The default value of `false` means that the devfile requests the provisioning of the default editor.
18+
When no editor is specified, a default editor is provided. To represent this user-defined example, use the `editorFree` attribute as shown in the following example:
1919
+
2020
.A devfile without an editor
2121
====
@@ -24,33 +24,12 @@ When an editor is not specified in a devfile, a default is provided. When no edi
2424
schemaVersion: 2.0.0
2525
metadata:
2626
name: petclinic-dev-environment
27+
attributes:
28+
editorFree: true
2729
components:
28-
- name: myApp
30+
- name: myapp
2931
kubernetes:
30-
local: my-app.yaml
31-
attributes:
32-
editorFree: true
33-
----
34-
====
35-
36-
. Define the optional `persistVolumes` attribute (ephemeral mode)
37-
+
38-
By default, volumes and PVCs specified in a devfile are bound to a host folder to persist data even after a container restart. To disable data persistence to make the workspace faster, such as when the volume back end is slow, modify the `persistVolumes` attribute in the devfile. The default value is `true`. Set to `false` to use `emptyDir` for configured volumes and PVC.
39-
+
40-
.A devfile with ephemeral mode enabled
41-
====
42-
[source,yaml]
43-
----
44-
schemaVersion: 2.0.0
45-
metadata:
46-
name: petclinic-dev-environment
47-
projects:
48-
- name: petclinic
49-
git:
50-
remotes:
51-
origin: "https://github.com/che-samples/web-java-spring-petclinic.git"
52-
attributes:
53-
persistVolumes: false
32+
uri: my-app.yaml
5433
----
5534
====
5635

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

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,9 @@ A component type that allows to define a container image-based configuration of
3030
endpoints:
3131
- name: maven-server
3232
targetPort: 3101
33-
configuration:
34-
protocol: tcp
35-
scheme: http
36-
secure: 'true'
37-
public: 'true'
38-
discoverable: 'false'
33+
protocol: https
34+
secure: 'true'
35+
exposure: public
3936
memoryLimit: 1536M
4037
command: ['tail']
4138
args: ['-f', '/dev/null']
@@ -46,7 +43,7 @@ A component type that allows to define a container image-based configuration of
4643
----
4744
schemaVersion: 2.0.0
4845
metadata:
49-
name: MyDevfile
46+
name: mydevfile
5047
components:
5148
- name: go
5249
container:
@@ -67,7 +64,7 @@ For the `container` component to have access to the project sources, you must se
6764
----
6865
schemaVersion: 2.0.0
6966
metadata:
70-
name: MyDevfile
67+
name: mydevfile
7168
components:
7269
- name: go
7370
container:

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ schemaVersion: 2.0.0
2424
metadata:
2525
name: my-project-dev
2626
parent:
27-
id: redhat/nodejs/11.6
27+
id: redhat/nodejs
2828
registry: https://devfile-registry.io/
2929
----
3030
====
@@ -39,14 +39,13 @@ schemaVersion: 2.0.0
3939
metadata:
4040
name: my-project-dev
4141
parent:
42-
id: redhat/nodejs/11.6
4342
uri: https://raw.githubusercontent.com/eclipse/che-devfile-registry/master/devfiles/nodejs/devfile.yaml
4443
----
4544
====
4645
+
4746
.Parent identified by a Kubernetes resource
4847
====
49-
Using a Kubernetes resource name, namespace and selector if it has been deployed on a Kubernete cluster.
48+
Using a Kubernetes resource name and namespace if it has been deployed on a Kubernete cluster.
5049
5150
[source,yaml]
5251
----
@@ -57,7 +56,6 @@ parent:
5756
kubernetes:
5857
name: mydevworkspacetemplate
5958
namespace: mynamespace
60-
selector: mykey=myvalue
6159
----
6260
====
6361

0 commit comments

Comments
 (0)