You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: libs/docs/src/docs/no-version/devfile-validation-rules.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Devfile validation rules
3
3
description: Devfile validation rules
4
4
---
5
5
6
-
## Id and Name:
6
+
## Id and name:
7
7
`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`
8
8
9
9
The restriction is added to allow easy translation to K8s resource names, and also to have consistent rules for both `name` and `id` fields.
@@ -19,17 +19,17 @@ The validation will be done as part of schema validation, the rule will be intro
19
19
20
20
## Endpoints:
21
21
- All the endpoint names are unique across components
22
-
- Endpoint ports must be unique across container components -- two container components cannot have the same target port, but one container component may have two endpoints with the same target port. This restriction does not apply to container components with `dedicatedPod` set to `true`.
22
+
- Endpoint ports must be unique across `container` components -- two `container` components cannot have the same `targetPort`, but one `container` component may have two endpoints with the same `targetPort`. This restriction does not apply to `container` components with `dedicatedPod` set to `true`.
23
23
24
24
25
25
## Commands:
26
26
1.`id` must be unique
27
-
2. composite command:
27
+
2.`composite` command:
28
28
- Should not reference itself via a subcommand
29
-
- Should not indirectly reference itself via a subcommand which is a composite command
29
+
- Should not indirectly reference itself via a subcommand which is a `composite` command
30
30
- Should reference a valid devfile command
31
-
3.`exec` command should: map to a valid container component
32
-
4.`apply` command should: map to a valid container/kubernetes/openshift/image component
31
+
3.`exec` command should: map to a valid `container` component
32
+
4.`apply` command should: map to a valid `container`/`kubernetes`/`openshift`/`image` component
33
33
5.`{build, run, test, debug, deploy}`, each kind of group can only have one default command associated with it. If there are multiple commands of the same kind without a default, a warning will be displayed.
34
34
35
35
## Components:
@@ -42,11 +42,11 @@ Common rules for all components types:
42
42
3. The annotations should not have conflict values for same key, except deployment annotations and service annotations set for a container with `dedicatedPod=true`
43
43
4. Resource requirements, e.g. `cpuLimit`, `cpuRequest`, `memoryLimit`, `memoryRequest`, must be in valid quantity format; and the resource requested must be less than the resource limit (if specified).
44
44
45
-
### Plugin Component
45
+
### Plugin component
46
46
- Commands in plugins components share the same commands validation rules as listed above. Validation occurs after overriding and merging, in flattened devfile
47
47
- Registry URL needs to be in valid format
48
48
49
-
### Kubernetes & Openshift component
49
+
### Kubernetes & OpenShift component
50
50
-`uri` needs to be a valid URI format
51
51
52
52
### Image component
@@ -56,18 +56,18 @@ Common rules for all components types:
56
56
## Events:
57
57
1.`preStart` and `postStop` events can only be `apply` commands
58
58
2.`postStart` and `preStop` events can only be `exec` commands
59
-
3. If `preStart` and `postStop` events refer to a composite command, then all containing commands need to be `apply` commands.
60
-
4. If `postStart` and `preStop` events refer to a composite command, then all containing commands need to be `exec` commands.
59
+
3. If `preStart` and `postStop` events refer to a `composite` command, then all containing commands need to be `apply` commands.
60
+
4. If `postStart` and `preStop` events refer to a `composite` command, then all containing commands need to be `exec` commands.
61
61
62
62
63
63
## Parent:
64
64
- Share the same validation rules as listed above. Validation occurs after overriding and merging, in flattened devfile
65
65
66
66
67
-
## starterProjects:
67
+
## Starter projects:
68
68
- Starter project entries cannot have more than one remote defined
69
69
- If `checkoutFrom.remote` is mentioned, validate it against the starter project remote configured map
70
70
71
-
## projects
71
+
## Projects
72
72
- If more than one remote is configured, a checkout remote is mandatory
73
73
- If checkout remote is mentioned, validate it against the starter project remote configured map
0 commit comments