Skip to content

Commit

Permalink
[tf] cleanup config (aptos-labs#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
sherry-x authored Mar 1, 2022
1 parent 6017bae commit 11df992
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 21 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ diem-move/vm-genesis/genesis/vm_config.toml

# Terraform
.terraform/
terraform/terraform.tfstate*
terraform/.terraform.tfstate*
terraform/validator/*/*-kubernetes.json
terraform/validator/*/*-vault.ca
terraform/validator/*/*-kube.config
terraform/validator/vault-init/backend.tf
terraform/testnet/*-kubernetes.json
terraform/testnet/*-vault.ca

# Move Build Output
build/
Expand Down
15 changes: 0 additions & 15 deletions helm/validator/files/configs/keymanager.yaml

This file was deleted.

25 changes: 25 additions & 0 deletions terraform/testnet/testnet/files/grafana.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
{{- if .Values.monitoring.grafana.googleAuth }}

{{- with .Values.monitoring.grafana.config }}
[auth.google]
enabled = true
client_id = {{ .client_id }}
client_secret = {{ .client_secret }}
scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
auth_url = https://accounts.google.com/o/oauth2/auth
token_url = https://accounts.google.com/o/oauth2/token
allowed_domains = {{ .allowed_domains }}
allow_sign_up = true
{{- end }}

[users]
auto_assign_org_role = Editor

[server]
protocol = http
root_url = http://mon.{{ .Values.service.domain }}/grafana
serve_from_sub_path = true

{{- else }}
[auth.anonymous]
enabled = true

# Role for unauthenticated users, other valid values are `Editor` and `Admin`
org_role = Editor

{{- end }}
4 changes: 0 additions & 4 deletions terraform/testnet/testnet/templates/monitoring.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ spec:
{{- include "testnet.selectorLabels" . | nindent 4 }}
app.kubernetes.io/name: monitoring
ports:
- name: prom-http
port: 9090
targetPort: 9090
- name: grafana-http
port: 80
targetPort: 3000
Expand Down Expand Up @@ -166,7 +163,6 @@ spec:
args:
- "--web.enable-lifecycle"
- "--config.file=/etc/prometheus/prometheus.yml"
- "--web.external-url=http://mon.{{ $domain }}:9090"
- "--storage.tsdb.min-block-duration=15m"
- "--storage.tsdb.max-block-duration=30m"
- "--storage.tsdb.retention.time={{ .prometheus.retention }}"
Expand Down
2 changes: 2 additions & 0 deletions terraform/testnet/testnet/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ monitoring:
requests:
cpu: 0.25
memory: 128Mi
googleAuth:
config:

cluster_test:
enabled: true
Expand Down
2 changes: 0 additions & 2 deletions terraform/validator/vault-init/main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
provider "vault" {}

variable "namespace" {
description = "Prefix to use when naming secrets and transit keys"
default = "diem"
Expand Down

0 comments on commit 11df992

Please sign in to comment.