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: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
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
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.Reference in Installations
- Web-server and job installations: link groups explicitly using the
variableGroupsfield in your resource files - Helm Chart and Terraform installations: all environment variable groups are automatically available — no explicit linking needed. Reference them in config via
k8sSecretNameork8sSecretValue
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:| Status | Description | Action Required |
|---|---|---|
| In Progress | Currently syncing repository | Wait for completion |
| Completed | Last sync was successful | None - resources are up to date |
| Failed | Sync failed due to errors | Check validation errors and fix issues |
| File Not Found | No resource files found in repository | Create resource files in the repository |
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