Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions deploy/kubernetes/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ data:
INDEX_CHUNK_OVERLAP: '10'
INDEX_MICRO_CHUNKS: '0'
INDEX_SEMANTIC_CHUNKS: '1'
INDEX_UPSERT_BACKOFF: '0.5'
INDEX_UPSERT_BATCH: '128'
INDEX_UPSERT_RETRIES: '5'
LLAMACPP_EXTRA_ARGS: ''
LLAMACPP_GPU_LAYERS: '32'
LLAMACPP_GPU_SPLIT: ''
Expand All @@ -47,7 +50,7 @@ data:
LLM_EXPAND_MAX: '0'
LLM_EXPAND_MODEL: phi3:mini
LLM_PROVIDER: ollama
MAX_CHANGED_SYMBOLS_RATIO: '0.6 # If >60% of symbols changed, do full reprocessing'
MAX_CHANGED_SYMBOLS_RATIO: '0.6'
MAX_EMBED_CACHE: '16384'
MAX_MICRO_CHUNKS_PER_FILE: '500'
MCP_INDEXER_URL: http://localhost:8003/mcp
Expand All @@ -68,12 +71,13 @@ data:
MULTI_REPO_MODE: '1'
OLLAMA_HOST: http://host.docker.internal:11434
PRF_ENABLED: '1'
QDRANT_API_KEY: ''
QDRANT_TIMEOUT: '20'
QDRANT_URL: http://qdrant:6333
REFRAG_CANDIDATES: '200'
REFRAG_COMMIT_DESCRIBE: '1'
REFRAG_DECODER: '1'
REFRAG_DECODER_MODE: 'prompt # prompt|soft'
REFRAG_DECODER_MODE: prompt
REFRAG_ENCODER_MODEL: BAAI/bge-base-en-v1.5
REFRAG_GATE_FIRST: '1'
REFRAG_MODE: '1'
Expand Down
3 changes: 0 additions & 3 deletions deploy/kubernetes/indexer-services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ spec:
volumeMounts:
- name: work-volume
mountPath: /work
readOnly: true
- name: metadata-volume
mountPath: /work/.codebase
envFrom:
Expand Down Expand Up @@ -145,7 +144,6 @@ spec:
volumeMounts:
- name: work-volume
mountPath: /work
readOnly: true
- name: metadata-volume
mountPath: /work/.codebase
envFrom:
Expand Down Expand Up @@ -205,7 +203,6 @@ spec:
volumeMounts:
- name: work-volume
mountPath: /work
readOnly: true
- name: metadata-volume
mountPath: /work/.codebase
envFrom:
Expand Down
5 changes: 0 additions & 5 deletions deploy/kubernetes/mcp-http.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -265,11 +265,6 @@ spec:
configMapKeyRef:
name: context-engine-config
key: MEMORY_MCP_URL
- name: CTX_MULTI_COLLECTION
valueFrom:
configMapKeyRef:
name: context-engine-config
key: CTX_MULTI_COLLECTION
- name: FASTMCP_HOST
valueFrom:
configMapKeyRef:
Expand Down
5 changes: 0 additions & 5 deletions deploy/kubernetes/mcp-indexer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,6 @@ spec:
configMapKeyRef:
name: context-engine-config
key: EMBEDDING_MODEL
- name: CTX_MULTI_COLLECTION
valueFrom:
configMapKeyRef:
name: context-engine-config
key: CTX_MULTI_COLLECTION
resources:
requests:
memory: 512Mi
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes/upload-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ spec:
volumes:
- name: work-volume
persistentVolumeClaim:
claimName: upload-work-pvc
claimName: code-repos-pvc
- name: codebase-volume
persistentVolumeClaim:
claimName: upload-codebase-pvc
Expand Down
39 changes: 38 additions & 1 deletion scripts/sync_env_to_k8s.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,52 @@ def parse_env_file(env_path: Path) -> dict:
with env_path.open("r", encoding="utf-8") as f:
for raw_line in f:
line = raw_line.strip()
if not line or line.startswith("#"):
if not line:
continue

commented = False
if line.startswith("#"):
# Support commented defaults of the form "# KEY=VALUE" so that
# template-style .env files can still drive configmap.yaml.
stripped = line.lstrip("#").strip()
if "=" not in stripped:
# Pure comment, skip.
continue

key_part, value_part = stripped.split("=", 1)
key_candidate = key_part.strip()

# Only treat as a default if the key looks like an env var:
# UPPERCASE letters, digits, and underscores, with no spaces/colons.
if (
not key_candidate
or " " in key_candidate
or ":" in key_candidate
or not key_candidate.replace("_", "").isalnum()
or not key_candidate.isupper()
):
# Looks like prose (e.g. "Repository mode: 0=...") rather than
# an environment variable. Leave it as a comment.
continue

line = f"{key_candidate}={value_part.strip()}"
commented = True

if "=" not in line:
continue
key, value = line.split("=", 1)
key = key.strip()
value = value.strip()
if not key:
continue
# Do not let commented defaults override explicit KEY=VALUE entries
# that appeared earlier in the file.
if commented and key in data:
continue
# Strip inline shell-style comments from unquoted values, so that
# "VALUE # comment" becomes just "VALUE".
if "#" in value and not (value.startswith("\"") or value.startswith("'")):
value = value.split("#", 1)[0].rstrip()
# Strip single/double quotes if the whole value is quoted
if (value.startswith("\"") and value.endswith("\"")) or (
value.startswith("'") and value.endswith("'")
Expand Down
Loading