🌳
pt0/deployF/k8sProvF/k3sF/k3sExtIpsSyncF/mkjob.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()
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 })