From 541eb6ef5919172af16d1a0497eda1372345b2ce Mon Sep 17 00:00:00 2001 From: skudasov Date: Thu, 30 Nov 2023 00:51:41 +0100 Subject: [PATCH] dynamic nodes connection in config --- charts/chainlink-cluster/connect.toml | 1 + integration-tests/k8s/connect.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/charts/chainlink-cluster/connect.toml b/charts/chainlink-cluster/connect.toml index f866212ed07..f0a74d4c144 100644 --- a/charts/chainlink-cluster/connect.toml +++ b/charts/chainlink-cluster/connect.toml @@ -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 = "notreal@fakeemail.ch" diff --git a/integration-tests/k8s/connect.go b/integration-tests/k8s/connect.go index e927761fe2e..34eafc42e24 100644 --- a/integration-tests/k8s/connect.go +++ b/integration-tests/k8s/connect.go @@ -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"` @@ -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,