Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions benchmark_runner/main/environment_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,13 @@ def __init__(self):
'hammerdb': 4.0
}

# Set namespace based on workload
# Set namespace based on workload.
# BENCHMARK_OPERATOR_NAMESPACE is used when set (e.g. OpenShift CI) so the app targets that
# namespace for workload/operator while NAMESPACE can remain the job namespace for the framework.
base_workload = self._environment_variables_dict['workload'].split('_')[0]
if EnvironmentVariables.get_env('NAMESPACE'):
if EnvironmentVariables.get_env('BENCHMARK_OPERATOR_NAMESPACE'):
self._environment_variables_dict['namespace'] = EnvironmentVariables.get_env('BENCHMARK_OPERATOR_NAMESPACE')
elif EnvironmentVariables.get_env('NAMESPACE'):
self._environment_variables_dict['namespace'] = EnvironmentVariables.get_env('NAMESPACE')
elif base_workload in self._environment_variables_dict['workload_namespaces']:
default_namespace = self._environment_variables_dict['workload_namespaces'][base_workload]
Expand Down