apiVersion: batch/v1
kind: Job
metadata:
  name: nomidotwatcher-last-50k
  namespace: nodewatcher-staging
  labels:
    stage: staging
    name: nomidotwatcher
    app: nomidotwatcher
    job-name: nomidotwatcher-last-50k
spec:
  manualSelector: true
  selector:
    matchLabels:
      stage: staging
      name: nomidotwatcher
      app: nomidotwatcher
      job-name: nomidotwatcher-last-50k
  template:
    metadata:
      labels:
        stage: staging
        name: nomidotwatcher
        app: nomidotwatcher
        job-name: nomidotwatcher-last-50k
    spec:
      restartPolicy: Never
      containers:
        - name: nomidotwatcher
          image: eu.gcr.io/test-installations-222013/nomidot_watcher@sha256:36bf710c39451a8054885be5bca0ff8ffd8e530a9137e61d455cf2d16de23ca0
          imagePullPolicy: Always
          env:
            - name: PRISMA_ENDPOINT
              value: http://nodewatcher.nodewatcher-staging:4466
            - name: ARCHIVE_NODE_ENDPOINT
              value: ws://polkassembly-rpc-internal-0.parity-prod.parity.io:9944
            - name: START_FROM
              value: '1919357'
            - name: BLOCK_IDENTIFIER
              value: 'last-50k-2'
            - name: MAX_LAG
              value: '10'
          command: ["yarn", "start"]
