~sbaildon/cluster

ref: a8baba7c cluster/projects/crave_supply/database/database.yaml -rw-r--r-- 956 bytes
a8baba7cSean Baildon container registry 0 replicas a month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: postgres
  labels:
    app: postgres
spec:
  selector:
    matchLabels:
      app: postgres
  serviceName: postgres
  replicas: 1
  updateStrategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: postgres
    spec:
      volumes:
        - name: postgres-data
          persistentVolumeClaim:
            claimName: postgres-pvc
      containers:
        - name: postgres
          image: docker.io/postgres:13.2-alpine
          ports:
            - name: db
              containerPort: 5432
              protocol: TCP
          volumeMounts:
            - mountPath: "/var/lib/postgresql/data"
              name: postgres-data
          env:
            - name: POSTGRES_DB
              value: "crave"
            - name: POSTGRES_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: postgres-auth
                  key: password