Same agent Smaller bill. The tools and infrastructure to get more work from your AI. Fewer tokens. Less compute. Lower cost.
TypeScript agent-harnessagent-harness-engineeringai-engineeringai-observabilityamd-gpuclaude-codeclickhousecodexcoding-agentcoding-agentscursorgenaigpu-monitoringllm-observabilityllmopsnvidia-smiobservabilityopen-sourceopenaiopentelemetry
fix: controller release workflow (#1166)
Aman Agarwalc5551ced164d
diff --git a/.github/workflows/controller-release.yml b/.github/workflows/controller-release.ymlindex dc52e0c0..d7fad6f6 100644--- a/.github/workflows/controller-release.yml+++ b/.github/workflows/controller-release.yml@@ -132,13 +132,11 @@ jobs:cd distsha256sum * > SHA256SUMS.txt- - name: Create GitHub Release+ - name: Upload release assetsuses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2with:- name: "OpenLIT Controller ${{ steps.version.outputs.version }}"files: |dist/*- generate_release_notes: true# ── 4. Docker multi-arch image → GHCR ─────────────────────────────────────docker:diff --git a/openlit-controller/.gitignore b/openlit-controller/.gitignoreindex 624537ed..732255d4 100644--- a/openlit-controller/.gitignore+++ b/openlit-controller/.gitignore@@ -2,3 +2,12 @@ openlit-controller.obi-src/*.tar.gzdist/++# libbpf headers copied by `make setup-bpf-headers` (vmlinux.h is committed)+internal/scanner/bpf/bpf_helpers.h+internal/scanner/bpf/bpf_helper_defs.h+internal/scanner/bpf/bpf_tracing.h++# bpf2go generated files (rebuilt by `make generate`)+internal/scanner/*_bpfel.go+internal/scanner/*_bpfel.odiff --git a/openlit-controller/Dockerfile b/openlit-controller/Dockerfileindex 76e6c691..c9bd60ff 100644--- a/openlit-controller/Dockerfile+++ b/openlit-controller/Dockerfile@@ -30,7 +30,7 @@ FROM golang:1.24-bookworm AS builderARG VERSION=devRUN apt-get update && apt-get install -y --no-install-recommends \- clang llvm libbpf-dev linux-headers-generic bpftool && \+ clang llvm libbpf-dev && \rm -rf /var/lib/apt/lists/*WORKDIR /build@@ -39,7 +39,7 @@ RUN go mod downloadCOPY . .-RUN make setup-bpf generate+RUN make setup-bpf-headers generateRUN CGO_ENABLED=0 go build -ldflags "-s -w -X github.com/openlit/openlit/openlit-controller/internal/server.Version=${VERSION}" \-o openlit-controller ./cmd/controllerdiff --git a/openlit-controller/Makefile b/openlit-controller/Makefileindex 2afe33c8..6ed61159 100644--- a/openlit-controller/Makefile+++ b/openlit-controller/Makefile@@ -11,13 +11,20 @@ elseBPF_TARGET_ARCH := $(UNAME_M)endif-.PHONY: setup-bpf-setup-bpf:- bpftool btf dump file /sys/kernel/btf/vmlinux format c > $(SCANNER_DIR)/bpf/vmlinux.h+# Copy libbpf headers needed for BPF compilation.+# vmlinux.h is committed as a minimal hand-maintained header (see bpf/vmlinux.h).+.PHONY: setup-bpf-headers+setup-bpf-headers:cp /usr/include/bpf/bpf_helpers.h $(SCANNER_DIR)/bpf/cp /usr/include/bpf/bpf_helper_defs.h $(SCANNER_DIR)/bpf/cp /usr/include/bpf/bpf_tracing.h $(SCANNER_DIR)/bpf/+# Full setup: regenerate vmlinux.h from the running kernel + copy headers.+# Requires /sys/kernel/btf/vmlinux (available on the host, NOT inside Docker).+.PHONY: setup-bpf+setup-bpf: setup-bpf-headers+ bpftool btf dump file /sys/kernel/btf/vmlinux format c > $(SCANNER_DIR)/bpf/vmlinux.h+.PHONY: generategenerate:cd $(SCANNER_DIR) && GOPACKAGE=scanner go run github.com/cilium/ebpf/cmd/bpf2go -cc clang -target bpfel llmScanner ./bpf/llm_scanner.bpf.c -- -I./bpf -D__TARGET_ARCH_$(BPF_TARGET_ARCH)diff --git a/openlit-controller/internal/scanner/bpf/vmlinux.h b/openlit-controller/internal/scanner/bpf/vmlinux.hnew file mode 100644index 00000000..b98c438e--- /dev/null+++ b/openlit-controller/internal/scanner/bpf/vmlinux.h@@ -0,0 +1,126 @@+/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */+/*+ * Minimal vmlinux.h — hand-maintained subset of kernel types used by+ * llm_scanner.bpf.c. This avoids a build-time dependency on+ * /sys/kernel/btf/vmlinux (which is unavailable inside Docker BuildKit).+ *+ * Only the types actually referenced by the BPF program are included.+ * CO-RE (preserve_access_index) is applied so the BPF loader can+ * relocate field accesses at runtime if the target kernel's layout+ * differs.+ *+ * To regenerate a full vmlinux.h from a running kernel (local dev):+ * bpftool btf dump file /sys/kernel/btf/vmlinux format c > vmlinux.h+ */++#ifndef __VMLINUX_H__+#define __VMLINUX_H__++#pragma clang attribute push (__attribute__((preserve_access_index)), apply_to = record)++/* ── Basic scalar types ───────────────────────────────────────────── */++typedef unsigned char __u8;+typedef short unsigned int __u16;+typedef unsigned int __u32;+typedef unsigned long long __u64;+typedef signed char __s8;+typedef short int __s16;+typedef int __s32;+typedef long long __s64;++typedef __u16 __be16;+typedef __u32 __be32;+typedef __u64 __be64;++typedef _Bool bool;+enum { false = 0, true = 1 };++/* ── Opaque kernel types (used only as kprobe parameter types) ──── */++struct sock;+struct sockaddr;++/* ── IPv4 socket address ──────────────────────────────────────────── */++struct in_addr {+ __be32 s_addr;+};++struct sockaddr_in {+ __u16 sin_family;+ __be16 sin_port;+ struct in_addr sin_addr;+ unsigned char __pad[8]; /* sizeof(struct sockaddr) == 16 */+};++/* ── IPv6 socket address ──────────────────────────────────────────── */++struct in6_addr {+ union {+ __u8 in6_u[16];+ };+};++struct sockaddr_in6 {+ __u16 sin6_family;+ __be16 sin6_port;+ __be32 sin6_flowinfo;+ struct in6_addr sin6_addr;+ __u32 sin6_scope_id;+};++/* ── Architecture-specific pt_regs ────────────────────────────────+ *+ * bpf_tracing.h's BPF_KPROBE macro reads function arguments from+ * registers via struct pt_regs (x86) or struct user_pt_regs (arm64).+ * The field names below must match what bpf_tracing.h expects.+ */++#if defined(__TARGET_ARCH_x86)++struct pt_regs {+ long unsigned int r15;+ long unsigned int r14;+ long unsigned int r13;+ long unsigned int r12;+ long unsigned int bp;+ long unsigned int bx;+ long unsigned int r11;+ long unsigned int r10;+ long unsigned int r9;+ long unsigned int r8;+ long unsigned int ax;+ long unsigned int cx;+ long unsigned int dx;+ long unsigned int si;+ long unsigned int di;+ long unsigned int orig_ax;+ long unsigned int ip;+ long unsigned int cs;+ long unsigned int flags;+ long unsigned int sp;+ long unsigned int ss;+};++#elif defined(__TARGET_ARCH_arm64)++struct user_pt_regs {+ __u64 regs[31];+ __u64 sp;+ __u64 pc;+ __u64 pstate;+};++struct pt_regs {+ struct user_pt_regs user_regs;+ __u64 orig_x0;+ __s32 syscallno;+ __u32 unused2;+};++#endif /* __TARGET_ARCH_* */++#pragma clang attribute pop++#endif /* __VMLINUX_H__ */