Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ public class GKEConfig {
@Expose
private String nodeLocations;

@SerializedName(value = "jvm_args", alternate = "jvmArgs")
@Expose
private String jvmArgs;

@SerializedName(value = "min_count", alternate = "minCount")
@Expose
private int minCount;
Expand Down Expand Up @@ -153,6 +157,14 @@ public void setNodeLocations(String nodeLocations) {
this.nodeLocations = nodeLocations;
}

public String getJvmArgs() {
return jvmArgs;
}

public void setJvmArgs(String jvmArgs) {
this.jvmArgs = jvmArgs;
}

public int getMinCount() {
return minCount;
}
Expand Down
10 changes: 10 additions & 0 deletions machmeter/src/main/resources/terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ variable "gke_config" {
service_account_json = string
machine_type = string
node_locations = string
jvm_args = string
min_count = number
max_count = number
initial_node_count = number
Expand Down Expand Up @@ -303,6 +304,10 @@ resource "kubernetes_deployment" "jmeter-master" {
name = "GOOGLE_APPLICATION_CREDENTIALS"
value = "/var/secrets/google/key.json"
}
env {
name = "JVM_ARGS"
value: var.gke_config.jvm_args
}
}
volume {
name = "loadtest"
Expand Down Expand Up @@ -380,6 +385,11 @@ resource "kubernetes_stateful_set" "jmeter-slave" {
env {
name = "GOOGLE_APPLICATION_CREDENTIALS"
value = "/var/secrets/google/key.json"

}
env {
name = "JVM_ARGS"
value: var.gke_config.jvm_args
}
}
volume {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"nodeLocations": "us-central1-a,us-central1-b,us-central1-c",
"minCount": 3,
"maxCount": 3,
"initialNodeCount": 3
"initialNodeCount": 3,
"jvmArgs": "-Xms1g -Xmx1g"
}
},
"ddlConfig" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"nodeLocations": "us-central1-a,us-central1-b,us-central1-c",
"minCount": 3,
"maxCount": 3,
"initialNodeCount": 3
"initialNodeCount": 3,
"jvmArgs": "-Xms1g -Xmx1g"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add a default value for jvmArgs in GKEConfig as -Xms1g -Xmx1g and not mention it in setup.json. Only when we want to override we should pass the value . WDYT?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

}
},
"ddlConfig" : {
Expand Down
3 changes: 2 additions & 1 deletion machmeter/usecases/finance/ledger/sample-configs/setup.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"nodeLocations": "us-central1-a,us-central1-b,us-central1-c",
"minCount": 3,
"maxCount": 3,
"initialNodeCount": 3
"initialNodeCount": 3,
"jvmArgs": "-Xms1g -Xmx1g"
}
},
"ddlConfig" : {
Expand Down
3 changes: 2 additions & 1 deletion machmeter/usecases/shopping/cart/sample-configs/setup.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"nodeLocations": "us-central1-a,us-central1-b,us-central1-c",
"minCount": 3,
"maxCount": 3,
"initialNodeCount": 3
"initialNodeCount": 3,
"jvmArgs": "-Xms1g -Xmx1g"
}
},
"ddlConfig" : {
Expand Down