apiVersion: apps/v1 kind: StatefulSet metadata: name: postgres namespace: polymarket-bot spec: persistentVolumeClaimRetentionPolicy: whenDeleted: Retain whenScaled: Retain podManagementPolicy: OrderedReady replicas: 1 revisionHistoryLimit: 10 selector: matchLabels: app: postgres serviceName: postgres template: metadata: labels: app: postgres spec: containers: - env: - name: POSTGRES_USER value: bot - name: POSTGRES_PASSWORD value: bot - name: POSTGRES_DB value: polymarket image: postgres:16-alpine imagePullPolicy: IfNotPresent name: postgres ports: - containerPort: 5432 protocol: TCP readinessProbe: exec: command: - pg_isready - -U - bot failureThreshold: 3 initialDelaySeconds: 5 periodSeconds: 5 successThreshold: 1 timeoutSeconds: 1 resources: {} terminationMessagePath: /dev/termination-log terminationMessagePolicy: File volumeMounts: - mountPath: /var/lib/postgresql/data name: data dnsPolicy: ClusterFirst restartPolicy: Always schedulerName: default-scheduler securityContext: {} terminationGracePeriodSeconds: 30 updateStrategy: rollingUpdate: partition: 0 type: RollingUpdate volumeClaimTemplates: - apiVersion: v1 kind: PersistentVolumeClaim metadata: name: data spec: accessModes: - ReadWriteOnce resources: requests: storage: 5Gi volumeMode: Filesystem status: phase: Pending