Skip to content

Commit

Permalink
Merge pull request #632 from pinheadmz/rpcpass
Browse files Browse the repository at this point in the history
chart: set rpcpassword as a value, add to labels for scenarios
  • Loading branch information
m3dwards authored Oct 4, 2024
2 parents 81d0297 + 228c674 commit 2fbbf8c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions resources/charts/bitcoincore/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ data:
{{ template "bitcoincore.check_semver" . }}
{{- .Values.baseConfig | nindent 4 }}
rpcport={{ index .Values .Values.chain "RPCPort" }}
rpcpassword={{ .Values.rpcpassword }}
zmqpubrawblock=tcp://0.0.0.0:{{ .Values.ZMQBlockPort }}
zmqpubrawtx=tcp://0.0.0.0:{{ .Values.ZMQTxPort }}
{{- .Values.defaultConfig | nindent 4 }}
Expand Down
3 changes: 2 additions & 1 deletion resources/charts/bitcoincore/templates/pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ metadata:
{{- end }}
chain: {{ .Values.chain }}
RPCPort: "{{ index .Values .Values.chain "RPCPort" }}"
rpcpassword: {{ .Values.rpcpassword }}
app: {{ include "bitcoincore.fullname" . }}
{{- if .Values.collectLogs }}
collect_logs: "true"
Expand Down Expand Up @@ -89,7 +90,7 @@ spec:
- name: BITCOIN_RPC_USER
value: user
- name: BITCOIN_RPC_PASSWORD
value: password
value: {{ .Values.rpcpassword }}
{{- if .Values.metrics }}
- name: METRICS
value: {{ .Values.metrics }}
Expand Down
3 changes: 2 additions & 1 deletion resources/charts/bitcoincore/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,13 @@ baseConfig: |
fallbackfee=0.00001000
listen=1
rpcuser=user
rpcpassword=password
# rpcpassword MUST be set as a chart value
rpcallowip=0.0.0.0/0
rpcbind=0.0.0.0
rest=1
# rpcport and zmq endpoints are configured by chain in configmap.yaml
rpcpassword: gn0cchi

config: ""

Expand Down
2 changes: 1 addition & 1 deletion src/warnet/control.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def run(scenario_file: str, debug: bool, source_dir, additional_args: tuple[str]
"rpc_host": tank.status.pod_ip,
"rpc_port": int(tank.metadata.labels["RPCPort"]),
"rpc_user": "user",
"rpc_password": "password",
"rpc_password": tank.metadata.labels["rpcpassword"],
"init_peers": [],
}
for tank in tankpods
Expand Down

0 comments on commit 2fbbf8c

Please sign in to comment.