a83d79bc10
Added features: - Home Assistant MCP server as optional sidecar (mcpSidecars.homeassistant) - Requires homeassistant-url and homeassistant-token secrets - Runs on port 8087 using SSE transport mode - Disabled by default due to credential requirements Fixed deployment logic: - Kubernetes and Flux MCP sidecars now only deploy when: 1. They are enabled in values (mcpSidecars.<name>.enabled: true) 2. AND clusterAccess is not "none" (they need RBAC to function) - Prevents unnecessary container failures when no permissions exist Documentation updates: - Complete Helm values reference for all MCP sidecars - Deployment examples and troubleshooting guides - Updated memory notes with current architecture Breaking change: - K8s/Flux MCP sidecars won't deploy with clusterAccess=none - This is intentional as they cannot function without RBAC 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>
194 lines
6.9 KiB
YAML
194 lines
6.9 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "antigravity.fullname" . }}
|
|
labels:
|
|
{{- include "antigravity.labels" . | nindent 4 }}
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
{{- include "antigravity.labels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{- include "antigravity.labels" . | nindent 8 }}
|
|
spec:
|
|
{{- if ne (.Values.clusterAccess | default "none") "none" }}
|
|
serviceAccountName: {{ include "antigravity.fullname" . }}
|
|
{{- end }}
|
|
securityContext:
|
|
fsGroup: 1000
|
|
fsGroupChangePolicy: "OnRootMismatch"
|
|
containers:
|
|
- name: devcontainer
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
ports:
|
|
{{- if ne (.Values.ide | default "vscode") "none" }}
|
|
- containerPort: 5800
|
|
name: vnc-web
|
|
protocol: TCP
|
|
{{- end }}
|
|
{{- if .Values.ssh }}
|
|
- containerPort: 22
|
|
name: ssh
|
|
protocol: TCP
|
|
{{- end }}
|
|
env:
|
|
- name: IDE
|
|
value: {{ .Values.ide | default "vscode" | quote }}
|
|
- name: SSH
|
|
value: {{ .Values.ssh | toString | quote }}
|
|
- name: USER_ID
|
|
value: {{ .Values.userId | quote }}
|
|
- name: GROUP_ID
|
|
value: {{ .Values.groupId | quote }}
|
|
- name: DISPLAY_WIDTH
|
|
value: {{ .Values.display.width | quote }}
|
|
- name: DISPLAY_HEIGHT
|
|
value: {{ .Values.display.height | quote }}
|
|
- name: SECURE_CONNECTION
|
|
value: {{ .Values.secureConnection | quote }}
|
|
- name: HAPPY_HOME_DIR
|
|
value: {{ .Values.happyHomeDir | quote }}
|
|
- name: HAPPY_EXPERIMENTAL
|
|
value: {{ .Values.happyExperimental | quote }}
|
|
- name: HAPPY_SERVER_URL
|
|
value: {{ .Values.happyServerUrl | quote }}
|
|
- name: HAPPY_WEBAPP_URL
|
|
value: {{ .Values.happyWebappUrl | quote }}
|
|
- name: GITHUB_REPO
|
|
value: {{ .Values.githubRepo | quote }}
|
|
envFrom:
|
|
- secretRef:
|
|
name: {{ include "antigravity.envSecretName" . }}
|
|
optional: true
|
|
resources:
|
|
{{- toYaml .Values.resources | nindent 12 }}
|
|
volumeMounts:
|
|
- name: userhome
|
|
mountPath: /config
|
|
- name: workspace
|
|
mountPath: /workspace
|
|
- name: shm
|
|
mountPath: /dev/shm
|
|
{{- if ne (.Values.ide | default "vscode") "none" }}
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: 5800
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 10
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: 5800
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 5
|
|
{{- else if .Values.ssh }}
|
|
livenessProbe:
|
|
tcpSocket:
|
|
port: 22
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 10
|
|
readinessProbe:
|
|
tcpSocket:
|
|
port: 22
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 5
|
|
{{- end }}
|
|
{{- if and .Values.mcpSidecars.kubernetes.enabled (ne .Values.clusterAccess "none") }}
|
|
- name: kubernetes-mcp
|
|
image: "{{ .Values.mcpSidecars.kubernetes.image.repository }}:{{ .Values.mcpSidecars.kubernetes.image.tag }}"
|
|
args:
|
|
- --port
|
|
- {{ .Values.mcpSidecars.kubernetes.port | quote }}
|
|
ports:
|
|
- containerPort: {{ .Values.mcpSidecars.kubernetes.port }}
|
|
name: k8s-mcp
|
|
protocol: TCP
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: {{ .Values.mcpSidecars.kubernetes.port }}
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 10
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: {{ .Values.mcpSidecars.kubernetes.port }}
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 5
|
|
resources:
|
|
{{- toYaml .Values.mcpSidecars.kubernetes.resources | nindent 12 }}
|
|
{{- end }}
|
|
{{- if and .Values.mcpSidecars.flux.enabled (ne .Values.clusterAccess "none") }}
|
|
- name: flux-mcp
|
|
image: "{{ .Values.mcpSidecars.flux.image.repository }}:{{ .Values.mcpSidecars.flux.image.tag }}"
|
|
args:
|
|
- serve
|
|
- --transport=sse
|
|
- --port={{ .Values.mcpSidecars.flux.port }}
|
|
ports:
|
|
- containerPort: {{ .Values.mcpSidecars.flux.port }}
|
|
name: flux-mcp
|
|
protocol: TCP
|
|
livenessProbe:
|
|
tcpSocket:
|
|
port: {{ .Values.mcpSidecars.flux.port }}
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 10
|
|
readinessProbe:
|
|
tcpSocket:
|
|
port: {{ .Values.mcpSidecars.flux.port }}
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 5
|
|
resources:
|
|
{{- toYaml .Values.mcpSidecars.flux.resources | nindent 12 }}
|
|
{{- end }}
|
|
{{- if .Values.mcpSidecars.homeassistant.enabled }}
|
|
- name: homeassistant-mcp
|
|
image: "{{ .Values.mcpSidecars.homeassistant.image.repository }}:{{ .Values.mcpSidecars.homeassistant.image.tag }}"
|
|
imagePullPolicy: Always
|
|
command: ["fastmcp", "run", "fastmcp-sse.json"]
|
|
ports:
|
|
- name: homeassistant
|
|
containerPort: {{ .Values.mcpSidecars.homeassistant.port }}
|
|
env:
|
|
- name: HOMEASSISTANT_URL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ include "antigravity.envSecretName" . }}
|
|
key: homeassistant-url
|
|
optional: true
|
|
- name: HOMEASSISTANT_TOKEN
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ include "antigravity.envSecretName" . }}
|
|
key: homeassistant-token
|
|
optional: true
|
|
livenessProbe:
|
|
tcpSocket:
|
|
port: {{ .Values.mcpSidecars.homeassistant.port }}
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 10
|
|
readinessProbe:
|
|
tcpSocket:
|
|
port: {{ .Values.mcpSidecars.homeassistant.port }}
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 5
|
|
resources:
|
|
{{- toYaml .Values.mcpSidecars.homeassistant.resources | nindent 12 }}
|
|
{{- end }}
|
|
volumes:
|
|
- name: workspace
|
|
emptyDir: {}
|
|
- name: shm
|
|
emptyDir:
|
|
medium: Memory
|
|
sizeLimit: {{ .Values.shm.sizeLimit }}
|
|
- name: userhome
|
|
persistentVolumeClaim:
|
|
claimName: {{ include "antigravity.pvcName" . }}
|