Skip to content

GitOps

Git-based delivery for your local cluster.

LoKO GitOps connects Forgejo to a GitOps controller (FluxCD or ArgoCD), so commits become cluster state.

  • A Forgejo gitops repository used as the reconciled source of truth.
  • A sample-webapp repository with CI workflows for build, PR previews, and promote-to-prod.
  • Automatic reconcile on push via webhooks (plus periodic polling).
  • Provider-aware PR preview generation.
  • Forgejo hosts repos, webhooks, and Forgejo Actions.
  • Provider (FluxCD or ArgoCD) watches Git and applies state.
  • GitOps repo (gitops) contains clusters/<env>/ and app overlays.
CapabilityFluxCDArgoCD
PR trigger modeIntent label preview, deploy label preview-builtIntent label preview, deploy title suffix [preview-built]
PR generator modelResourceSetInputProvider + ResourceSetApplicationSet pullRequest generator
Preview hostsample-webapp-pr-{N}.<apps-domain>sample-webapp-pr-{N}.<apps-domain>
  1. Run loko gitops init.
  2. Commit to gitops to reconcile manifests.
  3. Open PRs in sample-webapp to build preview images.
  4. Add the preview label when you want a PR image pushed to the container registry, then use /preview if you want to activate it later on an existing PR.
  5. Promote approved image to prod via workflow.
Terminal window
loko gitops init --provider fluxcd
loko gitops status
loko gitops reconcile # trigger immediate reconciliation of root construct
loko gitops reset # destroy + re-initialize (keeps gitops.enabled: true)
loko gitops destroy