Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/spectre/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,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.3.9
version: 0.3.10

# 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
5 changes: 4 additions & 1 deletion charts/spectre/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# spectre

![Version: 0.3.9](https://img.shields.io/badge/Version-0.3.9-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.68.3](https://img.shields.io/badge/AppVersion-0.68.3-informational?style=flat-square)
![Version: 0.3.10](https://img.shields.io/badge/Version-0.3.10-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.68.3](https://img.shields.io/badge/AppVersion-0.68.3-informational?style=flat-square)

A Helm chart for deploying Chronicle Spectre Relay on Kubernetes

Expand Down Expand Up @@ -60,6 +60,9 @@ A Helm chart for deploying Chronicle Spectre Relay on Kubernetes
| replicaCount | int | `1` | |
| resources | object | `{}` | |
| rpcUrl | string | `nil` | rpcUrl for the target chain |
| rpcUrlSecret | object | `{"key":"","name":""}` | Read CFG_CHAIN_RPC_URLS from an existing Secret instead of `rpcUrl`, for URLs that carry credentials such as an `api_key` query parameter. When `name` is set, `rpcUrl` is ignored and `key` is required. |
| rpcUrlSecret.key | string | `""` | Secret key holding the URL. Spectre takes exactly one URL, so store a single line with no trailing newline. |
| rpcUrlSecret.name | string | `""` | Secret name, in the release namespace |
| securityContext | object | `{}` | |
| service.annotations | object | `{}` | |
| service.ports.listen.port | int | `8080` | |
Expand Down
76 changes: 76 additions & 0 deletions charts/spectre/ci/secret-rpc-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Same as testnet-envs-values.yaml, but CFG_CHAIN_RPC_URLS comes from a Secret through rpcUrlSecret.
# rpcUrl is empty, so the relay only starts if the Secret path works. No CFG_ETH_* is set,
# so the inline config falls back to a random key.
rpcUrl: ""
# -- must match target chain
chainId: '11155111'
# -- can be one of `legacy`or `eip1559`
txType: legacy
# -- can be one of mainnet: `eth`, `arb`, `opt`, `gno`, `scr`, `zkevm`, `mantle`, or testnets: `gor`, `sep`, `ogor`, `mango`, `testnet-zkEVM-mango`, `mantle-testnet`, `scr-sepolia`
chainType: sep

inlineConfig: |
variables {
separator = env("CFG_SEPARATOR", "\n")
target_chain_id = env("CFG_CHAIN_ID", "11155111")
}
ethereum {
rand_keys = env("CFG_ETH_FROM", "") == "" ? ["default"] : []
dynamic "key" {
for_each = env("CFG_ETH_FROM", "") == "" ? [] : [1]
labels = ["default"]
content {
address = env("CFG_ETH_FROM", "")
keystore_path = env("CFG_ETH_KEYS", "")
passphrase_file = env("CFG_ETH_PASS", "")
}
}
client "default" {
ethereum_key = "default"
rpc_urls = explode(var.separator, env("CFG_CHAIN_RPC_URLS", ""))
chain_id = tonumber(env("CFG_CHAIN_ID", "11155111"))
tx_type = env("CFG_CHAIN_TX_TYPE", "legacy")
}
}
info {
ethereum_key = "default"
}
logger {
log_level = env("CFG_LOG_LEVEL", "debug")
log_format = env("CFG_LOG_FORMAT", "text")
metrics {
listen_host = ""
listen_port = 8080
listen_path = "/healthz"
}
}
transport {
libp2p {
disable_discovery = true
ethereum_key = "default"
listen_addrs = explode(var.separator, env("CFG_LIBP2P_LISTEN_ADDRS", "/ip4/0.0.0.0/tcp/8000"))
feeds = []
}
}
spectre {
scheduler = tonumber(env("CFG_SPECTRE_INTERVAL", "120"))
scribe {
ethereum_client = "default"
contract_addr = "0x0000000000000000000000000000000000000001"
spread = 1.0
expiration = 86400
}
}

rpcUrlSecret:
name: spectre-ci-rpc
key: CFG_CHAIN_RPC_URLS

extraObjects:
- apiVersion: v1
kind: Secret
metadata:
name: spectre-ci-rpc
type: Opaque
stringData:
CFG_CHAIN_RPC_URLS: https://ethereum-sepolia.blockpi.network/v1/rpc/public
8 changes: 8 additions & 0 deletions charts/spectre/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,15 @@ spec:
- name: CFG_ENVIRONMENT
value: "{{ .Values.environment | default "prod" }}"
- name: CFG_CHAIN_RPC_URLS
{{- $rpcUrlSecret := .Values.rpcUrlSecret | default dict }}
{{- if $rpcUrlSecret.name }}
valueFrom:
secretKeyRef:
name: {{ $rpcUrlSecret.name | quote }}
key: {{ required "rpcUrlSecret.key is required when rpcUrlSecret.name is set" $rpcUrlSecret.key | quote }}
{{- else }}
value: "{{ .Values.rpcUrl }}"
{{- end }}
- name: CFG_CHAIN_ID
value: "{{ .Values.chainId }}"
- name: CFG_CHAIN_NAME
Expand Down
6 changes: 6 additions & 0 deletions charts/spectre/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ image:
environment: stage
# -- rpcUrl for the target chain
rpcUrl: null
# -- Read CFG_CHAIN_RPC_URLS from an existing Secret instead of `rpcUrl`, for URLs that carry credentials such as an `api_key` query parameter. When `name` is set, `rpcUrl` is ignored and `key` is required.
rpcUrlSecret:
# -- Secret name, in the release namespace
name: ""
# -- Secret key holding the URL. Spectre takes exactly one URL, so store a single line with no trailing newline.
key: ""
# -- must match target chain
chainId: null
# -- can be one of `legacy`or `eip1559`
Expand Down
Loading