diff --git a/system-x/services/hyperfoil/src/main/java/software/tnb/hyperfoil/resource/openshift/OpenshiftHyperfoil.java b/system-x/services/hyperfoil/src/main/java/software/tnb/hyperfoil/resource/openshift/OpenshiftHyperfoil.java index 94196f98b..3fe3adba8 100644 --- a/system-x/services/hyperfoil/src/main/java/software/tnb/hyperfoil/resource/openshift/OpenshiftHyperfoil.java +++ b/system-x/services/hyperfoil/src/main/java/software/tnb/hyperfoil/resource/openshift/OpenshiftHyperfoil.java @@ -120,8 +120,9 @@ public int getPortMapping(int port) { } private Map getHyperfoilDefinition(boolean includesAgentLog) { + LOG.info("Hyperfoil version is set to: " + HyperfoilConfiguration.getHyperfoilVersion()); Map metadata = Map.of("name", APP_NAME, "namespace", OpenshiftClient.get().getNamespace()); - Map spec = Map.of("agentDeployTimeout", 120000, "version", "latest", "route", + Map spec = Map.of("agentDeployTimeout", 120000, "version", HyperfoilConfiguration.getHyperfoilVersion(), "route", Map.of("host", OpenshiftClient.get().generateHostname("hyperfoil")) // "hyperfoil.apps.mycloud.example.com" ); if (includesAgentLog) { diff --git a/system-x/services/hyperfoil/src/main/java/software/tnb/hyperfoil/service/HyperfoilConfiguration.java b/system-x/services/hyperfoil/src/main/java/software/tnb/hyperfoil/service/HyperfoilConfiguration.java index 19f0107cb..db9ede674 100644 --- a/system-x/services/hyperfoil/src/main/java/software/tnb/hyperfoil/service/HyperfoilConfiguration.java +++ b/system-x/services/hyperfoil/src/main/java/software/tnb/hyperfoil/service/HyperfoilConfiguration.java @@ -20,6 +20,8 @@ public class HyperfoilConfiguration extends Configuration { public static final String RETRY_NUMBER_OF_RETRIES = "hyperfoil.http.retry.policy.retries"; public static final String RETRY_POLICY_ENABLED = "hyperfoil.http.retry.policy.enabled"; + private static final String HYPERFOIL_VERSION = "hyperfoil.version"; + public static boolean keepRunning() { return getBoolean(KEEP_RUNNING, false); } @@ -55,4 +57,8 @@ public static int retryNumberOfRetries() { public static boolean isRetryPolicyEnabled() { return getBoolean(RETRY_POLICY_ENABLED, false); } + + public static String getHyperfoilVersion() { + return getProperty(HYPERFOIL_VERSION, "latest"); + } }