Skip to content

Commit

Permalink
[tf] add chain_name to testnet config
Browse files Browse the repository at this point in the history
  • Loading branch information
rustielin authored and aptos-bot committed Apr 26, 2022
1 parent 62a30b2 commit d8f872a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion terraform/testnet/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module "validator" {
node_pool_sizes = var.validator_lite_mode ? {
utilities = var.num_utilities_instance > 0 ? var.num_utilities_instance : 3
validators = var.num_validator_instance > 0 ? var.num_validator_instance : var.num_validators + var.num_public_fullnodes
} : {
} : {
utilities = var.num_utilities_instance > 0 ? var.num_utilities_instance : 3 * var.num_validators
validators = var.num_validator_instance > 0 ? var.num_validator_instance : 3 * var.num_validators + var.num_public_fullnodes + 1
}
Expand Down Expand Up @@ -86,6 +86,7 @@ resource "helm_release" "testnet" {
jsonencode({
imageTag = local.image_tag
validatorLite = var.validator_lite_mode
chain_name = "aptos-${terraform.workspace}"
localVaultBackend = var.enable_dev_vault # Toggle dev vault mode
genesis = {
numValidators = var.num_validators
Expand Down
2 changes: 2 additions & 0 deletions terraform/testnet/testnet/files/prometheus.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
global:
scrape_interval: 15s
evaluation_interval: 15s
external_labels:
chain_name: {{ .Values.chain_name }}

# Alertmanager configuration
alerting:
Expand Down
3 changes: 3 additions & 0 deletions terraform/testnet/testnet/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
imageTag: latest
validatorLite: false

# name of the chain for prometheus label
chain_name:

genesis:
numValidators: 1
numPublicFullnodes: 1
Expand Down

0 comments on commit d8f872a

Please sign in to comment.