Skip to content
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

Introduce external snapshotter and snapshot controller for VolumeSnapshot support #35

Merged
merged 10 commits into from
Dec 4, 2024

Conversation

hlts2
Copy link
Member

@hlts2 hlts2 commented Nov 27, 2024

WHAT

I have added k8s manifest for VolumeSnapshot support.
This PR contains the following components.

  • external-snapshotter sidecar
    • This compoent watches the Kubernetes API server for VolumeSnapshotContent CRD objects.
  • snapshot controller
    • The component will be watching the Kubernetes API server for VolumeSnapshot and VolumeSnapshotContent CRD objects. The CSI external-snapshotter sidecar only watches the Kubernetes API server for VolumeSnapshotContent CRD objects. The snapshot controller will be creating the VolumeSnapshotContent CRD object which triggers the CSI external-snapshotter sidecar to create a snapshot on the storage system.

WHY

We have plan to support VolumeSnapshot in the civo-csi driver.
Apart from the implementation of csi driver handler, the k8s manifest also needs to be added, so it will be added in this PR.

⚠️ FYI

  • The csi-snapshotter is in error, but this error will be fixed after driver implementation(Create, Delete, List handler) is complete.
    swappy-20241202-142340

  • The following is an error message

❯ stern civo-csi-controller -c csi-snapshotter
+ civo-csi-controller-0 › csi-snapshotter
civo-csi-controller-0 csi-snapshotter I1202 05:23:57.914070       1 main.go:108] Version: v8.1.0
civo-csi-controller-0 csi-snapshotter I1202 05:23:57.914820       1 connection.go:234] "Connecting" address="unix:///var/lib/kubelet/plugins/csi.civo.com/csi.sock"
civo-csi-controller-0 csi-snapshotter I1202 05:23:57.916350       1 connection.go:264] "GRPC call" method="/csi.v1.Identity/GetPluginInfo" request="{}"
civo-csi-controller-0 csi-snapshotter I1202 05:23:57.916870       1 connection.go:270] "GRPC response" response="{\"name\":\"csi.civo.com\",\"vendor_version\":\"0.0.1\"}" err=null
civo-csi-controller-0 csi-snapshotter I1202 05:23:57.916881       1 main.go:190] CSI driver name: "csi.civo.com"
civo-csi-controller-0 csi-snapshotter I1202 05:23:57.916891       1 common.go:143] "Probing CSI driver for readiness"
civo-csi-controller-0 csi-snapshotter I1202 05:23:57.916911       1 connection.go:264] "GRPC call" method="/csi.v1.Identity/Probe" request="{}"
civo-csi-controller-0 csi-snapshotter I1202 05:23:58.743969       1 connection.go:270] "GRPC response" response="{\"ready\":{\"value\":true}}" err=null
civo-csi-controller-0 csi-snapshotter I1202 05:23:58.744022       1 connection.go:264] "GRPC call" method="/csi.v1.Controller/ControllerGetCapabilities" request="{}"
civo-csi-controller-0 csi-snapshotter I1202 05:23:58.744627       1 connection.go:270] "GRPC response" response="{\"capabilities\":[{\"Type\":{\"Rpc\":{\"type\":1}}},{\"Type\":{\"Rpc\":{\"type\":2}}},{\"Type\":{\"Rpc\":{\"type\":3}}},{\"Type\":{\"Rpc\":{\"type\":4}}},{\"Type\":{\"Rpc\
":{\"type\":9}}}]}" err=null
civo-csi-controller-0 csi-snapshotter E1202 05:23:58.744646       1 main.go:221] CSI driver csi.civo.com does not support ControllerCreateSnapshot
- civo-csi-controller-0 › csi-snapshotter

I will add an example manifest after all the implementation is complete.

@hlts2 hlts2 requested a review from rytswd November 27, 2024 02:44
@hlts2 hlts2 self-assigned this Nov 27, 2024
@hlts2 hlts2 changed the title [WIP] Introduce external snapshotter and snapshot controller Introduce external snapshotter and snapshot controller Dec 2, 2024
@hlts2 hlts2 changed the title Introduce external snapshotter and snapshot controller Introduced external snapshotter and snapshot controller for VolumeSnapshot support Dec 2, 2024
@hlts2 hlts2 marked this pull request as ready for review December 2, 2024 05:43
@hlts2 hlts2 changed the title Introduced external snapshotter and snapshot controller for VolumeSnapshot support Introduce external snapshotter and snapshot controller for VolumeSnapshot support Dec 2, 2024
@hlts2
Copy link
Member Author

hlts2 commented Dec 4, 2024

@RealHarshThakur
Thank you for reviewing this PR!
I will merge it 🚀

@hlts2 hlts2 merged commit 5c71fef into master Dec 4, 2024
6 checks passed
@hlts2 hlts2 deleted the feat/introduce-external-snapshotter branch December 4, 2024 02:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants