apiVersion: batch/v1beta1
kind: CronJob
metadata:
  labels:
    app.kubernetes.io/name: slurm-check-ha
  name: slurm-check-ha
  namespace: infra
spec:
  concurrencyPolicy: Forbid
  failedJobsHistoryLimit: 1
  jobTemplate:
    metadata:
      labels:
        app.kubernetes.io/name: slurm-check-ha
    spec:
      template:
        spec:
          containers:
          - image: docker-registry.zooxlabs.com/check_slurmha:2
            imagePullPolicy: IfNotPresent
            name: pd-metrics-cron
            resources: {}
            terminationMessagePath: /dev/termination-log
            terminationMessagePolicy: File
            volumeMounts:
            - mountPath: /root/.ssh/id_rsa
              subPath: id_rsa
              name: slurm-master-root-ssh
              readOnly: true
          dnsPolicy: ClusterFirst
          restartPolicy: Never
          schedulerName: default-scheduler
          terminationGracePeriodSeconds: 30
          volumes:
          - name: slurm-master-root-ssh
            secret:
              defaultMode: 420
              items:
              - key: slurm_master.priv
                mode: 256
                path: id_rsa
              secretName: slurm-master-root-ssh
  schedule: '*/2 * * * *'
  successfulJobsHistoryLimit: 3
  suspend: false
