This is an automated email from the ASF dual-hosted git repository. pearl11594 pushed a commit to branch add-support-csi-projects in repository https://gitbox.apache.org/repos/asf/cloudstack.git
commit 7d2a7b9ca9b0c3e9efaa9cbf479848339737c857 Author: Pearl Dsilva <pearl1...@gmail.com> AuthorDate: Tue Jul 29 12:45:28 2025 -0400 update response --- api/src/main/java/org/apache/cloudstack/api/ApiConstants.java | 1 + .../cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java | 1 + .../apache/cloudstack/api/response/KubernetesClusterResponse.java | 8 ++++++++ .../src/main/resources/script/deploy-csi-driver | 6 +++--- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/api/src/main/java/org/apache/cloudstack/api/ApiConstants.java b/api/src/main/java/org/apache/cloudstack/api/ApiConstants.java index e3926a56d78..9c477258681 100644 --- a/api/src/main/java/org/apache/cloudstack/api/ApiConstants.java +++ b/api/src/main/java/org/apache/cloudstack/api/ApiConstants.java @@ -299,6 +299,7 @@ public class ApiConstants { public static final String IP_TOTAL = "iptotal"; public static final String IS_CONTROL_NODE = "iscontrolnode"; public static final String IS_CLEANUP_REQUIRED = "iscleanuprequired"; + public static final String IS_CSI_ENABLED = "iscsienabled"; public static final String IS_DYNAMIC = "isdynamic"; public static final String IS_EDGE = "isedge"; public static final String IS_ENCRYPTED = "isencrypted"; diff --git a/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java b/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java index a39b5bba58c..c5776695064 100644 --- a/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java +++ b/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/KubernetesClusterManagerImpl.java @@ -880,6 +880,7 @@ public class KubernetesClusterManagerImpl extends ManagerBase implements Kuberne response.setMinSize(kubernetesCluster.getMinSize()); response.setMaxSize(kubernetesCluster.getMaxSize()); response.setClusterType(kubernetesCluster.getClusterType()); + response.setCsiEnabled(kubernetesCluster.isCsiEnabled()); response.setCreated(kubernetesCluster.getCreated()); return response; diff --git a/plugins/integrations/kubernetes-service/src/main/java/org/apache/cloudstack/api/response/KubernetesClusterResponse.java b/plugins/integrations/kubernetes-service/src/main/java/org/apache/cloudstack/api/response/KubernetesClusterResponse.java index b811f4f9dcb..b03d3b38411 100644 --- a/plugins/integrations/kubernetes-service/src/main/java/org/apache/cloudstack/api/response/KubernetesClusterResponse.java +++ b/plugins/integrations/kubernetes-service/src/main/java/org/apache/cloudstack/api/response/KubernetesClusterResponse.java @@ -204,6 +204,10 @@ public class KubernetesClusterResponse extends BaseResponseWithAnnotations imple @Param(description = "Maximum size of the cluster") private Long maxSize; + @SerializedName(ApiConstants.IS_CSI_ENABLED) + @Param(description = "Indicates if the CloudStack CSI driver has been setup in the cluster") + private Boolean isCsiEnabled; + @SerializedName(ApiConstants.CLUSTER_TYPE) @Param(description = "the type of the cluster") private KubernetesCluster.ClusterType clusterType; @@ -515,4 +519,8 @@ public class KubernetesClusterResponse extends BaseResponseWithAnnotations imple public void setCniConfigName(String cniConfigName) { this.cniConfigName = cniConfigName; } + + public void setCsiEnabled(Boolean csiEnabled) { + isCsiEnabled = csiEnabled; + } } diff --git a/plugins/integrations/kubernetes-service/src/main/resources/script/deploy-csi-driver b/plugins/integrations/kubernetes-service/src/main/resources/script/deploy-csi-driver index 1f97b66ff4c..5c66698d82a 100644 --- a/plugins/integrations/kubernetes-service/src/main/resources/script/deploy-csi-driver +++ b/plugins/integrations/kubernetes-service/src/main/resources/script/deploy-csi-driver @@ -31,13 +31,13 @@ else # "https://github.com/shapeblue/cloudstack-csi-driver/releases/download/v3.0.0/manifest.yaml" # ) CSI_URLS=( - "http://10.0.3.130/cks/csi/snapshot-crds.yaml -O ${working_dir}/snapshot-crds.yaml" - "http://10.0.3.130/cks/csi/manifest.yaml -O ${working_dir}/manifest.yaml" + "http://10.0.3.130/cks/csi/snapshot-crds.yaml" + "http://10.0.3.130/cks/csi/manifest.yaml" ) for url in "${URLS[@]}"; do filename=$(basename "$url") - curl -sSL ${url} -o ${filename} + curl -sSL ${url} -o ${working_dir}/${filename} if [ $? -ne 0 ]; then echo "Unable to connect to the internet to download the relevant files to install and setup CloudStack CSI driver" exit 1