mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-24 15:39:06 +00:00
88 lines
2.1 KiB
YAML
88 lines
2.1 KiB
YAML
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: shumai-server
|
|
namespace: shumai
|
|
labels:
|
|
app: shumai-server
|
|
spec:
|
|
type: LoadBalancer
|
|
ports:
|
|
- port: 80
|
|
targetPort: 3000
|
|
name: http
|
|
- port: 3000
|
|
targetPort: 3000
|
|
name: http-alt
|
|
selector:
|
|
app: shumai-server
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: shumai-server
|
|
namespace: shumai
|
|
labels:
|
|
app: shumai-server
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: shumai-server
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: shumai-server
|
|
spec:
|
|
affinity:
|
|
nodeAffinity:
|
|
requiredDuringSchedulingIgnoredDuringExecution:
|
|
nodeSelectorTerms:
|
|
- matchExpressions:
|
|
- key: eks.amazonaws.com/nodegroup
|
|
operator: In
|
|
values:
|
|
- shumai-general
|
|
- shumai-general-spot
|
|
- matchExpressions:
|
|
- key: workload
|
|
operator: In
|
|
values:
|
|
- general
|
|
containers:
|
|
- name: server
|
|
image: shumaione/shumai:latest
|
|
imagePullPolicy: IfNotPresent
|
|
env:
|
|
- name: SHUMAI_WORKERS
|
|
value: 'agent'
|
|
# For cloud deployments, set to your public S3 / Garage LoadBalancer endpoint
|
|
- name: AWS_PUBLIC_ENDPOINT_URL_S3
|
|
value: 'http://localhost:3900'
|
|
envFrom:
|
|
- configMapRef:
|
|
name: shumai-config
|
|
- secretRef:
|
|
name: shumai-secret
|
|
ports:
|
|
- containerPort: 3000
|
|
name: http
|
|
resources:
|
|
requests:
|
|
cpu: 250m
|
|
memory: 512Mi
|
|
limits:
|
|
cpu: 2000m
|
|
memory: 2Gi
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: 3000
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 5
|
|
livenessProbe:
|
|
tcpSocket:
|
|
port: 3000
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 10
|