Skip to content

Commit

Permalink
Merge pull request #6 from santiment/add-metrics-to-optimism
Browse files Browse the repository at this point in the history
Add prometheus metrics to optimism
  • Loading branch information
kalkov authored Jan 25, 2023
2 parents 084a0ac + 0702972 commit 734a7f6
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/optimism/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
description: Helm chart for optimism node
name: optimism
version: 0.0.1
version: 0.0.2
appVersion: master
keywords:
- Optimism
Expand Down
17 changes: 15 additions & 2 deletions charts/optimism/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
Optimism
=====
# Optimism

## Install

Add helm chart repository:

helm repo add santiment https://santiment.github.io/chain-charts && helm repo update

Pull the chart locally:

helm pull santiment/optimism

Install helm chart:

helm install optimism ./optimism-0.0.1.tgz
6 changes: 6 additions & 0 deletions charts/optimism/templates/service_l2geth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ spec:
targetPort: {{ .Values.l2geth.service.rpc.port }}
{{- end }}
protocol: TCP
{{- if .Values.l2geth.metrics.enabled }}
- name: metrics
port: {{.Values.l2geth.metrics.port }}
targetPort: {{ .Values.l2geth.metrics.port }}
protocol: TCP
{{- end }}
selector:
app: {{ template "optimism.name" . }}
release: {{ .Release.Name }}
17 changes: 16 additions & 1 deletion charts/optimism/templates/statefulset_l2geth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,17 @@ spec:
{{- end }}
"--datadir={{ .Values.l2geth.mountPath }}",
"--config=/root/l2geth.toml",
"--password={{ .Values.l2geth.mountPath }}/password"]
"--password={{ .Values.l2geth.mountPath }}/password",
{{- if .Values.l2geth.metrics.enabled }}
"--metrics",
"--pprof",
"--pprofaddr=0.0.0.0",
"--pprofport={{ .Values.l2geth.metrics.port }}",
{{- if .Values.l2geth.metrics.expensive }}
"--metrics.expensive"
{{- end }}
{{- end }}
]
volumeMounts:
- name: {{ template "optimism.volumename" . }}
mountPath: {{ .Values.l2geth.mountPath }}
Expand All @@ -106,6 +116,11 @@ spec:
- containerPort: {{ .Values.l2geth.service.rpc.port }}
name: rpc
protocol: TCP
{{- if .Values.l2geth.metrics.enabled }}
- containerPort: 6060
name: metrics-port
protocol: TCP
{{- end }}
env:
{{- range $key, $val := .Values.l2geth.environment }}
- name: {{ $key }}
Expand Down
4 changes: 4 additions & 0 deletions charts/optimism/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ l2geth:
rpc:
port: "8545"
annotations: {}
metrics:
enabled: false
port: 6060
expensive: false

## Node labels for pod assignment
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
Expand Down

0 comments on commit 734a7f6

Please sign in to comment.