1import { getKlusterCtx } from "../k8sF/ctxF/klusterCtxF.mts"2import * as _ from 'lodash-es'3import { genericIngressTmpl } from '../k8sF/generic1IngressTmplF.mts'4import { assertDefined } from "../../sharedF/assertsF/assertDefinedF.mts"5import { resourcesAction } from '../k8sF/resourcesActionF.mts'7export const k8sHarvDashboardHn = async ({hostnameA}: {hostnameA: string[]}) => {8 // limited harvester dashboard hostname from wildcard hostnameA9 const {clusterVip} = getKlusterCtx()10 assertDefined(clusterVip)12 const name = 'rancher-expose'13 // const name = 'expose-rancher' // was this renamed to ^ in recent harv version14 const namespace = 'cattle-system'15 const resources = [16 genericIngressTmpl({name, svcName: 'rancher', namespace, hostnameA, ingressAnnotationsH: {17 'nginx.ingress.kubernetes.io/server-alias': clusterVip, // IMPORTANT otherwise nodes cant join18 }}),19 ]20 await resourcesAction({resources})21}