---
apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: keep-network-relay-request-submitter
  namespace: ropsten
  labels:
    app: keep-network
    type: relay-requester
spec:
  schedule: '*/10 * * * *'
  jobTemplate:
    metadata:
      labels:
        app: keep-network
        type: relay-requester
    spec:
      activeDeadlineSeconds: 600
      template:
        spec:
          containers:
          - name: keep-network-relay-request-submitter
            image: gcr.io/keep-dev-fe24/keep-client
            ports:
              - containerPort: 3919
            env:
              - name: KEEP_ETHEREUM_PASSWORD
                valueFrom:
                  configMapKeyRef:
                    name: keep-client-5
                    key: eth_account_password
              - name: LOG_LEVEL
                value: debug
            volumeMounts:
              - name: keep-client-5
                mountPath: /mnt/keep-client/config
            command: ["keep-client", "-config", "/mnt/keep-client/config/keep-client-config.toml", "relay", "request"]
          volumes:
          - name: keep-client-5
            configMap:
              name: keep-client-5
              items:
                - key: eth_account_keyfile
                  path: eth_account_keyfile
                - key: keep-client-config.toml
                  path: keep-client-config.toml
          restartPolicy: OnFailure
