From 9aa41da9026c8ca3358de68b42d95a1e3999bffa Mon Sep 17 00:00:00 2001 From: Nikita Korolev Date: Tue, 3 Dec 2024 15:08:01 +0300 Subject: [PATCH] chore: add option for vi-pvc Signed-off-by: Nikita Korolev --- tests/performance/README.md | 4 +++- tests/performance/templates/vmds.yaml | 6 ++++++ tests/performance/values.yaml | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/performance/README.md b/tests/performance/README.md index fa9a5a10a..e5330acf7 100644 --- a/tests/performance/README.md +++ b/tests/performance/README.md @@ -2,4 +2,6 @@ ## values.yaml - `vmDiskType`: - `vi`: creates VMs with VirtualImage in `blockDeviceRefs` - - `vd`: creates VMs with corresponding `VirtualDisk` \ No newline at end of file + - `vd`: creates VMs with corresponding `VirtualDisk` +- `viType`: + - `pvc`: create vi with persistentVolumeClaim type \ No newline at end of file diff --git a/tests/performance/templates/vmds.yaml b/tests/performance/templates/vmds.yaml index 23ef425ad..b33ebe267 100644 --- a/tests/performance/templates/vmds.yaml +++ b/tests/performance/templates/vmds.yaml @@ -7,11 +7,17 @@ metadata: labels: vm: {{ $.Values.resourcesPrefix }} spec: +{{- if eq .Values.viType "pvc" }} + storage: PersistentVolumeClaim + persistentVolumeClaim: + storageClassName: {{ $.Values.storageClass }} +{{- else }} storage: ContainerRegistry dataSource: type: "HTTP" http: url: {{ $.Values.imageURL }} +{{- end }} {{- if ne .Values.vmDiskType "vi" }} {{- $count := (.Values.count | int) }} {{- range until $count }} diff --git a/tests/performance/values.yaml b/tests/performance/values.yaml index 212b7945c..467e24793 100644 --- a/tests/performance/values.yaml +++ b/tests/performance/values.yaml @@ -6,6 +6,8 @@ spec: memory: size: 256Mi +viType: vi +# viType: pvc vmDiskType: vd resources: "all" resourcesPrefix: "performance"