Skip to content

Conversation

@Pearl1594
Copy link
Member

  • Support for Project
  • Support for volume snapshots - create, delete, restore
  • increase leniency of pod anti affinity rule
  • Add support for VMware & XenServer

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Pearl1594 added 30 commits July 7, 2025 09:10
Fix image references and increase leniency of the pod anti affinity rule
 Support for identifying device paths for attached volumes on Vmware and XenServer
Add support for Volume snapshot for CloudStack CSI driver
@rohityadavcloud
Copy link
Member

LGTM. Let's not squash merge but merge the PR branch to retain commit history. cc @Pearl1594 @kiranchavala @weizhouapache @vishesh92

@vishesh92 vishesh92 requested a review from Copilot September 12, 2025 08:39
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the CloudStack CSI driver with volume snapshot functionality and improved hypervisor support. The main focus is implementing snapshot operations (create, delete, restore), adding support for VMware and XenServer platforms, and improving device detection algorithms.

Key changes include:

  • Implementation of volume snapshot operations for CloudStack CSI driver
  • Addition of VMware and XenServer support for device path detection
  • Enhanced project support across CloudStack API calls
  • Improved controller scheduling flexibility

Reviewed Changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 25 comments.

Show a summary per file
File Description
pkg/driver/controller.go Implements snapshot operations and volume restoration from snapshots
pkg/cloud/snapshots.go New file providing CloudStack snapshot API operations
pkg/cloud/volumes.go Adds project support and volume creation from snapshots
pkg/mount/mount.go Adds VMware/XenServer device detection with improved retry logic
deploy/k8s/controller-deployment.yaml Adds snapshot controller containers and relaxes pod anti-affinity
deploy/k8s/00-snapshot-crds.yaml New file defining Kubernetes snapshot CRDs
Various example and deployment files Adds snapshot configuration examples and RBAC permissions
Comments suppressed due to low confidence (1)

pkg/mount/mount.go:1

  • Replace fmt.Printf statements with structured logging using klog. This improves log consistency and allows for proper log level control.
// Package mount provides utilities to detect,

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Member

@kiranchavala kiranchavala left a comment

Choose a reason for hiding this comment

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

LGTM, tested the following cases

Test Case Execution Result
CSI driver should deploy on kvm hypervisor Pass
CSi driver should deploy on Vmware Pass
CSi driver should deploy on Xenserver Pass
CSI option should be displayed in the CKS cluster creation form and in the details Pass
CSI driver should be installed when an external cks node is added to the k8s cluster Pass
CSI driver should work fine when autoscaling is enabled on the cks cluster Pass
Test the creation of storage class , persistent volume, persistent volume claim and pod which uses the pv Pass
Test the persistent volume resize feature Pass
Test the reclaimPolicy and volumeBindingMode of a storage class Pass
Test the deletion of storage class , persistent volume and persistent volume claim Pass
Test the deployment of csi driver on a capc cluster Pass
Test the creation of storage class , persistent volume and persistent volume claim, snapshots on a capc cluster Pass
Test the creation snapshot for the persistent volume Pass
Test the creation of persistent volume from snapshot Pass
Test the deletion of the volume snapshots of a persistent volume Pass
Test the nodeSelector option in the pod specification to make persistent volume attaches to the correct node Pass
Test the custom disk offering with tags matching to a particular primary storage Pass
Test the csi driver on a cks cluster deployed in a project Pass
Test the csi driver on a cks cluster deployed in a user account Pass
Test the cks driver on a cks cluster deployed under a domain Pass
Test the cks driver on a isolated network Pass
Test the cks driver on a shared network Pass
Test the cks driver on vpc network Pass
Test the csi driver on a routed mode network Pass
Test deletion of cks cluster when reclaim policy is set to Retain and Delete Pass
Test the upgrade of k8s cluster with csi driver enabled Pass

Copy link
Member

@vishesh92 vishesh92 left a comment

Choose a reason for hiding this comment

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

clgtm

@Pearl1594 Pearl1594 merged commit 6eea15f into main Oct 1, 2025
0 of 2 checks passed
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.

5 participants