1import { eptMjsRunner } from '../../../eptMjsRunnerF.mts'2import { getReqKlusterCtx } from '../../../k8sF/ctxF/klusterCtxF.mts'3import { syncCronJobPolicy } from '../../../k8sF/jobTypeF.mts'4import { getKubeConfigFilename } from '../../../../serverF/kubePortFwdF/kubeConfigPathAI.mts'5import { ptAnchorInclude } from '../../../../serverF/libF/ptAnchorIncludeF.mts'6import { type importMetaUrlType } from '../../../../ptDirF.mts'8const defaultRunFilePath = ptAnchorInclude('./run.mts', import.meta.url)10export const k8sK3sExtIp = async ({runFilePath = defaultRunFilePath} = {}) => {11 const kcfg = getReqKlusterCtx()12 await eptMjsRunner({13 ...kcfg,14 importMetaUrl: import.meta.url as importMetaUrlType,15 runFilePath,16 name: 'k3sextipsync',17 appPath: 'pt0/deployF',18 envConf: {klustCertsH: kcfg.klustCertsH, cfApiKeySecretName: kcfg.cfApiKeySecretName, domainNames: kcfg.domainNames},19 jobType: {20 kind: 'CronJob',21 schedule: '*/5 * * * *',22 ...syncCronJobPolicy,23 },24 extraDockerSetupLine: 'RUN curl -LO "https://dl.k8s.io/release/v1.35.2/bin/linux/amd64/kubectl" && chmod +x kubectl && mv kubectl /usr/local/bin/',25 secretNames: [26 getKubeConfigFilename(kcfg.cluster_name),27 ...(kcfg.cfApiKeySecretName ? [kcfg.cfApiKeySecretName] : []),28 ],29 })30}