mirror of
https://github.com/Rainyy21/k3s-health-dashboard.git
synced 2026-10-11 02:40:19 -04:00
9 lines
233 B
Python
9 lines
233 B
Python
from fastapi import APIRouter, Query
|
|
from app.k8s_client import fetch_pods
|
|
|
|
router = APIRouter(prefix="/pods", tags=["pods"])
|
|
|
|
@router.get("/")
|
|
def list_pods(namespace: str = Query("all")):
|
|
return fetch_pods(namespace=namespace)
|