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: pkg/validation/validation-rule.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,11 @@
1
1
### Id and Name:
2
2
`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`
3
3
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
+
5
6
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.
6
7
7
-
- limit to lowercase characters i.e.; no uppercase allowed
8
+
- limit to lowercase characters i.e., no uppercase allowed
8
9
- limit within 63 characters, except for endpoint’s name which is limited within 15 characters
9
10
- no special characters allowed except dash(-)
10
11
- start with an alphanumeric character
@@ -14,6 +15,7 @@ The validation will be done as part of schema validation, the rule will be intro
14
15
15
16
### Endpoints:
16
17
- all the endpoint names are unique across components
18
+
17
19
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`
18
20
19
21
### Commands:
@@ -22,9 +24,7 @@ Since network is shared in the same pod, endpoint ports should be unique across
22
24
- Should not reference itself via a subcommand
23
25
- Should not indirectly reference itself via a subcommand which is a composite command
24
26
- 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
28
28
4. vscodeLaunch & vscodeTask: URI needs to be in valid URI format
29
29
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.
30
30
@@ -55,4 +55,4 @@ Common rules for all components types:
55
55
56
56
57
57
### 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