diff --git a/charts/modify-vm-resources/Chart.yaml b/charts/modify-vm-resources/Chart.yaml index b1fab4a2..9a48ee96 100644 --- a/charts/modify-vm-resources/Chart.yaml +++ b/charts/modify-vm-resources/Chart.yaml @@ -6,7 +6,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.4.0-rc1 +version: 1.4.0-rc2 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/modify-vm-resources/templates/02-configmap_01-modify-vm-resources-resources-schemas.yaml b/charts/modify-vm-resources/templates/02-configmap_01-modify-vm-resources-resources-schemas.yaml index 8573391c..e35d231e 100755 --- a/charts/modify-vm-resources/templates/02-configmap_01-modify-vm-resources-resources-schemas.yaml +++ b/charts/modify-vm-resources/templates/02-configmap_01-modify-vm-resources-resources-schemas.yaml @@ -29,7 +29,8 @@ data: "title": "Memory", "description": "The new guest memory of the VM", "type": "string", - "examples": ["2Gi"] + "examples": ["2Gi"], + "pattern": "^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$" }, "vm_new_cpu_cores": { "title": "CPU Cores", diff --git a/charts/modify-vm-resources/templates/04-sonataflow_modify-vm-resources.yaml b/charts/modify-vm-resources/templates/04-sonataflow_modify-vm-resources.yaml index cd9edf10..acd7621f 100755 --- a/charts/modify-vm-resources/templates/04-sonataflow_modify-vm-resources.yaml +++ b/charts/modify-vm-resources/templates/04-sonataflow_modify-vm-resources.yaml @@ -45,7 +45,7 @@ spec: operation: '{ "result": { "completedWith":"success", "message": "VM " + .vm_name + " in namespace " + .vm_namespace + " updated.", "outputs":[ { "key":"Console URL", "value": $SECRET.cluster_console_url + "/k8s/ns/" + .vm_namespace + "/kubevirt.io~v1~VirtualMachine/" + .vm_name + "/console/standalone", "format":"link" } ] } }' type: expression - name: errorVMNotRunningResult - operation: '{ "result": { "completedWith":"error", "message": "VM " + .vm_name + " in namespace " + .vm_namespace + " not ready after the update after checking" + (.vmStatusRunningRetries|tostring) + " times: " + .vm.status } }' + operation: '{ "result": { "completedWith":"error", "message": "VM " + .vm_name + " in namespace " + .vm_namespace + " not ready after the update after checking" + (.vmStatusRunningRetries|tostring) + " times: " + (.vm.status|tostring) } }' type: expression - name: errorAuthorizationDeniedResult operation: '{ "result": { "completedWith":"error", "message": "Authorization denied to update VM " + .vm_name + " in namespace " + .vm_namespace + ". Memory: " + .vm_new_memory + ". CPU cores: " + (.vm_new_cpu_cores|tostring) + ". CPU threads: " + (.vm_new_cpu_threads|tostring) + ". CPU sockets: " + (.vm_new_cpu_sockets|tostring), "outputs":[ { "key":"Jira issue", "value": $SECRET.jira_url + "/jira/servicedesk/projects/" + .projectKey + "/issues/" + .jiraCreateIssueResult.key, "format":"link" }] } }' @@ -354,7 +354,7 @@ spec: functionRef: arguments: payload: - description: '"VM " + .vm_name + " in namespace " + .vm_namespace + " not ready after the update after checking" + (.vmStatusRunningRetries|tostring) + " times: " + .vm.status' + description: '"VM " + .vm_name + " in namespace " + .vm_namespace + " not ready after the update after checking" + (.vmStatusRunningRetries|tostring) + " times: " + (.vm.status|tostring)' severity: high title: '"VM " + .vm_name + " in namespace " + .vm_namespace + " not ready"' topic: Modify VM Resources workflow @@ -425,7 +425,7 @@ spec: podTemplate: container: resources: {} - image: quay.io/orchestrator/serverless-workflow-modify-vm-resources:8cc116b6a74f709d5e401226579ca6976b591ec6 + image: quay.io/orchestrator/serverless-workflow-modify-vm-resources:e69ebe8103c918fa403d3a5f0a676753eca3d87d envFrom: - secretRef: name: modify-vm-resources-creds