Files
portal/app/page.tsx
T
Tom Chien (IQ-AS) ef3ab9255d
CI/CD (dev on branch, prod on tag) / build-and-deploy (push) Successful in 4m54s
add email 02
2026-11-19 16:16:43 +08:00

78 lines
2.8 KiB
TypeScript

import { Header } from "@/components/Header";
import { Section } from "@/components/Section";
import { Travel } from "@/components/Travel";
import { CicdFlow } from "@/components/lab/CicdFlow";
import { RequestFlow } from "@/components/lab/RequestFlow";
import { ServiceLinks } from "@/components/lab/ServiceLinks";
import { profile } from "@/content/site";
function SubHeading({
title,
children,
}: {
title: string;
children?: React.ReactNode;
}) {
return (
<div className="mb-8">
<h3 className="text-xl font-semibold text-white">{title}</h3>
{children && (
<p className="mt-1 max-w-3xl text-sm leading-6 text-slate-400">
{children}
</p>
)}
</div>
);
}
export default function Home() {
return (
<>
<span id="top" />
<Header />
<main className="flex-1">
<h1 className="sr-only">{profile.name}: Kubernetes lab portal</h1>
<Section
id="lab"
eyebrow="The Lab"
title="A Self-Hosted CI/CD and Kubernetes lab on a Mac mini"
lead="Kubernetes comes from Docker Desktop on my Mac mini in my home lab. A host-level Nginx accepts traffic on port 80 and hands it to the cluster's ingress controller, which routes each application hostname to the right service. Harbor and Gitea run in the same cluster, but each is exposed by its own LoadBalancer service on a host port, so they skip the ingress. Everything below is hosted on that one machine, including this site."
>
<div>
<SubHeading title="How a request reaches a pod">
DNS is managed at GoDaddy. Application traffic passes through the
host Nginx and the cluster ingress before landing on a pod. Harbor
and Gitea are pods in the cluster too, but each is exposed by its
own LoadBalancer service on :8080 and :3001, so they are not
behind the ingress.
</SubHeading>
<RequestFlow />
</div>
<div className="mt-20">
<SubHeading title="From git push to running pod">
Gitea Actions builds the image on the Docker Desktop daemon,
stores it in Harbor and deploys it with Helm. A branch push goes
to dev, a tag goes to prod.
</SubHeading>
<CicdFlow />
</div>
<div className="mt-20">
<SubHeading title="Lab services">
Live endpoints you can open yourself.
</SubHeading>
<ServiceLinks />
</div>
</Section>
<Travel />
</main>
<footer className="border-t border-white/10 py-8 text-center text-sm text-slate-500">
Built with Next.js and deployed by the pipeline described above.
</footer>
</>
);
}