Skip to content

Commit 8fe97ce

Browse files
authored
feat(xatu): add xatu server (ethpandaops#144)
1 parent c1d7169 commit 8fe97ce

28 files changed

+754
-46
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ Tooling
7171
- [`ethereum-address-metrics-exporter`](charts/ethereum-address-metrics-exporter) - A prometheus exporter for Ethereum externally owned account and contract addresses.
7272
- [`smart-contract-verifier-http`](charts/smart-contract-verifier-http) - Smart contract verification service.
7373
- [`web3signer`](charts/web3signer) - An open-source remote signing service.
74+
- [`xatu-sentry`](charts/xatu-sentry) - Ethereum p2p monitoring tool that runs along side a [Ethereum consensus client](https://ethereum.org/en/developers/docs/nodes-and-clients/#consensus-clients) and collects data via the consensus client's [Beacon API](https://ethereum.github.io/beacon-APIs/).
75+
- [`xatu-server`](charts/xatu-server) - Ethereum p2p monitoring tool that collects events from and controls various Xatu clients.
7476

7577
## Development
7678

File renamed without changes.

charts/xatu-sentry/Chart.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: v2
2+
name: xatu-sentry
3+
description: Ethereum p2p monitoring tool that runs along side a Ethereum consensus client and collects data via the consensus client's Beacon API.
4+
home: https://github.com/ethpandaops/xatu
5+
type: application
6+
version: 0.0.1
7+
maintainers:
8+
- name: samcm
9+
10+
- name: savid
11+

charts/xatu/README.md charts/xatu-sentry/README.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

2-
# xatu
2+
# xatu-sentry
33

44
![Version: 0.0.1](https://img.shields.io/badge/Version-0.0.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
55

6-
Ethereum p2p monitoring tool
6+
Ethereum p2p monitoring tool that runs along side a Ethereum consensus client and collects data via the consensus client's Beacon API.
77

88
**Homepage:** <https://github.com/ethpandaops/xatu>
99

@@ -18,14 +18,13 @@ Ethereum p2p monitoring tool
1818
| config.logging | string | `"info"` | |
1919
| config.metricsAddr | string | `":9090"` | |
2020
| config.name | string | `"example-instance"` | |
21+
| config.ntp_server | string | `"time.google.com"` | |
2122
| config.outputs[0].config.address | string | `"http://localhost:8080"` | |
2223
| config.outputs[0].config.batch_timeout | string | `"5s"` | |
2324
| config.outputs[0].config.export_timeout | string | `"30s"` | |
2425
| config.outputs[0].config.headers.Authorization | string | `"Someb64Value"` | |
2526
| config.outputs[0].config.max_export_batch_size | int | `512` | |
2627
| config.outputs[0].config.max_queue_size | int | `51200` | |
27-
| config.outputs[0].config.ntp_server | string | `"pool.ntp.org"` | |
28-
| config.outputs[0].config.type | string | `"http"` | |
2928
| config.outputs[0].name | string | `"basic"` | |
3029
| config.outputs[0].type | string | `"http"` | |
3130
| containerSecurityContext | object | See `values.yaml` | The security context for containers |
File renamed without changes.

charts/xatu/templates/NOTES.txt charts/xatu-sentry/templates/NOTES.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
1. Get the application URL by running these commands:
22
{{- if contains "NodePort" .Values.service.type }}
3-
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "xatu.fullname" . }})
3+
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "xatu-sentry.fullname" . }})
44
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
55
echo http://$NODE_IP:$NODE_PORT
66
{{- else if contains "LoadBalancer" .Values.service.type }}
77
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
8-
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "xatu.fullname" . }}'
9-
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "xatu.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
10-
echo http://$SERVICE_IP:{{ include "xatu.httpPort" . }}
8+
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "xatu-sentry.fullname" . }}'
9+
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "xatu-sentry.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
10+
echo http://$SERVICE_IP:{{ include "xatu-sentry.httpPort" . }}
1111
{{- else if contains "ClusterIP" .Values.service.type }}
12-
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "xatu.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
12+
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "xatu-sentry.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
1313
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
1414
echo "Visit http://127.0.0.1:8080 to use your application"
1515
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{{/*
22
Expand the name of the chart.
33
*/}}
4-
{{- define "xatu.name" -}}
4+
{{- define "xatu-sentry.name" -}}
55
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
66
{{- end }}
77

@@ -10,7 +10,7 @@ Create a default fully qualified app name.
1010
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
1111
If release name contains chart name it will be used as a full name.
1212
*/}}
13-
{{- define "xatu.fullname" -}}
13+
{{- define "xatu-sentry.fullname" -}}
1414
{{- if .Values.fullnameOverride }}
1515
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
1616
{{- else }}
@@ -26,16 +26,16 @@ If release name contains chart name it will be used as a full name.
2626
{{/*
2727
Create chart name and version as used by the chart label.
2828
*/}}
29-
{{- define "xatu.chart" -}}
29+
{{- define "xatu-sentry.chart" -}}
3030
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
3131
{{- end }}
3232

