apiVersion: v1
kind: ReplicationController
metadata:
  name: postgresql-db
  namespace: gitlab
spec:
  replicas: 1
  selector:
    name: postgresql-db
  template:
    metadata:
      name: postgresql-db
      labels:
        name: postgresql-db
    spec:
      containers:
      - name: postgresql-db
        image: postgres:12
        env:
        - name: DB_USER
          value: gitlab
        - name: DB_PASS
          value: passw0rd
        - name: DB_NAME
          value: gitlab_production
        - name: DB_EXTENSION
          value: pg_trgm
        - name: POSTGRES_PASSWORD
          value: gitlab
        ports:
        - name: postgres
          containerPort: 5432
        volumeMounts:
        - mountPath: /var/lib/postgresql
          name: data
      volumes:
      - name: data
        emptyDir: {}
