apiVersion: v1
kind: ReplicationController
metadata:
  name: zabbix-db
  namespace: monitoring
  labels:
    app: zabbix
    tier: zabbix-db
spec:
  replicas: 1
  template:
    metadata:
      labels:
        name: zabbix-db
        app: zabbix
        tier: zabbix-db
    spec:
      containers:
        - name: zabbix-db
          #image: postgres:latest
          image: timescale/timescaledb:latest-pg11
          ports:
          - containerPort: 5432
            name: postgres
          env:
          - name: POSTGRES_USER
            value: zabbix
          - name: POSTGRES_DB
            value: zabbix
          - name: POSTGRES_PASSWORD
            value: pg_password
          volumeMounts:
          - name: zabbix-db-storage
            mountPath: /var/lib/postgresql
      volumes:
      - name: zabbix-db-storage
        emptyDir:
          medium: Memory
