Skip to content
Docs

Version Control (Optional)

Hyve’s core model is: a cluster is one YAML file in a local directory, and hyve reconcile makes reality match whatever that file says — created, updated, or deleted. That directory doesn’t need to be anything more than a folder on disk (see Contexts). Putting it under git is entirely your own choice, not a requirement — but it’s a natural fit, applying the same version control, review, and continuous-reconciliation discipline to infrastructure that’s already applied to application code (the pattern commonly called “GitOps”). This page covers that optional layer.

Declarative

Describe the desired state; hyve figures out how to get there — git or not

Continuous Reconciliation

Add a file to create, delete it to destroy, edit a field to update

Auditable

Full change history is whatever your version control already gives you

Your Own Git

Hyve never clones, pulls, pushes, or commits — that stays entirely yours

The core loop

clusters/production.yaml
apiVersion: hyve.io/v1alpha1
kind: ClusterDefinition
metadata:
name: production
spec:
region: PHX1
driver:
source: github.com/your-org/hyve-civo-module
version: v1.0.0
params:
node_size: g4s.kube.large
node_count: "3"
Terminal window
hyve reconcile

Commit that file and reconcile creates the cluster. Edit node_count and reconcile scales it. Delete the file and reconcile tears it down. One command, three outcomes, depending purely on what’s in the directory hyve context currently points at — see Contexts.

Hyve does not sync git for you

Terminal window
# Before reconciling, get the latest state yourself
git pull
hyve reconcile
# After reconciling, hyve may have written state back to
# cluster-state/*.state.yaml — commit and push that yourself too
git add -A && git commit -m "hyve: reconcile" && git push

A real change, end to end

Branch

Terminal window
git checkout -b scale-production

Edit the cluster definition

Change node_count in clusters/production.yaml — no CLI command needed, it’s just a file.

Preview, then commit

Terminal window
hyve reconcile --dry-run
git commit -am "Scale production to 5 nodes for holiday traffic"
git push origin scale-production

Review

Open a pull request — the diff is the change, reviewable like any code change.

Merge and reconcile

Terminal window
git checkout main && git pull
hyve reconcile

Disaster recovery

Clone your state repository

Terminal window
git clone https://github.com/your-org/your-hyve-config.git
cd your-hyve-config

Point hyve at it

Terminal window
hyve context create prod --path .
hyve context use prod

Reconcile

Terminal window
hyve reconcile
# Recreates every cluster defined in the directory

Best practices

Descriptive commit messages

git commit -m "Scale production for holiday traffic", not git commit -m "update" — this is your audit trail, since hyve keeps none of its own.

Review production changes via pull request

A cluster YAML diff is a normal code diff — branch, push, open a PR, merge, then reconcile.

Separate environments, separate directories

One hyve context per environment (hyve context create prod --path ..., hyve context create staging --path ...) keeps production and staging changes from ever touching the same reconcile run — see Contexts.

Automate reconciliation in CI

git pull && hyve reconcile --dry-run on every PR, git pull && hyve reconcile on merge to main — no extra orchestration needed.