---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: timescaledb
  namespace: performance
  labels:
    app: timescaledb
    env: "{{ env }}"
spec:
  replicas: 1
  strategy:
    type: RollingUpdate
  selector:
    matchLabels:
      app: timescaledb
      env: "{{ env }}"
  template:
    metadata:
      labels:
        app: timescaledb
        env: "{{ env }}"
    spec:
      nodeSelector:
        env: "{{ env }}"
      volumes:
        - name: timescaledb-volume
      containers:
        - name: timescaledb
          image: "{{ timescaledb_container_image }}"
          imagePullPolicy: "{{ image_pull_policy }}"
          ports:
            - name: http
              containerPort: 5432
          env:
            - name: POSTGRES_USER
              value: postgres
            - name: POSTGRES_PASSWORD
              value: postgres
          volumeMounts:
            - name: timescaledb-volume
              mountPath: /pg-data
              
