Architect.io Docs

Contexts

When writing architect.yml files, you can reference information about the runtime or environment, details that are otherwise unique to each deployed environment, through Architect's expression syntax. Encoding component's with these references can help limit the manual configuration needs of your services and make them portable from environment to environment.

Available contexts

There are several context groups that contain important, dynamic information about your component and its future deployed environment. Below are the context categories available for reference:

Context nameDescription
dependenciesReferences to the dynamic outputs of each dependency and their interfaces
ingressesReferences to the dynamic outputs of external interfaces
secretsDynamic values for the secrets declared by your component
servicesReferences to the dynamic outputs of each service and their interfaces

dependencies context

The dependencies context contains dynamic information about the dependencies of the component. This context can primarily be used to refer to the internal addresses of dependency interfaces.

PropertyTypeDescription
dependenciesobjectInformation about the component's dependencies
dependencies.<dependency>objectInformation about the specified dependency
dependencies.<dependency>.interfacesobjectInformation about the dependency's interfaces
dependencies.<dependency>.interfaces.<interface>objectInformation about the specified interface of the dependency. See the interface values for more details.
dependencies.<dependency>.ingressesobjectInformation about the ingress rules associated with a dependency
dependencies.<dependency>.ingresses.<interface>objectInformation about the specified ingress rule of the dependency. See the interface values for more details.

ingresses context

The ingresses context contains information about the external exposed interfaces.

PropertyTypeDescription
ingressesobjectInformation on the ingress rules of the component
ingresses.<interface>objectInformation on an ingress rule matching the interface. See the interface values for more details.

secrets context

The secrets context contains all the values assigned to each secret declared by your component.

PropertyTypeDescription
secretsobjectA dictionary containing the secret values
secrets.<key>stringResolves to the value of the specified secret

services context

The services context contains dynamic information about all the services inside the component. This context can primarily be used to refer to the interfaces of other services inside the component.

PropertyTypeDescription
servicesobjectInformation about each service inside the component
services.<service>objectInformation specific to one of the named services inside the component
services.<service>.interfacesobjectInformation about the specified service's interfaces
services.<service>.interfaces.<interface>objectInformation about the specified service interface. See the interface values for more details.

interface values

Interface values are referenced in many places, dependencies, ingresses, interfaces, and services with a set of uniform values available to reference. These values include:

PropertyTypeDescription
urlThe fully composed URL of the reference interface. This will take the format, <protocol>://<username>:<password>@<host>:<port><path>.
protocolThe protocol of the interface being referenced. This will always be the specific value assigned to the interface by the developer.
usernameThe username of the interface being referenced. Not all interfaces have usernames, so this will be an empty string if none is set.
passwordThe password of the interface being referenced. Not all interfaces have passwords, so this will be an empty string if none is set.
hostThe host value of the interface being referenced. This value is usually dynamic to accomodate the differences between service discovery solutions available to each environment.
portThe port value of the interface being referenced. This will not always be the specific port that the interface is listening on as many container clusters leverage port mapping to ensure that there are no port collisions when sharing hardware in a cluster.
pathThe path value of the interface being referenced. Not all interfaces have paths, so this will be an empty string if none is set.
No results found for query ""