Created
May 11, 2018 17:31
-
-
Save alecmerdler/ba96a135155a9d4c2b345d3a30eab03b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { execSync } = require('child_process'); | |
/** | |
* Create a bunch of configmaps for load testing. | |
*/ | |
new Array(10000).fill(0).forEach((_, i) => { | |
const configMap = { | |
apiVersion: 'v1', | |
kind: 'ConfigMap', | |
metadata: { | |
namespace: 'load-test', | |
name: `test-${i}`, | |
}, | |
data: { | |
key: 'val', | |
} | |
}; | |
const result = execSync(`echo '${JSON.stringify(configMap)}' | kubectl create -f - `).toString().trim(); | |
console.log(result); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment