Skip to content

Commit

Permalink
feat: make the container spec optional and support top level extensions
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Meier <[email protected]>
  • Loading branch information
astromechza committed Nov 29, 2024
1 parent ab4a6be commit d8af847
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
3 changes: 3 additions & 0 deletions samples/score-minimal.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
apiVersion: score.dev/v1b1
metadata:
name: example-workload-name123
10 changes: 10 additions & 0 deletions samples/score-with-extensions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: score.dev/v1b1
metadata:
name: example-workload-name123
x-my-extension:
archive: http://example.com/binary.tgz
variables:
SOME_VAR: ${resources.example.thing}
resources:
example:
type: resource-type
12 changes: 9 additions & 3 deletions score-v1b1.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,16 @@
"type": "object",
"required": [
"apiVersion",
"metadata",
"containers"
"metadata"
],
"additionalProperties": false,
"patternProperties": {
"^x-.+": {
"description": "A top-level Score extention. This is a schema extension which is not defined by the common Score specification but may be supported by a subset of Score implementations. The 'x-' prefix avoid conflict with future top level fields in the Score specification.",
"type": "object",
"additionalProperties": true
}
},
"properties": {
"apiVersion": {
"description": "The declared Score Specification version.",
Expand Down Expand Up @@ -67,7 +73,7 @@
"containers": {
"description": "The set of named containers in the Workload. The container name must be a valid RFC1123 Label Name of up to 63 characters, including a-z, 0-9, '-' but may not start or end with '-'.",
"type": "object",
"minProperties": 0,
"minProperties": 1,
"additionalProperties": {
"$ref": "#/$defs/container"
},
Expand Down

0 comments on commit d8af847

Please sign in to comment.