reference
Supported Score fields
Which fields of a Score workload file (score.dev/v1b1) Glenr accepts, accepts with a limit, or refuses, and the message a refusal prints.
How to read the table
Glenr checks every Score document when it is submitted, in this order. The first check that fails refuses the document with its own message.
- The
glenr.io/kindannotation equals the kind of the resource. - The workload profile shape: a
readinessProbebeside more than one service port needs itslivenessProbe, two edges to different targets or ports may not give their network policies one name, and${resources.<name>.port}may not sit besideparams.port. - A container CPU or memory limit is spelled in whole millicores (
500m) or mebibytes (512Mi). - The document carries none of the eleven annotations the platform writes from values (see Annotations).
- The Score contract: the Score schema narrowed to the fields below, among them one to eight service ports, then the rules a schema cannot express, such as which annotations a kind of resource takes. A document that fails is refused with a message that begins
score does not meet the Score contract:and lists the failures separated by semicolons.
Supported means the field is accepted and used. Supported with limits means it is accepted within the limit in the Detail column. Refused means a document that carries the field is rejected. A path in angle brackets, such as <name>, stands for a name you choose. Messages are quoted as the API returns them. A row with several messages lists one per check that can refuse it. Schema messages name the failing path, for example /containers/web; the name in your message is the name in your document.
A rule marked as checked by the renderer is not checked at submission. The zone refuses the document when it applies it.
Zone limits: workload profile S1
Some fields work only in a zone that runs the workload profile S1. Today the Helsinki zone runs it and the Warsaw zone does not. These fields need it:
- a second or later entry under
service.ports, and atargetPortthat differs from itsport; containers.<name>.filesandcontainers.<name>.volumes;- a resource of type
volume(a scratch volume) or of typesecret; - a
serviceresource edge withparams.port.
A document with one service port, no files and none of these resources runs in any zone. In a zone without S1, a create, deploy or promote of a document that uses any of them is refused with a message that begins with the fields and ends which zone <zone> does not run yet, so they would be dropped silently. Remove them to deploy here, or place the resource on a zone that runs the profile. Copying or moving an environment into a zone without S1 is refused for the same reason, and the refusal names the resources that need it. The table below lists the fields, not the zone each works in.
Document
| Field | Status | Detail | Refusal message |
|---|---|---|---|
apiVersion | Supported with limits | The value is score.dev/v1b1. | /apiVersion value must be 'score.dev/v1b1'. |
metadata.name | Supported with limits | 2 to 32 characters: lowercase letters, digits and hyphens, starting and ending with a letter or digit. | /metadata/name minLength: got 1, want 2. |
metadata.annotations.<key> | Supported with limits | String values. The keys the platform reads are in the Annotations table below. An unlisted key under convoy-tech.com/ is accepted with a warning that it has no effect. An unlisted key under any other domain, glenr.io/ included, is accepted without a warning. | |
metadata.<any other field> | Refused | Only name and annotations are accepted under metadata. | /metadata additional properties 'labels' not allowed. |
<any other top-level field> | Refused | Only apiVersion, metadata, containers, service and resources are accepted at the top level. | (document root) additional properties 'foo' not allowed. |
Containers
| Field | Status | Detail | Refusal message |
|---|---|---|---|
containers | Supported with limits | Exactly one container. | /containers maxProperties: got 2, want 1. |
containers.<name>.image | Supported | A non-empty string. The value . means the platform builds the image from the repository the resource is bound to; any other value is an image reference. | |
containers.<name>.command | Supported | A list of strings, rendered as the container command. | |
containers.<name>.args | Supported | A list of strings, rendered as the container args. | |
containers.<name>.variables.<NAME> | Supported with limits | String values. A value may contain ${metadata.name} and ${resources.<name>.<output>}; $${ writes a literal ${. The validator refuses a reference to a resource the document does not declare, and a database output inside a composed value. The renderer refuses an output the resource type does not provide: route provides url; service and external-api provide host and port. | variables.A: ${foo.bar} is not a placeholder this platform resolves. Use ${metadata.name} or ${resources.<name>.<output>}, or write $${ for a literal ${. |
containers.<name>.resources.limits.cpu | Supported with limits | A whole number of millicores with the suffix m, from 50m to 2000m. Another spelling, such as 2 or 0.5, is refused first by glenr-api; the range is checked after it. When the document sets limits, they apply in place of the size. | cpu limit "2" is not a spelling this platform reads. Write millicores, like "500m" or "2000m" for two cores. Glenr reads this field as millicores, so "2" would run as 2m ... (message continues)score does not meet the Score contract: containers.web.resources.limits.cpu must be between 50m and 2000m. |
containers.<name>.resources.limits.memory | Supported with limits | A whole number of mebibytes with the suffix Mi, from 64Mi to 8192Mi. Another spelling, such as 1G, is refused first by glenr-api; the range is checked after it. Both limits are required together. | memory limit "256" is not a spelling this platform reads. Write mebibytes, like "512Mi" or "1024Mi" for a gibibyte. Glenr reads this field as mebibytes, so "256" would run as 256Mi ... (message continues)score does not meet the Score contract: containers.web.resources.limits.memory must be between 64Mi and 8192Mi. |
containers.<name>.resources.requests.cpu, .memory | Supported with limits | Accepted when equal to the limits. A different value is refused. | Convoy sets requests = limits; specify limits only. |
containers.<name>.livenessProbe.httpGet.path, .portcontainers.<name>.readinessProbe.httpGet.path, .port | Supported with limits | An httpGet probe, or an exec probe (below). The path starts with /. The port is 1 to 65535. A document that declares one probe gets the other with the same path on the primary port. A document with more than one service port that declares a readinessProbe must also declare a livenessProbe: glenr-api refuses one that does not, because the liveness probe it adds from the readiness path may point at another port. Probe timings are set by the renderer. A document with no probe gets a TCP readiness probe on the primary port. | invalid: containers.main declares a readinessProbe and the service declares 2 ports, but containers.main declares no livenessProbe. The platform would add one on the primary port from the readiness path. Declare containers.main.livenessProbe on the port it should check, or remove containers.main.readinessProbe |
containers.<name>.livenessProbe.httpGet.hostcontainers.<name>.readinessProbe.httpGet.host | Refused | A probe can only target its own pod. To send a Host header, use httpHeaders. | containers.main.livenessProbe.httpGet.host is "x.example"; a probe can only target its own pod. Remove host (to send a Host header, use httpHeaders)./containers/main/livenessProbe/httpGet additional properties 'host' not allowed. |
containers.<name>.livenessProbe.httpGet.scheme, .httpHeaderscontainers.<name>.readinessProbe.httpGet.scheme, .httpHeaders | Supported with limits | scheme is HTTP or HTTPS. httpHeaders is a list of at most 4 name and value pairs. A header value is written out as a literal: a ${...} placeholder in it is refused. Available in Helsinki and Warsaw. | /containers/main/livenessProbe/httpGet/httpHeaders maxItems: got 5, want 4.containers.main.livenessProbe.httpGet.httpHeaders[0] (A): a probe header is a literal, and ${...} is not resolved there. Write the value out. |
containers.<name>.livenessProbe.exec.commandcontainers.<name>.readinessProbe.exec.command | Supported with limits | An exec probe runs the command in the container; exit 0 is success. A probe declares exec or httpGet, not both. Available in Helsinki and Warsaw. | containers.main.livenessProbe declares both httpGet and exec. Declare one. |
containers.<name>.files.<path> | Supported with limits | A map from the absolute target path to the file. Each entry sets content or binaryContent, and may set mode and noExpand. content expands ${metadata.name} and ${resources.<name>.<output>} unless noExpand is true. A database output is refused in a file: it is bound as its own variable instead. A content that is exactly ${resources.<s>.<KEY>} of a secret resource mounts the value from a Secret, and the value enters neither the document nor a ConfigMap; a secret inside a longer text is refused. binaryContent is standard base64, renders into a ConfigMap and expands no placeholder. mode is three octal digits and keeps the other-read bit, as 0644 does. The target path is absolute and outside /proc, /sys, /dev, /var/run/secrets and /run/secrets. At most 16 files per container, 64 KiB per file and 256 KiB per workload. The array form Score also defines is refused. | score does not meet the Score contract: containers.main.files./etc/app.env.content: ${resources.db.PGHOST} is a database output. A database's outputs are secret-backed and cannot be written into a file; they are bound as their own variables (DATABASE_URL, PGHOST, ...). Read those instead. |
containers.<name>.volumes.<path> | Supported with limits | A map from the absolute mount path to the volume. source is required and is ${resources.<name>}, the name of a volume resource in the same document; readOnly is optional. The mount path is absolute and outside /proc, /sys, /dev, /var/run/secrets and /run/secrets, and holds no file of the container. The array form Score also defines is refused. | |
containers.<name>.before.<init>.ready | Supported with limits | An init container: another container of the document, listed under the main container as before.<init>.ready: complete. It runs to completion before the main container starts. At most 4 init containers, run in document order. One container is the main container. ready: started and ready: healthy order a sidecar and are refused. Available in Helsinki and Warsaw. | containers.main.before.init.ready is "started". Only ready: complete is supported, which runs init to completion before the container starts; started and healthy order a sidecar, which is not supported yet./containers/main/before/init/ready value must be 'complete'. |
Service
| Field | Status | Detail | Refusal message |
|---|---|---|---|
service.ports | Supported with limits | One to eight TCP ports, and only on a service. A service without the block, and a worker, task or cron with one, are refused by the Score contract. Each key is a port name: 2 to 15 characters, lowercase letters, digits and hyphens, starting and ending with a letter or digit, at least one letter, no --. The primary port is the one named http, or the first in document order when none is; it is served on Service port 80. Every other port is served on its own number. Two ports may not listen on one container port, and a non-primary port may not use 80. | score does not meet the Score contract: service.ports.metrics declares port 80, but the primary port service.ports.http is served on Service port 80. Choose another port number for metrics. |
service.ports.<name>.port | Supported | 1 to 65535. The primary port is served on Service port 80 and forwarded to its container port. Every other port is served on this number and forwarded to its container port. | |
service.ports.<name>.targetPort | Supported with limits | The port the container listens on, 1 to 65535. Absent, the container port is port. Two ports of one service may not share a targetPort. | |
service.ports.<name>.protocol | Supported with limits | The value is TCP. UDP, which Score defines, is refused. | /service/ports/http/protocol value must be 'TCP'. |
Resources
The type is one of postgres, route, service, external-api, volume and secret. Any other type, such as redis, is refused. The refusal prints one line per alternative, for example /resources/r/type value must be 'route'. Names match ^[a-zA-Z0-9_][a-zA-Z0-9_.-]*$.
| Field | Status | Detail | Refusal message |
|---|---|---|---|
resources.<name>.type: postgresresources.<name>.id | Supported with limits | id is required and non-empty. No other field is accepted on a postgres resource. The Score contract does not run on a postgres document at submission: its storage and size are values the platform applies on the way to the zone, so the authored document would fail the contract by construction. | /resources/db missing property 'id'. |
resources.<name>.type: route | Supported with limits | No other field is accepted. The only output is url, and it is refused when the app is declared glenr.io/expose=internal. | /resources/r additional properties 'params' not allowed. |
resources.<name>.type: serviceresources.<name>.params.app, .kind, .port | Supported with limits | params.app is required: the name of another app in the same environment, 2 to 32 characters with the metadata.name pattern. params.kind is optional and its only value is postgres, which makes the edge the database port. params.port is optional: the name of a port the target app declares in its service.ports, and the allow-edge is scoped to that port; absent, the edge uses the primary port as http. Two edges to one app on one port merge into one; two edges to different targets or ports that would give their network policies one name are refused. ${resources.<this>.port} beside params.port is refused, because the placeholder resolves to 80. No other field is accepted on a service resource. | /resources/r/params/kind value must be 'postgres'.invalid: resources.named (resource api, port admin) and resources.default (resource api-admin, port http) would both create the network policy web-to-api-admin. Rename one of the resources, or reach one of them through another portinvalid: ${resources.backend.port} resolves to 80, the primary port, while resources.backend.params.port names port admin; write the Service port of admin in its place |
resources.<name>.type: external-apiresources.<name>.params.host, .params.port | Supported with limits | host is a DNS name of 3 to 253 characters with at least two labels; a leading *. is accepted and a bare * is refused. port is 1 to 65535 and is 443 when omitted. Both go under params. host or port beside type at the top level of the resource is refused by glenr-api, and the message names params.host and params.port. | score does not meet the Score contract: resources.e: an external-api names its endpoint under params, not at the top level; write params.host and params.port |
resources.<name>.class | Supported with limits | Accepted on a volume resource, where it is required and its only value is ephemeral. Every other resource type refuses it. | score does not meet the Score contract: resources.scratch: a volume needs class: ephemeral; persistent volumes are not available yet. |
resources.<name>.type: volumeresources.<name>.params.size | Supported with limits | A scratch volume whose data lives as long as the pod, mounted by a container's volumes entry through ${resources.<name>}. params.size is optional: Mi or Gi, from 1Mi to 4Gi, default 1Gi. The scratch space shares the pod's 4Gi ephemeral-storage limit with the container's own writes, so a size above 3Gi is accepted with a warning. | score does not meet the Score contract: resources.scratch.params.size is 5Gi (5120Mi); the limit is 4Gi (4096Mi) per scratch volume. |
resources.<name>.type: secret | Supported with limits | Its outputs are keys of the resource's values cascade. In this form an output is used only as the whole content of a container file: a content that is exactly ${resources.<name>.<KEY>} mounts that key from a Secret, and the value enters neither the document nor a ConfigMap. A secret placeholder inside a longer text is refused, and a deploy whose named key has no value is refused with the key named. | invalid: no value is set for secret WSO2_KEYSTORE_P12_B64, the content of file /home/wso2carbon/glenr-secrets/wso2carbon.p12.b64. Set each as a secret on this resource, this environment or this cell, then try again |
resources.<name>.metadata | Refused | Score defines metadata on a resource; the profile does not accept it. | /resources/r additional properties 'metadata' not allowed. |
Annotations
Annotations are string values under metadata.annotations. Eleven keys are written by the platform from the values of the resource (size, storage, replicas, scaling, version, CPU type, CPU architecture and the primary domain), and glenr-api refuses a submitted document that carries one; those rows are marked Refused, and their detail gives the limits of the value to set instead. For the other keys, the Score contract refuses a bad value when the document is submitted. Where only the renderer refuses it, the row says so, and the refusal appears when the zone applies the document.
| Field | Status | Detail | Refusal message |
|---|---|---|---|
glenr.io/kind | Supported with limits | service (the default), worker, task, cron or postgres. glenr-api first requires the annotation to equal the kind of the resource, and refuses a document whose annotation is missing or differs. A worker, task or cron has no route, so a service block on one is refused. | score says glenr.io/kind: workers, and this resource is a service; make them the samescore has no glenr.io/kind annotation; add `glenr.io/kind: worker` to its metadata.annotations |
glenr.io/expose | Supported with limits | public or internal. Required on a service; there is no default. Refused on a worker, task or cron. | glenr.io/expose: "world" is not an exposure; the two are "public" and "internal" |
glenr.io/size | Refused | The platform writes this key from the value size; set the value on the resource instead. The renderer reads five sizes: nano (100m, 128Mi), micro (250m, 256Mi), small (500m, 512Mi), standard (1000m, 2048Mi) and large (2000m, 4096Mi). On an app, limits set in the document apply in place of the size. | invalid: metadata.annotations.glenr.io/size is set by the platform from values, so set the value `size` instead. Remove it from the document to deploy |
glenr.io/cpu-type | Refused | The platform writes this key from the value cpu.type; set the value instead. cpu.type is shared or dedicated. | invalid: metadata.annotations.glenr.io/cpu-type is set by the platform from values, so set the value `cpu.type` instead. Remove it from the document to deploy |
glenr.io/cpu-arch | Refused | The platform writes this key from the value cpu.arch; set the value instead. cpu.arch is amd64 or arm64. | invalid: metadata.annotations.glenr.io/cpu-arch is set by the platform from values, so set the value `cpu.arch` instead. Remove it from the document to deploy |
glenr.io/schedule | Supported with limits | Required on a cron. The validator checks that the value is present and does not check the expression. | a cron needs glenr.io/schedule ... (message continues) |
glenr.io/timezone | Supported | Read for a cron. The default is Etc/UTC. | |
glenr.io/retries, glenr.io/timeout, glenr.io/parallelism | Supported with limits | Read for a task and a cron. A whole number from 0 to 2^30. | glenr.io/timeout: "30m" is not a whole number |
glenr.io/release | Supported with limits | A release command. Accepted on a service and a worker; refused on a task or a cron. | glenr.io/release: only a service or a worker rolls out, so only they take a release command, and this is a task |
glenr.io/startup-seconds | Supported with limits | Opt-in startup probe. A quoted whole number of seconds from 30 to 900. The platform adds a startup probe with the liveness probe's handler (the readiness probe's, when there is no liveness probe) that checks every 10 seconds and allows the container that long to start before liveness checks begin. The document declares a livenessProbe or a readinessProbe for it to run, or the annotation is refused. A livenessProbe without the annotation gets a warning. Available in Helsinki and Warsaw. | annotation glenr.io/startup-seconds is "20"; write the seconds a slow start may take as a whole number from 30 to 900, in quotes, such as "300".annotation glenr.io/startup-seconds is 300, but containers.main declares no livenessProbe or readinessProbe for the startup probe to run. Declare one, or remove the annotation. |
glenr.io/storage | Refused | The platform writes this key from the value storage on the database; set the value instead. The renderer takes the disk in whole GiB, greater than 0. | invalid: metadata.annotations.glenr.io/storage is set by the platform from values, so set the value `storage` on the database instead. Remove it from the document to deploy |
glenr.io/postgres-version | Refused | The platform writes this key from the value version on the database; set the value instead. The renderer records it on the rendered database object. It does not choose the version that runs. | invalid: metadata.annotations.glenr.io/postgres-version is set by the platform from values, so set the value `version` on the database instead. Remove it from the document to deploy |
glenr.io/public-host | Refused | The platform writes this key from the primary custom domain of the resource; make a custom domain the primary domain instead. The renderer refuses a value that is not a lower-case hostname. | invalid: metadata.annotations.glenr.io/public-host is set by the platform from values, so make a custom domain the primary domain of the resource instead. Remove it from the document to deploy |
glenr.io/scale-min, glenr.io/scale-max, glenr.io/scale-cpu, glenr.io/scale-memory | Refused | The platform writes these keys from the values scale.min, scale.max, scale.cpu and scale.memory; set the values instead. The renderer's limits: scale-max turns scaling on and needs scale-min; scale-min and scale-max are whole numbers from 1 to 20 and min is at most max; scale-cpu and scale-memory are percentages from 1 to 100 and at least one is required; a CPU or memory target needs a size. A kind other than service, and scaling combined with a fixed replicas count, are refused by the renderer. | invalid: metadata.annotations.glenr.io/scale-min is set by the platform from values, so set the value `scale.min` instead. Remove it from the document to deploy |
convoy-tech.com/replicas | Refused | The platform writes this key from the value replicas; set the value instead. The renderer reads an integer string from 1 to 20. | invalid: metadata.annotations.convoy-tech.com/replicas is set by the platform from values, so set the value `replicas` instead. Remove it from the document to deploy |
convoy-tech.com/build-method | Supported with limits | dockerfile or auto-detect. | annotation convoy-tech.com/build-method must be "dockerfile" or "auto-detect". |
convoy-tech.com/image-tag-mode | Supported with limits | pin or track. | annotation convoy-tech.com/image-tag-mode must be "pin" or "track". |
convoy-tech.com/renderer | Supported with limits | score or legacy. | annotation convoy-tech.com/renderer must be "score" or "legacy". |
convoy-tech.com/build-dockerfile, convoy-tech.com/build-context | Supported | Recognised by the validator, which does not check the value. |
