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
Tobias Brunner 1f8d469f63
All checks were successful
continuous-integration/drone/push Build is passing
docspell WIP
2021-01-10 21:10:35 +01:00

56 lines
1.3 KiB
YAML

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