source-controller
source-controller copied to clipboard
Feature: autodiscovery for repositories of gitlab group
We want to sync all git repositories within a gitlab group/subgroup. The source-controller should do some kind of autodiscovery of all repos in the gitlab group path.
Use-case scenario:
- We have a gitlab server with a group named cluster-configs
- gitlab.example.domain/cluster-configs
- We have a central k8s cluster with flux2
- gitlab.example.domain/cluster-configs/crossplane-master
- This k8s is managing itself via flux2 and crossplane
- Customers can create repos within that group with there individual kustomizations
- gitlab.example.domain/cluster-configs/cluster-customer1
- gitlab.example.domain/cluster-configs/cluster-customeX
- Each time a repo is created it is fetch by source-controller/kustomize-controller
/cc @haarchri
From a design perspective, this inquiry makes me grumble, but I acknowledge the value of centralizing config for an org.
We're talking about ways that this could be implemented which would not be magical or against the core principles of GitOps. You would need an object that describes the org itself, which could impute values for downstream GitRepos and generate them, almost like a GitLabOrganization Controller for Flux?
We don't have anything like this on the roadmap now, but if you're interested in building something like this, we have a fair amount of documentation about how to build your own controllers on top of the GitOps Toolkit:
https://fluxcd.io/docs/gitops-toolkit/source-watcher/