Render manifests from DRY formats (e.g., Helm, Kustomize) in git
ConfigHub can render DRY configuration generation formats such as Helm and Kustomize from git using its standard worker. This page covers two paths:
- The unit-level model — how a single renderer unit plus a rendered ("wet") unit works. This is the primitive used by everything else.
cub gitops discover/cub gitops import— the bulk flow that brings an existing Argo CD or Flux cluster under ConfigHub management, inserting ConfigHub into the middle of the GitOps pipeline.
The unit-level model
The high-level model is:
- The GitOps tool of your choice (currently Flux or ArgoCD) and the worker must be running in your Kubernetes cluster. For ArgoCD, the worker calls ArgoCD, so
ARGOCD_SERVERmust be set to the cluster DNS name for ArgoCD's server, such asargocd-server.argocd.svc.cluster.local,ARGOCD_AUTH_TOKENmust be set to a valid token, andARGOCD_INSECUREshould be set totrueif targeting the service directly. Flux is not called directly, so the worker doesn't require additional configuration for that. - Create a unit with
ToolchainTypeKubernetes/YAMLcontaining the KRM resource from the GitOps tool specifying what / how to render. For Flux, this would be aHelmReleaseorKustomizationresource and for ArgoCD it would be anApplicationresource. Any source repository resources referenced must already exist in the cluster. They could be applied using other units. - Attach a Target that supports the corresponding renderer bridge
ProviderType,FluxRendererorArgoCDRenderer. - Create a corresponding empty unit of
ToolchainTypeKubernetes/YAMLto receive the rendered configuration. - Link the empty unit to the renderer unit using
UpdateTypeMergeUnitsandUseLiveStatetrue. For example:cub link create --space "$SPACE" - rendered-unit renderer-unit --use-live-state --auto-update --update-type MergeUnits - Apply the renderer unit. The rendered configuration will automatically be copied to the rendered unit in the case that
--auto-updatewas specified. In the case that the link is not set to auto-update, the rendered unit can be updated as follows:cub unit update --space "$SPACE" --patch --resolve "Link:*" rendered-unit
The merge behavior is the same as for unit upgrades, so changes made to the rendered unit will not be clobbered by subsequent re-renderings by the renderer unit.
Importing a GitOps-managed cluster with cub gitops
If you are already deploying with Argo CD or Flux, cub gitops discover and cub gitops import insert ConfigHub into the middle of the pipeline. The result: manifests are rendered into ConfigHub and then deployed from ConfigHub via Argo CD (or Flux) through an OCI image fetched from ConfigHub. That gives you versioning, validation, policy enforcement, review, and approval on the fully rendered configuration — and modifications made in ConfigHub are preserved across re-renders, similar to patches.
What gets created
cub gitops discover --space <space> <target> queries the cluster through the worker and reports the Argo CD Application resources and/or Flux HelmRelease / Kustomization resources it finds.
cub gitops import --space <space> <target> then:
- Creates dry units containing those Application / HelmRelease / Kustomization resources. Each dry unit has a Target attached that supports the corresponding renderer bridge (
ArgoCDRendererorFluxRenderer). Dry units are the renderer inputs. - Creates corresponding wet units that will hold the rendered manifests, linked to their dry unit via a
MergeUnitslink withUseLiveState: true. CRDs are split into separate wet units during this process. - Sets each wet and CRD unit's
ProviderTypetoArgoCDOCIorFluxOCIso that applying it deploys through ConfigHub's OCI registry via the GitOps tool. A single Target can carry multipleConfigTypes(e.g.ArgoCDRendererandArgoCDOCI) — the unit'sProviderTypeselects which bridge on that Target handles the unit, which is why one target slug can serve discovery, rendering, and deployment at once. - For Argo CD: disables auto-sync on the imported
Applicationresource (the existing one should remain in the cluster but must not be manually synced or deleted — ConfigHub now owns the rendered output). - For Flux: suspends the imported
HelmReleaseorKustomizationfor the same reason.
When a single worker hosts the discovery, renderer, and OCI bridges — e.g. installed with -t kubernetes,argocdrenderer,argocdoci — a single target slug (such as worker-kubernetes-yaml-cluster) is sufficient for all three steps, because the renderer and OCI capabilities register as additional ConfigTypes on that target.
Rendering and deploying
Applying a dry unit invokes its renderer bridge:
- The
ArgoCDRendererbridge calls Argo CD to render the manifests — similar in effect toargocd app manifests— and returns the result to ConfigHub as LiveState. - The
FluxRendererbridge performs the equivalent rendering forHelmRelease/Kustomizationresources.
The linked wet unit receives that rendered LiveState as its Data. You can then review, modify, validate, approve, and apply the wet units.
Applying a wet (or CRD) unit deploys the rendered manifests via the ArgoCDOCI or FluxOCI bridge. ConfigHub's worker creates a new Argo CD Application (or Flux HelmRelease / Kustomization) that fetches an OCI image from ConfigHub's OCI registry and deploys it to the cluster. The new GitOps resource takes over the workload that the original, now-suspended resource was managing.
Updating after a git change
After a change is made to DRY configuration in git (helm values, templates, or kustomizations):
- Re-apply the corresponding dry unit(s) to re-render. The renderer bridge pulls the latest from git and produces updated manifests.
- Review the diff on the linked wet units. Modifications previously made to a wet unit are preserved — the merge behavior matches unit upgrades.
- Approve and apply the updated wet units to roll the change out through Argo CD / Flux.
Example walkthrough
A working end-to-end example using Argo CD on a local kind cluster — including worker installation with the three bridges — is available at GitOps Import with ArgoCD and in the confighub/examples/gitops-import repository.