apiVersion: apps/v1 kind: StatefulSet metadata: namespace: zipline name: zipline-postgresql spec: replicas: 1 selector: matchLabels: app: zipline-postgresql serviceName: zipline-postgresql template: metadata: labels: app: zipline-postgresql spec: restartPolicy: Always terminationGracePeriodSeconds: 60 containers: - name: zipline-postgresql image: postgres:15 resources: requests: cpu: 100m memory: 256Mi limits: cpu: 500m memory: 512Mi ports: - containerPort: 5432 volumeMounts: - name: zipline-postgresql-database mountPath: /var/lib/postgres envFrom: - secretRef: name: zipline-postgres-secrets volumes: - name: zipline-postgresql-database persistentVolumeClaim: claimName: zipline-postgresql-pvc