1import { fix1IngressPublishAddr } from '../../../k8sF/fix1IngressPublishAddrAI.mts'2import { doSetKlusterWcHnIp } from '../../../k8sF/genericExtNameSvcF.mts'3import { getMyCfExtIp, getCfExtIpViaDomain } from '../../../../serverF/cfIpF.mts'4import { getExtIpWithFallbacks } from '../../../../serverF/extIpFallbacksAI.mts'5import { getKlusterCtx } from '../../../k8sF/ctxF/klusterCtxF.mts'7export const k3sExtIpSyncCore = async () => {8 const {cluster_name} = getKlusterCtx()9 console.log('starting k3sextipsync...', {cluster_name})11 const ip = await getExtIpWithFallbacks([getMyCfExtIp, getCfExtIpViaDomain])12 console.log('detected external IP:', ip)14 await fix1IngressPublishAddr({ip})15 await doSetKlusterWcHnIp({ip, action: 'apply'})17 console.log('k3sextipsync completed successfully')18}