You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Go REST API Server for Incident Management & Alert Processing
Overview
The KubeRCA Backend is a Go-based REST API server that serves as the central hub for the KubeRCA system. It receives Alertmanager webhooks, manages incidents and alerts, handles authentication, and coordinates with the Agent service for AI-powered analysis.
Key Responsibilities
Receive and process Alertmanager webhook alerts
Create and manage incidents with alert associations
Send Slack notifications with thread tracking
Coordinate analysis requests with the Agent service
Store and search incident embeddings via pgvector
Provide JWT-based authentication
Architecture
flowchart LR
AM[Alertmanager] -->|Webhook| BE[Backend]
BE -->|Notification| SL[Slack]
BE -->|Analyze Request| AG[Agent]
BE -->|Embeddings| LLM[Gemini API]
BE <-->|Data| PG[(PostgreSQL + pgvector)]
FE[Frontend] -->|REST API| BE
Loading
Tech Stack
Category
Technology
Language
Go 1.24
Framework
Gin
Database
PostgreSQL + pgvector
Auth
JWT (golang-jwt/jwt/v5)
AI
Google GenAI (embeddings)
Container
Docker (multi-stage build)
CI/CD
GitHub Actions
Quick Start
Prerequisites
Go 1.24+
PostgreSQL with pgvector extension
(Optional) Slack Bot Token for notifications
Installation
# Run in repository root# (monorepo layout: cd backend/main)
go mod tidy
Run Development Server
go run .
The server starts at http://localhost:8080 by default.
Run Tests
go test ./...
Build Binary
go build -o main .
Merge Policy (release-please)
Prefer Squash and merge (or Rebase and merge) into main to keep a single conventional commit per change.
Avoid merge commits with conventional prefixes (e.g., feat:, fix:) to prevent duplicate changelog entries.
Do not edit CHANGELOG.md manually; release-please owns it.