Skip to content

Commit

Permalink
Merge branch 'ethpandaops:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
eskp authored Mar 21, 2024
2 parents 2c9f6a8 + ed43463 commit 6d91d5b
Show file tree
Hide file tree
Showing 30 changed files with 1,676 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ Tooling
- [`blobscan-indexer`](charts/blobscan-indexer) - Blobscan-Indexer indexes blobs in MongoDB for use with Blobscan.
- [`blobscan`](charts/blobscan) - Blobscan is the first blockchain explorer that helps to navigate and visualize those EIP-4844 blobs.
- [`blockscout`](charts/blockscout) - Execution layer block explorer.
- [`blutgang`](charts/blutgang) - The wd40 of ethereum load balancers.
- [`checkpointz`](charts/checkpointz) - A beacon chain Checkpoint Sync provider.
- [`consensus-monitor`](charts/consensus-monitor) - Web UI to check your ethereum consensus layer nodes via their beacon APIs.
- [`dora`](charts/dora) - Lightweight Beaconchain explorer.
Expand Down
23 changes: 23 additions & 0 deletions charts/assertoor/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
13 changes: 13 additions & 0 deletions charts/assertoor/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v2
name: assertoor
description: >
Testing tool that is capable of doing actions and checking conditions on ethereum pos networks.
home: https://github.com/ethpandaops/assertoor
sources:
- https://github.com/ethpandaops/assertoor
type: application
version: 0.0.1
appVersion: "1.0.0"
maintainers:
- name: pk910
email: [email protected]
98 changes: 98 additions & 0 deletions charts/assertoor/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@

# assertoor

![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)

Testing tool that is capable of doing actions and checking conditions on ethereum pos networks.

**Homepage:** <https://github.com/ethpandaops/assertoor>

## Source Code

* <https://github.com/ethpandaops/assertoor>

# Usage

Usage: assertoor --config config.yaml

Helper:
```shell
Usage of ./assertoor:
--config string
Path to the assertoor config file
```

Example Configuration:
```yaml
endpoints:
- name: node1
executionUrl: "http://execution-node:8545"
consensusUrl: "http://beacon-node:5052"

globalVariables:
walletPrivkey: "feedbeef12340000feedbeef12340000feedbeef12340000feedbeef12340000"

assertoorTests:
- file: "https://raw.githubusercontent.com/ethpandaops/assertoor-test/master/assertoor-tests/block-proposal-check.yaml"
name: "Custom Block proposal check"
timeout: 48h
config:
validatorPairNames: ["geth", "besu"]
schedule:
cron:
- "0 */2 * * *" # every 2 hours
startup: true
- file: "https://raw.githubusercontent.com/ethpandaops/assertoor-test/master/assertoor-tests/stability-check.yaml"
- file: "https://raw.githubusercontent.com/ethpandaops/assertoor-test/master/assertoor-tests/all-opcodes-test.yaml"
- file: "https://raw.githubusercontent.com/ethpandaops/assertoor-test/master/assertoor-tests/validator-lifecycle-test-small.yaml"

```

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | Affinity configuration for pods |
| annotations | object | `{}` | Annotations for the StatefulSet |
| assertoorApiEnabled | bool | `true` | Enable assertoor API |
| assertoorFrontendEnabled | bool | `true` | Enable assertoor UI |
| assertoorTests | list | `[]` | assertoor test configurations -- file is the only required field. All other fields default to the values provided in the test file, but can be overriden if needed. |
| config | string | See `values.yaml` | Config file |
| containerSecurityContext | object | See `values.yaml` | The security context for containers |
| customArgs | list | `["--config=/data/assertoor-config.yaml"]` | Custom args for the assertoor container |
| customCommand | list | `[]` | Command replacement for the assertoor container |
| endpoints | list | `[{"consensusHeaders":{"X-Test":"test","Y-Test":"test2"},"consensusUrl":"http://beacon-node:5052","executionHeaders":{"X-Test":"test","Y-Test":"test2"},"executionUrl":"http://execution-node:8545","name":"default-endpoint"}]` | An array of endpoints to use for assertoor -- executionUrl & consensusUrl are the only required fields |
| extraContainers | list | `[]` | Additional containers |
| extraEnv | list | `[]` | Additional env variables |
| extraPorts | list | `[]` | Additional ports. Useful when using extraContainers |
| extraVolumeMounts | list | `[]` | Additional volume mounts |
| extraVolumes | list | `[]` | Additional volumes |
| fullnameOverride | string | `""` | Overrides the chart's computed fullname |
| globalVariables | object | `{"walletPrivkey":"feedbeef12340000feedbeef12340000feedbeef12340000feedbeef12340000"}` | global assertoor variables -- global variables are passed to all tests. |
| httpPort | int | `8080` | HTTP port for assertoor interface |
| image.pullPolicy | string | `"IfNotPresent"` | assertoor container pull policy |
| image.repository | string | `"ethpandaops/assertoor"` | assertoor container image repository |
| image.tag | string | `"latest"` | assertoor container image tag |
| ingress.annotations | object | `{}` | Annotations for Ingress |
| ingress.enabled | bool | `false` | Ingress resource for the HTTP API |
| ingress.hosts[0].host | string | `"chart-example.local"` | |
| ingress.hosts[0].paths | list | `[]` | |
| ingress.tls | list | `[]` | Ingress TLS |
| initContainers | list | `[]` | Additional init containers |
| nameOverride | string | `""` | Overrides the chart's name |
| nodeSelector | object | `{}` | Node selector for pods |
| podAnnotations | object | `{}` | Pod annotations |
| podDisruptionBudget | object | `{}` | Define the PodDisruptionBudget spec If not set then a PodDisruptionBudget will not be created |
| podLabels | object | `{}` | Pod labels |
| priorityClassName | string | `nil` | Pod priority class |
| resources | object | `{}` | Resource requests and limits |
| securityContext | object | See `values.yaml` | The security context for pods |
| service.type | string | `"ClusterIP"` | Service type |
| serviceAccount.annotations | object | `{}` | Annotations to add to the service account |
| serviceAccount.create | bool | `true` | Specifies whether a service account should be created |
| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
| terminationGracePeriodSeconds | int | `30` | How long to wait until the pod is forcefully terminated |
| tolerations | list | `[]` | Tolerations for pods |
| topologySpreadConstraints | list | `[]` | Topology Spread Constraints for pods |
| validatorNamesInventory | string | `""` | This can be a url here for example: -- "https://config.dencun-devnet-8.ethpandaops.io/api/v1/nodes/validator-ranges" -- If you want to use a local range file define it in the values.yaml validatorNamesRanges section |
| validatorNamesRanges | string | `"0-1: test\n"` | |
54 changes: 54 additions & 0 deletions charts/assertoor/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@

