mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-26 10:55:27 +00:00
docs(deploy): redesign EKS documentation, rename k8s to eks, and add scalable deployment feature
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: shumai-postgres
|
||||
namespace: shumai
|
||||
labels:
|
||||
app: shumai-postgres
|
||||
spec:
|
||||
ports:
|
||||
- port: 5432
|
||||
name: postgres
|
||||
selector:
|
||||
app: shumai-postgres
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: shumai-postgres
|
||||
namespace: shumai
|
||||
spec:
|
||||
serviceName: shumai-postgres
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: shumai-postgres
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: shumai-postgres
|
||||
spec:
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: eks.amazonaws.com/nodegroup
|
||||
operator: In
|
||||
values:
|
||||
- shumai-general-spot
|
||||
- matchExpressions:
|
||||
- key: workload
|
||||
operator: In
|
||||
values:
|
||||
- general
|
||||
containers:
|
||||
- name: postgres
|
||||
image: pgvector/pgvector:pg18
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
name: postgres
|
||||
env:
|
||||
- name: POSTGRES_USER
|
||||
value: 'shumai'
|
||||
- name: POSTGRES_PASSWORD
|
||||
value: 'shumai_password'
|
||||
- name: POSTGRES_DB
|
||||
value: 'shumai_db'
|
||||
- name: PGDATA
|
||||
value: '/var/lib/postgresql/18/docker/pgdata'
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- pg_isready -U shumai -d shumai_db
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
volumeMounts:
|
||||
- name: postgres-data
|
||||
mountPath: /var/lib/postgresql/18/docker
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: postgres-data
|
||||
spec:
|
||||
accessModes: ['ReadWriteOnce']
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
||||
Reference in New Issue
Block a user