-
Notifications
You must be signed in to change notification settings - Fork 787
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Snapshotter sidecar is deployed by Helm chart even if enableVolumeSnapshot == false #942
Comments
@wongma7 Do we want to make the snapshot functionality something that can be disabled again? We removed the option from the controller since it moved out of alpha but if it is going to cause issues without the controller then maybe we need the flag still. Did was there ever a decision about whether this chart would continue to install the snapshot controller or expect it to already be installed? It seems like even if we add a toggle back it should be different or work in conjunction with the one to install the controller. Someone who wants the sidecar might have already installed the controller and we don't want to install a second one, right? |
If we do offer again an option to disable it, and I'm not sure if we should yet, then I would like to name it differently to disambiguate installing the sidecar ( This PR is adding functionality to install the CRDs https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/938/files#diff-1d5fa767c508a62e96682164464f2a7a08d37010ba05aaaa1b59ec98578fb6feR1, let's discuss further there. IMO it makes sense to install the snapshot controller and CRDs by default, because there are users who expect the EBS helm chart to "just work" i.e. to install the controller and CRDs. It's too early to expect the snapshot controller to already be installed, kops has started to install the controller and CRDs only recently with 1.20. And if the CRDs are already installed, the helm install command fails with a message saying that, so there's no risk of having an extra install. So IMO |
Another idea: snapshotController.enable = true/false |
I've got to say I'm happy with any solution that gets rid of the errors. I think the main issue with baking the CRDs into the deployment would be if they conflict with anything else also installing them, e.g. if the cluster managers start to deploy them by default. I get the impression though that volume snapshots is an optional feature, and if that's the case, then I think it makes sense to allow the sidecar to be optional too. |
If this project decides the snapshotting feature should be mandatory, and I don't have an opinion either way, then I think installing the CRDs and snapshot controller should be listed as a prerequisite, rather than being sort of half, or even fully installed by this chart. After all, I might have installed them from somewhere else for another reason, they're on a different release cycle, etc. |
I think the snapshotter sidecar spitting out errors shouldn't affect the operation of the rest of the driver, but the Pod will show 5/6 containers unhealthy, so I understand obviously it would be better without the errors. Yes the feature is optional, it's just that with the 3 moving pieces involved (CRDs, snapshot controller, snapshot sidecar) all having to be compatible/updated in lockstep, it's not trivial to provide a single switch to turn it on and off, and clearly our helm chart has failed to do* this since if they are already installed Baking the CRDs into helm isn't an issue, helm should figure it out for us: https://helm.sh/docs/chart_best_practices/custom_resource_definitions/. So with the fix from #938, if enableVolumeSnapshot is true we'll install the CRDs ,not just the controller.
I'm now inclined to agree after a lot of waffling on this issue. originally I was sure we should not install the snapshot controller at all, see #635, because we are essentially duplicating the distribution efforts by e.g. kubernetes distros like kops or the snapshot controller repo itself which provides its own templates. But, at the time kops didn't actually install them by default and the feature (i.e. the CRDS) were still beta, so as you can see the issue closed and we continued maintaining the snapshot controller installation til now. As of kops 1.20, they install the snapshot controller and CRDs by default, so I think it would be fair for us to in the next helm release (2.0.0?) just stop installing the CRDs and snapshot controller altogether and list it as prerequisite, with a link to snapshot-controller repo... |
/kind bug
What happened?
When disabling snapshots, the ebs-snapshot-controller is no longer deployed, but the snapshot sidecar in the ebs-csi-controller is still deployed, causing repeated errors in the logs if the snapshot CRDs have not been deployed.
Example:
What you expected to happen?
In addition to not deploying the snapshot controller itself, it should not deploy the snapshot sidecar for the ebs-csi-controller pod, or at least disable it so that I don't get errors about a feature I don't need.
How to reproduce it (as minimally and precisely as possible)?
On a 1.19 or 1.20 cluster without the
SnapshotVolumeContent
andSnapshotVolumeClass
CRDs, deploy the EBS-CSI Helm chart 1.2.0-1.2.2 withenableVolumeSnapshot = false
and tail the ebs-csi-controller pod logs.Anything else we need to know?:
I believe this worked in an earlier version of the chart, but I'm afraid I don't remember in what version.
From what I can tell, the snapshot controller stateful set checks the
enableVolumeSnapshot
flag, but the ebs-csi-controller does not check it for the csi-snapshotter sidecar container.Environment
kubectl version
):The text was updated successfully, but these errors were encountered: