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
2 changes: 1 addition & 1 deletion deploy/helm/coderag/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: >-
type: application

# Chart version — bump on every chart change (independent of the app version).
version: 0.1.1
version: 0.1.2

# Version of CodeRAG this chart deploys by default. No versioned container images
# are published yet, so the default image tag is the rolling `:beta` channel; pin
Expand Down
19 changes: 16 additions & 3 deletions deploy/helm/coderag/templates/reindex-cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,24 @@ spec:
AUTH="Authorization: Bearer ${CODERAG_API_KEY}"
fi
echo "Reindex (full=$FULL) via $CODERAG_URL ..."
curl -fsS -X POST ${AUTH:+-H "$AUTH"} "$CODERAG_URL/index" \
# -w writes the HTTP status on its own line; --fail-with-body keeps the
# body on 4xx/5xx so we can act on the code instead of just exiting.
code=$(curl -sS -o /dev/stderr -w '%{http_code}' \
-X POST ${AUTH:+-H "$AUTH"} "$CODERAG_URL/index" \
-H 'content-type: application/json' \
-d "{\"full\": $FULL}"
-d "{\"full\": $FULL}")
echo
echo "Reindex request complete."
# 409 = an index build is already running (e.g. the per-upgrade init
# Job, or an overlapping run). That is a benign no-op for a periodic
# refresh, not a failure — don't fail the Job and trigger backoff retries.
if [ "$code" = "409" ]; then
echo "Reindex skipped: a build is already in progress (HTTP 409)."
exit 0
fi
case "$code" in
2*) echo "Reindex request complete (HTTP $code)." ;;
*) echo "Reindex failed (HTTP $code)." >&2; exit 1 ;;
esac
resources:
{{- toYaml .Values.index.resources | nindent 16 }}
volumeMounts:
Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/coderag/templates/ui-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
# The UI bundles the engine and writes its own index — single writer, one replica.
replicas: 1
strategy:
type: Recreate
{{- toYaml .Values.ui.strategy | nindent 4 }}
selector:
matchLabels:
{{- include "coderag.selectorLabels" . | nindent 6 }}
Expand Down
20 changes: 20 additions & 0 deletions deploy/helm/coderag/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,26 @@ server:
ui:
enabled: false
containerPort: 8501
# -- Deployment update strategy. Defaults to Recreate: the UI is a single writer on
# a ReadWriteOnce volume, so the old pod must release the claim before the new one
# binds it. The cost is a brief gap with no Ready pod on every image change — visible
# behind an ingress as a 502 / "no available server".
#
# Switch to a zero-surge RollingUpdate to make image rollouts seamless (new pod goes
# Ready before the old one is removed) ONLY when BOTH hold:
# 1. the volume tolerates two pods mounting it at once — same-node RWO (e.g. k3s
# local-path, where the surge pod lands on the same node) or a ReadWriteMany
# class — otherwise the surge pod is stuck Pending and the rollout stalls; and
# 2. there are no concurrent index writes during the overlap (the UI only writes on
# Reindex, so a read-only / demo-mode UI is safe; a UI actively reindexing is not).
# Worst case if (1) is misjudged is a stalled-but-still-up rollout, never an outage.
# strategy:
# type: RollingUpdate
# rollingUpdate:
# maxUnavailable: 0
# maxSurge: 1
strategy:
type: Recreate
service:
type: ClusterIP
port: 8501
Expand Down
Loading