Skip to main content

PATH Helm Config (`.values.yaml`)

🚧 WORK IN PROGRESS 🚧

This document is not ready for public consumption.

CONFIGURATION FILES

A PATH stack is configured via two files:

FileRequiredDescription
.config.yamlPATH gateway configurations
.values.yamlPATH Helm chart deployment configurations

Table of Contents

Default Values

Optional

Using the .values.yaml file is optional; PATH will run with default values if the file is not present.

The .values.yaml file is used to configure a PATH deployment by overriding the default values in the Helm chart.

By default PATH is configured as follows:

Services:

ProtocolService IDAliases
shannonanvil-
morseF00Ceth, eth-mainnet
morseF021polygon, polygon-mainnet

API Keys:

  • test_api_key

Customizing Default Values

If you wish to customize the default values, you can copy the template file to the local directory and modify it.

make configs_copy_values_yaml
info

For the full list of configurable values in the PATH Helm Chart, see the Helm Values Documentation.

Helm Values File Location (Local Development)

In development mode, the config file must be located at:

./local/path/.values.yaml

Tilt's hot reload feature is enabled by default in the Helm chart. This means that when the .values.yaml file is updated, Tilt will automatically redeploy the PATH Gateway stack with the new values.

GUARD Configuration

auth.apiKey Section

Default test_api_key

By default a single default API key value of test_api_key is provided. This should be overridden in the .values.yaml file.

This section configures the list of allowed API keys for the PATH gateway. Any request without a valid API key will be rejected.

The API key is specified per-request as the Authorization header.

FieldTypeRequiredDefaultDescription
enabledbooleanYestrueWhether to enforce API key authentication
apiKeysarray[string]Yes[test_api_key]List of API keys authorized to access the gateway

💡 See Envoy Gateway's API Key Authentication documentation for more information.

services Section

This section configures the list of services that are allowed to access the PATH gateway.

Each service must be assigned a unique serviceId and may have multiple aliases which map to the same service.

The service ID is specified per-request as the Target-Service-Id header; either the serviceId or any of the aliases will be accepted. See examples below for more details.

FieldTypeRequiredDefaultDescription
servicesarray[object]Yes-List of services
services[].serviceIdstringYes-The unique identifier for the service
services[].aliasesarray[string]Yes-List of aliases for the service

Example .values.yaml File

guard:
auth:
apiKey:
enabled: true
apiKeys:
- test_api_key_1
- test_api_key_2
- test_api_key_3
services:
- serviceId: F021
aliases:
- polygon
- serviceId: F00C
aliases:
- eth
- serviceId: F000
aliases:
- pocket

Example Requests

The above .values.yaml files will allow the following requests to PATH.

Request to the polygon service using the service ID using API key test_api_key_1:

curl http://localhost:3070/v1 \
-H "Target-Service-Id: F021" \
-H "Authorization: test_api_key_1" \
-d '{"jsonrpc": "2.0", "id": 1, "method": "eth_blockNumber" }'

Request to the polygon service using the alias using API key test_api_key_2:

curl http://localhost:3070/v1 \
-H "Target-Service-Id: polygon" \
-H "Authorization: test_api_key_2" \
-d '{"jsonrpc": "2.0", "id": 1, "method": "eth_blockNumber" }'

Request to the "eth" service using an alias using API key test_api_key_3:

curl http://localhost:3070/v1 \
-H "Target-Service-Id: eth" \
-H "Authorization: test_api_key_3" \
-d '{"jsonrpc": "2.0", "id": 1, "method": "eth_blockNumber" }'