apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app.kubernetes.io/component: database
    app.kubernetes.io/part-of: talkyard
    app.kubernetes.io/version: v0.2021.10-e846283fa
  name: rdb
  namespace: talkyard
spec:
  minReadySeconds: 10
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      name: rdb
  template:
    metadata:
      labels:
        name: rdb
    spec:
      containers:
      - args:
        - --logging_collector=off
        env:
        - name: POSTGRES_PASSWORD
          valueFrom:
            secretKeyRef:
              key: postgres-password
              name: talkyard-rdb-secrets
        image: debiki/talkyard-rdb:v0.2021.10-e846283fa
        imagePullPolicy: IfNotPresent
        livenessProbe:
          exec:
            command:
            - /bin/sh
            - -c
            - exec pg_isready -U "talkyard" -h 127.0.0.1 -p 5432
          initialDelaySeconds: 30
          periodSeconds: 30
          timeoutSeconds: 6
        name: rdb
        ports:
        - containerPort: 5432
          name: default
        readinessProbe:
          exec:
            command:
            - /bin/sh
            - -c
            - exec pg_isready -U "talkyard" -h 127.0.0.1 -p 5432
          initialDelaySeconds: 10
          periodSeconds: 30
          timeoutSeconds: 6
