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
4 changes: 2 additions & 2 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ jobs:

- name: Install pre-commit and helm-docs
run: |
pip install pre-commit==3.6.0
curl -fSsL -o - https://github.com/norwoodj/helm-docs/releases/download/v1.12.0/helm-docs_1.12.0_Linux_x86_64.tar.gz | tar -xz -C /usr/local/bin helm-docs
pip install pre-commit==4.5.1
curl -fSsL -o - https://github.com/norwoodj/helm-docs/releases/download/v1.14.2/helm-docs_1.14.2_Linux_x86_64.tar.gz | tar -xz -C /usr/local/bin helm-docs

- name: Run pre-commit hooks
run: pre-commit run --all-files
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/norwoodj/helm-docs
rev: v1.12.0
rev: v1.14.2
hooks:
- id: helm-docs
args:
Expand Down
2 changes: 1 addition & 1 deletion charts/bridges-common-relay/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: bridges-common-relay
description: A Helm chart for bridges-common-relay
type: application
version: 1.1.1
version: 1.2.0
maintainers:
- name: Parity
url: https://github.com/paritytech/helm-charts
Expand Down
4 changes: 2 additions & 2 deletions charts/bridges-common-relay/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This is intended behaviour. Make sure to run `git add -A` once again to stage ch

# Parity Bridges Common helm chart

![Version: 1.1.1](https://img.shields.io/badge/Version-1.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![Version: 1.2.0](https://img.shields.io/badge/Version-1.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

This helm chart installs [Parity Bridges Common](https://github.com/paritytech/parity-bridges-common) relayer.

Expand Down Expand Up @@ -80,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.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)
24 changes: 22 additions & 2 deletions charts/bridges-common-relay/templates/cronjob.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
{{ range $val := .Values.rewards }}
{{ range $reward_owner := tuple "ThisChain" "BridgedChain" }}
{{- $typesVolumeName := printf "types-override-%s" ($val.name | lower | trunc 40 | trimSuffix "-") }}
{{- $typesFile := default "bridge-reward-types-override.json" $val.types_override_filename }}
{{- $typesArgs := "" }}
{{- if $val.types_override }}
{{- $typesArgs = printf " --types /types/%s" $typesFile }}
{{- end }}
apiVersion: batch/v1
kind: CronJob
metadata:
Expand Down Expand Up @@ -32,6 +38,11 @@ spec:
secret:
secretName: {{ include "bridges-common-relay.secretName" $ }}
optional: false
{{- if $val.types_override }}
- name: {{ $typesVolumeName }}
configMap:
name: {{ include "bridges-common-relay.fullname" $ }}-{{ $val.name | lower }}-types
{{- end }}
{{- end}}
containers:
- name: bridges-common-relay-{{ $val.name | lower }}-{{ $reward_owner | lower }}
Expand All @@ -57,9 +68,13 @@ spec:
"owner": $owner
}'
)
{{- if $val.params_wrapper }}

rewards_account_params=$(jq -n --arg key {{ $val.params_wrapper | quote }} --argjson params "$rewards_account_params" '{($key): $params}')
{{- end }}

reward=$(
polkadot-js-api --ws "$RPC_URL" query.bridgeRelayers.relayerRewards \
polkadot-js-api --ws "$RPC_URL"{{ $typesArgs }} query.bridgeRelayers.relayerRewards \
{{ $val.address | quote }} \
"$rewards_account_params" \
| jq -r '.relayerRewards'
Expand All @@ -74,7 +89,7 @@ spec:
# Avoid nonce collision with "ThisChain".
{{ if eq $reward_owner "BridgedChain" }}sleep 10{{ end }}

polkadot-js-api --ws "$RPC_URL" \
polkadot-js-api --ws "$RPC_URL"{{ $typesArgs }} \
--seed "$(cat /secrets/{{ $val.seed_phrase_secret_name }})" \
tx.bridgeRelayers.claimRewards "$rewards_account_params"
resources:
Expand All @@ -84,6 +99,11 @@ spec:
- name: secrets
mountPath: "/secrets"
readOnly: true
{{- if $val.types_override }}
- name: {{ $typesVolumeName }}
mountPath: "/types"
readOnly: true
{{- end}}
{{- end}}
---
{{- end }}
Expand Down
15 changes: 15 additions & 0 deletions charts/bridges-common-relay/templates/rewards-types-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{- range $val := .Values.rewards }}
{{- if $val.types_override }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "bridges-common-relay.fullname" $ }}-{{ $val.name | lower }}-types
labels:
{{- include "bridges-common-relay.labels" $ | nindent 4 }}
data:
{{- $typesFile := default "bridge-reward-types-override.json" $val.types_override_filename }}
{{ $typesFile }}: |
{{ $val.types_override | nindent 4 }}
---
{{- end }}
{{- end }}
7 changes: 7 additions & 0 deletions charts/bridges-common-relay/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,10 @@ rewards: {}
# bridged_chain_id: "0x62687764"
# # -- Secret name of the seed phrase of the relayer
# seed_phrase_secret_name: "bridge-hub-rococo-signer-file"
# # -- Optional: wrap rewards params in a top-level enum variant
# params_wrapper: "PolkadotKusamaBridge"
# # -- Optional: JSON types override for polkadot-js-api
# types_override: |
# {"MyType": "u32"}
# # -- Optional: override types file name (default: bridge-reward-types-override.json)
# types_override_filename: "bridge-reward-types-override.json"
2 changes: 1 addition & 1 deletion charts/common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ This is intended behaviour. Make sure to run `git add -A` once again to stage ch
| 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.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)
2 changes: 1 addition & 1 deletion charts/node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -563,4 +563,4 @@ If you're running a collator node:
| wsHealthExporter.resources | object | `{}` | Resource limits & requests |

----------------------------------------------
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.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)
2 changes: 1 addition & 1 deletion charts/node/ci/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ done
echo "Waiting for addons to be ready..."
sleep 30

kustomize build --enable-helm . | kubectl apply -f -
kustomize build --enable-helm . | kubectl apply -n node-test -f -

cd ginkgo && go test --namespace node-test --kubeconfig ${KUBECONFIG:-$HOME/.kube/config}
2 changes: 1 addition & 1 deletion charts/polkadot-basic-notification/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ helm install polkadot-basic-notification parity/polkadot-basic-notification
| 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.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)
2 changes: 1 addition & 1 deletion charts/polkadot-introspector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@ helm install polkadot-introspector parity/polkadot-introspector
| 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.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)
2 changes: 1 addition & 1 deletion charts/staking-miner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,4 +213,4 @@ If you use a customized value for `args` make sure to update it accordingly. If
| waitRuntimeUpgrade.resources | object | `{}` | Resources configuration for the wait container |

----------------------------------------------
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.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)
2 changes: 1 addition & 1 deletion charts/substrate-faucet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,4 +232,4 @@ Adding default global override for .org.matrix.msc3786.rule.room.server_acl
| tolerations | list | `[]` | Tolerations for pods assignment ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ |

----------------------------------------------
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.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)
2 changes: 1 addition & 1 deletion charts/substrate-telemetry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,4 @@ By default, the type of Kubernetes service used for Telemetry-Core, Telemetry-Sh
| 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.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)
2 changes: 1 addition & 1 deletion charts/testnet-manager/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ helm install testnet-manager parity/testnet-manager
| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |

----------------------------------------------
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.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)