diff --git a/config/settings.local.yaml.tpl b/config/settings.local.yaml.tpl index a0b6e60b..54d6ef4b 100644 --- a/config/settings.local.yaml.tpl +++ b/config/settings.local.yaml.tpl @@ -44,7 +44,7 @@ # auth_url: "" # authorization URL for already deployed Authorino # oidc_url: "" # oidc URL for already deployed Authorino # metrics_service_name: "" # controller metrics service name for already deployed Authorino -# default_exposer: "openshift" # Exposer type that should be used, options: 'openshift' +# default_exposer: "kubernetes" # Force Exposer typem options: 'openshift', 'kind', 'kubernetes' # control_plane: # managedzone: aws-mz # Name of the ManagedZone resource # issuer: # Issuer object for testing TLSPolicy diff --git a/config/settings.yaml b/config/settings.yaml index 8865a925..09e3eb19 100644 --- a/config/settings.yaml +++ b/config/settings.yaml @@ -24,7 +24,6 @@ default: hyperfoil: generate_reports: True reports_dir: "reports" - default_exposer: "openshift" control_plane: managedzone: "aws-mz" issuer: diff --git a/testsuite/config/exposer.py b/testsuite/config/exposer.py index a7a6eaff..7f9d63a5 100644 --- a/testsuite/config/exposer.py +++ b/testsuite/config/exposer.py @@ -8,7 +8,11 @@ # pylint: disable=unused-argument def load(obj, env=None, silent=True, key=None, filename=None): """Selects proper Exposes class""" - try: + if "default_exposer" not in obj or not obj["default_exposer"]: + client = obj["cluster"] + if "route.openshift.io/v1" in client.do_action("api-versions").out(): + obj["default_exposer"] = EXPOSERS["openshift"] + else: + obj["default_exposer"] = EXPOSERS["kubernetes"] + else: obj["default_exposer"] = EXPOSERS[obj["default_exposer"]] - except KeyError: - pass