3333
{{/*
3434
Common labels
3535
*/}}
36-
{{- define "xatu.labels" -}}
37-
helm.sh/chart: {{ include "xatu.chart" . }}
38-
{{ include "xatu.selectorLabels" . }}
36+
{{- define "xatu-sentry.labels" -}}
37+
helm.sh/chart: {{ include "xatu-sentry.chart" . }}
38+
{{ include "xatu-sentry.selectorLabels" . }}
3939
{{- if .Chart.AppVersion }}
4040
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
4141
{{- end }}
@@ -45,22 +45,22 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
4545
{{/*
4646
Selector labels
4747
*/}}
48-
{{- define "xatu.selectorLabels" -}}
49-
app.kubernetes.io/name: {{ include "xatu.name" . }}
48+
{{- define "xatu-sentry.selectorLabels" -}}
49+
app.kubernetes.io/name: {{ include "xatu-sentry.name" . }}
5050
app.kubernetes.io/instance: {{ .Release.Name }}
5151
{{- end }}
5252

5353
{{/*
5454
Create the name of the service account to use
5555
*/}}
56-
{{- define "xatu.serviceAccountName" -}}
56+
{{- define "xatu-sentry.serviceAccountName" -}}
5757
{{- if .Values.serviceAccount.create }}
58-
{{- default (include "xatu.fullname" .) .Values.serviceAccount.name }}
58+
{{- default (include "xatu-sentry.fullname" .) .Values.serviceAccount.name }}
5959
{{- else }}
6060
{{- default "default" .Values.serviceAccount.name }}
6161
{{- end }}
6262
{{- end }}
6363

64-
{{- define "xatu.metricsPort" -}}
64+
{{- define "xatu-sentry.metricsPort" -}}
6565
{{ (split ":" .Values.config.metricsAddr)._1 | default ":9090" }}
6666
{{- end -}}
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
apiVersion: v1
22
kind: ConfigMap
33
metadata:
4-
name: {{ include "xatu.fullname" . }}
4+
name: {{ include "xatu-sentry.fullname" . }}
55
labels:
6-
{{- include "xatu.labels" . | nindent 4 }}
6+
{{- include "xatu-sentry.labels" . | nindent 4 }}
77
data:
88
config.yaml: |-
99
{{ toYaml .Values.config | nindent 4 }}

charts/xatu/templates/deployment.yaml charts/xatu-sentry/templates/deployment.yaml

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
apiVersion: apps/v1
22
kind: Deployment
33
metadata:
4-
name: {{ include "xatu.fullname" . }}
4+
name: {{ include "xatu-sentry.fullname" . }}
55
labels:
6-
{{- include "xatu.labels" . | nindent 4 }}
6+
{{- include "xatu-sentry.labels" . | nindent 4 }}
77
annotations:
88
{{- toYaml .Values.annotations | nindent 4 }}
99
spec:
1010
replicas: {{ .Values.replicas }}
1111
selector:
1212
matchLabels:
13-
{{- include "xatu.selectorLabels" . | nindent 6 }}
13+
{{- include "xatu-sentry.selectorLabels" . | nindent 6 }}
1414
template:
1515
metadata:
1616
labels:
17-
{{- include "xatu.selectorLabels" . | nindent 8 }}
17+
{{- include "xatu-sentry.selectorLabels" . | nindent 8 }}
1818
{{- with .Values.podLabels }}
1919
{{- toYaml . | nindent 8 }}
2020
{{- end }}
@@ -25,7 +25,7 @@ spec:
2525
{{- toYaml . | nindent 8 }}
2626
{{- end }}
2727
spec:
28-
serviceAccountName: {{ include "xatu.serviceAccountName" . }}
28+
serviceAccountName: {{ include "xatu-sentry.serviceAccountName" . }}
2929
{{- if .Values.priorityClassName }}
3030
priorityClassName: {{ .Values.priorityClassName }}
3131
{{- end }}
@@ -70,7 +70,7 @@ spec:
7070
{{- end }}
7171
ports:
7272
- name: metrics
73-
containerPort: {{ include "xatu.metricsPort" . }}
73+
containerPort: {{ include "xatu-sentry.metricsPort" . }}
7474
protocol: TCP
7575
livenessProbe:
7676
{{- toYaml .Values.livenessProbe | nindent 12 }}
@@ -83,7 +83,7 @@ spec:
8383
- name: {{ $key }}
8484
valueFrom:
8585
secretKeyRef:
86-
name: {{ include "xatu.fullname" $ }}-env
86+
name: {{ include "xatu-sentry.fullname" $ }}-env
8787
key: {{ $key }}
8888
{{- end }}
8989
{{- if .Values.extraEnv }}
@@ -105,4 +105,4 @@ spec:
105105
{{- end }}
106106
- name: config
107107
configMap:
108-
name: {{ include "xatu.fullname" . }}
108+
name: {{ include "xatu-sentry.fullname" . }}

