Skip to content

Commit 87433a8

Browse files
committed
address review comments
Signed-off-by: Stephanie <[email protected]>
1 parent 5bf2f9b commit 87433a8

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

libs/docs/src/docs/no-version/devfile-validation-rules.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Devfile validation rules
33
description: Devfile validation rules
44
---
55

6-
## Id and Name:
6+
## Id and name:
77
`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`
88

99
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
1919

2020
## Endpoints:
2121
- 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`.
2323

2424

2525
## Commands:
2626
1. `id` must be unique
27-
2. composite command:
27+
2. `composite` command:
2828
- 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
3030
- 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
3333
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.
3434

3535
## Components:
@@ -42,11 +42,11 @@ Common rules for all components types:
4242
3. The annotations should not have conflict values for same key, except deployment annotations and service annotations set for a container with `dedicatedPod=true`
4343
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).
4444

45-
### Plugin Component
45+
### Plugin component
4646
- Commands in plugins components share the same commands validation rules as listed above. Validation occurs after overriding and merging, in flattened devfile
4747
- Registry URL needs to be in valid format
4848

49-
### Kubernetes & Openshift component
49+
### Kubernetes & OpenShift component
5050
- `uri` needs to be a valid URI format
5151

5252
### Image component
@@ -56,18 +56,18 @@ Common rules for all components types:
5656
## Events:
5757
1. `preStart` and `postStop` events can only be `apply` commands
5858
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.
6161

6262

6363
## Parent:
6464
- Share the same validation rules as listed above. Validation occurs after overriding and merging, in flattened devfile
6565

6666

67-
## starterProjects:
67+
## Starter projects:
6868
- Starter project entries cannot have more than one remote defined
6969
- If `checkoutFrom.remote` is mentioned, validate it against the starter project remote configured map
7070

71-
## projects
71+
## Projects
7272
- If more than one remote is configured, a checkout remote is mandatory
7373
- If checkout remote is mentioned, validate it against the starter project remote configured map

0 commit comments

Comments
 (0)