apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: taskcluster-web-server-scanner
  labels: &ref_0
    app.kubernetes.io/name: taskcluster-web-server
    app.kubernetes.io/instance: '{{ .Release.Name }}'
    app.kubernetes.io/component: taskcluster-web-server-scanner
    app.kubernetes.io/part-of: taskcluster
spec:
  concurrencyPolicy: Forbid
  schedule: 0 0 * * *
  jobTemplate:
    metadata:
      labels: *ref_0
    spec:
      activeDeadlineSeconds: 86340
      template:
        metadata:
          labels: *ref_0
        spec:
          restartPolicy: OnFailure
          containers:
            - name: taskcluster-web-server-scanner
              image: '{{ .Values.dockerImage }}'
              imagePullPolicy: Always
              args:
                - web-server/scanner
              resources:
                requests:
                  cpu: '{{ .Values.web_server.procs.scanner.cpu }}'
                  memory: '{{ .Values.web_server.procs.scanner.memory }}'
              env:
                - name: TASKCLUSTER_ROOT_URL
                  value: '{{ .Values.rootUrl }}'
                - name: USE_KUBERNETES_DNS_SERVICE_DISCOVERY
                  value: '{{ .Values.useKubernetesDnsServiceDiscovery }}'
                - name: NODE_ENV
                  value: production
              envFrom:
                - secretRef:
                    name: taskcluster-web-server
