- Change hostname from vkvm-us1 to zgocloud-us1 - Update persistent volume claim name from pg-data-local-vkus1-pvc to pg-data-local-zgus1-pvc - Modify storage class name to local-zgus1 These updates ensure that the PostgreSQL deployment references the correct Kubernetes node and persistent volume, aligning with the current infrastructure and deployment strategy.
46 lines
1.0 KiB
YAML
46 lines
1.0 KiB
YAML
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: pg
|
|
namespace: lobe-chat
|
|
labels:
|
|
app: pg
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: pg
|
|
template:
|
|
metadata:
|
|
annotations: {}
|
|
labels:
|
|
app: pg
|
|
spec:
|
|
nodeSelector:
|
|
region: us
|
|
kubernetes.io/hostname: zgocloud-us1
|
|
containers:
|
|
- name: pg
|
|
#image: postgres:16
|
|
image: pgvector/pgvector:pg16
|
|
ports:
|
|
- containerPort: 5432
|
|
name: pg
|
|
env:
|
|
- name: POSTGRES_USER
|
|
value: "postgres"
|
|
- name: POSTGRES_PASSWORD
|
|
value: "PEw9jLtFZ69CBAT2"
|
|
- name: POSTGRES_DB
|
|
value: "lobechat"
|
|
- name: TZ
|
|
value: "Asia/Shanghai"
|
|
volumeMounts:
|
|
- name: pg-data
|
|
mountPath: /var/lib/postgresql/data
|
|
volumes:
|
|
- name: pg-data
|
|
persistentVolumeClaim:
|
|
claimName: pg-data-local-zgus1-pvc
|
|
|