github.com/kiali/kiali@v1.84.0/tools/README.md (about) 1 # Tools for Kiali maintainers 2 3 This folder contains tools for maintainers of the Kiali project. 4 5 ## Mock graph data 6 7 There's two cli tools to help with testing large graph topologies without needing to deploy the underlying resources. 8 9 **Note:** You do not need to run the generator before running the proxy. The proxy server will run the generator itself and serve up the mock data from memory by default. If you are testing locally, you probably want to use the proxy. If you want to output the mock data as a json file, then run the generator. 10 11 ### proxy server 12 13 The proxy server runs an http proxy that intercepts all `/api/namespaces/graph` calls and returns mock graph data. The rest of the api calls are passed through to the kiali api. To test the kiali ui using the proxy server, you should start the proxy server then, in the kiali ui's `package.json`, replace the `proxy` field with the address of the proxy server e.g. `"proxy": "https://localhost:10201"`. Finally run `yarn start` and navigate to local node server endpoint: `http://localhost:3000`. When you navigate to the graph page, you should see graph rendered with the mock data. 14 15 Running the following command will start the proxy server in https mode. 16 17 ```bash 18 go run tools/cmd/proxy/main.go <kiali-url> --apps 50 --box --https 19 ``` 20 21 For more usage information: 22 23 ```bash 24 go run tools/cmd/proxy/main.go --help 25 ``` 26 27 ### generator 28 29 The generator creates a json file with a mock `/api/namespaces/graph` response. 30 31 Running the following command will create a json file with 50 apps (workloads + services). There is some randomness in the graph generation so running the command multiple times with the same options will yield different results. 32 33 ```bash 34 go run tools/cmd/generate/main.go --apps 50 --box 35 ``` 36 37 For more usage information: 38 39 ```bash 40 go run tools/cmd/generate/main.go --help 41 ```