config: env-based service URIs via ConfigMap (prod: SOPS-encrypted)
CI / CI (pull_request) Successful in 32m52s

- config.yaml: prod config with cluster-internal DNS (LLM, OpenSearch, Authentik, Temporal, API-GW)
- config.local.yaml: dev config with external URLs via ingress
- deployment.yaml: remove hardcoded URIs, read all from ConfigMap envFrom
- All downstream service URIs now configurable per environment
- Production config encrypted with SOPS (Age-based)
- Application code reads LLM_ENDPOINT, OPENSEARCH_HOST, AUTHENTIK_ISSUER, etc. from ENV
- Simplifies prod/dev switching: just swap ConfigMap, no code changes
This commit is contained in:
2026-09-13 11:12:53 +09:00
parent 4fdbb48ae6
commit 985bb7ff46
5 changed files with 246 additions and 28 deletions
+32 -10
View File
@@ -1,5 +1,7 @@
# Non-sensitive environment variables for poimen-memory
# Change these without redeploying secrets.
# Production environment configuration for poimen-memory
# All services use cluster-internal DNS names
# This file is encrypted with SOPS in production
# For local dev, use plaintext version with external URLs
apiVersion: v1
kind: ConfigMap
metadata:
@@ -9,19 +11,39 @@ metadata:
app.kubernetes.io/name: poimen-memory
app.kubernetes.io/component: config
data:
# Auth mode: jwt | apikey
MEM_AUTH_MODE: "none"
# Auth mode: jwt | apikey | none
MEM_AUTH_MODE: "jwt"
# Rate limiting
MEM_RATE_LIMIT_INGEST: "100"
MEM_RATE_LIMIT_QUERY: "1000"
MEM_IDEMPOTENCY_TTL_SECS: "86400"
# Embeddings
MEM_EMBEDDING_BATCH_SIZE: "32"
# OpenSearch
OPENSEARCH_HOST: "opensearch.poimen.svc.cluster.local:9200"
# Obsidian
# LLM Configuration (for entity extraction)
LLM_ENDPOINT: "http://api-internal.riotpiao.com:8000/v1/chat/completions"
LLM_MODEL: "qwen:7b"
# Downstream services - read by application from ENV
# Internal cluster DNS (prod) / external URLs (local)
# LLM Service (entity extraction, fact extraction)
LLM_ENDPOINT: "http://reasoning-predictor.llm-serving.svc.cluster.local:8000/v1/chat/completions"
LLM_API_BASE: "http://reasoning-predictor.llm-serving.svc.cluster.local:8000/v1"
LLM_MODEL: "ornith:35b"
LLM_TIMEOUT_SECS: "30"
ENABLE_LLM_EXTRACTION: "true"
# OpenSearch (vector store, BM25 retrieval)
OPENSEARCH_HOST: "opensearch.poimen.svc.cluster.local:9200"
OPENSEARCH_SCHEME: "http"
OPENSEARCH_VERIFY_CERTS: "false"
# Authentik (OIDC provider)
AUTHENTIK_ISSUER: "https://authentik.auth.svc.cluster.local:9443/application/o/poimen/"
AUTHENTIK_VERIFY_SSL: "false"
# Temporal (workflow orchestration - future)
TEMPORAL_ENDPOINT: "temporal-frontend.temporal.svc.cluster.local:7233"
TEMPORAL_NAMESPACE: "poimen"
# API Gateway (external queue, route optimization - future)
GATEWAY_URL: "http://api-gw.poimen.svc.cluster.local:8080"