-
Notifications
You must be signed in to change notification settings - Fork 253
Open
Milestone
Description
The prevalent opinion on how to do CI/CD right is to keep things in one branch, not use many.
Using Fleet this can be realized in two different ways:
- one GitRepo resources pointing to several paths.
- Many different GitRepo resources pointing to the same git repository but using multiple, different paths, and
Both ways pose challenges in the way they are implemented in Fleet.
- Having one GitRepo resource pointing to many paths in the git repository leads to the Bundles for all paths to be recreated if a commit is added to the git repository, even if content for the path has not changed.
- See Limit git clone to latest commit #3136 for only cloning the last commit and sparse checkouts
- Having many GitRepo resources pointing to the same git repository leads to the same git repository being polled for changes, cloned and updated many times.
- apply creates bundles, several have unchanged resources, but a new commit
- bundle reconciler processes bundles
- lists all bundledeployments
- calculates all bundledeployments
- creates next 50, requeues
When multiple GitRepos use the same branch and different paths to define bundles, a single commit to that branch triggers all associated GitRepos. Each GitRepo recreates its bundles even if only one path changed.
graph LR
A[Commit to Shared Branch - modify only path **b**] --> B[GitRepo 1 / path a]
A --> C[GitRepo 2 / path a,b,c]
B --> D[Recreate Bundle a]
C --> G[Recreate Bundle a]
C --> E[Recreate Bundle **b**]
C --> F[Recreate Bundle c]
Metadata
Metadata
Assignees
Type
Projects
Status
To Triage