| # operational_metrics_cronjob.yaml |
| apiVersion: batch/v1 |
| kind: CronJob |
| metadata: |
| name: operational-metrics-cronjob |
| namespace: operational-metrics |
| spec: |
| # Midnight PDT |
| schedule: "0 7 * * *" |
| timeZone: "Etc/UTC" |
| concurrencyPolicy: Forbid |
| jobTemplate: |
| spec: |
| template: |
| spec: |
| serviceAccountName: operational-metrics-ksa |
| nodeSelector: |
| iam.gke.io/gke-metadata-server-enabled: "true" |
| containers: |
| - name: process-llvm-commits |
| image: ghcr.io/llvm/operations-metrics:latest |
| env: |
| - name: GITHUB_TOKEN |
| valueFrom: |
| secretKeyRef: |
| name: operational-metrics-secrets |
| key: github-token |
| resources: |
| requests: |
| cpu: "250m" |
| # We explicitly use Mi here instead of a decimal number of |
| # Gi because k8s will automatically convert to Mi which |
| # terraform then thinks differs from what it intended to apply. |
| memory: "1792Mi" |
| limits: |
| cpu: "2" |
| memory: "2Gi" |
| restartPolicy: OnFailure |