Skip to content

Commit

Permalink
Merge pull request #1415 from shekhar316/adding-exp-modes
Browse files Browse the repository at this point in the history
4. Adding Support For VPA and Auto Mode in CreateExperiment [KRUIZE-VPA Integration]
  • Loading branch information
dinogun authored Dec 13, 2024
2 parents da8ae97 + 4a098a8 commit 69abe0b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,19 @@ public ExperimentUseCaseType(KruizeObject kruizeObject) throws Exception {
throw new Exception("Invalid Mode " + kruizeObject.getMode() + " for target cluster as Remote.");
}
} else if (kruizeObject.getTarget_cluster().equalsIgnoreCase(AnalyzerConstants.LOCAL)) {
if (kruizeObject.getMode().equalsIgnoreCase(AnalyzerConstants.MONITOR)) {
setLocal_monitoring(true);
} else if (kruizeObject.getMode().equalsIgnoreCase(AnalyzerConstants.EXPERIMENT)) {
setLocal_experiment(true);
} else {
throw new Exception("Invalid Mode " + kruizeObject.getMode() + " for target cluster as Local.");
switch (kruizeObject.getMode().toLowerCase()) {
case AnalyzerConstants.MONITOR:
case AnalyzerConstants.RECREATE:
case AnalyzerConstants.AUTO:
setLocal_monitoring(true);
break;

case AnalyzerConstants.EXPERIMENT:
setLocal_experiment(true);
break;

default:
throw new Exception("Invalid Mode " + kruizeObject.getMode() + " for target cluster as Local.");
}
} else {
throw new Exception("Invalid Target cluster type");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ public class AnalyzerConstants {
public static final String EXPERIMENT = "experiment";
public static final String LOCAL = "local";
public static final String REMOTE = "remote";
public static final String AUTO = "auto";
public static final String RECREATE = "recreate";



// Used to parse autotune configmaps
Expand Down

0 comments on commit 69abe0b

Please sign in to comment.