Skip to main content
inframan.yaml sits at the root of your repository and describes your application: its services, how each one is built, how it scales, what it’s connected to, and how any of that differs between environments. It’s the source of truth. Inframan reads it on every release, and settings you change in the console are written back to it through a pull request.

A minimal file

inframan.yaml
This declares one web service, built from ./Dockerfile and listening on port 8080.

A complete example

inframan.yaml
This example assumes the infrastructure has a node pool named app-pool, an active domain api.example.com, PostgreSQL and Redis add-ons named main and cache, an infrastructure secret stripe-key and an env group shared-config.

Top-level fields

string
required
Always v1.
string
required
The application’s name. It must match the name the application was created with, and it can’t change afterwards.
string
default:"application"
The Kubernetes namespace the application’s services run in. Defaults to the application name. It can’t change afterwards.
map
required
The application’s services, keyed by service name. At least one is required. See Service fields.
map of strings
Values substituted for {{NAME}} in your pipelines’ pre-deploy and post-deploy commands. Top level only: they can’t be set per environment. See Pipelines.
object
The default rollout for every service. See rollout under Release.
application and namespace are permanent. If a push changes either one, that release fails and Inframan opens a pull request titled auto-fix: immutable inframan.yaml fields drifted that puts them back.

Service fields

Basics

string
default:"web"
  • web: an HTTP service that receives traffic on port.
  • worker: a long-running process with no inbound traffic, such as a queue consumer.
  • job: runs to completion once per release.
See Services and runtimes.
integer
The port a web service listens on. Required for web. Inframan sets the PORT environment variable to it, so don’t set PORT yourself. These ports are reserved by the platform: 8012, 8022, 8112, 9090, 9091, 15020, 15021 and 15090.
string
The application node pool the service runs on. Required when the infrastructure has more than one application pool, and filled in for you when it has exactly one. See Node pools.
string
Overrides the image’s command. It runs as /bin/sh -c "<start_command>", so the image needs /bin/sh. Don’t use double quotes inside it.

Build

string
default:"\"\""
The build context, relative to the repository root. Empty means the repository root. In a monorepo, set it to the service’s directory, or leave it empty if the Dockerfile needs files from sibling directories.
object

Routing

string
The public hostname for a web service, such as api.example.com. The domain must already be active on the same infrastructure. Without a domain, a service is only reachable from inside the cluster. See Custom domains.
string
The path under domain that routes to this service, such as /api. Several services can share one domain on different prefixes.
string
What path_prefix is rewritten to before the request reaches the service, such as /.

Scaling

object

Resources

object
Kubernetes quantities such as 250m or 512Mi.

Network and health checks

object
Probes apply to web services only.

Environment

map of strings
Plain environment variables. They’re also passed to the build as build arguments.
list of strings
Env groups to attach, by name. A group listed later wins over one listed earlier.
map of strings
Environment variable name to infrastructure secret name, for example STRIPE_KEY: stripe-key. The value is read from your cloud’s secret manager at deploy time.
map of strings
Environment variable name to the thing it connects to. Inframan fills in the value:
  • postgres/<instance>, redis/<instance>: the add-on’s connection URL.
  • storage/<instance>: the bucket’s name.
  • service/<application>/<service>: the internal URL of another web service.
See Connections.
How these combine, and which wins when two set the same name, is covered in Environment variables and secrets.

Release

object
integer
default:"30"
How long a replica gets to finish its work after it’s asked to stop, from 1 to 3600 seconds.

Environment overrides

A service can change its settings per environment under environments.prod or environments.nonprod. The infrastructure’s tag decides which one applies.
inframan.yaml
A runtime setting placed directly under the environment, such as environments.nonprod.scaling, is silently ignored. Put it under environments.nonprod.service. An override that sets cpu or memory must also repeat type: hpa.

Several applications in one file

A repository can hold more than one application. Instead of application: and services:, list each one under applications:, keyed by application name:
inframan.yaml
Each section is created as its own application, under its own name. A file can’t use both forms, and two sections can’t share a namespace.

Validation

  • When you create an application, an invalid file is refused, with the reason.
  • When you push, an invalid file fails the release before anything is built, and the error is on the release’s page.
  • If a branch you push has no inframan.yaml, the release fails and Inframan opens a pull request that adds one.
Unknown keys are ignored rather than rejected, so a misspelt field has no effect. If a setting doesn’t seem to apply, check its spelling against this page.