Open verult opened 3 years ago
Here's reasons I can think of:
Pros of combining sidecars:
--leader-election
where we've had consistency issues in the pastCons/challenges:
Instead of going from one sidecar per repo
to all sidecars in one repo
, should we also consider something in the middle where we combine some sidecars into one repo but leave others in their own repos?
This something we discussed way back in Kubecon San Diego 2019 F2F. Here is an (now old) example: https://github.com/lpabon/csi-controller
We still need separate common library repos and tooling since csi drivers are using them
Those could be included in a single repo via individual go.mod files in sub-directories.
Let me add another Pro:
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale
Instead of going from one sidecar per repo to all sidecars in one repo, should we also consider something in the middle where we combine some sidecars into one repo
Another approach I've seen is a single repo with multiple packages like what https://lerna.js.org/ manages, we'd keep the source code of each project isolated in its own directory (minus the common code which would be another package in the repo) and still having the same artifacts as if they were on their own.
In lerna versioning has two modes, fixed
where there's a single shared version for all the packages (like a repo version) and independent
where each package can have its own release cycle. We could have something similar for go modules.
The directory structure could be something like:
.cloudbuild.yml
Makefile
release-tools/
packages/
csi-lib-utils/
external-attacher/
external-provisioner/
external-resizer/
external-snapshotter/
The sidecars would refer to csi-lib-utils with a go replace line in their go.mod file.
Pros:
less confusion for driver authors on which combination of sidecars to use
because there would be a single version for all of themCons:
make -j
Storage capacity tracking can react to all operations that may affect capacity, like resizing. Currently it is limited to volume provisioning and deletion.
With a single repo we could test both images (provisioner and resizer) on presubmit
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/reopen
/remove-lifecycle rotten
Please send feedback to sig-contributor-experience at kubernetes/community.
/close
@k8s-triage-robot: Closing this issue.
/remove-lifecycle rotten /reopen
@mauriciopoppe: Reopened this issue.
/lifecycle frozen
Opening this issue to discuss the feasibility, benefits, and drawbacks of combining CSI controller sidecars and maintaining less repos and images.
One downside of the current "microservices" model of maintaining one controller per repo/image is that an update to a common library,
csi-lib-utils
for example, requires manual changes that are sometimes duplicated across multiple controllers. One possible solution is to combine controllers into one binary, modeling afterkube-controller-manager
.Combining sidecars is non-trivial and would require a strong signal that the improvements are worth the engineering effort. To make such a signal more visible, this bug could be used to collect potential pain points in the current model that are hard to address by other means.
AFAIK there has been some thoughts and work in this area in the past. If you have thought about this, let us know what you think. Thanks!
/cc @chrishenzie