Skip to content

Commit

Permalink
Add genereric command/params for bridge-relay (#326)
Browse files Browse the repository at this point in the history
* switch to generic params list for bridge-relay configuration

* fix CI values for bridge-relay
  • Loading branch information
PierreBesson authored Jan 23, 2024
1 parent 8f67d23 commit 307204d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 65 deletions.
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: 0.2.5
version: 1.0.0
maintainers:
- name: Parity
url: https://github.com/paritytech/helm-charts
Expand Down
12 changes: 2 additions & 10 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: 0.2.5](https://img.shields.io/badge/Version-0.2.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.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 @@ -51,20 +51,12 @@ helm install bridges-common-relay parity/bridges-common-relay
| imagePullSecrets | list | `[]` | Reference to one or more secrets to be used when pulling images. ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ |
| nameOverride | string | `""` | Provide a name in place of node for `app:` labels |
| nodeSelector | object | `{}` | Define which Nodes the Pods are scheduled on |
| params | list | `[]` | |
| podAnnotations | object | `{}` | Annotations to add to the Pod |
| podSecurityContext | object | `{}` | SecurityContext holds pod-level security attributes and common container settings. ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ |
| prometheus | object | `{"enabled":false,"port":9615}` | Expose metrics via Prometheus format in /metrics endpoint. |
| prometheus.enabled | bool | `false` | Expose Prometheus metrics |
| prometheus.port | int | `9615` | The port for exposed Prometheus metrics |
| relayHeaders.enabled | bool | `false` | |
| relayHeaders.name | string | `"kusama-to-bridge-hub-polkadot"` | |
| relayHeaders.params.source-host | string | `"ws://rpc.example"` | |
| relayHeaders.params.source-port | int | `9955` | |
| relayHeaders.params.target-host | string | `"ws://rpc.example"` | |
| relayHeaders.params.target-port | int | `9944` | |
| relayHeadersAndMessages.enabled | bool | `false` | |
| relayHeadersAndMessages.name | string | `"bridge-hub-rococo-bridge-hub-wococo"` | |
| relayHeadersAndMessages.params | object | `{}` | |
| replicaCount | int | `1` | |
| resources | object | `{}` | Resource limits & requests |
| secrets | object | `{}` | Secrets will be mounted to pod /secrets/{key} |
Expand Down
9 changes: 7 additions & 2 deletions charts/bridges-common-relay/ci/kind-values.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
relayHeaders:
enabled: true
params:
- relay-headers
- kusama-to-bridge-hub-polkadot
- --source-host=ws://rpc.example
- --source-port=9955
- --target-host=ws://rpc.example
- --target-port=9944
21 changes: 2 additions & 19 deletions charts/bridges-common-relay/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,8 @@ spec:
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
{{- if .Values.relayHeaders.enabled }}
- "relay-headers"
- "{{ .Values.relayHeaders.name }}"
{{- range $key, $value := .Values.relayHeaders.params }}
- "--{{ $key }} {{ $value }}"
{{- end }}
{{- end }}
{{- if .Values.relayHeadersAndMessages.enabled }}
- "relay-headers-and-messages"
- "{{ .Values.relayHeadersAndMessages.name }}"
{{- range $key, $value := .Values.relayHeadersAndMessages.params }}
{{- if kindIs "slice" $value }}
{{- range $param := $value }}
- "--{{ $key }} {{ $param }}"
{{- end }}
{{- else }}
- "--{{ $key }} {{ $value }}"
{{- end }}
{{- end }}
{{- range $param := .Values.params }}
- {{ $param | quote }}
{{- end }}
{{- if .Values.prometheus.enabled }}
- "--prometheus-host 0.0.0.0"
Expand Down
35 changes: 2 additions & 33 deletions charts/bridges-common-relay/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,39 +30,8 @@ serviceAccount:
# -- Service Account name
name: ""

relayHeaders:
enabled: false
name: kusama-to-bridge-hub-polkadot
params:
source-host: ws://rpc.example
source-port: 9955
target-host: ws://rpc.example
target-port: 9944
# target-signer: //Bob
# or
# target-signer-file: /path/to/bob/seed

relayHeadersAndMessages:
enabled: false
name: bridge-hub-rococo-bridge-hub-wococo
params: {}
# rococo-host: localhost
# rococo-port: 9942
# bridge-hub-rococo-host: localhost
# bridge-hub-rococo-port: 8943
# bridge-hub-rococo-signer: //Charlie
# wococo-headers-to-bridge-hub-rococo-signer: //Bob
# wococo-parachains-to-bridge-hub-rococo-signer: //Bob
# bridge-hub-rococo-transactions-mortality: 4
# wococo-host: localhost
# wococo-port: 9945
# bridge-hub-wococo-host: localhost
# bridge-hub-wococo-port: 8945
# bridge-hub-wococo-signer-file: /secrets/bridge-hub-wococo-signer-file
# rococo-headers-to-bridge-hub-wococo-signer: //Bob
# rococo-parachains-to-bridge-hub-wococo-signer: //Bob
# bridge-hub-wococo-transactions-mortality: 4
# lane: ["00000001", "00000002"]
params: []


# -- Secrets will be mounted to pod /secrets/{key}
secrets: {}
Expand Down

0 comments on commit 307204d

Please sign in to comment.