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