Skip to content

Commit

Permalink
feat(proxyd): allow configuration for backendGroup options (#244)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: Carlos Jorge <[email protected]>
  • Loading branch information
graphops-renovate[bot] and cjorge-graphops authored Feb 26, 2024
1 parent 919a8e6 commit 12dbd28
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/proxyd/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.5.0
version: 0.5.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
3 changes: 2 additions & 1 deletion charts/proxyd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Deploy and scale [proxyd](https://github.com/ethereum-optimism/optimism/tree/develop/proxyd) inside Kubernetes with ease

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) ![Version: 0.5.0](https://img.shields.io/badge/Version-0.5.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v4.4.4](https://img.shields.io/badge/AppVersion-v4.4.4-informational?style=flat-square)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) ![Version: 0.5.1](https://img.shields.io/badge/Version-0.5.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v4.4.4](https://img.shields.io/badge/AppVersion-v4.4.4-informational?style=flat-square)

## Introduction

Expand Down Expand Up @@ -127,6 +127,7 @@ We do not recommend that you upgrade the application by overriding `image.tag`.
| Key | Description | Type | Default |
|-----|-------------|------|---------|
| backendConfigTemplate | TOML configuration for backend | string | `"# How long proxyd should wait for a backend response before timing out.\nresponse_timeout_seconds = 300\n# Maximum response size, in bytes, that proxyd will accept from a backend.\nmax_response_size_bytes = 10737420000 # 10 GiB\n# Maximum number of times proxyd will try a backend before giving up.\nmax_retries = 3\n# Number of seconds to wait before trying an unhealthy backend again.\nout_of_service_seconds = 10\n"` |
| backendGroups.consensus_aware | Enable consensus awareness | bool | `true` |
| backends.example-backend | Example backend configuration, keep disabled | object | `{"enabled":false,"extraConfig":{},"groups":["main"],"rpcUrl":"http://your-node:8545","wsUrl":"ws://your-node:8545"}` |
| backends.example-backend.enabled | Enable the backend | bool | `false` |
| backends.example-backend.extraConfig | Define additional configuration keys for the backend (see [proxyd config](https://github.com/ethereum-optimism/optimism/blob/5d309e6a6d5e1ef6a88c1ce827b7e6d47f033bbb/proxyd/example.config.toml#L47)) | object | `{}` |
Expand Down
8 changes: 7 additions & 1 deletion charts/proxyd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ backends:
groups:
- main

# -- Options for backend groups
backendGroups:
# -- Enable consensus awareness
consensus_aware: true

# -- Mapping JSON-RPC method name to a particular group of backends (method_name -> group_name)
rpcMethodMappings:
web3_clientVersion: main
Expand Down Expand Up @@ -270,9 +275,10 @@ configTemplate: |
{{- end }}
[backend_groups]
{{- $backendOptions := .Values.backendGroups }}
{{- range $groupName, $groupMembers := .computed.backendGroups }}
[backend_groups.{{ $groupName }}]
consensus_aware = true
{{ toToml $backendOptions }}
{{ toToml (dict "backends" $groupMembers) }}
{{- end }}
Expand Down

0 comments on commit 12dbd28

Please sign in to comment.