Skip to content

Commit

Permalink
dynamic nodes connection in config
Browse files Browse the repository at this point in the history
  • Loading branch information
skudasov committed Nov 29, 2023
1 parent fa40a0e commit 541eb6e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions charts/chainlink-cluster/connect.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ network_chain_id = 1337
network_private_key = "ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"
network_ws_url = "ws://geth:8546"
network_http_url = "http://geth:8544"
cl_nodes_num = 6
cl_node_url_template = "http://app-node-%d:6688"
cl_node_internal_dns_record_template = "app-node-%d"
cl_node_user = "[email protected]"
Expand Down
3 changes: 2 additions & 1 deletion integration-tests/k8s/connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ type ConnectionVars struct {
NetworkPrivateKey string `toml:"network_private_key"`
NetworkWSURL string `toml:"network_ws_url"`
NetworkHTTPURL string `toml:"network_http_url"`
CLNodesNum int `toml:"cl_nodes_num"`
CLNodeURLTemplate string `toml:"cl_node_url_template"`
CLNodeInternalDNSRecordTemplate string `toml:"cl_node_internal_dns_record_template"`
CLNodeUser string `toml:"cl_node_user"`
Expand Down Expand Up @@ -66,7 +67,7 @@ func ConnectRemote(l zerolog.Logger) (blockchain.EVMClient, *client2.MockserverC
return nil, nil, nil, nil, nil, err
}
clClients := make([]*client.ChainlinkK8sClient, 0)
for i := 1; i <= 6; i++ {
for i := 1; i <= cfg.CLNodesNum; i++ {
c, err := client.NewChainlinkK8sClient(&client.ChainlinkConfig{
URL: fmt.Sprintf(cfg.CLNodeURLTemplate, i),
Email: cfg.CLNodeUser,
Expand Down

0 comments on commit 541eb6e

Please sign in to comment.