Skip to content

Commit

Permalink
[tf][testnet] custom grafana datasources
Browse files Browse the repository at this point in the history
  • Loading branch information
rustielin authored and aptos-bot committed Mar 22, 2022
1 parent 1de250f commit 73f9149
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions terraform/testnet/testnet/templates/monitoring.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ data:
isDefault: true
access: proxy
url: http://localhost:9090
{{- range .Values.monitoring.grafana.datasources }}
- name: {{ .name }}
{{- range $k, $v := .config }}
{{ $k }}: {{ toYaml $v }}
{{- end }}
{{- if .jsonData }}
jsonData:
{{ toYaml .jsonData | nindent 10 }}
{{- end }}
{{- end }}
dashboards.yml: |-
apiVersion: 1
Expand Down Expand Up @@ -230,6 +240,9 @@ spec:
- name: grafana
image: {{ .grafana.image.repo }}:{{ .grafana.image.tag }}
imagePullPolicy: {{ .grafana.image.pullPolicy }}
env:
- name: GF_AUTH_SIGV4_AUTH_ENABLED
value: "true"
command: ["/bin/sh", "-c"]
args: ["cp /dashboards/* /etc/grafana/dashboards/aptos && gunzip -f /etc/grafana/dashboards/aptos/*.json.gz && exec /run.sh"]
resources:
Expand Down
1 change: 1 addition & 0 deletions terraform/testnet/testnet/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ monitoring:
memory: 128Mi
googleAuth:
config:
datasources: []

# if enabled, faucet_test is synchronized with cluster_test traffic
# to prevent race on mint account
Expand Down

0 comments on commit 73f9149

Please sign in to comment.