Ryvn YAML Specification
Complete reference for the ryvn.yaml configuration file
The ryvn.yaml
file is the primary configuration file for defining your Ryvn resources. It must be placed in the root directory of your repository and defines blueprints, environments, and previews that will be managed by Ryvn.
ryvn.yaml
file is allowed per repository, and it must be in the root directory.File Structure
Top-Level Properties
Property | Type | Required | Description |
---|---|---|---|
apiVersion | string | Yes | API version of the Ryvn YAML specification. Currently only v1 is supported. |
blueprints | array | No | List of blueprints to be managed by Ryvn. |
environments | array | No | List of environments to be managed by Ryvn. |
previews | array | No | List of previews to be managed by Ryvn. |
Blueprints
Blueprints define reusable application templates that can be installed across multiple environments. They encapsulate service configurations, environment variables, secrets, and input parameters.
Blueprint Properties
Property | Type | Required | Description |
---|---|---|---|
name | string | Yes | Name of the blueprint. Must be lowercase alphanumeric with hyphens, max 63 characters. |
description | string | Yes | Description of the blueprint. |
displayName | string | No | Human-readable name for the blueprint. |
inputs | array | No | List of input parameters required by the blueprint. |
services | array | Yes | List of service installations associated with this blueprint. |
Blueprint Inputs
Inputs define parameters that can be customized when installing a blueprint into an environment.
Property | Type | Required | Description |
---|---|---|---|
name | string | Yes | Name of the input parameter. |
description | string | No | Detailed description of what the input is for. |
displayName | string | No | Human-readable name for the input. |
type | string | Yes | Type of the input. Valid values: string , number , boolean , array , object . |
default | any | No | Default value for the input. If not provided, the input will be required. |
Blueprint Service Installations
Service installations define how services are configured when installed from a blueprint.
Property | Type | Required | Description |
---|---|---|---|
service | string | Yes | Name of the service to install. |
installationName | string | No | Custom name for the installation. If not provided, uses the service name. |
namespace | string | No | Kubernetes namespace for the installation. If not provided, uses the environment’s default namespace. |
envVars | array | No | Environment variables for the service. Only valid for web-server services. |
config | string | No | YAML configuration string for the service. Supports template variables like {{ .ryvn.blueprint.inputs.cpu }} . |
secrets | array | No | Secrets belonging to the service. Only valid for helm-chart and terraform service types. |
Environment Variables
Environment variables can be configured for web-server services.
Property | Type | Required | Description |
---|---|---|---|
key | string | Yes | The key (name) of the environment variable. |
isSecret | boolean | Yes | Whether the environment variable is a secret. |
value | string | No | The value of the environment variable. Omit for secrets. |
valueFrom | object | No | Reference to a git sync secret. Only valid for secret environment variables. |
Secrets
Secrets can be generated automatically or referenced from git sync secrets.
Property | Type | Required | Description |
---|---|---|---|
name | string | Yes | Name of the secret. |
fromGitSyncSecret | object | No | Reference to a git sync secret. |
generated | object | No | Configuration for automatically generated secrets. |
keys | array | No | Keys for user-defined secrets. Cannot be specified for generated secrets. |
Generated Secret Configuration
Property | Type | Required | Description |
---|---|---|---|
type | string | Yes | Type of secret to generate. Valid values: random-string , random-bytes , rsa-key , ec-key . |
length | integer | No | Length for random-string or random-bytes. Uses default if not specified. |
Configuration Templates
The config
property supports template variables that reference blueprint inputs.
Environments
Environments define where blueprints are installed and how they are configured.
Environment Properties
Property | Type | Required | Description |
---|---|---|---|
name | string | Yes | Name of the environment. |
installations | array | No | List of installations associated with this environment. |
Installations
Installations define how blueprints are installed into environments.
Property | Type | Required | Description |
---|---|---|---|
fromBlueprint | object | Yes | Blueprint installation configuration. |
From Blueprint Installation
Property | Type | Required | Description |
---|---|---|---|
name | string | Yes | Name of the blueprint to install. |
blueprintInstallationName | string | No | Custom name for the blueprint installation. If not provided, uses the blueprint name. |
inputs | array | No | Input values to override blueprint defaults. |
Previews
Previews enable automatic deployment of feature branches or pull requests for testing and review.
Preview Properties
Property | Type | Required | Description |
---|---|---|---|
name | string | Yes | Name of the preview. Must be lowercase alphanumeric with hyphens, max 63 characters. |
environment | string | Yes | Name of the environment where previews will be installed. |
fromBlueprint | object | Yes | Blueprint configuration for the preview. |
Complete Example
Validation Rules
Ryvn performs comprehensive validation of your ryvn.yaml
file:
Naming Conventions
- All names must be lowercase alphanumeric with hyphens only
- Names must be less than 63 characters
- Names must match the pattern:
^[a-z0-9]+(-[a-z0-9]+)*$
Required Fields
- Blueprints must have at least one service
- Service installations must specify a service name
- Environment variables must have a key and isSecret value
- Secrets must have a name and either generated config or fromGitSyncSecret reference
Cross-References
- Referenced services must exist in the organization
- Referenced git sync secrets must exist
- Referenced blueprints must exist when installing into environments
- Referenced environments must exist for previews
Input Validation
- Required inputs must be provided when installing blueprints
- Input values must match their declared types
- Secret inputs cannot have default values
Validation errors will prevent the sync from completing. Check the validation output in your Ryvn dashboard for detailed error messages.