apiVersion: apps/v1
kind: StatefulSet
metadata:
  labels:
    app: block-indexer-v3
    version: v3
  name: block-indexer-v3
  namespace: eth-mainnet
spec:
  podManagementPolicy: Parallel
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: block-indexer-v3
      version: v3
  serviceName: block-indexer-v3
  template:
    metadata:
      labels:
        app: block-indexer-v3
        version: v3
      name: block-indexer-v3
    spec:
      containers:
        - command:
            - /app/sfeth
            - tools
            - generate-account-index
            - --account-indexes-size=10000
            - --irreversible-indexes-sizes=10000,1000
            - --create-irreversible-indexes
            - <blocks_indexes_storage_path>
            - <irreversibility_indexes_storage_path>
            - <merged_blocks_storage_path>
            - "14300000"
          env:
            - name: INFO
              value: github.com/streamingfast/.*
          image: <sfeth_container_image>
          imagePullPolicy: IfNotPresent
          name: indexer
          ports:
            - containerPort: 9102
              name: prometheus
              protocol: TCP
          resources:
            limits:
              cpu: "1"
              memory: 2Gi
            requests:
              cpu: 300m
              memory: 2Gi
      serviceAccountName: app-blocks-writer
  updateStrategy:
    type: RollingUpdate