charts/xatu/templates/secret.yaml charts/xatu-sentry/templates/secret.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
apiVersion: v1
22
kind: Secret
33
metadata:
4-
name: {{ include "xatu.fullname" . }}-env
4+
name: {{ include "xatu-sentry.fullname" . }}-env
55
labels:
6-
{{- include "xatu.labels" . | nindent 4 }}
6+
{{- include "xatu-sentry.labels" . | nindent 4 }}
77
data:
88
{{- range $key, $value := .Values.secretEnv }}
99
{{ $key }}: {{ $value | b64enc }}
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
apiVersion: v1
22
kind: Service
33
metadata:
4-
name: {{ include "xatu.fullname" . }}
4+
name: {{ include "xatu-sentry.fullname" . }}
55
labels:
6-
{{- include "xatu.labels" . | nindent 4 }}
6+
{{- include "xatu-sentry.labels" . | nindent 4 }}
77
spec:
88
type: {{ .Values.service.type }}
99
ports:
10-
- port: {{ include "xatu.metricsPort" . }}
10+
- port: {{ include "xatu-sentry.metricsPort" . }}
1111
targetPort: metrics
1212
protocol: TCP
1313
name: metrics
1414
{{- if .Values.extraPorts }}
1515
{{ toYaml .Values.extraPorts | nindent 4}}
1616
{{- end }}
1717
selector:
18-
{{- include "xatu.selectorLabels" . | nindent 4 }}
18+
{{- include "xatu-sentry.selectorLabels" . | nindent 4 }}

charts/xatu/templates/serviceaccount.yaml charts/xatu-sentry/templates/serviceaccount.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
apiVersion: v1
33
kind: ServiceAccount
44
metadata:
5-
name: {{ include "xatu.serviceAccountName" . }}
5+
name: {{ include "xatu-sentry.serviceAccountName" . }}
66
labels:
7-
{{- include "xatu.labels" . | nindent 4 }}
7+
{{- include "xatu-sentry.labels" . | nindent 4 }}
88
{{- with .Values.serviceAccount.annotations }}
99
annotations:
1010
{{- toYaml . | nindent 4 }}

charts/xatu/templates/servicemonitor.yaml charts/xatu-sentry/templates/servicemonitor.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
apiVersion: monitoring.coreos.com/v1
33
kind: ServiceMonitor
44
metadata:
5-
name: {{ include "xatu.fullname" . }}
5+
name: {{ include "xatu-sentry.fullname" . }}
66
{{- if .Values.serviceMonitor.namespace }}
77
namespace: {{ .Values.serviceMonitor.namespace }}
88
{{- end }}
99
labels:
10-
{{- include "xatu.labels" . | nindent 4 }}
10+
{{- include "xatu-sentry.labels" . | nindent 4 }}
1111
{{- if .Values.serviceMonitor.labels }}
1212
{{- toYaml .Values.serviceMonitor.labels | nindent 4 }}
1313
{{- end }}
@@ -22,7 +22,7 @@ spec:
2222
scrapeTimeout: {{ .Values.serviceMonitor.scrapeTimeout }}
2323
{{- end }}
2424
honorLabels: true
25-
port: http
25+
port: metrics
2626
path: {{ .Values.serviceMonitor.path }}
2727
scheme: {{ .Values.serviceMonitor.scheme }}
2828
{{- if .Values.serviceMonitor.tlsConfig }}
@@ -36,7 +36,7 @@ spec:
3636
jobLabel: "{{ .Release.Name }}"
3737
selector:
3838
matchLabels:
39-
{{- include "xatu.selectorLabels" . | nindent 8 }}
39+
{{- include "xatu-sentry.selectorLabels" . | nindent 8 }}
4040
namespaceSelector:
4141
matchNames:
4242
- {{ .Release.Namespace }}

charts/xatu/values.yaml charts/xatu-sentry/values.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,14 @@ config:
2525
logging: "info"
2626
metricsAddr: ":9090"
2727
name: example-instance
28+
ntp_server: time.google.com
2829
ethereum:
2930
beacon_node_address: http://localhost:5052
3031
outputs:
3132
- name: basic
3233
type: http
3334
config:
34-
type: http
3535
address: http://localhost:8080
36-
ntp_server: pool.ntp.org
3736
headers:
3837
Authorization: Someb64Value
3938
max_queue_size: 51200

charts/xatu-server/.helmignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/

charts/xatu/Chart.yaml charts/xatu-server/Chart.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
2-
name: xatu
3-
description: Ethereum p2p monitoring tool
2+
name: xatu-server
3+
description: Ethereum p2p monitoring tool that collects events from and controls various Xatu clients.
44
home: https://github.com/ethpandaops/xatu
55
type: application
66
version: 0.0.1

0 commit comments

Comments
 (0)