apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: sm-client
  namespace: NAMESPACE
spec:
  selector:
    matchLabels:
      app: spacemesh-client # has to match .spec.template.metadata.labels
  serviceName: "sm-client"
  replicas: 5
  template:
    metadata:
      labels:
        name: client
        app: spacemesh-client
        namespace: NAMESPACE
      annotations:
        cluster-autoscaler.kubernetes.io/safe-to-evict: 'false'
        prometheus.io/scrape: 'true'
        prometheus.io/port: '2020'
        prometheus.io/path: '/metrics'
    spec:
      containers:
      - name: client
        image: spacemeshos/go-spacemesh:develop
        imagePullPolicy: Always
        args: ['--randcon', '3', '--bootstrap', '--test-mode', '--oracle_server', 'http://10.12.3.14:3030', '--grpc', 'gateway,globalstate,transaction', '--json-server', '--bootnodes', '10.36.1.12:7513/26hRBJqMJPUnKgJ9VR6g3kH6aCQhZ9shBvhn3bEHDvRyv', '--metrics', '--metrics-port', '2020', '--pprof-server']
        resources:
          requests:
            memory: "512M"
            cpu: "0.5"
          limits:
            memory: "2048M"
            cpu: "1"
        ports:
        - containerPort: 9093
        volumeMounts:
        - name: client-vol
          mountPath: /usr/share/spacemesh          
      nodeSelector:
        namespace: NAMESPACE
      tolerations:
        - key: "namespace"
          operator: "Equal"
          value: NAMESPACE
          effect: "NoSchedule"
  volumeClaimTemplates:
    - metadata:
        name: client-vol
      spec:
        accessModes:
          - ReadWriteOnce
        resources:
          requests:
            storage: 1Gi
        storageClassName: standard        
