chart data fixes

This commit is contained in:
2026-04-01 03:09:54 -04:00
parent 9e6a20c218
commit ca44e68f64
7 changed files with 102 additions and 16 deletions

71
bin/dev
View File

@@ -553,6 +553,9 @@ deep_restart() {
# Force restart iceberg-catalog since it depends on postgres and minio
echo -e "${GREEN}→${NC} Force restarting iceberg-catalog (depends on postgres/minio)..."
kubectl delete pod -l app=iceberg-catalog 2>/dev/null || true
# Remove all sandbox deployments and services to free quota
echo -e "${GREEN}→${NC} Removing all sandbox deployments and services..."
kubectl delete deployments,services --all -n dexorder-sandboxes 2>/dev/null || true
;;
*)
echo -e "${RED}Error: Unknown service '$service'${NC}"
@@ -711,19 +714,75 @@ case "$COMMAND" in
rebuild_images
deploy_services
else
# Multiple services specified
# Multiple services specified: rebuild ALL first, then deploy ALL together.
# Deploying one-at-a-time causes each deploy to revert the previous service's
# image tag override (each kubectl apply -k . only carries one tag at a time).
sandbox_requested=0
deploy_services_list=()
for service in "$@"; do
rebuild_images "$service"
# Special handling for sandbox: delete sandbox deployments instead of applying kustomization
if [ "$service" == "sandbox" ]; then
echo -e "${GREEN}→${NC} Deleting user container deployments in dexorder-sandboxes namespace..."
kubectl delete deployments --all -n dexorder-sandboxes 2>/dev/null || true
echo -e "${GREEN}✓ User containers will be recreated by gateway on next login${NC}"
sandbox_requested=1
else
deploy_service "$service"
deploy_services_list+=("$service")
fi
done
# Deploy all non-sandbox services together in one kustomize apply
if [ ${#deploy_services_list[@]} -gt 0 ]; then
if [ -f "$ROOT_DIR/.dev-image-tag" ]; then
source "$ROOT_DIR/.dev-image-tag"
fi
cd "$ROOT_DIR/deploy/k8s/dev"
# Template gateway-config if gateway is in the list
for svc in "${deploy_services_list[@]}"; do
if [ "$svc" == "gateway" ]; then
sed -i "s/SANDBOX_TAG_PLACEHOLDER/$SANDBOX_TAG/g" "$ROOT_DIR/deploy/k8s/dev/configs/gateway-config.yaml"
sed -i "s/SIDECAR_TAG_PLACEHOLDER/$SIDECAR_TAG/g" "$ROOT_DIR/deploy/k8s/dev/configs/gateway-config.yaml"
"$SCRIPT_DIR/config-update" dev
break
fi
done
# Build the images stanza for all services at once
echo "" >> kustomization.yaml
echo "# Image tags (added by bin/dev)" >> kustomization.yaml
echo "images:" >> kustomization.yaml
for svc in "${deploy_services_list[@]}"; do
case "$svc" in
relay) echo " - name: dexorder/ai-relay" >> kustomization.yaml; echo " newTag: $RELAY_TAG" >> kustomization.yaml ;;
ingestor) echo " - name: dexorder/ai-ingestor" >> kustomization.yaml; echo " newTag: $INGEST_TAG" >> kustomization.yaml ;;
flink) echo " - name: dexorder/ai-flink" >> kustomization.yaml; echo " newTag: $FLINK_TAG" >> kustomization.yaml ;;
gateway) echo " - name: dexorder/ai-gateway" >> kustomization.yaml; echo " newTag: $GATEWAY_TAG" >> kustomization.yaml ;;
web) echo " - name: dexorder/ai-web" >> kustomization.yaml; echo " newTag: $WEB_TAG" >> kustomization.yaml ;;
lifecycle-sidecar|sidecar) echo " - name: dexorder/ai-lifecycle-sidecar" >> kustomization.yaml; echo " newTag: $SIDECAR_TAG" >> kustomization.yaml ;;
esac
done
kubectl apply -k .
sed -i '/# Image tags (added by bin\/dev)/,$d' kustomization.yaml
# Restore gateway-config placeholders if gateway was deployed
for svc in "${deploy_services_list[@]}"; do
if [ "$svc" == "gateway" ]; then
sed -i "s/$SANDBOX_TAG/SANDBOX_TAG_PLACEHOLDER/g" "$ROOT_DIR/deploy/k8s/dev/configs/gateway-config.yaml"
sed -i "s/$SIDECAR_TAG/SIDECAR_TAG_PLACEHOLDER/g" "$ROOT_DIR/deploy/k8s/dev/configs/gateway-config.yaml"
break
fi
done
fi
# Handle sandbox separately
if [ "$sandbox_requested" == "1" ]; then
echo -e "${GREEN}→${NC} Deleting user container deployments in dexorder-sandboxes namespace..."
kubectl delete deployments --all -n dexorder-sandboxes 2>/dev/null || true
echo -e "${GREEN}✓ User containers will be recreated by gateway on next login${NC}"
fi
fi
;;
rebuild)