feat(infra): add all Kubernetes manifests
- namespace, temporal server, workspaces PVC - API server deployment, service, serviceaccount, RBAC - Dev overlay Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: shannon
|
||||
labels:
|
||||
app.kubernetes.io/part-of: shannon
|
||||
@@ -0,0 +1,69 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: shannon-router
|
||||
namespace: shannon
|
||||
labels:
|
||||
app: shannon-router
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: shannon-router
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: shannon-router
|
||||
spec:
|
||||
containers:
|
||||
- name: router
|
||||
image: node:20-slim
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
apt-get update && apt-get install -y gettext-base &&
|
||||
npm install -g @musistudio/claude-code-router &&
|
||||
mkdir -p /root/.claude-code-router &&
|
||||
envsubst < /config/router-config.json > /root/.claude-code-router/config.json &&
|
||||
ccr start
|
||||
ports:
|
||||
- containerPort: 3456
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: shannon-credentials
|
||||
env:
|
||||
- name: HOST
|
||||
value: "0.0.0.0"
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /config
|
||||
readOnly: true
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 3456
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 5
|
||||
resources:
|
||||
requests:
|
||||
memory: 128Mi
|
||||
cpu: 100m
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
name: shannon-router-config
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: shannon-router
|
||||
namespace: shannon
|
||||
spec:
|
||||
selector:
|
||||
app: shannon-router
|
||||
ports:
|
||||
- port: 3456
|
||||
targetPort: 3456
|
||||
@@ -0,0 +1,86 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: temporal-data
|
||||
namespace: shannon
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: shannon-temporal
|
||||
namespace: shannon
|
||||
labels:
|
||||
app: shannon-temporal
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: shannon-temporal
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: shannon-temporal
|
||||
spec:
|
||||
containers:
|
||||
- name: temporal
|
||||
image: temporalio/temporal:latest
|
||||
command:
|
||||
- server
|
||||
- start-dev
|
||||
- --db-filename
|
||||
- /home/temporal/temporal.db
|
||||
- --ip
|
||||
- "0.0.0.0"
|
||||
ports:
|
||||
- containerPort: 7233
|
||||
name: grpc
|
||||
- containerPort: 8233
|
||||
name: web-ui
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /home/temporal
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- temporal
|
||||
- operator
|
||||
- cluster
|
||||
- health
|
||||
- --address
|
||||
- localhost:7233
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 10
|
||||
resources:
|
||||
requests:
|
||||
memory: 256Mi
|
||||
cpu: 250m
|
||||
limits:
|
||||
memory: 512Mi
|
||||
volumes:
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: temporal-data
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: shannon-temporal
|
||||
namespace: shannon
|
||||
spec:
|
||||
selector:
|
||||
app: shannon-temporal
|
||||
ports:
|
||||
- name: grpc
|
||||
port: 7233
|
||||
targetPort: 7233
|
||||
- name: web-ui
|
||||
port: 8233
|
||||
targetPort: 8233
|
||||
Reference in New Issue
Block a user