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

Add logic to create volume from volumecontentsource #39

Merged
merged 5 commits into from
Dec 16, 2024

Conversation

hlts2
Copy link
Member

@hlts2 hlts2 commented Dec 10, 2024

WHAT

I have added logic to create volume from volumecontentsource.

WHY

To support volume snapshot, it is necessary to implement functionality to handle case where a user requests the creation of volume from snapshot using a manifest like the one shown below.

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: csi-pvc-restore
spec:
  dataSource: # <-------------- this 
    name: new-snapshot
    kind: VolumeSnapshot
    apiGroup: snapshot.storage.k8s.io
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
  storageClassName: civo-volume

FYI

⚠️ The client-side implementation is not yet complete, so some parts are impelemented with comments. Once all the implementations are finished, I will uncomment the code.

@hlts2 hlts2 changed the title [WIP]: Add logic to create volume from volumecontentsource Add logic to create volume from volumecontentsource Dec 10, 2024
@hlts2 hlts2 marked this pull request as ready for review December 10, 2024 05:39
@hlts2 hlts2 self-assigned this Dec 10, 2024
Copy link
Member

@rytswd rytswd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly LGTM, just left a couple of questions 🙏

pkg/driver/controller_server.go Outdated Show resolved Hide resolved
pkg/driver/controller_server.go Show resolved Hide resolved
@hlts2 hlts2 requested a review from rytswd December 11, 2024 03:03
Copy link
Member

@rytswd rytswd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We certainly would like to have tests, but cannot test against a commented out code 😆
Thanks, LGTM for now!

@hlts2
Copy link
Member Author

hlts2 commented Dec 16, 2024

@rytswd Thank you for reviewing! I will merge this PR! 🚀
I will add test codes after client codes are ready. Thank you 🙏

@hlts2 hlts2 merged commit fd56387 into master Dec 16, 2024
6 checks passed
@hlts2 hlts2 deleted the fix/snapshot/create-volume branch December 16, 2024 05:26
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