Deployment Targets and Deployments
targets declares the Deployment Targets Services run on, nested as they nest, and deployments lists each Service in each Environment on a Target, with its URLs. They can sit in any file of a Project; deployments.yaml is a convention.
Example
Section titled “Example”The Kitchen sink’s: a cluster inside a region, and a Deployment of each Service, the API’s with a health endpoint:
targets: cloud: name: Cloud region kind: region targets: cluster: name: Kubernetes cluster kind: cluster
deployments: - service: web environment: prod target: cluster url: https://shop.sink.example - service: api environment: prod target: cluster url: https://api.sink.example endpoints: - name: health url: https://api.sink.example/healthz - service: orders-db environment: prod target: cloud - service: events environment: prod target: cloud - service: mailer environment: prod target: cluster - service: search environment: prod target: cloudSee Add Deployments.
Fields
Section titled “Fields”These keys of a Project file declare Deployment Targets and the Deployments on them.
Generated from schemas/model.schema.json, which editors can use for completion and validation. <id> stands for a key you choose; [] for each item of a list.
targets
Section titled “targets”| Field | Type | Required | Notes |
|---|---|---|---|
targets |
map of id → object | ||
targets.<id>.name |
string | yes | |
targets.<id>.kind |
string | yes | What the Target is, such as region, cluster, namespace or platform. |
targets.<id>.description |
string | ||
targets.<id>.owner |
string | ||
targets.<id>.tags |
list of string | ||
targets.<id>.links |
list of object | ||
targets.<id>.links[].label |
string | yes | |
targets.<id>.links[].url |
string | yes | Format: uri. |
targets.<id>.targets |
map of id → object |
deployments
Section titled “deployments”| Field | Type | Required | Notes |
|---|---|---|---|
deployments |
list of object | ||
deployments[].service |
string | yes | An id in this Project, or project:id for one in another Project. |
deployments[].environment |
string | yes | |
deployments[].target |
string | yes | An id in this Project, or project:id for one in another Project. |
deployments[].url |
string | Format: uri. | |
deployments[].endpoints |
list of object | ||
deployments[].endpoints[].name |
string | yes | |
deployments[].endpoints[].url |
string | yes | Format: uri. |