Skip to content

Commit 373e925

Browse files
yangcao77elsony
authored andcommitted
address review comments
Signed-off-by: Stephanie <yangcao@redhat.com>
1 parent 9db2f35 commit 373e925

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pkg/validation/validation-rule.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
### Id and Name:
22
`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`
33

4-
The restriction is added to allow easy translation to K8s resource names, and also to have consistent rules for both name and id fields
4+
The restriction is added to allow easy translation to K8s resource names, and also to have consistent rules for both name and id fields.
5+
56
The validation will be done as part of schema validation, the rule will be introduced as a regex in schema definition, any objection of the rule in devfile will result in a failure.
67

7-
- limit to lowercase characters i.e.; no uppercase allowed
8+
- limit to lowercase characters i.e., no uppercase allowed
89
- limit within 63 characters, except for endpoint’s name which is limited within 15 characters
910
- no special characters allowed except dash(-)
1011
- start with an alphanumeric character
@@ -14,6 +15,7 @@ The validation will be done as part of schema validation, the rule will be intro
1415

1516
### Endpoints:
1617
- all the endpoint names are unique across components
18+
1719
Since network is shared in the same pod, endpoint ports should be unique across components, two components cannot have the same target port but two endpoints in a single component can have the same target port. Only exception: container component with `dedicatedpod=true`
1820

1921
### Commands:
@@ -22,9 +24,7 @@ Since network is shared in the same pod, endpoint ports should be unique across
2224
- Should not reference itself via a subcommand
2325
- Should not indirectly reference itself via a subcommand which is a composite command
2426
- Should reference a valid devfile command
25-
- Subcommands should be valid as well
26-
3. exec command should:
27-
map to a valid container component
27+
3. exec command should: map to a valid container component
2828
4. vscodeLaunch & vscodeTask: URI needs to be in valid URI format
2929
5. `{build, run, test, debug}`, 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.
3030

@@ -55,4 +55,4 @@ Common rules for all components types:
5555

5656

5757
### starterProjects:
58-
- Starter project entries cannot have more than one remotes defined
58+
- Starter project entries cannot have more than one remote defined

0 commit comments

Comments
 (0)