🌳
pt0/deployF/ethF/getExCliResourcesF.mts
3import { jwtPath } from './jwtPathF.mts'
5import * as _ from 'lodash-es'
8export const getEth2Vals = ({ethNetwork, eth1ClientName}: {ethNetwork: string, eth1ClientName: string}) => {
9 const walletPassSecName = `wallet2pass-${ethNetwork}`
10 const jwtSecretName = `${ethNetwork}-jwt`
11 const httpWeb3Prov = `http://${eth1ClientName}-${ethNetwork}:8545`
12 const execEngProv = `http://${eth1ClientName}-${ethNetwork}:8551`
14 return {walletPassSecName, jwtSecretName, httpWeb3Prov, execEngProv}
17export const getEth2VolMounts = ({name, ethNetwork, mountPath = '/data'}: {name: string, ethNetwork: string, mountPath?: string}) => {
18 const jwtSecretName = `${ethNetwork}-jwt`
20 const {volumes: volumes1, volumeMounts: volumeMounts1} = pvcVolumeMounts({name, mountPath})
22 const volumes = [
23 {
24 name: jwtSecretName,
25 secret: {
26 secretName: jwtSecretName
27 }
28 },
29 ...volumes1
30 ]
31 const volumeMounts = [
32 {
33 name: jwtSecretName,
34 mountPath: jwtPath,
35 subPath: jwtSecretName,
36 },
37 ...volumeMounts1
38 ]
39 return {volumes, volumeMounts}
42export const getExCliResources = async ({action, name, sizeGb, nodePort}: {action: string, name: string, sizeGb: number, nodePort: number}) => {
43 return [
44 kubeSvcTmpl({name, portNos: [8545, 8551]}),
45 dualNodePortTmpl({name, selfName: name + '-p2p', nodePort}),
46 ...await genericPvcTmplA({name, sizeGb, action}),
47 ]