Skip to content

Commit

Permalink
[tf][validator] enable prom remote_write
Browse files Browse the repository at this point in the history
  • Loading branch information
rustielin authored and aptos-bot committed Mar 17, 2022
1 parent 7153156 commit d4e03e9
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 13 deletions.
14 changes: 14 additions & 0 deletions terraform/helm/validator/files/prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,17 @@ scrape_configs:
tls_config:
insecure_skip_verify: true
{{ end }}

{{ if .Values.monitoring.prometheus.remote_write.enabled }}
{{ with .Values.monitoring.prometheus.remote_write }}
remote_write:
- url: {{ .url }}
sigv4:
region: {{ .region }}
queue_config:
max_samples_per_send: 1000
max_shards: 200
capacity: 2500
{{ end }}
{{ end }}

2 changes: 2 additions & 0 deletions terraform/helm/validator/templates/monitoring.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "aptos-validator.fullname" . }}-prometheus
annotations:
{{- toYaml .Values.monitoring.serviceAccount.annotations | nindent 4 }}
labels:
{{- include "aptos-validator.labels" . | nindent 4 }}

Expand Down
6 changes: 6 additions & 0 deletions terraform/helm/validator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ monitoring:
fullKubernetesScrape: false
useKubeStateMetrics: false
prometheus:
remote_write:
enabled: false
url:
region:
image:
repo: prom/prometheus
tag: v2.27.1@sha256:ca9e612ba1b6382ccf3642e21c9ee328ed4baa49fe84600ead7b7790c139aab4
Expand Down Expand Up @@ -310,6 +314,8 @@ monitoring:
nodeSelector: {}
tolerations: []
affinity: {}
serviceAccount:
annotations: {}

logging:
vector:
Expand Down
13 changes: 0 additions & 13 deletions terraform/testnet/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,6 @@ module "validator" {
trusted_instance_type = var.trusted_instance_type
}

output "vpc_id" {
value = module.validator.vpc_id
sensitive = true
}

output "aws_subnet_private" {
value = module.validator.aws_subnet_private
}

output "cluster_security_group_id" {
value = module.validator.cluster_security_group_id
}

data "aws_eks_cluster" "aptos" {
name = "aptos-${terraform.workspace}"
}
Expand Down
16 changes: 16 additions & 0 deletions terraform/testnet/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
output "vpc_id" {
value = module.validator.vpc_id
sensitive = true
}

output "aws_subnet_private" {
value = module.validator.aws_subnet_private
}

output "cluster_security_group_id" {
value = module.validator.cluster_security_group_id
}

output "oidc_provider" {
value = module.validator.oidc_provider
}

0 comments on commit d4e03e9

Please sign in to comment.