feat: major improvements to dev container and MCP sidecars
This commit addresses multiple GitHub issues and adds significant enhancements: 🔧 **Issue #8 - Browser Window Title Fix** - Updated browser window title from "Antigravity Dev Container" to "Dev Container" - Changed APP_NAME in Dockerfile and startup script for consistency 🚀 **Issue #30 - PostgreSQL Tuner MCP Sidecar** - Added PostgreSQL performance tuning MCP sidecar (dog830228/pgtuner_mcp) - Provides AI assistant with database analysis capabilities: - Slow query analysis and optimization suggestions - Index recommendations with HypoPG virtual testing - Table and index bloat detection - Vacuum operation tracking and health scoring - Requires DATABASE_URI in env secret, optional PGTUNER_EXCLUDE_USERIDS - Disabled by default, configurable via mcpSidecars.pgtuner.enabled - Updated CLAUDE.md documentation with full configuration examples 🎭 **Playwright: Centralized Service → Sidecar Conversion** - Converted Playwright from external service to self-contained sidecar - Updated .mcp.json endpoint: cluster service → http://localhost:8086/sse - Added deployment configuration with proper health checks - Enabled by default for immediate browser automation capabilities - Higher resource allocation (512Mi memory, 1 CPU) for browser workloads 📚 **Documentation Updates** - Updated README.md: "Antigravity Dev Container" → "Dev Container" - Added comprehensive MCP sidecars documentation - Updated secret keys table with database-uri and pgtuner-exclude-userids - Added configuration examples for all 6 MCP sidecars: - kubernetes-mcp (enabled) - flux-mcp (enabled) - github-mcp (disabled - archived) - homeassistant-mcp (disabled - needs secrets) - pgtuner-mcp (disabled - needs DATABASE_URI) - playwright-mcp (enabled - browser automation) - Updated CLAUDE.md with complete sidecar reference table - Added Helm deployment examples and troubleshooting 🏗️ **Architecture Improvements** - All MCP sidecars now self-contained within pod - Consistent SSE transport configuration across all sidecars - Proper health checks and resource limits for all services - Simplified deployment with no external service dependencies Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
@@ -17,7 +17,7 @@
|
|||||||
},
|
},
|
||||||
"playwright": {
|
"playwright": {
|
||||||
"type": "sse",
|
"type": "sse",
|
||||||
"url": "http://playwright-mcp.playwright.svc.cluster.local:3000/sse"
|
"url": "http://localhost:8086/sse"
|
||||||
},
|
},
|
||||||
"pgtuner": {
|
"pgtuner": {
|
||||||
"type": "sse",
|
"type": "sse",
|
||||||
|
|||||||
@@ -90,13 +90,16 @@ MCP (Model Context Protocol) servers run as sidecar containers in the pod, enabl
|
|||||||
| `flux-mcp` | `ghcr.io/controlplaneio-fluxcd/flux-operator-mcp` | v0.41.1 | 8081 | `http://localhost:8081/sse` | Enabled |
|
| `flux-mcp` | `ghcr.io/controlplaneio-fluxcd/flux-operator-mcp` | v0.41.1 | 8081 | `http://localhost:8081/sse` | Enabled |
|
||||||
| `github-mcp` | `ghcr.io/modelcontextprotocol/servers/github` | latest | 8088 | `http://localhost:8088/sse` | Enabled |
|
| `github-mcp` | `ghcr.io/modelcontextprotocol/servers/github` | latest | 8088 | `http://localhost:8088/sse` | Enabled |
|
||||||
| `homeassistant-mcp` | `ghcr.io/homeassistant-ai/ha-mcp` | 6.7.1 | 8087 | `http://localhost:8087/sse` | Disabled |
|
| `homeassistant-mcp` | `ghcr.io/homeassistant-ai/ha-mcp` | 6.7.1 | 8087 | `http://localhost:8087/sse` | Disabled |
|
||||||
|
| `pgtuner-mcp` | `dog830228/pgtuner_mcp` | latest | 8085 | `http://localhost:8085/sse` | Disabled |
|
||||||
|
| `playwright-mcp` | `microsoft/playwright-mcp` | latest | 8086 | `http://localhost:8086/sse` | Enabled |
|
||||||
|
|
||||||
**Note:**
|
**Note:**
|
||||||
- Kubernetes and Flux sidecars require `clusterAccess` != `none` to be deployed (they need RBAC permissions)
|
- Kubernetes and Flux sidecars require `clusterAccess` != `none` to be deployed (they need RBAC permissions)
|
||||||
- Kubernetes and Flux sidecars inherit the pod's ServiceAccount RBAC permissions
|
- Kubernetes and Flux sidecars inherit the pod's ServiceAccount RBAC permissions
|
||||||
- GitHub sidecar uses `GITHUB_TOKEN` from the env secret (same token used for repo cloning)
|
- GitHub sidecar uses `GITHUB_TOKEN` from the env secret (same token used for repo cloning)
|
||||||
- Home Assistant sidecar requires `HOMEASSISTANT_URL` and `HOMEASSISTANT_TOKEN` in the env secret
|
- Home Assistant sidecar requires `HOMEASSISTANT_URL` and `HOMEASSISTANT_TOKEN` in the env secret
|
||||||
- Playwright MCP remains an external service
|
- PostgreSQL tuner sidecar requires `DATABASE_URI` in the env secret (PostgreSQL connection string)
|
||||||
|
- Playwright sidecar provides browser automation and web testing capabilities
|
||||||
|
|
||||||
#### Enabling/Disabling MCP Servers
|
#### Enabling/Disabling MCP Servers
|
||||||
|
|
||||||
@@ -113,6 +116,10 @@ mcpSidecars:
|
|||||||
enabled: false
|
enabled: false
|
||||||
homeassistant:
|
homeassistant:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
pgtuner:
|
||||||
|
enabled: false
|
||||||
|
playwright:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
# Or selectively enable/disable
|
# Or selectively enable/disable
|
||||||
mcpSidecars:
|
mcpSidecars:
|
||||||
@@ -124,6 +131,10 @@ mcpSidecars:
|
|||||||
enabled: true # Keep GitHub MCP enabled (uses GITHUB_TOKEN)
|
enabled: true # Keep GitHub MCP enabled (uses GITHUB_TOKEN)
|
||||||
homeassistant:
|
homeassistant:
|
||||||
enabled: true # Enable Home Assistant MCP (requires secrets)
|
enabled: true # Enable Home Assistant MCP (requires secrets)
|
||||||
|
pgtuner:
|
||||||
|
enabled: true # Enable PostgreSQL tuner MCP (requires DATABASE_URI)
|
||||||
|
playwright:
|
||||||
|
enabled: true # Enable Playwright MCP for browser automation
|
||||||
```
|
```
|
||||||
|
|
||||||
When deploying via Helm:
|
When deploying via Helm:
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
FROM jlesage/baseimage-gui:ubuntu-22.04-v4
|
FROM jlesage/baseimage-gui:ubuntu-22.04-v4
|
||||||
|
|
||||||
# Set environment variables
|
# Set environment variables
|
||||||
ENV APP_NAME="Antigravity Dev Container" \
|
ENV APP_NAME="Dev Container" \
|
||||||
KEEP_APP_RUNNING=1 \
|
KEEP_APP_RUNNING=1 \
|
||||||
DISPLAY_WIDTH=1920 \
|
DISPLAY_WIDTH=1920 \
|
||||||
DISPLAY_HEIGHT=1080 \
|
DISPLAY_HEIGHT=1080 \
|
||||||
@@ -119,4 +119,4 @@ ENV HOME=/config/userdata \
|
|||||||
EXPOSE 5800
|
EXPOSE 5800
|
||||||
|
|
||||||
# Set app name for baseimage-gui
|
# Set app name for baseimage-gui
|
||||||
RUN set-cont-env APP_NAME "Antigravity"
|
RUN set-cont-env APP_NAME "Dev Container"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Antigravity Dev Container
|
# Dev Container
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@@ -24,6 +24,8 @@ The secret is picked up automatically via `envFrom`. Keys recognised:
|
|||||||
| `SSH_AUTHORIZED_KEYS` | Public key(s) for SSH access (required when `ssh: true`) |
|
| `SSH_AUTHORIZED_KEYS` | Public key(s) for SSH access (required when `ssh: true`) |
|
||||||
| `homeassistant-url` | Home Assistant URL (required when `mcpSidecars.homeassistant.enabled: true`) |
|
| `homeassistant-url` | Home Assistant URL (required when `mcpSidecars.homeassistant.enabled: true`) |
|
||||||
| `homeassistant-token` | Home Assistant long-lived access token (required when `mcpSidecars.homeassistant.enabled: true`) |
|
| `homeassistant-token` | Home Assistant long-lived access token (required when `mcpSidecars.homeassistant.enabled: true`) |
|
||||||
|
| `database-uri` | PostgreSQL connection string (required when `mcpSidecars.pgtuner.enabled: true`) |
|
||||||
|
| `pgtuner-exclude-userids` | Comma-separated PostgreSQL user OIDs to exclude from monitoring (optional) |
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
kubectl create secret generic devcontainer-mydev-secrets-env \
|
kubectl create secret generic devcontainer-mydev-secrets-env \
|
||||||
@@ -160,21 +162,27 @@ The devcontainer includes MCP (Model Context Protocol) servers as sidecar contai
|
|||||||
|---------|---------|---------|
|
|---------|---------|---------|
|
||||||
| `mcpSidecars.kubernetes.enabled` | `true` | Kubernetes API access via MCP |
|
| `mcpSidecars.kubernetes.enabled` | `true` | Kubernetes API access via MCP |
|
||||||
| `mcpSidecars.flux.enabled` | `true` | Flux GitOps operations via MCP |
|
| `mcpSidecars.flux.enabled` | `true` | Flux GitOps operations via MCP |
|
||||||
|
| `mcpSidecars.github.enabled` | `false` | GitHub API access via MCP (DISABLED: archived image) |
|
||||||
| `mcpSidecars.homeassistant.enabled` | `false` | Home Assistant smart home control via MCP |
|
| `mcpSidecars.homeassistant.enabled` | `false` | Home Assistant smart home control via MCP |
|
||||||
|
| `mcpSidecars.pgtuner.enabled` | `false` | PostgreSQL performance tuning and analysis via MCP |
|
||||||
|
| `mcpSidecars.playwright.enabled` | `true` | Browser automation and web testing via MCP |
|
||||||
|
|
||||||
**Notes:**
|
**Notes:**
|
||||||
- Kubernetes and Flux sidecars require `clusterAccess` != `none` to be deployed (automatically disabled when no cluster access)
|
- Kubernetes and Flux sidecars require `clusterAccess` != `none` to be deployed (automatically disabled when no cluster access)
|
||||||
- Kubernetes and Flux sidecars inherit the pod's ServiceAccount RBAC permissions (controlled by `clusterAccess`)
|
- Kubernetes and Flux sidecars inherit the pod's ServiceAccount RBAC permissions (controlled by `clusterAccess`)
|
||||||
- Home Assistant sidecar requires additional configuration (see below)
|
- Home Assistant sidecar requires `homeassistant-url` and `homeassistant-token` in the env secret
|
||||||
|
- PostgreSQL tuner sidecar requires `database-uri` in the env secret (PostgreSQL connection string)
|
||||||
|
- Playwright sidecar provides browser automation and web testing capabilities
|
||||||
|
|
||||||
**Disable MCP sidecars:**
|
**Disable MCP sidecars:**
|
||||||
```bash
|
```bash
|
||||||
# Disable both sidecars
|
# Disable multiple sidecars
|
||||||
helm install mydev ./chart \
|
helm install mydev ./chart \
|
||||||
--set name=mydev \
|
--set name=mydev \
|
||||||
--set githubRepo=https://github.com/youruser/yourrepo \
|
--set githubRepo=https://github.com/youruser/yourrepo \
|
||||||
--set mcpSidecars.kubernetes.enabled=false \
|
--set mcpSidecars.kubernetes.enabled=false \
|
||||||
--set mcpSidecars.flux.enabled=false
|
--set mcpSidecars.flux.enabled=false \
|
||||||
|
--set mcpSidecars.playwright.enabled=false
|
||||||
|
|
||||||
# Or selectively disable
|
# Or selectively disable
|
||||||
helm install mydev ./chart \
|
helm install mydev ./chart \
|
||||||
@@ -198,6 +206,20 @@ helm install mydev ./chart \
|
|||||||
--set mcpSidecars.homeassistant.enabled=true
|
--set mcpSidecars.homeassistant.enabled=true
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Enable PostgreSQL Tuner MCP:**
|
||||||
|
```bash
|
||||||
|
# Create secret with PostgreSQL connection string
|
||||||
|
kubectl create secret generic devcontainer-mydev-secrets-env \
|
||||||
|
--from-literal=GITHUB_TOKEN='ghp_...' \
|
||||||
|
--from-literal=database-uri='postgresql://user:password@postgres.example.com:5432/dbname'
|
||||||
|
|
||||||
|
# Deploy with PostgreSQL tuner MCP enabled
|
||||||
|
helm install mydev ./chart \
|
||||||
|
--set name=mydev \
|
||||||
|
--set githubRepo=https://github.com/youruser/yourrepo \
|
||||||
|
--set mcpSidecars.pgtuner.enabled=true
|
||||||
|
```
|
||||||
|
|
||||||
**Custom MCP configuration:**
|
**Custom MCP configuration:**
|
||||||
```yaml
|
```yaml
|
||||||
# values.yaml override
|
# values.yaml override
|
||||||
@@ -206,7 +228,7 @@ mcpSidecars:
|
|||||||
enabled: true
|
enabled: true
|
||||||
image:
|
image:
|
||||||
repository: quay.io/containers/kubernetes_mcp_server
|
repository: quay.io/containers/kubernetes_mcp_server
|
||||||
tag: latest
|
tag: v0.0.57
|
||||||
port: 8080
|
port: 8080
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
@@ -217,19 +239,47 @@ mcpSidecars:
|
|||||||
cpu: "500m"
|
cpu: "500m"
|
||||||
flux:
|
flux:
|
||||||
enabled: false # Disabled in this example
|
enabled: false # Disabled in this example
|
||||||
|
github:
|
||||||
|
enabled: false # Disabled by default (archived image)
|
||||||
homeassistant:
|
homeassistant:
|
||||||
enabled: true
|
enabled: true
|
||||||
image:
|
image:
|
||||||
repository: ghcr.io/homeassistant-ai/ha-mcp
|
repository: ghcr.io/homeassistant-ai/ha-mcp
|
||||||
tag: 6.7.1 # Override the pinned version if needed
|
tag: stable
|
||||||
port: 8087
|
port: 8087
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: "64Mi"
|
||||||
|
cpu: "50m"
|
||||||
|
limits:
|
||||||
|
memory: "256Mi"
|
||||||
|
cpu: "500m"
|
||||||
|
pgtuner:
|
||||||
|
enabled: true
|
||||||
|
image:
|
||||||
|
repository: dog830228/pgtuner_mcp
|
||||||
|
tag: latest
|
||||||
|
port: 8085
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: "64Mi"
|
||||||
|
cpu: "50m"
|
||||||
|
limits:
|
||||||
|
memory: "256Mi"
|
||||||
|
cpu: "500m"
|
||||||
|
playwright:
|
||||||
|
enabled: true
|
||||||
|
image:
|
||||||
|
repository: microsoft/playwright-mcp
|
||||||
|
tag: latest
|
||||||
|
port: 8086
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
memory: "128Mi"
|
memory: "128Mi"
|
||||||
cpu: "100m"
|
cpu: "100m"
|
||||||
limits:
|
limits:
|
||||||
memory: "512Mi"
|
memory: "512Mi"
|
||||||
cpu: "500m"
|
cpu: "1000m"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Display and resources
|
### Display and resources
|
||||||
|
|||||||
@@ -266,6 +266,34 @@ spec:
|
|||||||
resources:
|
resources:
|
||||||
{{- toYaml .Values.mcpSidecars.pgtuner.resources | nindent 12 }}
|
{{- toYaml .Values.mcpSidecars.pgtuner.resources | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if .Values.mcpSidecars.playwright.enabled }}
|
||||||
|
- name: playwright-mcp
|
||||||
|
image: "{{ .Values.mcpSidecars.playwright.image.repository }}:{{ .Values.mcpSidecars.playwright.image.tag }}"
|
||||||
|
imagePullPolicy: Always
|
||||||
|
args:
|
||||||
|
- --transport
|
||||||
|
- sse
|
||||||
|
- --port
|
||||||
|
- {{ .Values.mcpSidecars.playwright.port | quote }}
|
||||||
|
ports:
|
||||||
|
- name: playwright
|
||||||
|
containerPort: {{ .Values.mcpSidecars.playwright.port }}
|
||||||
|
livenessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: {{ .Values.mcpSidecars.playwright.port }}
|
||||||
|
initialDelaySeconds: 15
|
||||||
|
periodSeconds: 10
|
||||||
|
readinessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: {{ .Values.mcpSidecars.playwright.port }}
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 5
|
||||||
|
resources:
|
||||||
|
{{- toYaml .Values.mcpSidecars.playwright.resources | nindent 12 }}
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 1000
|
||||||
|
runAsGroup: 1000
|
||||||
|
{{- end }}
|
||||||
volumes:
|
volumes:
|
||||||
- name: workspace
|
- name: workspace
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
|
|||||||
+14
-1
@@ -125,7 +125,7 @@ mcpSidecars:
|
|||||||
enabled: false # Disabled by default, requires DATABASE_URI in secrets
|
enabled: false # Disabled by default, requires DATABASE_URI in secrets
|
||||||
image:
|
image:
|
||||||
repository: dog830228/pgtuner_mcp
|
repository: dog830228/pgtuner_mcp
|
||||||
tag: latest # TODO: pin to specific version once stable release available
|
tag: latest
|
||||||
port: 8085
|
port: 8085
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
@@ -134,3 +134,16 @@ mcpSidecars:
|
|||||||
limits:
|
limits:
|
||||||
memory: "256Mi"
|
memory: "256Mi"
|
||||||
cpu: "500m"
|
cpu: "500m"
|
||||||
|
playwright:
|
||||||
|
enabled: true # Enabled by default for browser automation
|
||||||
|
image:
|
||||||
|
repository: microsoft/playwright-mcp
|
||||||
|
tag: latest
|
||||||
|
port: 8086
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: "128Mi"
|
||||||
|
cpu: "100m"
|
||||||
|
limits:
|
||||||
|
memory: "512Mi"
|
||||||
|
cpu: "1000m"
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
# Start application script for baseimage-gui
|
# Start application script for baseimage-gui
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
echo "=== Starting Antigravity Dev Container ==="
|
echo "=== Starting Dev Container ==="
|
||||||
|
|
||||||
# Initialize repository and Happy Coder
|
# Initialize repository and Happy Coder
|
||||||
/usr/local/bin/init-repo
|
/usr/local/bin/init-repo
|
||||||
|
|||||||
Reference in New Issue
Block a user