Skip to content

feat(k8s): consolidate llm profiles by vram, bypass squid for rfc1918/local, add gemma4:31b - #654

Merged
dan-petty merged 2 commits into
release/v0.2.23from
feat/k8s-provider-vram-services
Sep 28, 2026
Merged

dan-petty merged 2 commits into
release/v0.2.23from
feat/k8s-provider-vram-services

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Summary

This pull request delivers complete consolidation and hardening of the in-cluster LLM infrastructure, proxy routing, and model catalog:

  1. VRAM-Consolidated LLM Profiles & Services:

    • Replaced fragmented host-specific manifests with standardized <llm_provider>-<vram_gib> service tiers (ollama-16gib, ollama-24gib, ollama-32gib, ollama-48gib, ollama-64gib, ollama-72gib, ollama-96gib, ollama-128gib, and corresponding vllm-* tiers).
    • Consolidated vllm-profiles.yaml and ollama-profiles.yaml around single-GPU and multi-GPU VRAM profiles.
    • Migrated PVC and NetworkPolicy resources into k8s/llm/profiles/.
    • Updated LiteLLM Gateway route definitions (k8s/llm/gateway/configmap.yaml) to match virtual models to their optimal hardware and VRAM profiles.
  2. Squid Caching Proxy Bypass for RFC 1918 & Local Domains:

    • Configured NO_PROXY across all stack deployments (llm-gateway, ollama-profiles, vllm-profiles, lightllm, portkey) to explicitly exempt RFC 1918 CIDRs (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16), local domains (.lan, lan, .local, local, .internal, internal), and cluster FQDNs (.svc, .cluster.local).
    • Hardened llm-gateway-perimeter NetworkPolicy with explicit egress rules for private RFC 1918 inference endpoints (ports 11434 and 8000).
    • Resolved litellm.ServiceUnavailableError: Ollama_chatException DNS failures caused by proxying internal traffic through Squid.
  3. Gemma 4 31B Integration:

    • Pulled and verified gemma4:31b on the 32GiB VRAM Volta backend (ollama-32gib).
    • Added gemma4:31b route to llm-gateway-config and updated Open WebUI MODEL_FILTER_LIST and SQLite connection settings.
    • Validated streaming and non-streaming inference directly through both LiteLLM Gateway and Open WebUI.
  4. Ingress & Session Reliability:

    • Applied templated Traefik Ingress routes matching chat.retric.click, ai.retric.click, ollama.retric.click, and qdrant.retric.click.
    • Enforced persistent Open WebUI session key (/app/backend/data/.webui_secret_key) preventing token invalidation on pod restarts.

Verification

  • uv run devops ci: 100% pass across all 10 quality gates.
  • Targeted test suites: tests/test_k8s_llm_gateway.py, tests/test_k8s_squid.py, tests/test_ai_gateway_portkey_lightllm.py, tests/test_k8s_network_policies.py all passing.
  • Live cluster end-to-end verified: devops-chat, devops-coder, and gemma4:31b inference tested and functioning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

1 participant