This commit is contained in:
2026-02-19 19:55:05 -05:00
parent 7003d860b7
commit dfc0a3c1e3
10 changed files with 169 additions and 153 deletions
+13
View File
@@ -0,0 +1,13 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: devcontainer
data:
# GitHub repository to clone on startup
# Example: "https://github.com/username/repository"
# github-repo: "https://github.com/username/repository"
# Happy Coder configuration (optional)
# happy-server-url: "https://api.cluster-fluster.com"
# happy-webapp-url: "https://app.happy.engineering"
+20
View File
@@ -0,0 +1,20 @@
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: antigravity
spec:
parentRefs:
- name: external
namespace: gateway-system
hostnames:
- ${FQDN}
rules:
- matches:
- path:
type: PathPrefix
value: /
backendRefs:
- name: antigravity
port: 5800
weight: 1
+22
View File
@@ -0,0 +1,22 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
# - configmap.yaml
- statefulset.yaml
- service.yaml
# Uncomment to create secrets from files
# secretGenerator:
# - name: antigravity-secrets
# literals:
# - github-token=ghp_your_token
# - vnc-password=your_password
commonLabels:
app: antigravity
environment: production
commonAnnotations:
managed-by: kustomize
description: "Antigravity Dev Container with Happy Coder"
+15
View File
@@ -0,0 +1,15 @@
---
# Example secrets - DO NOT commit actual secrets!
# Use SealedSecrets or another secret management solution
apiVersion: v1
kind: Secret
metadata:
name: antigravity-secrets
type: Opaque
stringData:
# GitHub Personal Access Token (for private repos)
github-token: "ghp_your_token_here"
# VNC Password (optional, for secure VNC access)
vnc-password: "your_vnc_password"
+13
View File
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: devcontainer
labels:
app: devcontainer
spec:
ports:
- port: 5800
name: vnc-web
protocol: TCP
selector:
app: devcontainer
+83
View File
@@ -0,0 +1,83 @@
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: antigravity
spec:
serviceName: "antigravity"
replicas: 1
selector:
matchLabels:
app: devcontainer
template:
metadata:
labels:
app: devcontainer
spec:
securityContext:
fsGroup: 1000
fsGroupChangePolicy: "OnRootMismatch"
containers:
- name: antigravity
image: ghcr.io/cpfarhood/devcontainer:latest
imagePullPolicy: Always
ports:
- containerPort: 5800
name: vnc-web
protocol: TCP
volumeMounts:
- name: userhome
mountPath: /home
- name: workspace
mountPath: /workspace
env:
# User/Group IDs for the claude user
- name: USER_ID
value: "1000"
- name: GROUP_ID
value: "1000"
# VNC display settings
- name: DISPLAY_WIDTH
value: "1920"
- name: DISPLAY_HEIGHT
value: "1080"
- name: SECURE_CONNECTION
value: "0"
- name: HAPPY_HOME_DIR
value: "/home/user/.happy"
- name: HAPPY_EXPERIMENTAL
value: "true"
envFrom:
- configMapRef: ${ENV_CONFIGMAP}
- secretRef: ${ENV_SECRETS}
resources:
requests:
memory: "2Gi"
cpu: "1000m"
limits:
memory: "8Gi"
cpu: "4000m"
livenessProbe:
httpGet:
path: /
port: 5800
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
httpGet:
path: /
port: 5800
initialDelaySeconds: 10
periodSeconds: 5
volumes:
- name: workspace
emptyDir: {}
volumeClaimTemplates:
- metadata:
name: userhome
spec:
accessModes: ["ReadWriteMany"]
storageClassName: "ceph-filesystem"
resources:
requests:
storage: 10Gi