-
Notifications
You must be signed in to change notification settings - Fork 246
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
feat: allow csi-snapshotter to be enabled without installing CRDs #481
feat: allow csi-snapshotter to be enabled without installing CRDs #481
Conversation
Welcome @navilg! |
Hi @navilg. Thanks for your PR. I'm waiting for a kubernetes-csi member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/easycla |
Is there ever a situation where only some of the snapshot CRD should be enabled? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there ever a situation where only some of the snapshot CRD should be enabled?
there are imho two scenarios
- the user has external-snapshotter already installed for some other CSI driver
- in this case, it makes sense to not install CRDs and resources related to the snapshot-controller
- the user doesn't have external-snapshotter at all
- in this case, they will need all of the CRDs and the controller as well
I would be in favour of introducing just a single config knob for the snahpshot-controller related resources and CRDs combined, wdyt?
A cluster may have multiple csi-drivers of other third-party or cloud-native storage solutions. In those cases (scenario 1), CRDs will already exist and helm install will fail. So single config knob for snapshot-controller and CRDs combined would be problematic here. imo, if external-snapshotter is enabled AND CRDs are enabled, in that case only CRDs should be deployed. Instead of multiple knobs (each for one CRD), We may look into having single knob for all 3 CRDs. And we can keep external snapshotter and CRDs enabled by default. |
My point is more why do we need a separate boolean value for each of the 3 CRDs? Why not a single one to enable/disable all 3 CRDs. I don't think there's ever a situation where a cluster admin would only install 2 of the 3 CRDs for snapshots, right? Also, I'm getting a parse error with the latest version of the PR:
for values:
|
As far as the knobs go, I think it may be useful to decouple the CRDs and the But the original issue in #467 (clarified here) was the need to decouple:
That way a cluster admin could install the CRDs and/or Right now both the csi-driver-nfs/charts/latest/csi-driver-nfs/templates/csi-snapshot-controller.yaml Line 1 in 748bde3
csi-driver-nfs/charts/latest/csi-driver-nfs/templates/csi-nfs-controller.yaml Lines 69 to 85 in 748bde3
|
+1
+1 and all of my thumbs are up |
Yeah. We can have one config to enable/disable all 3 CRDs instead of having them individually enabled/disabled. |
So a separate knob for CRDS (one for all three CRDs) and another knob for |
I would keep the sidecar controlled only by I would just stick to the description in #467, imho it proposes ideal solutions. |
I think this works. Another option is to use the That way, CRDs can be skipped with the There is really no "good" way to do CRDs with helm, only least-bad ways depending on the situation (for example |
If moved to the crds dir, make sure you have at least one release where the old crd has the helm annotation to cause it to not delete it when its removed from helm manifest maintenance. |
Yeah, I think this would require very specific upgrade instructions to preserve CRD state without accidentally removing them. |
agree, we only need on boolean for all the 3 CRDs |
Replaced three boolean values with single boolean value to install (or not install) all 3 CRDs. |
@navilg could you rebase to master branch and also squash all commits? thanks. |
ecf9751
to
3d3bc3d
Compare
@andyzhangx Done |
/ok-to-test |
77be759
to
7b636c8
Compare
Not sure I need to file another issue for this or not.... Say I have the external snapshoter installed via: https://artifacthub.io/packages/helm/piraeus-charts/snapshot-controller With this flag it still seems like there is some missing functionality to be able to share a snapshot-controller like this? https://github.com/kubernetes-csi/csi-driver-nfs/blob/master/charts/v4.4.0/csi-driver-nfs/templates/csi-nfs-controller.yaml#L69-L85 is still needed to be enabled, but the whole controller is also deployed in that case? https://github.com/kubernetes-csi/csi-driver-nfs/blob/master/charts/v4.4.0/csi-driver-nfs/templates/csi-snapshot-controller.yaml#L1 |
@kfox1111 good catch, I will fix this after this PR merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andyzhangx, navilg The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind bug
What this PR does / why we need it:
When VolumeSnapshot,VolumeSnapshotClass or VolumeSnapshotContent CRD already exists on K8s cluster, helm fails to install the chart on cluster if externalSnapshotter is enabled.
With these changes, externalSnapshotter can be enabled without trying to re-create those CRDs if they are already present in cluster.
Which issue(s) this PR fixes:
Fixes #467
Special notes for your reviewer:
Does this PR introduce a user-facing change?: