apiVersion: apps/v1
kind: Deployment
metadata:
  name: retraced-cron
  namespace: '{{repl ConfigOption "namespace"}}'
spec:
  selector:
    matchLabels:
      tier: cron
  replicas: 1
  template:
    metadata:
      labels:
        app: auditlog
        tier: cron
        dest: nsq
        source: cron
    spec:
      containers:
        - name: cron
          image: registry.replicated.com/library/retraced:1.4.6
          imagePullPolicy: IfNotPresent
          command:
            - /bin/bash
            - -c
            - /usr/local/bin/replicated-auditlog-cron /crontab | grep ERRO
          env:
            - name: NSQD_HOST
              valueFrom:
                secretKeyRef:
                  key: NSQD_HOST
                  name: auditlog
            - name: NSQD_HTTP_PORT
              valueFrom:
                secretKeyRef:
                  key: NSQD_HTTP_PORT
                  name: auditlog
            - name: RETRACED_DISABLE_GEOSYNC
              value: "1"
          resources:
            requests:
              cpu: 10m
            limits:
              cpu: 100m
      imagePullSecrets:
      - name: auditlog-imagepull-secret

