From efeb5f177725b213076e0c896e194b15427b0528 Mon Sep 17 00:00:00 2001
From: "stu126940@mail.uni-kiel.de" <stu126940@mail.uni-kiel.de>
Date: Wed, 1 Sep 2021 14:06:15 +0200
Subject: [PATCH] use oneOf in order to allow only specifying one resource set
 per array member

---
 docs/crd-docu.md                                    | 2 +-
 theodolite/crd/crd-benchmark.yaml                   | 6 ++++++
 theodolite/examples/operator/example-benchmark.yaml | 4 ++--
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/docs/crd-docu.md b/docs/crd-docu.md
index 60ad46b27..f76623103 100644
--- a/docs/crd-docu.md
+++ b/docs/crd-docu.md
@@ -935,7 +935,7 @@ Specifies the scaling resource that is benchmarked.
         <td><b>resourceValues</b></td>
         <td>[]integer</td>
         <td>
-          List of resource values for the specified resource type.<br/>
+          <br/>
         </td>
         <td>true</td>
       </tr></tbody>
diff --git a/theodolite/crd/crd-benchmark.yaml b/theodolite/crd/crd-benchmark.yaml
index dba973f1d..d94126a21 100644
--- a/theodolite/crd/crd-benchmark.yaml
+++ b/theodolite/crd/crd-benchmark.yaml
@@ -127,6 +127,9 @@ spec:
                 type: array
                 items:
                   type: object
+                  oneOf:
+                    - required: [configMap]
+                    - required: [fileSystem]
                   properties:
                     configMap:
                       type: object
@@ -150,6 +153,9 @@ spec:
                 type: array
                 items:
                   type: object
+                  oneOf:
+                    - required: [configMap]
+                    - required: [fileSystem]
                   properties:
                     configMap:
                       type: object
diff --git a/theodolite/examples/operator/example-benchmark.yaml b/theodolite/examples/operator/example-benchmark.yaml
index afc077b4d..2fd7fe26a 100644
--- a/theodolite/examples/operator/example-benchmark.yaml
+++ b/theodolite/examples/operator/example-benchmark.yaml
@@ -37,7 +37,7 @@ spec:
     #        - "jmx-configmap.yaml"
     #        - "uc1-service-monitor.yaml"
     - configMap:
-       name: "test-configmap"
+       name: "example-configmap"
        files:
          - "uc1-kstreams-deployment.yaml"
          - "aggregation-service.yaml"
@@ -50,7 +50,7 @@ spec:
     #       - uc1-load-generator-service.yaml
     #       - uc1-load-generator-deployment.yaml
     - configMap:
-       name: "test-configmap"
+       name: "example-configmap"
        files:
           - uc1-load-generator-service.yaml
           - uc1-load-generator-deployment.yaml
\ No newline at end of file
-- 
GitLab