This repository has been archived on 2023-04-02. You can view files and clone it, but cannot push or open issues or pull requests.
gitops-tbrnt/docspell/statefulset-postgres.yaml

56 lines
1.3 KiB
YAML
Raw Permalink Normal View History

2021-01-10 20:10:35 +00:00
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: postgres
namespace: docspell
spec:
updateStrategy:
type: RollingUpdate
selector:
matchLabels:
app: postgres
serviceName: postgres
replicas: 1
template:
metadata:
labels:
app: postgres
spec:
terminationGracePeriodSeconds: 10
containers:
- name: postgres
image: docker.io/postgres:13.1
imagePullPolicy: IfNotPresent
ports:
- name: postgres
containerPort: 5432
protocol: TCP
resources:
requests:
cpu: 100m
memory: 256Mi
env:
- name: POSTGRES_USER
value: docspell
- name: POSTGRES_PASSWORD
value: jQbslGY72R8aqDxqet5ypKLvjrfmK1
- name: POSTGRES_DB
value: docspell
- name: PGUSER
value: postgres
- name: PGDATA
value: /var/lib/postgresql/data/pgdata
volumeMounts:
- mountPath: /var/lib/postgresql/data/pgdata
name: postgres
subPath: postgres-db
volumeClaimTemplates:
- metadata:
name: postgres
spec:
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 1Gi