utils.ts 505 B

123456789101112131415161718
  1. export const getSubkeyContainers = (validators: number, dataPath: string) => {
  2. const result = []
  3. for (let i = 1; i <= validators; i++) {
  4. result.push({
  5. name: `subkey-node-${i}`,
  6. image: 'parity/subkey:latest',
  7. command: ['/bin/sh', '-c'],
  8. args: [`subkey generate-node-key > ${dataPath}/privatekey${i} 2> ${dataPath}/publickey${i}`],
  9. volumeMounts: [
  10. {
  11. name: 'config-data',
  12. mountPath: dataPath,
  13. },
  14. ],
  15. })
  16. }
  17. return result
  18. }