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/validator/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.8.2"
version: "0.9.0"

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

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

A Helm chart for deploying Chronicle Validator on Kubernetes

Expand All @@ -15,14 +15,15 @@ A Helm chart for deploying Chronicle Validator on Kubernetes
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| extraObjects | list | `[]` | Extra K8s manifests to deploy |
| ghost | object | `{"argsOverride":[],"commandOverride":[],"enabled":true,"env":{"normal":{},"raw":{}},"ethConfig":{},"image":{"repository":null,"tag":null},"rpcUrl":null,"service":{"annotations":{},"externalTrafficPolicy":"","loadBalancerClass":"","ports":{"libp2p":{"port":8000,"protocol":"TCP"}},"trafficDistribution":"","type":"LoadBalancer"},"watchdogConfigReg":"0x94Fea534aef6df5cF66C2DAE5CE0A05d10C068F3"}` | Values for Ghost |
| ghost | object | `{"argsOverride":[],"commandOverride":[],"enabled":true,"env":{"normal":{},"raw":{}},"ethConfig":{},"image":{"repository":null,"tag":null},"rpcUrl":null,"rpcUrlSecret":{"key":"","name":""},"service":{"annotations":{},"externalTrafficPolicy":"","loadBalancerClass":"","ports":{"libp2p":{"port":8000,"protocol":"TCP"}},"trafficDistribution":"","type":"LoadBalancer"},"watchdogConfigReg":"0x94Fea534aef6df5cF66C2DAE5CE0A05d10C068F3"}` | Values for Ghost |
| ghost.argsOverride | list | `[]` | args override for the validator |
| ghost.commandOverride | list | `[]` | command override for the validator |
| ghost.enabled | bool | `true` | Whether to deploy the Ghost (defi) container/deployment. Set to `false` to run a single-container release (e.g. VAO-only). |
| ghost.env | object | `{"normal":{},"raw":{}}` | Environment variable listing |
| ghost.env.normal | object | `{}` | un-encrypted env vars passed to the pod |
| ghost.ethConfig | object | `{}` | Provide ETH keys from existing secrets : **NB** use only existing secret OR env vars, do not provide both |
| ghost.image | object | `{"repository":null,"tag":null}` | Image tag for the validator (overrides global image if set) |
| ghost.rpcUrlSecret | object | `{"key":"","name":""}` | Read the Ghost container's CFG_CHAIN_RPC_URLS from an existing Secret instead of `ghost.rpcUrl`, for URLs that carry credentials such as an `api_key` query parameter. When `name` is set, `ghost.rpcUrl` is ignored and `key` is required. The VAO container inherits it when it sets neither `vao.rpcUrlSecret` nor `vao.rpcUrl`. |
| ghost.service | object | `{"annotations":{},"externalTrafficPolicy":"","loadBalancerClass":"","ports":{"libp2p":{"port":8000,"protocol":"TCP"}},"trafficDistribution":"","type":"LoadBalancer"}` | Service type for the validator |
| ghost.service.annotations | object | `{}` | Annotations to add to the service |
| ghost.service.externalTrafficPolicy | string | `""` | Optional LoadBalancer traffic policy, for example Local. |
Expand Down Expand Up @@ -78,7 +79,8 @@ A Helm chart for deploying Chronicle Validator on Kubernetes
| vao.extraVolumes | list | `[]` | Extra volumes to mount (typically for secrets) |
| vao.image | object | `{"repository":null,"tag":null}` | Image tag for the validator (overrides global image if set) |
| vao.resources | object | `{}` | Resources constraints for the validator, CPU, Memory, etc. |
| vao.rpcUrl | string | `nil` | Chain RPC URL(s) for the VAO container's target chain. Falls back to `ghost.rpcUrl` when unset (pre-0.8.0 behavior). |
| vao.rpcUrl | string | `nil` | Chain RPC URL(s) for the VAO container's target chain. When neither this nor `vao.rpcUrlSecret` is set, the VAO container uses the Ghost settings, `ghost.rpcUrlSecret` then `ghost.rpcUrl` (pre-0.8.0 behavior). |
| vao.rpcUrlSecret | object | `{"key":"","name":""}` | Read the VAO container's CFG_CHAIN_RPC_URLS from an existing Secret instead of `vao.rpcUrl`. When `name` is set, `vao.rpcUrl` is ignored and `key` is required. |
| vao.service | object | `{"annotations":{},"externalTrafficPolicy":"","loadBalancerClass":"","ports":{"libp2p":{"port":8001,"protocol":"TCP"}},"trafficDistribution":"","type":"LoadBalancer"}` | Service type for the validator |
| vao.service.annotations | object | `{}` | Annotations to add to the service |
| vao.service.externalTrafficPolicy | string | `""` | Optional LoadBalancer traffic policy, for example Local. |
Expand Down
14 changes: 13 additions & 1 deletion charts/validator/ci/testnet-envs-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ global:
chainName: sep
ghost:
watchdogConfigReg: "0xE1CcD31f46F30A764DbACB4759E69d8799126941"
rpcUrl: https://0xrpc.io/sep
# CFG_CHAIN_RPC_URLS comes from the test-rpc Secret below, and VAO inherits it.
# mainnet-envs-values.yaml covers the plain rpcUrl path.
rpcUrl: ""
rpcUrlSecret:
name: test-rpc
key: CFG_CHAIN_RPC_URLS

