Setting up Git Sync
Prerequisites
To start using Infrastructure as Code, you must have already configured or enabled the following:- Ryvn GitHub App: Must be connected to your Ryvn organization and any pending permissions must be approved
Setup
To configure Git Sync for your organization:1
Navigate to Settings
Go to the Settings tab in the Ryvn Dashboard
2
Access Git Sync
Click on Git Sync in the settings menu
3
Add Git Sync
- Click Add Git Sync button
- Select a repository from the dropdown list
- Optionally specify a branch name (defaults to the repository’s default branch)
- Click Configure to set up the sync
4
Create resource files
- In your selected repository, create YAML files defining your resources
- Each resource uses the
kind,metadata,specstructure - Commit and push the files to your repository
5
Monitor sync status
- Return to the Git Sync page to monitor the sync status
- Check for any validation errors or sync failures
- Verify that your resources are created in the Ryvn Dashboard
You must have GitHub integration configured and access to the repository you want to sync with.
Resource file structure
Each resource follows a standard pattern withkind, metadata, and spec fields. Ryvn recursively scans all YAML files from your entry point directory and identifies resources by their kind field.
Add
# yaml-language-server: $schema=https://api.ryvn.app/v1/schemas/resources.json at the top of your resource files to enable autocomplete and validation in editors that support YAML Language Server (VS Code, Neovim, etc.).Usage examples
Creating a Helm chart installation
Here’s a simple example of creating an environment with a helm-chart installation:production environment. The configuration sets up the controller with 2 replicas and resource limits, placing the installation in the ingress-nginx namespace. It references a variable group for the TLS certificate — all environment variable groups are automatically available to Helm Chart installations as Kubernetes secrets.
Reference
See GitOps ReferenceManaging secrets with Variable Groups
Variable groups are the recommended way to manage shared secrets and environment variables across installations. They are scoped to environments.1
Navigate to Variable Groups
Go to the Variable Groups page in the Ryvn Dashboard
2
Create a group
Click Create, select a target environment, and give the group a name
3
Add variables
Add your key-value pairs — toggle the lock icon for sensitive values
4
Reference in installations
- Web-server and job installations: link groups explicitly using the
variableGroupsfield in your resource files - Helm Chart installations: all environment variable groups are automatically available — no explicit linking needed. Reference the secret by name with
k8sSecretNameand let the chart resolve keys viasecretKeyRef/existingSecret - Terraform installations: all environment variable groups are automatically available — read individual values into Terraform variables with
k8sSecretValue
Variable groups are encrypted and stored securely. For web-server and job installations, reference them using the
variableGroups field. For Helm Chart and Terraform installations, all variable groups in the environment are automatically available as Kubernetes secrets without explicit linking.Sync status and monitoring
The Git Sync page displays the current status of your repository synchronization:Validation errors
If sync fails due to validation errors, you’ll see:- Resource Type: The type of resource that failed validation
- Resource Name: The name of the specific resource
- Error Message: Detailed description of the validation issue