apiVersion: apps/v1
kind: Deployment
metadata:
  name: twhelp-tribe-consumer-deployment
spec:
  selector:
    matchLabels:
      app: twhelp-tribe-consumer
  template:
    metadata:
      labels:
        app: twhelp-tribe-consumer
    spec:
      containers:
        - name: twhelp-tribe-consumer
          image: twhelp
          args: [consumer, tribe]
          env:
            - name: APP_MODE
              value: development
            - name: LOG_LEVEL
              value: debug
            - name: DB_CONNECTION_STRING
              valueFrom:
                secretKeyRef:
                  name: twhelp-secret
                  key: db-connection-string
            - name: RABBITMQ_CONNECTION_STRING
              valueFrom:
                secretKeyRef:
                  name: twhelp-secret
                  key: rabbitmq-connection-string
          livenessProbe:
            exec:
              command: [cat, /tmp/live]
            initialDelaySeconds: 5
            periodSeconds: 10
          resources:
            requests:
              cpu: 100m
              memory: 100Mi
            limits:
              cpu: 300m
              memory: 300Mi