service:
# -- Type of service for the validator, can also be `LoadBalancer`
Expand Down Expand Up @@ -73,6 +78,13 @@ extraObjects:
type: Opaque
stringData:
keyfile: "{}"
- apiVersion: v1
kind: Secret
metadata:
name: test-rpc
type: Opaque
stringData:
CFG_CHAIN_RPC_URLS: https://0xrpc.io/sep
- apiVersion: v1
kind: ConfigMap
metadata:
Expand Down
18 changes: 18 additions & 0 deletions charts/validator/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,21 @@ Create the name of the service account to use
{{- default "default" .Values.global.serviceAccount.name }}
{{- end }}
{{- end }}

{{/*
CFG_CHAIN_RPC_URLS source for one container: valueFrom.secretKeyRef when the
Secret ref has a name, else the plain URL. Takes a dict with "secret" (an
rpcUrlSecret map, may be nil), "url" (the plain rpcUrl) and "path" (the values
path, for the error message).
*/}}
{{- define "validator.rpcUrlEnvSource" -}}
{{- $secret := .secret | default dict -}}
{{- if $secret.name -}}
valueFrom:
secretKeyRef:
name: {{ $secret.name | quote }}
key: {{ required (printf "%s.key is required when %s.name is set" .path .path) $secret.key | quote }}
{{- else -}}
value: {{ .url | quote }}
{{- end -}}
{{- end }}
9 changes: 7 additions & 2 deletions charts/validator/templates/deployment-vao.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,13 @@ spec:
- name: CFG_CHAIN_ID
value: {{ .Values.global.chainId | default "1" | quote }}
- name: CFG_CHAIN_RPC_URLS
{{- /* vao.rpcUrl falls back to ghost.rpcUrl to preserve pre-0.8.0 behavior for releases that only set the ghost value */}}
value: {{ .Values.vao.rpcUrl | default .Values.ghost.rpcUrl | quote }}
{{- /* VAO uses its own rpcUrlSecret/rpcUrl when either is set, else the ghost pair (pre-0.8.0 behavior for releases that only set the ghost values). Within a pair the Secret wins. */}}
{{- $vaoRpcUrlSecret := .Values.vao.rpcUrlSecret | default dict }}
{{- $rpcSrc := dict "secret" .Values.ghost.rpcUrlSecret "url" .Values.ghost.rpcUrl "path" "ghost.rpcUrlSecret" }}
{{- if or $vaoRpcUrlSecret.name .Values.vao.rpcUrl }}
{{- $rpcSrc = dict "secret" $vaoRpcUrlSecret "url" .Values.vao.rpcUrl "path" "vao.rpcUrlSecret" }}
{{- end }}
{{- include "validator.rpcUrlEnvSource" $rpcSrc | nindent 14 }}
{{- if .Values.global.chainTxType }}
- name: CFG_CHAIN_TX_TYPE
value: {{ .Values.global.chainTxType | default "eip1559" | quote }}
Expand Down
2 changes: 1 addition & 1 deletion charts/validator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ spec:
- name: CFG_CHAIN_ID
value: {{ .Values.global.chainId | default "1" | quote }}
- name: CFG_CHAIN_RPC_URLS
value: {{ .Values.ghost.rpcUrl | quote }}
{{- include "validator.rpcUrlEnvSource" (dict "secret" .Values.ghost.rpcUrlSecret "url" .Values.ghost.rpcUrl "path" "ghost.rpcUrlSecret") | nindent 14 }}
{{- if .Values.global.chainTxType }}
- name: CFG_CHAIN_TX_TYPE
value: {{ .Values.global.chainTxType | default "eip1559" | quote }}
Expand Down
10 changes: 9 additions & 1 deletion charts/validator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ ghost:
tag: null
# Deprecated: use `chainRpcUrl` instead - remove after FINSHED release
rpcUrl: null
# -- Read the Ghost container's CFG_CHAIN_RPC_URLS from an existing Secret instead of `ghost.rpcUrl`, for URLs that carry credentials such as an `api_key` query parameter. When `name` is set, `ghost.rpcUrl` is ignored and `key` is required. The VAO container inherits it when it sets neither `vao.rpcUrlSecret` nor `vao.rpcUrl`.
rpcUrlSecret:
name: ""
key: ""

# -- WATCHDOG onchain config address
watchdogConfigReg: "0x94Fea534aef6df5cF66C2DAE5CE0A05d10C068F3"
Expand Down Expand Up @@ -227,8 +231,12 @@ vao:
image:
repository: null
tag: null
# -- Chain RPC URL(s) for the VAO container's target chain. Falls back to `ghost.rpcUrl` when unset (pre-0.8.0 behavior).
# -- Chain RPC URL(s) for the VAO container's target chain. When neither this nor `vao.rpcUrlSecret` is set, the VAO container uses the Ghost settings, `ghost.rpcUrlSecret` then `ghost.rpcUrl` (pre-0.8.0 behavior).
rpcUrl: null
# -- Read the VAO container's CFG_CHAIN_RPC_URLS from an existing Secret instead of `vao.rpcUrl`. When `name` is set, `vao.rpcUrl` is ignored and `key` is required.
rpcUrlSecret:
name: ""
key: ""
# -- WATCHDOG onchain config address
watchdogConfigReg: "0x064358f9b6428C51F80511D73AFEb3A9e5Cf0213"
# -- WATCHDOG polling interval (in seconds)
Expand Down
Loading