This repository is a Rancher Fleet “bootstrap” GitOps repo. It contains a Helm chart that provisions Fleet GitRepo (and optional HelmOp) resources, which Fleet then uses to deploy other GitOps repositories (and Helm workloads) across your clusters.
- You register this repo in Fleet (typically as a
GitRepoin thefleet-localnamespace on the management cluster). - Fleet detects the Helm chart (
Chart.yaml) and renders it. - The chart creates downstream
fleet.cattle.iocustom resources (GitRepo/HelmOp) fromvalues.yaml. - Fleet reconciles those resources and deploys the referenced repos/charts to clusters selected via labels/selectors.
Edit values.yaml:
gitrepos: list of FleetGitReporesources to create.helmrepos: list of FleetHelmOpresources to create (optional).
name(required): resource name and default cluster-label key.namespace(optional, defaultfleet-default): usefleet-localfor local-only repos.description,labels(optional): metadata helpers.- Repository URL parts (optional):
repo_domain(defaulthttps://github.com)repo_path(defaultgorizond)repo(default<name>)
- Other optional Fleet fields:
targetNamespace,clientSecretName,imageScanInterval,imageScanCommit,ociRegistrySecret,keepResources. - Targeting helpers (optional):
clusterGroups: list of Fleet cluster groupsclusterSelector: label map for an additional selector targettargets: list of additional label keys (each expects<key>=enabled)
name(required): resource name and default cluster-label key.namespace(optional, defaultfleet-default): usefleet-localfor local-only HelmOps.description,labels(optional): metadata helpers.helm(required): YAML object rendered intoHelmOp.spec.helm(for example:repo,chart,releaseName,version,values).dependsOn(optional): YAML list rendered intoHelmOp.spec.dependsOn.targetNamespace(optional): rendered intoHelmOp.spec.namespace.- Targeting helpers (optional):
clusterGroups,clusterSelector,targets(same behavior asgitrepos[]).
For every downstream entry that is not in fleet-local, the chart always adds a target selector matching clusters labelled:
<name>=enabled
Example: to enable a downstream repo named fleet-cert-manager on a cluster, add the label fleet-cert-manager=enabled to that cluster in Rancher.
Register this repository in Fleet (Rancher UI) or apply a GitRepo manifest like:
apiVersion: fleet.cattle.io/v1alpha1
kind: GitRepo
metadata:
name: fleet-gitops
namespace: fleet-local
spec:
repo: https://github.com/<org-or-user>/fleet-gitops
branch: main
paths:
- .After it reconciles, Fleet will create the downstream GitRepo/HelmOp resources defined in values.yaml.
helm template fleet-gitops . -f values.yaml- Downstream
GitRepo.spec.branchis currently set tomainintemplates/git-repos.yaml.