How to use Fluxcd with microservices where multiple gitrepos and multiple branches and their history come in place #5087
Unanswered
prathamesh-0909
asked this question in
General
Replies: 2 comments 1 reply
-
Flux bootstrap can be run only once per cluster, you would do this for a fleet repo which has a single branch e.g. main and from where you onboard all the apps by creating a GitRepo/Kustomization pair for each one. Depending on the cluster env, you will use Kustomize overlays in the fleet repo to change things like the branch name and any other env-specific app settings. An example of this can be found here: https://github.com/fluxcd/flux2-multi-tenancy And a more complex example here: https://github.com/controlplaneio-fluxcd/d1-fleet |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am currently using gitlab and we had a decision of placing our k8s deployment files into the code itself under a folder named deployments. As we plan to connect gitlab agent with our k8s cluster. I wonder how to flux bootstrap flux for my 20+ microservices (each being a different project in gitlab under the same group).
Previously we used to deploy k8s deployment files from a single git repo for each env (dev, staging, QA) but now we have decided to place deployment files in the code itself.
I have no idea, how to bootstrap flux for all projects under a group in gitlab and how to bootstrap flux to multiple branches like dev, testing, and etc. As deployment files merging to dev branch in the code will affect the configurations of resources at dev env in my cluster whereas as changes to the deployment files at testing branch in the same repo will change the configurations of the resources in testing env and so on.
How should I flux bootstrap flux for multiple git repos and multiple git branches in each repo and how should I bootstrap flux whenever I need to introduce a new service in the project. Do I need to bootstrap every service again, or bootstrap the only new service will work?
Is there any way I can select all projects under a gitlab group or subgroup?
Also let me know if storing deployment files in the code repo is a good idea or bad idea?
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions