Skip to content

golgoth31/sreportal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

365 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SRE Portal

A Kubernetes operator that discovers DNS records from your cluster resources and presents them in a unified web dashboard. It integrates with external-dns sources (Services, Ingresses, Istio Gateways, Gateway API routes, DNSEndpoints) and supports manual DNS entries through Custom Resources.

Features

  • DNS Discovery -- Automatically discover DNS records from Services, Ingresses, Istio Gateways, Gateway API routes (HTTPRoute, GRPCRoute, TLSRoute, TCPRoute, UDPRoute), and external-dns endpoints across all namespaces
  • Portal Routing -- Organize endpoints into multiple portals using simple Kubernetes annotations (sreportal.io/portal)
  • Remote Portals -- Federate DNS data across clusters by connecting portals to remote SRE Portal instances
  • Alertmanager Integration -- Link Prometheus Alertmanager instances to portals; display active alerts in the dashboard
  • Web Dashboard -- React-powered SPA with Links (FQDNs), Alerts (per-portal), sidebar navigation, and light/dark theme
  • MCP Servers -- Built-in Model Context Protocol for AI assistants: DNS/portals at /mcp and /mcp/dns, alerts at /mcp/alerts
  • Connect API -- gRPC-compatible Connect protocol API for FQDNs, portals, and alerts
  • Flexible Grouping -- Group FQDNs by annotation, label, namespace, or custom rules
  • Single Container -- Controller, gRPC API, web UI, and MCP servers all run in one container

Architecture

┌──────────────────────────────────────────────────────┐
│                   SRE Portal Pod                     │
│                                                      │
│  ┌──────────────┐  ┌─────────────┐  ┌────────────┐  │
│  │  Controllers  │  │ Connect API │  │   Web UI   │  │
│  │  (ctrl-runtime)│  │  (gRPC/h2c) │  │  (Echo v5) │  │
│  └──────┬───────┘  └──────┬──────┘  └─────┬──────┘  │
│         │                 │               │          │
│         └─────────┬───────┴───────┬───────┘          │
│                   │               │                  │
│            K8s API Server    MCP (/mcp, /mcp/dns,     │
│                              /mcp/alerts)            │
└──────────────────────────────────────────────────────┘

SRE Portal defines four CRDs:

CRD Description
Portal Named web dashboard view with optional remote federation
DNS Manual DNS entry groups linked to a portal
DNSRecord Auto-discovered endpoints (managed by the operator)
Alertmanager Alertmanager instance linked to a portal; operator fetches active alerts and exposes them in the UI and API

Quick Start

Prerequisites

  • Kubernetes cluster v1.28+
  • kubectl configured to access the cluster
  • Helm 3+ (for Helm install)

Install with Helm

helm install sreportal oci://ghcr.io/golgoth31/charts/sreportal \
  --namespace sreportal-system --create-namespace

Access the Dashboard

kubectl port-forward -n sreportal-system svc/sreportal-controller-manager 8082:8082

Open http://localhost:8082 in your browser.

Annotate Your Services

The operator discovers DNS records from resources with the external-dns.alpha.kubernetes.io/hostname annotation:

apiVersion: v1
kind: Service
metadata:
  name: my-web-app
  annotations:
    external-dns.alpha.kubernetes.io/hostname: "myapp.example.com"
    sreportal.io/portal: "main"           # optional: route to a specific portal
    sreportal.io/groups: "Backend,APIs"    # optional: assign to groups
spec:
  type: ClusterIP
  ports:
    - port: 80

Connect an AI Assistant (MCP)

SRE Portal exposes two MCP servers (Streamable HTTP):

Endpoint Tools
/mcp or /mcp/dns search_fqdns, list_portals, get_fqdn_details
/mcp/alerts list_alerts

Claude Code (DNS/portals):

claude mcp add sreportal --transport http http://localhost:8082/mcp

Claude Code (alerts):

claude mcp add sreportal-alerts --transport http http://localhost:8082/mcp/alerts

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "sreportal": {
      "transport": "http",
      "url": "http://localhost:8082/mcp"
    },
    "sreportal-alerts": {
      "transport": "http",
      "url": "http://localhost:8082/mcp/alerts"
    }
  }
}

Documentation

Full documentation is available at the documentation site:

Technology Stack

Component Technology
Operator Go 1.25, Kubebuilder, controller-runtime v0.23
API Connect protocol (connectrpc.com/connect)
Web UI React 19, Vite, Tailwind CSS v4, shadcn/ui, TanStack Query v5
MCP Model Context Protocol (mark3labs/mcp-go)
Web server Echo v5 with h2c
Codegen Buf (protobuf)
DNS sources sigs.k8s.io/external-dns
Testing Ginkgo v2, Gomega, envtest

Development

make build          # Build manager binary
make run            # Run locally with current kubeconfig
make test           # Unit tests with envtest
make manifests      # Regenerate CRDs/RBAC
make proto          # Regenerate Go + TypeScript from proto
make build-web      # Build React app (Vite)

See Development for the full guide.

License

Copyright 2026.

Licensed under the Apache License, Version 2.0. See LICENSE for details.