Skip to content

Commit

Permalink
Issue open-horion#4098 - Bug: Change "pvcSize" to "pvcSizeGB"
Browse files Browse the repository at this point in the history
Signed-off-by: Le Zhang <zhangl@us.ibm.com>
  • Loading branch information
LiilyZhang committed Aug 6, 2024
1 parent 9e57b6d commit 00ebbd0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions cli/kube_deployment/kube_deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ func (p *KubeDeploymentConfigPlugin) Sign(dep map[string]interface{}, privKey *r
delete(dep, "mmsPVC")
}

if pvcSizeVal, ok := mmsPVCConfig["pvcSize"]; ok {
if pvcSizeVal, ok := mmsPVCConfig["pvcSizeGB"]; ok {
pvcSize := int64(pvcSizeVal.(float64))
msgPrinter.Printf("pvcSize: %v\n", pvcSize)
msgPrinter.Printf("pvcSizeGB: %v\n", pvcSize)
}
}

Expand Down Expand Up @@ -126,8 +126,8 @@ func (p *KubeDeploymentConfigPlugin) DefaultClusterConfig() interface{} {
return map[string]interface{}{
"operatorYamlArchive": "",
"mmsPVC": map[string]interface{}{
"enable": false,
"pvcSize": 0,
"enable": false,
"pvcSizeGB": 0,
},
}
}
Expand Down
2 changes: 1 addition & 1 deletion kube_operator/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ func (c KubeClient) CreateMMSPVC(envVars map[string]string, mmsPVCConfig map[str
}

pvcSizeInString := DEFAULT_PVC_SIZE_IN_STRING
if size, ok := mmsPVCConfig["pvcSize"]; ok {
if size, ok := mmsPVCConfig["pvcSizeGB"]; ok {
sizeInServiceDef := int64(size.(float64))
if sizeInServiceDef > 0 {
pvcSizeInString = strconv.FormatInt(sizeInServiceDef, 10)
Expand Down

0 comments on commit 00ebbd0

Please sign in to comment.