Skip to content

Commit

Permalink
set new helm directive
Browse files Browse the repository at this point in the history
  • Loading branch information
austbot committed Jun 18, 2024
1 parent 28287ec commit 4701f7e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ RUN if [ "$FLAVOR" = "cuda" ]; then \
apt-get -y install cuda-toolkit-12-5; \
fi
WORKDIR /usr/opt/bonsol
ENTRYPOINT ["relay"]
CMD ["relay"]



Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ Fund that keypair with sol, and keep it secret, currently we only support the lo
# Deploying the Helm Chart
A helm chart exists for this project. You can deploy it to a kubernetes cluster. You will need to have a kubernetes cluster and helm installed.
```bash
helm install --set signer_config.local_signer_keypair_path=$(cat ./relaykp.json) bonsol ./charts/bonsol-node -f ./charts/bonsol-node/secret-values.yaml
helm install --set-file signer_config.local_signer_keypair_content=relaykp.json bonsol ./charts/bonsol-node -f ./charts/bonsol-node/secret-values.yaml
```
Ensure you set ```local_signer_keypair_content``` with the content of the relay kp. An example values file is in the helm directory at ```example-values.yaml```.

Expand Down
19 changes: 9 additions & 10 deletions charts/bonsol-node/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,29 @@ metadata:
labels:
{{- include "bonsol-node.labels" . | nindent 4 }}
data:
Node.toml: << |
risc0_image_folder = {{ .Values.risc0_image_folder }}
risc0_image_folder = "../elf"
Node.toml: |
risc0_image_folder = {{ .Values.risc0_image_folder | quote }}
max_input_size_mb = {{ .Values.max_input_size_mb }}
image_download_timeout_secs = {{ .Values.image_download_timeout_secs }}
input_download_timeout_secs = {{ .Values.input_download_timeout_secs }}
maximum_concurrent_proofs = {{ .Values.maximum_concurrent_proofs }}
max_image_size_mb = {{ .Values.max_image_size_mb }}
image_compression_ttl_hours = {{ .Values.image_compression_ttl_hours }}
env = {{ .Values.bonsol_env }}
env = {{ .Values.bonsol_env | quote }}
[transaction_sender_config]
{{- if eq .Values.transaction_sending_config.type "Rpc" }}
Rpc = { rpc_url = "{{ .Values.transaction_sending_config.rpc_url }}" }
Rpc = { rpc_url = {{ .Values.transaction_sending_config.rpc_url | quote }} }
{{- end }}
[signer_config]
{{- if eq .Values.signer_config.type "KeyPairFile" }}
KeyPairFile = { path = "{{ .Values.signer_config.path }}" }
{{- if eq .Values.signer_config.type "KeypairFile" }}
KeypairFile = { path = {{ .Values.signer_config.path | quote }} }
{{- end }}
[ingester_config]
{{- if eq .Values.ingester_config.type "RpcBlockSubscription" }}
RpcBlockSubscription = { wss_rpc_url = "{{ .Values.ingester_config.wss_rpc_url }}" }
RpcBlockSubscription = { wss_rpc_url = {{ .Values.ingester_config.wss_rpc_url | quote }} }
{{- end }}
{{- if eq .Values.ingester_config.type "GrpcSub" }}
GrpcSubscription = { grpc_url = "{{ .Values.ingester_config.grpc_url }}" }
{{- if eq .Values.ingester_config.type "GrpcSubscription" }}
GrpcSubscription = { grpc_url = {{ .Values.ingester_config.grpc_url | quote }}, token = {{ .Values.ingester_config.token | quote }}, connection_timeout_secs = {{ .Values.ingester_config.connection_timeout_secs }}, timeout_secs = {{ .Values.ingester_config.timeout_secs }} }
{{- end }}
4 changes: 2 additions & 2 deletions charts/bonsol-node/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command: ["/usr/opt/bonsol", "-f /opt/bonsol/Node.toml"]
command: ["/usr/opt/bonsol/relay","-f", "/opt/bonsol/Node.toml"]
ports:
- name: http
containerPort: {{ .Values.service.port }}
Expand All @@ -54,7 +54,7 @@ spec:
- name: images
mountPath: {{ .Values.risc0_image_folder }}
- name: config
mountPath: /opt/bonsol/
mountPath: /opt/bonsol/Node.toml
{{- with .Values.volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion charts/bonsol-node/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ input_download_timeout_secs: 60
maximum_concurrent_proofs: 1
max_image_size_mb: 4
image_compression_ttl_hours: 24
env: "dev"
bonsol_env: "dev"
transaction_sending_config:
type: "Rpc"
rpc_url: "http://localhost:8899"
Expand Down

0 comments on commit 4701f7e

Please sign in to comment.