Skip to content

Commit

Permalink
refactor names and generate readme
Browse files Browse the repository at this point in the history
  • Loading branch information
rzadp committed Mar 22, 2024
1 parent 54b0337 commit c0a3d0c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
3 changes: 2 additions & 1 deletion charts/bridges-common-relay/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ helm install bridges-common-relay parity/bridges-common-relay
| prometheus.port | int | `9615` | The port for exposed Prometheus metrics |
| replicaCount | int | `1` | |
| resources | object | `{}` | Resource limits & requests |
| rewards | object | `{}` | CronJobs to automatically claim relayer rewards |
| secrets | object | `{}` | Secrets will be mounted to pod /secrets/{key} |
| securityContext | object | `{}` | SecurityContext holds pod-level security attributes and common container settings. |
| service | object | `{"port":80,"type":"ClusterIP"}` | Service |
Expand All @@ -79,4 +80,4 @@ helm install bridges-common-relay parity/bridges-common-relay
| tolerations | list | `[]` | Tolerations for use with node taints |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.12.0](https://github.com/norwoodj/helm-docs/releases/v1.12.0)
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
8 changes: 4 additions & 4 deletions charts/bridges-common-relay/templates/cronjob.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{{ range $key, $val := .Values.rewards }}
{{ range $val := .Values.rewards }}
{{ range $reward_owner := tuple "ThisChain" "BridgedChain" }}
apiVersion: batch/v1
kind: CronJob
metadata:
name: bridge-{{ $key | lower }}-{{ $reward_owner | lower }}
name: bridge-{{ $val.name | lower }}-{{ $reward_owner | lower }}
labels:
{{- include "bridges-common-relay.labels" $ | nindent 4 }}
spec:
Expand All @@ -30,7 +30,7 @@ spec:
secretName: {{ include "bridges-common-relay.secretName" $ }}
optional: false
containers:
- name: bridges-common-relay-{{ $key | lower }}-{{ $reward_owner | lower }}
- name: bridges-common-relay-{{ $val.name | lower }}-{{ $reward_owner | lower }}
image: node:20.11
imagePullPolicy: IfNotPresent
env:
Expand Down Expand Up @@ -66,7 +66,7 @@ spec:
echo "No reward to claim, exiting."
exit 0
fi
echo "{{ $key }} on {{ $reward_owner }} has a reward of ${reward}."
echo "{{ $val.name }} on {{ $reward_owner }} has a reward of ${reward}."
npx @polkadot/api-cli@0.56.5 --ws "$RPC_URL" \
--seed "$(cat /secrets/{{ $val.seed_phrase_secret_name }})" \
Expand Down
8 changes: 7 additions & 1 deletion charts/bridges-common-relay/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,16 @@ serviceMonitor:

# -- CronJobs to automatically claim relayer rewards
rewards: {}
# rococoToWestendRelayer:
# - name: rococoToWestendRelayer
# # -- cron schedule
# schedule: "00 01 * * *"
# # -- Public address of the relayer
# address: "5Fxxx"
# # -- Bridge Hub RPC URL to use
# rpc_url: "wss://example.com"
# # -- Bridge line ID
# lane_id: "0x00000002"
# # -- Bridged Chain ID, for example [rococo](https://github.com/paritytech/polkadot-sdk/blob/7241a8db7b3496816503c6058dae67f66c666b00/bridges/testing/environments/rococo-westend/bridges_rococo_westend.sh#L349).
# bridged_chain_id: "0x62687764"
# # -- Secret name of the seed phrase of the relayer
# seed_phrase_secret_name: "bridge-hub-rococo-signer-file"

0 comments on commit c0a3d0c

Please sign in to comment.