Skip to content

Commit

Permalink
fix: some blutgang fixes, and more customization (#289)
Browse files Browse the repository at this point in the history
* fix: some blutgang fixes, and more customization

* fix typo
  • Loading branch information
barnabasbusa authored Feb 21, 2024
1 parent 8d7cc1f commit 0ae416f
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 21 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +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.
- [`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
2 changes: 1 addition & 1 deletion charts/blutgang/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ icon: https://github.com/rainshowerLabs/blutgang/assets/55022497/ec668c7a-5f56-4
sources:
- https://github.com/rainshowerLabs/blutgang
type: application
version: 0.0.1
version: 0.0.2
maintainers:
- name: barnabasbusa
email: busa.barnabas@gmail.com
4 changes: 2 additions & 2 deletions charts/blutgang/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# blutgang

![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)
![Version: 0.0.2](https://img.shields.io/badge/Version-0.0.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

Blutgang is a blazing fast, caching, minimalistic load balancer designed with Ethereum's JSON-RPC in mind. Historical RPC queries are cached in a local database, bypassing the need for slow, repeating calls to your node.

Expand All @@ -15,7 +15,7 @@ Blutgang is a blazing fast, caching, minimalistic load balancer designed with Et

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| adminPort | int | See `values.yaml` | Admin Port |
| adminNamespace | object | See `values.yaml` | Admin Namespace |
| affinity | object | `{}` | Affinity configuration for pods |
| annotations | object | `{}` | Annotations for the StatefulSet |
| config | string | See `values.yaml` | Config file |
Expand Down
4 changes: 3 additions & 1 deletion charts/blutgang/templates/service-headless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ spec:
targetPort: http
protocol: TCP
name: http
- port: {{ .Values.adminPort }}
{{- if .Values.adminNamespace.enabled }}
- port: {{ .Values.adminNamespace.adminPort }}
targetPort: admin
protocol: TCP
name: admin
{{- end }}
{{- if .Values.extraPorts }}
{{ toYaml .Values.extraPorts | nindent 4}}
{{- end }}
Expand Down
4 changes: 3 additions & 1 deletion charts/blutgang/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ spec:
targetPort: http
protocol: TCP
name: http
- port: {{ .Values.adminPort }}
{{- if .Values.adminNamespace.enabled }}
- port: {{ .Values.adminNamespace.adminPort }}
targetPort: admin
protocol: TCP
name: admin
{{- end }}
{{- if .Values.extraPorts }}
{{ toYaml .Values.extraPorts | nindent 4}}
{{- end }}
Expand Down
4 changes: 3 additions & 1 deletion charts/blutgang/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,11 @@ spec:
- name: http
containerPort: {{ .Values.httpPort }}
protocol: TCP
{{- if .Values.adminNamespace.enabled }}
- name: admin
containerPort: {{ .Values.adminPort }}
containerPort: {{ .Values.adminNamespace.adminPort }}
protocol: TCP
{{- end }}
livenessProbe:
{{- toYaml .Values.livenessProbe | nindent 12 }}
readinessProbe:
Expand Down
39 changes: 25 additions & 14 deletions charts/blutgang/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ customCommand: [] # Only change this if you need to change the default command
# -- RPC list for the blutgang container
# CSV list of rpcs [default: ]
rpcList: []
#- name: goerli-geth-teku
# url: http://goerli-geth-teku:8545
# ws_url: ws://goerli-geth-teku:8545
# - name: goerli-geth-teku
# url: http://goerli-geth-teku:8545
# ws_url: ws://goerli-geth-teku:8545 # Optional
# max_consecutive: 150 # Optional
# max_per_second: 200 # Optional

# -- Config file
# @default -- See `values.yaml`
Expand All @@ -40,7 +42,7 @@ config: |
# Clear the cache DB on startup
do_clear = false
# Where to bind blutgang to
address = "0.0.0.0:{{ .Values.httpPort}}"
address = "0.0.0.0:{{ .Values.httpPort }}"
# Moving average length for the latency
ma_length = 100
# Sort RPCs by latency on startup. Recommended to leave on.
Expand All @@ -58,17 +60,17 @@ config: |
# should not be exposed publicly.
[admin]
# Enable the admin namespace
enabled = false
enabled = {{ .Values.adminNamespace.enabled | default false }}
# Address for the admin RPC
address = "0.0.0.0:{{ .Values.adminPort }}"
address = "0.0.0.0:{{ .Values.adminNamespace.adminPort | default 5715 }}"
# Only allow read-only methods
# Recommended `true` unless you 100% need write methods
readonly = true
readonly = {{ .Values.adminNamespace.readOnly | default true }}
# Enable the use of JWT for auth
# Should be on if exposing to the internet
jwt = false
jwt = {{ .Values.adminNamespace.jwt_enabled | default false }}
# jwt token
key = ""
key = {{ .Values.adminNamespace.jwt_key | quote | default "" }}
# Sled config
# Sled is the database we use for our cache, for more info check their docs
Expand All @@ -93,12 +95,24 @@ config: |
{{- range .Values.rpcList }}
[{{ .name }}]
url = {{ .url | quote }}
{{- if .ws_url }}
ws_url = {{ .ws_url | quote }}
{{- end }}
# The maximum ammount of time we can use this rpc in a row.
max_consecutive = 150
max_consecutive = {{ .max_consecutive | default 150 }}
# Max ammount of querries per second.
max_per_second = 200
max_per_second = {{ .max_per_second | default 200 }}
{{- end }}
# -- Admin Namespace
# @default -- See `values.yaml`
adminNamespace:
enabled: false
adminPort: 5715
jwt_enabled: false
jwt_key: ""
readOnly: true

ingress:
# -- Ingress resource for the HTTP API
enabled: false
Expand Down Expand Up @@ -133,9 +147,6 @@ annotations: {}
# @default -- See `values.yaml`
httpPort: 3000

# -- Admin Port
# @default -- See `values.yaml`
adminPort: 5715

# -- Liveness probe
# @default -- See `values.yaml`
Expand Down

0 comments on commit 0ae416f

Please sign in to comment.