diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml index 373b7ed..788a006 100644 --- a/.github/workflows/production.yml +++ b/.github/workflows/production.yml @@ -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 diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index c8383c1..5f9403b 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -2,9 +2,6 @@ name: Staging deployment on: workflow_dispatch: - push: - branches: - - main env: TAG: ${{ github.sha }} @@ -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 diff --git a/deploy/mcp-for-docs/templates/gateway.yaml b/deploy/mcp-for-docs/templates/gateway.yaml index 42507d6..549ccaa 100644 --- a/deploy/mcp-for-docs/templates/gateway.yaml +++ b/deploy/mcp-for-docs/templates/gateway.yaml @@ -1,4 +1,4 @@ -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: name: mcp-for-docs @@ -47,7 +47,7 @@ spec: --- -apiVersion: gateway.networking.k8s.io/v1beta1 +apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: mcp-for-docs diff --git a/deploy/mcp-for-docs/templates/mcp-for-docs.yaml b/deploy/mcp-for-docs/templates/mcp-for-docs.yaml index de09b27..9fe805d 100644 --- a/deploy/mcp-for-docs/templates/mcp-for-docs.yaml +++ b/deploy/mcp-for-docs/templates/mcp-for-docs.yaml @@ -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 diff --git a/deploy/mcp-for-docs/values.yaml b/deploy/mcp-for-docs/values.yaml index f0fbf1e..732330a 100644 --- a/deploy/mcp-for-docs/values.yaml +++ b/deploy/mcp-for-docs/values.yaml @@ -3,6 +3,6 @@ nodeSelector: imagePullPolicy: IfNotPresent -minReplicas: 2 -maxReplicas: 3 -maxUnavailable: 1 +minReplicas: 1 +maxReplicas: 1 +maxUnavailable: 0 diff --git a/scripts/init-vector-store.ts b/scripts/init-vector-store.ts index 725e361..faba1e2 100644 --- a/scripts/init-vector-store.ts +++ b/scripts/init-vector-store.ts @@ -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,