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
6 changes: 3 additions & 3 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ jobs:
run: |
kubectl -n mcp-for-docs create secret docker-registry ghcr \
--docker-server=ghcr.io \
--docker-username=${{ secrets.GHCR_USERNAME }} \
--docker-password=${{ secrets.GHCR_TOKEN }} \
--docker-username="${{ secrets.GHCR_USERNAME }}" \
--docker-password="${{ secrets.GHCR_TOKEN }}" \
--docker-email=ci@appwrite.io \
--dry-run=client -o yaml | kubectl apply -f -

- name: Create application secrets
run: |
kubectl -n mcp-for-docs create secret generic mcp-for-docs \
--from-literal=openai-api-key=${{ secrets.OPENAI_API_KEY }} \
--from-literal=openai-api-key="${{ secrets.OPENAI_API_KEY }}" \
--dry-run=client -o yaml | kubectl apply -f -

- name: Deploy
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ name: Staging deployment

on:
workflow_dispatch:
push:
branches:
- main

env:
TAG: ${{ github.sha }}
Expand Down Expand Up @@ -61,15 +58,15 @@ jobs:
run: |
kubectl -n mcp-for-docs create secret docker-registry ghcr \
--docker-server=ghcr.io \
--docker-username=${{ secrets.GHCR_USERNAME }} \
--docker-password=${{ secrets.GHCR_TOKEN }} \
--docker-username="${{ secrets.GHCR_USERNAME }}" \
--docker-password="${{ secrets.GHCR_TOKEN }}" \
--docker-email=ci@appwrite.io \
--dry-run=client -o yaml | kubectl apply -f -

- name: Create application secrets
run: |
kubectl -n mcp-for-docs create secret generic mcp-for-docs \
--from-literal=openai-api-key=${{ secrets.OPENAI_API_KEY }} \
--from-literal=openai-api-key="${{ secrets.OPENAI_API_KEY }}" \
--dry-run=client -o yaml | kubectl apply -f -

- name: Deploy
Expand Down
4 changes: 2 additions & 2 deletions deploy/mcp-for-docs/templates/gateway.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: gateway.networking.k8s.io/v1beta1
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: mcp-for-docs
Expand Down Expand Up @@ -47,7 +47,7 @@ spec:

---

apiVersion: gateway.networking.k8s.io/v1beta1
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: mcp-for-docs
Expand Down
12 changes: 3 additions & 9 deletions deploy/mcp-for-docs/templates/mcp-for-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,27 +46,21 @@ spec:
ports:
- containerPort: 1234
startupProbe:
httpGet:
path: /
tcpSocket:
port: 1234
scheme: HTTP
periodSeconds: 5
timeoutSeconds: 3
failureThreshold: 12
livenessProbe:
httpGet:
path: /
tcpSocket:
port: 1234
scheme: HTTP
periodSeconds: 10
timeoutSeconds: 3
failureThreshold: 3
successThreshold: 1
readinessProbe:
httpGet:
path: /
tcpSocket:
port: 1234
scheme: HTTP
periodSeconds: 5
timeoutSeconds: 3
failureThreshold: 3
Expand Down
6 changes: 3 additions & 3 deletions deploy/mcp-for-docs/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ nodeSelector:

imagePullPolicy: IfNotPresent

minReplicas: 2
maxReplicas: 3
maxUnavailable: 1
minReplicas: 1
maxReplicas: 1
maxUnavailable: 0
4 changes: 4 additions & 0 deletions scripts/init-vector-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ export async function processPage({
library?: string;
}) {
const chunks = await getChunks({ markdown });
if (chunks.length === 0) {
console.log(`Skipping ${webPath}: no chunks generated`);
return { chunks, embeddings: [] };
}
const embeddings = await embedDocsPage(chunks);
await upsertDocsPageEmbeddings({
webPath,
Expand Down