apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: sm-bootstrap
spec:
  selector:
    matchLabels:
      app: spacemesh # has to match .spec.template.metadata.labels
  serviceName: "sm"
  replicas: 1
  template:
    metadata:
      labels:
        name: bootstrap
        app: spacemesh
      annotations:
        cluster-autoscaler.kubernetes.io/safe-to-evict: 'false'
        prometheus.io/scrape: 'true'
        prometheus.io/port: '2020'
        prometheus.io/path: '/metrics'
    spec:
      containers:
      - name: bootstrap
        image: spacemeshos/go-spacemesh:develop
        imagePullPolicy: Always
        args: ['--config', '/etc/config/config.toml', '--grpc', 'gateway,globalstate,transaction', '--test-mode', '--coinbase', '0x1234', '--metrics', '--metrics-port', '2020', '--pprof-server']
        resources:
          requests:
            memory: "512M"
            cpu: "0.5"
          limits:
            memory: "2048M"
            cpu: "1"
        ports:
        - containerPort: 9092
        - containerPort: 9999
        volumeMounts:
        - name: bootstrap-vol
          mountPath: /usr/share/spacemesh
      nodeSelector:
        role: tests
  volumeClaimTemplates:
    - metadata:
        name: bootstrap-vol
      spec:
        accessModes:
          - ReadWriteOnce
        resources:
          requests:
            storage: 1Gi
        storageClassName: standard


