fix: restore deployment — ingress routing, readiness probes, rate limiter
Some checks failed
Build and Deploy GooSeek / build-and-deploy (push) Has been cancelled
Some checks failed
Build and Deploy GooSeek / build-and-deploy (push) Has been cancelled
- Ingress: route /api/* on gooseek.ru to api-gateway (was going to webui) - api-gateway: move /health and /ready before JWT/rate-limit middleware to prevent liveness probe 429 failures causing CrashLoopBackOff - Readiness probes: fix agent-svc, search-svc, scraper-svc to use /health (they don't implement /ready endpoint, causing permanent 0/1 status) - ConfigMap: add missing CHAT_SVC_URL and API_GATEWAY_URL - deploy.sh: also clean up misplaced NetworkPolicy from gooseek namespace - webui: add Next.js rewrites to proxy /api/* to api-gateway Made-with: Cursor
This commit is contained in:
@@ -80,6 +80,14 @@ func main() {
|
||||
|
||||
app.Get("/metrics", metrics.MetricsHandler())
|
||||
|
||||
app.Get("/health", func(c *fiber.Ctx) error {
|
||||
return c.JSON(fiber.Map{"status": "ok"})
|
||||
})
|
||||
|
||||
app.Get("/ready", func(c *fiber.Ctx) error {
|
||||
return c.JSON(fiber.Map{"status": "ready"})
|
||||
})
|
||||
|
||||
app.Use(middleware.JWT(middleware.JWTConfig{
|
||||
Secret: cfg.JWTSecret,
|
||||
AuthSvcURL: cfg.AuthSvcURL,
|
||||
@@ -98,14 +106,6 @@ func main() {
|
||||
}))
|
||||
}
|
||||
|
||||
app.Get("/health", func(c *fiber.Ctx) error {
|
||||
return c.JSON(fiber.Map{"status": "ok"})
|
||||
})
|
||||
|
||||
app.Get("/ready", func(c *fiber.Ctx) error {
|
||||
return c.JSON(fiber.Map{"status": "ready"})
|
||||
})
|
||||
|
||||
app.Post("/api/chat", handleChat)
|
||||
app.All("/api/*", handleProxy)
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ spec:
|
||||
periodSeconds: 20
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /ready
|
||||
path: /health
|
||||
port: 3018
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 15
|
||||
|
||||
@@ -8,6 +8,7 @@ data:
|
||||
CRAWL4AI_URL: "http://crawl4ai:11235"
|
||||
REDIS_URL: "redis://redis:6379"
|
||||
DATABASE_URL: "postgres://gooseek:gooseek@postgres:5432/gooseek?sslmode=disable"
|
||||
CHAT_SVC_URL: "http://chat-svc:3005"
|
||||
DISCOVER_SVC_URL: "http://discover-svc:3002"
|
||||
MASTER_AGENTS_SVC_URL: "http://agent-svc:3018"
|
||||
SEARCH_SVC_URL: "http://search-svc:3001"
|
||||
@@ -23,6 +24,7 @@ data:
|
||||
AUTH_SVC_URL: "http://auth-svc:3050"
|
||||
TRAVEL_SVC_URL: "http://travel-svc:3035"
|
||||
ADMIN_SVC_URL: "http://admin-svc:3040"
|
||||
API_GATEWAY_URL: "http://api-gateway:3015"
|
||||
OLLAMA_BASE_URL: "http://ollama:11434"
|
||||
OLLAMA_MODEL: "qwen3.5:9b"
|
||||
OLLAMA_EMBEDDING_MODEL: "qwen3-embedding:0.6b"
|
||||
|
||||
@@ -88,9 +88,10 @@ echo "=== Applying sandbox namespace resources ==="
|
||||
kubectl apply -f "$SCRIPT_DIR/sandbox-namespace.yaml"
|
||||
kubectl apply -f "$SCRIPT_DIR/opensandbox-sandbox-ns.yaml"
|
||||
|
||||
# Clean up misplaced quota/limitrange from gooseek namespace (legacy fix)
|
||||
# Clean up misplaced sandbox resources from gooseek namespace (legacy fix)
|
||||
kubectl delete resourcequota sandbox-quota -n gooseek --ignore-not-found=true 2>/dev/null || true
|
||||
kubectl delete limitrange sandbox-limits -n gooseek --ignore-not-found=true 2>/dev/null || true
|
||||
kubectl delete networkpolicy sandbox-isolation -n gooseek --ignore-not-found=true 2>/dev/null || true
|
||||
|
||||
# Apply kustomization
|
||||
echo ""
|
||||
|
||||
@@ -21,6 +21,13 @@ spec:
|
||||
- host: gooseek.ru
|
||||
http:
|
||||
paths:
|
||||
- path: /api
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: api-gateway
|
||||
port:
|
||||
number: 3015
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
|
||||
@@ -39,7 +39,7 @@ spec:
|
||||
periodSeconds: 15
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /ready
|
||||
path: /health
|
||||
port: 3021
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
|
||||
@@ -39,7 +39,7 @@ spec:
|
||||
periodSeconds: 15
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /ready
|
||||
path: /health
|
||||
port: 3001
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
|
||||
@@ -1,12 +1,22 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
const API_GATEWAY = process.env.API_GATEWAY_URL || process.env.API_URL || 'http://api-gateway:3015';
|
||||
|
||||
const nextConfig = {
|
||||
output: 'standalone',
|
||||
reactStrictMode: true,
|
||||
env: {
|
||||
API_URL: process.env.API_URL || 'http://localhost:3015',
|
||||
API_URL: API_GATEWAY,
|
||||
NEXT_PUBLIC_TWOGIS_API_KEY: process.env.NEXT_PUBLIC_TWOGIS_API_KEY || process.env.TWOGIS_API_KEY || '',
|
||||
NEXT_PUBLIC_ENABLED_ROUTES: process.env.NEXT_PUBLIC_ENABLED_ROUTES || '',
|
||||
},
|
||||
async rewrites() {
|
||||
return [
|
||||
{
|
||||
source: '/api/:path*',
|
||||
destination: `${API_GATEWAY}/api/:path*`,
|
||||
},
|
||||
];
|
||||
},
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
|
||||
Reference in New Issue
Block a user