import type { NodeProps } from "@xyflow/react";
import { Handle, Position } from "@xyflow/react";
import { Box, Cpu, HardDrive, Network, Server as ServerIcon } from "lucide-react";
import { Badge } from "@/components/ui/badge";
import { cn } from "@/lib/cn";
import type { K8sNodeMetadata, TopologyNodeData } from "@/lib/topology-types";
export function K8sNodeComponent({ data, selected }: NodeProps) {
const nodeData = data as TopologyNodeData;
const metadata = nodeData.metadata as K8sNodeMetadata;
const { node, podCount, serverPods, proxyPods, health, metrics } = metadata;
const getStatusBadge = () => {
switch (health) {
case "healthy":
return
{node.name || "Unknown"}
Kubernetes Node