Skip to main content

Introduction to GitOps

Inspect 1.36

Why Git fits a Syself Autopilot cluster#

A whole workload cluster in Syself Autopilot is declared by a single Cluster object (plus a few related manifests). Because the cluster is one declarative object, Git is a natural place to keep it: the file in Git becomes the source of truth for the entire cluster, not just for the applications running inside it.

GitOps is one way to manage the Cluster object, not a requirement. You can always apply and change the object directly with kubectl. GitOps adds three things on top:

  • Every change is a pull request, and merging it is the deploy.
  • Git history is the audit trail, so you can see who changed what and when.
  • Reconciliation is automatic, which minimizes drift and manual error.

Two reconciliation loops#

Managing a cluster from Git runs two loops that hand off to each other:

  • Syself Autopilot keeps the running cluster matching the Cluster object in the management cluster.
  • Your GitOps tool keeps that Cluster object matching the manifest in Git.

You install the GitOps tool in a workload cluster and add the Syself Autopilot management cluster as an external destination, so the tool can reconcile your Cluster declarations. This works for a cluster that already exists too: apply it once by hand, then hand ongoing management to the tool.

Any GitOps tool works#

Because Syself Autopilot is driven through the Kubernetes API, plain Kubernetes YAML works with any GitOps tool. Argo CD and Flux both integrate well. The guides that follow cover Argo CD (Flux to come).

What to put in Git, and what to keep out#

Commit the Cluster object and its related topology manifests, alongside your application manifests. Keep secrets out of Git: reference them through a sealed-secret or an external secret store instead of committing them. Let the default topology values Syself Autopilot fills in be reconciled rather than fought over (see ).

Where to go next#

If you are new to the platform, you may also want to read the first.