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
The following commit(s) were added to refs/heads/add-support-csi-projects by
this push:
new 9587ea4c122 update response
9587ea4c122 is described below
commit 9587ea4c122723190934537e8fe885bae437c576
Author: Pearl Dsilva <[email protected]>
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..9d957e24256 100644
--- a/api/src/main/java/org/apache/cloudstack/api/ApiConstants.java
+++ b/api/src/main/java/org/apache/cloudstack/api/ApiConstants.java
@@ -93,6 +93,7 @@ public class ApiConstants {
public static final String CONTROLLER = "controller";
public static final String CONTROLLER_UNIT = "controllerunit";
public static final String COPY_IMAGE_TAGS = "copyimagetags";
+ public static final String CSI_ENABLED = "csienabled";
public static final String CSR = "csr";
public static final String PRIVATE_KEY = "privatekey";
public static final String DATASTORE_HOST = "datastorehost";
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..a7dfc5d030d 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.CSI_ENABLED)
+ @Param(description = "Indicates if the CloudStack CSI driver has been
setup in the cluster")
+ private Boolean csiEnabled;
+
@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) {
+ this.csiEnabled = 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