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.

Only one ryvn.yaml file is allowed per repository, and it must be in the root directory.

File Structure

apiVersion: v1
blueprints:
  - name: my-blueprint
    description: "Description of the blueprint"
    services:
      - service: my-service
        # ... service configuration
environments:
  - name: production
    installations:
      - fromBlueprint:
          name: my-blueprint
          # ... installation configuration
previews:
  - name: feature-preview
    environment: staging
    fromBlueprint:
      name: my-blueprint
      # ... preview configuration

Top-Level Properties

PropertyTypeRequiredDescription
apiVersionstringYesAPI version of the Ryvn YAML specification. Currently only v1 is supported.
blueprintsarrayNoList of blueprints to be managed by Ryvn.
environmentsarrayNoList of environments to be managed by Ryvn.
previewsarrayNoList 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

PropertyTypeRequiredDescription
namestringYesName of the blueprint. Must be lowercase alphanumeric with hyphens, max 63 characters.
descriptionstringYesDescription of the blueprint.
displayNamestringNoHuman-readable name for the blueprint.
inputsarrayNoList of input parameters required by the blueprint.
servicesarrayYesList of service installations associated with this blueprint.

Blueprint Inputs

Inputs define parameters that can be customized when installing a blueprint into an environment.

PropertyTypeRequiredDescription
namestringYesName of the input parameter.
descriptionstringNoDetailed description of what the input is for.
displayNamestringNoHuman-readable name for the input.
typestringYesType of the input. Valid values: string, number, boolean, array, object.
defaultanyNoDefault 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.

PropertyTypeRequiredDescription
servicestringYesName of the service to install.
installationNamestringNoCustom name for the installation. If not provided, uses the service name.
namespacestringNoKubernetes namespace for the installation. If not provided, uses the environment’s default namespace.
envVarsarrayNoEnvironment variables for the service. Only valid for web-server services.
configstringNoYAML configuration string for the service. Supports template variables like {{ .ryvn.blueprint.inputs.cpu }}.
secretsarrayNoSecrets belonging to the service. Only valid for helm-chart and terraform service types.

Environment Variables

Environment variables can be configured for web-server services.

PropertyTypeRequiredDescription
keystringYesThe key (name) of the environment variable.
isSecretbooleanYesWhether the environment variable is a secret.
valuestringNoThe value of the environment variable. Omit for secrets.
valueFromobjectNoReference to a git sync secret. Only valid for secret environment variables.

Secrets

Secrets can be generated automatically or referenced from git sync secrets.

PropertyTypeRequiredDescription
namestringYesName of the secret.
fromGitSyncSecretobjectNoReference to a git sync secret.
generatedobjectNoConfiguration for automatically generated secrets.
keysarrayNoKeys for user-defined secrets. Cannot be specified for generated secrets.
Generated Secret Configuration
PropertyTypeRequiredDescription
typestringYesType of secret to generate. Valid values: random-string, random-bytes, rsa-key, ec-key.
lengthintegerNoLength 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

PropertyTypeRequiredDescription
namestringYesName of the environment.
installationsarrayNoList of installations associated with this environment.

Installations

Installations define how blueprints are installed into environments.

PropertyTypeRequiredDescription
fromBlueprintobjectYesBlueprint installation configuration.

From Blueprint Installation

PropertyTypeRequiredDescription
namestringYesName of the blueprint to install.
blueprintInstallationNamestringNoCustom name for the blueprint installation. If not provided, uses the blueprint name.
inputsarrayNoInput values to override blueprint defaults.

Previews

Previews enable automatic deployment of feature branches or pull requests for testing and review.

Preview Properties

PropertyTypeRequiredDescription
namestringYesName of the preview. Must be lowercase alphanumeric with hyphens, max 63 characters.
environmentstringYesName of the environment where previews will be installed.
fromBlueprintobjectYesBlueprint 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.