From 1bfd9fb159d834877bb700ffc407565c399d8470 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Vonheiden?= <bjoern.vonheiden@hotmail.de>
Date: Wed, 2 Dec 2020 14:29:18 +0100
Subject: [PATCH] enable setting domain restriction from theodolite.yaml

---
 execution/lib/cli_parser.py |  2 ++
 execution/theodolite.yaml   | 28 +++++++++++++++-------------
 2 files changed, 17 insertions(+), 13 deletions(-)

diff --git a/execution/lib/cli_parser.py b/execution/lib/cli_parser.py
index 63896efe9..75a1e3ae5 100644
--- a/execution/lib/cli_parser.py
+++ b/execution/lib/cli_parser.py
@@ -125,6 +125,8 @@ def benchmark_parser(description):
                         help='[mandatory] List of instances used in benchmarks')
     parser.add_argument('--domain-restriction',
                         action="store_true",
+                        default=eval(
+                            os.environ.get('DOMAIN_RESTRICTION', 'False').capitalize()),
                         help='To use domain restriction. For details see README')
     parser.add_argument('--search-strategy',
                         metavar='<strategy>',
diff --git a/execution/theodolite.yaml b/execution/theodolite.yaml
index e332e6f57..bd386eaf3 100644
--- a/execution/theodolite.yaml
+++ b/execution/theodolite.yaml
@@ -14,22 +14,24 @@ spec:
           image: bvonheid/theodolite:latest
           # imagePullPolicy: Never # Used to pull "own" local image
           env:
-            - name: UC
+            - name: UC # mandatory
               value: "1"
-            - name: LOADS
-              value: "13206, 19635"
-            - name: INSTANCES
-              value: "1, 2"
-            - name: DURATION
-              value: "3"
-            - name: PARTITIONS
-              value: "30"
+            - name: LOADS # mandatory
+              value: "100000, 200000"
+            - name: INSTANCES # mandatory
+              value: "1, 2, 3"
+            # - name: DURATION
+            #   value: "5"
+            # - name: PARTITIONS
+            #   value: "40"
+            # - name: DOMAIN_RESTRICTION
+            #   value: "True"
             # - name: SEARCH_STRATEGY
-            #   value: ""
+            #   value: "linear-search"
             # - name: CPU_LIMIT
-            #   value: ""
+            #   value: "1000m"
             # - name: MEMORY_LIMIT
-            #   value: ""
+            #   value: "4Gi"
             - name: PROMETHEUS_BASE_URL
               value: "http://prometheus-operated:9090"
             # - name: NAMESPACE
@@ -38,7 +40,7 @@ spec:
             #   value: "COMMIT_INTERVAL_MS=100, NUM_STREAM_THREADS=1"
             - name: RESULT_PATH
               value: "results"
-            - name: PYTHONUNBUFFERED
+            - name: PYTHONUNBUFFERED # Enable logs in Kubernetes
               value: "1"
           volumeMounts:
             - mountPath: "/app/results"
-- 
GitLab