{{ template "chart.header" . }}
{{ template "chart.deprecationWarning" . }}

{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}

{{ template "chart.description" . }}


{{ template "chart.homepageLine" . }}

{{ template "chart.sourcesSection" . }}

{{ template "chart.requirementsSection" . }}


# Usage

Usage: assertoor --config config.yaml

Helper:
```shell
Usage of ./assertoor:
--config string
Path to the assertoor config file
```

Example Configuration:
```yaml
endpoints:
- name: node1
executionUrl: "http://execution-node:8545"
consensusUrl: "http://beacon-node:5052"

globalVariables:
walletPrivkey: "feedbeef12340000feedbeef12340000feedbeef12340000feedbeef12340000"

assertoorTests:
- file: "https://raw.githubusercontent.com/ethpandaops/assertoor-test/master/assertoor-tests/block-proposal-check.yaml"
name: "Custom Block proposal check"
timeout: 48h
config:
validatorPairNames: ["geth", "besu"]
schedule:
cron:
- "0 */2 * * *" # every 2 hours
startup: true
- file: "https://raw.githubusercontent.com/ethpandaops/assertoor-test/master/assertoor-tests/stability-check.yaml"
- file: "https://raw.githubusercontent.com/ethpandaops/assertoor-test/master/assertoor-tests/all-opcodes-test.yaml"
- file: "https://raw.githubusercontent.com/ethpandaops/assertoor-test/master/assertoor-tests/validator-lifecycle-test-small.yaml"

```

{{ template "chart.valuesSection" . }}
22 changes: 22 additions & 0 deletions charts/assertoor/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range $host := .Values.ingress.hosts }}
{{- range .paths }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
{{- end }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "assertoor.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "assertoor.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "assertoor.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP:{{ include "assertoor.httpPort" . }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "assertoor.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
{{- end }}
66 changes: 66 additions & 0 deletions charts/assertoor/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "assertoor.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "assertoor.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "assertoor.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "assertoor.labels" -}}
helm.sh/chart: {{ include "assertoor.chart" . }}
{{ include "assertoor.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "assertoor.selectorLabels" -}}
app.kubernetes.io/name: {{ include "assertoor.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "assertoor.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "assertoor.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

{{- define "assertoor.httpPort" -}}
{{- printf "8080" -}}
{{- end -}}
21 changes: 21 additions & 0 deletions charts/assertoor/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "assertoor.fullname" . }}-ranges
labels:
{{- include "assertoor.labels" . | nindent 4 }}
data:
ranges.yaml: |
{{- .Values.validatorNamesRanges | nindent 4 }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "assertoor.fullname" . }}-config
labels:
{{- include "assertoor.labels" . | nindent 4 }}
data:
assertoor-config.yaml: |
{{- tpl .Values.config . | nindent 4 }}
Loading

0 comments on commit 6d91d5b

Please sign in to comment.