### Issue Summary The `service` name in the Kubernetes manifest for the PostgreSQL database is defined as `twentycrm-db`. However, the `DSN` configuration in the Server and Worker `deployments` incorrectly references `twenty-db`. This mismatch causes the pods to fail during initialization and crash on boot. ### Fix Description - Updated the `DSN` values in both the Server and Worker `deployments` to correctly reference `twentycrm-db`, ensuring alignment with the database `service` name. - Verified the deployments to ensure the pods start without issues after the fix. ### Testing - Deployed the updated manifests in a development environment. - Confirmed that both Server and Worker pods initialize correctly and connect to the database service as expected.
83 lines
2.4 KiB
YAML
83 lines
2.4 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
labels:
|
|
app: twentycrm-server
|
|
name: twentycrm-server
|
|
namespace: twentycrm
|
|
spec:
|
|
progressDeadlineSeconds: 600
|
|
replicas: 1
|
|
strategy:
|
|
rollingUpdate:
|
|
maxSurge: 1
|
|
maxUnavailable: 1
|
|
type: RollingUpdate
|
|
selector:
|
|
matchLabels:
|
|
app: twentycrm-server
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: twentycrm-server
|
|
spec:
|
|
volumes:
|
|
- name: twentycrm-server-data
|
|
persistentVolumeClaim:
|
|
claimName: twentycrm-server-pvc
|
|
- name: twentycrm-docker-data
|
|
persistentVolumeClaim:
|
|
claimName: twentycrm-docker-data-pvc
|
|
containers:
|
|
- name: twentycrm
|
|
image: twentycrm/twenty:latest
|
|
imagePullPolicy: Always
|
|
env:
|
|
- name: PORT
|
|
value: 3000
|
|
- name: SERVER_URL
|
|
value: "https://crm.example.com:443"
|
|
- name: FRONT_BASE_URL
|
|
value: "https://crm.example.com:443"
|
|
- name: "PG_DATABASE_URL"
|
|
value: "postgres://postgres:postgres@twentycrm-db.twentycrm.svc.cluster.local/default"
|
|
- name: "REDIS_URL"
|
|
value: "redis://twentycrm-redis.twentycrm.svc.cluster.local:6379"
|
|
- name: ENABLE_DB_MIGRATIONS
|
|
value: "true"
|
|
- name: SIGN_IN_PREFILLED
|
|
value: "true"
|
|
- name: STORAGE_TYPE
|
|
value: "local"
|
|
- name: "MESSAGE_QUEUE_TYPE"
|
|
value: "bull-mq"
|
|
- name: "ACCESS_TOKEN_EXPIRES_IN"
|
|
value: "7d"
|
|
- name: "LOGIN_TOKEN_EXPIRES_IN"
|
|
value: "1h"
|
|
- name: APP_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: tokens
|
|
key: accessToken
|
|
ports:
|
|
- containerPort: 3000
|
|
name: http-tcp
|
|
protocol: TCP
|
|
resources:
|
|
requests:
|
|
memory: "256Mi"
|
|
cpu: "250m"
|
|
limits:
|
|
memory: "1024Mi"
|
|
cpu: "1000m"
|
|
stdin: true
|
|
tty: true
|
|
volumeMounts:
|
|
- mountPath: /app/docker-data
|
|
name: twentycrm-docker-data
|
|
- mountPath: /app/packages/twenty-server/.local-storage
|
|
name: twentycrm-server-data
|
|
dnsPolicy: ClusterFirst
|
|
restartPolicy: Always
|