apiVersion: apps/v1
kind: Deployment
metadata:
  name: vakyansh-consumer
spec:
  selector:
    matchLabels:
      app: vakyansh-consumer
  replicas: 1
  template:
    metadata:
      annotations:
        commit_sha: CIRCLE_SHA1
      labels:
        app: vakyansh-consumer
    spec:
      containers:
        - image: IMAGE_NAME
          imagePullPolicy: Always
          name: auto-validation
          env:
            - name: DB_HOST
              valueFrom:
                secretKeyRef:
                  name: vakyansh-secret
                  key: DB_HOST
            - name: DB_NAME
              valueFrom:
                secretKeyRef:
                  name: vakyansh-secret
                  key: DB_NAME
            - name: DB_USER
              valueFrom:
                secretKeyRef:
                  name: vakyansh-secret
                  key: DB_USER
            - name: DB_PASS
              valueFrom:
                secretKeyRef:
                  name: vakyansh-secret
                  key: DB_PASS
            - name: BROKER_URL
              valueFrom:
                secretKeyRef:
                  name: vakyansh-secret
                  key: BROKER_URL
            - name: TOPIC
              valueFrom:
                secretKeyRef:
                  name: vakyansh-secret
                  key: TOPIC
          ports:
            - containerPort: 8080

          resources:
            limits:
              cpu: 1000m
              memory: 1Gi
