feat: add helm chart
This commit is contained in:
parent
3742d2a026
commit
25a6306ae0
2 changed files with 8 additions and 12 deletions
|
|
@ -21,23 +21,19 @@ if [ -z "$OPENAI_API_BASE" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install KubeBlocks (if not already installed)
|
# Install KubeBlocks (if not already installed)
|
||||||
echo "Preparing to install KubeBlocks and required components..."
|
|
||||||
bash "$SCRIPT_DIR/databases/01-prepare.sh"
|
bash "$SCRIPT_DIR/databases/01-prepare.sh"
|
||||||
|
|
||||||
# Install database clusters
|
# Install database clusters
|
||||||
echo "Installing database clusters..."
|
|
||||||
bash "$SCRIPT_DIR/databases/02-install-database.sh"
|
bash "$SCRIPT_DIR/databases/02-install-database.sh"
|
||||||
|
|
||||||
# Create vector extension in PostgreSQL if enabled
|
# Create vector extension in PostgreSQL if enabled
|
||||||
if [ "$ENABLE_POSTGRESQL" = true ]; then
|
print "Waiting for PostgreSQL pods to be ready..."
|
||||||
print "Waiting for PostgreSQL pods to be ready..."
|
if kubectl wait --for=condition=ready pods -l kubeblocks.io/role=primary,app.kubernetes.io/instance=pg-cluster -n $NAMESPACE --timeout=300s; then
|
||||||
if kubectl wait --for=condition=ready pods -l app.kubernetes.io/instance=pg-cluster -n $NAMESPACE --timeout=300s; then
|
print "Creating vector extension in PostgreSQL..."
|
||||||
print "Creating vector extension in PostgreSQL..."
|
kubectl exec -it $(kubectl get pods -l kubeblocks.io/role=primary,app.kubernetes.io/instance=pg-cluster -n $NAMESPACE -o name) -n $NAMESPACE -- psql -c "CREATE EXTENSION vector;"
|
||||||
kubectl exec -it $(kubectl get pods -l kubeblocks.io/role=primary,app.kubernetes.io/instance=pg-cluster -n $NAMESPACE -o name) -n $NAMESPACE -- psql -c "CREATE EXTENSION vector;"
|
print_success "Vector extension created successfully."
|
||||||
print_success "Vector extension created successfully."
|
else
|
||||||
else
|
print "Warning: PostgreSQL pods not ready within timeout. Vector extension not created."
|
||||||
print "Warning: PostgreSQL pods not ready within timeout. Vector extension not created."
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get database passwords from Kubernetes secrets
|
# Get database passwords from Kubernetes secrets
|
||||||
|
|
@ -87,7 +83,7 @@ helm upgrade --install lightrag $SCRIPT_DIR/lightrag \
|
||||||
# Wait for LightRAG pod to be ready
|
# Wait for LightRAG pod to be ready
|
||||||
echo ""
|
echo ""
|
||||||
echo "Waiting for lightrag pod to be ready..."
|
echo "Waiting for lightrag pod to be ready..."
|
||||||
kubectl wait --for=condition=ready pod -l app.kubernetes.io/instance=lightrag --timeout=60s -n rag
|
kubectl wait --for=condition=ready pod -l app.kubernetes.io/instance=lightrag --timeout=120s -n rag
|
||||||
echo "lightrag pod is ready"
|
echo "lightrag pod is ready"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Running Port-Forward:"
|
echo "Running Port-Forward:"
|
||||||
|
|
|
||||||
0
k8s-deploy/uninstall_lightrag.sh
Normal file → Executable file
0
k8s-deploy/uninstall_lightrag.sh
Normal file → Executable file
Loading…
Add table
Reference in a new issue