github.com/smartcontractkit/chainlink-testing-framework/libs@v0.0.0-20240227141906-ec710b4eb1a3/k8s/examples/modify_helm/env.go (about) 1 package main 2 3 import ( 4 "fmt" 5 6 "github.com/smartcontractkit/chainlink-testing-framework/libs/k8s/environment" 7 "github.com/smartcontractkit/chainlink-testing-framework/libs/k8s/pkg/helm/chainlink" 8 "github.com/smartcontractkit/chainlink-testing-framework/libs/k8s/pkg/helm/ethereum" 9 "github.com/smartcontractkit/chainlink-testing-framework/libs/k8s/pkg/helm/mockserver" 10 mockservercfg "github.com/smartcontractkit/chainlink-testing-framework/libs/k8s/pkg/helm/mockserver-cfg" 11 ) 12 13 func main() { 14 e := environment.New(&environment.Config{ 15 NamespacePrefix: "modified-env", 16 Labels: []string{fmt.Sprintf("envType=Modified")}, 17 }). 18 AddHelm(mockservercfg.New(nil)). 19 AddHelm(mockserver.New(nil)). 20 AddHelm(ethereum.New(nil)). 21 AddHelm(chainlink.New(0, map[string]any{ 22 "replicas": 1, 23 })) 24 err := e.Run() 25 if err != nil { 26 panic(err) 27 } 28 e.Cfg.KeepConnection = true 29 e.Cfg.RemoveOnInterrupt = true 30 e, err = e. 31 ReplaceHelm("chainlink-0", chainlink.New(0, map[string]any{ 32 "replicas": 2, 33 })) 34 if err != nil { 35 panic(err) 36 } 37 err = e.Run() 38 if err != nil { 39 panic(err) 40 } 41 }