apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: google-play-scraper
  labels:
    app: play-scraper
spec:
  selector:
    matchLabels:
      app: play-scraper
  serviceName: no-service-is-needed
  replicas: 1
  updateStrategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: play-scraper
    spec:
      containers:
      - command:
        - sh
        - -c
        - sleep infinity
        image: registry.cafebazaar.ir:5000/bazaar/app-delivery/ayyar/google-play-crawler:0.3
        imagePullPolicy: IfNotPresent
        name: ubuntu-debug
        resources:
          limits:
            cpu: "2"
            ephemeral-storage: 500Mi
            memory: 4000Mi
          requests:
            cpu: "1"
            ephemeral-storage: 250Mi
            memory: 2000Mi
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
          - mountPath: /scraper/data
            subPath: scraper/data
            name: scraper-files
        
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      terminationGracePeriodSeconds: 30
      

  volumeClaimTemplates:
    - metadata:
        name: scraper-files
      spec:
        accessModes:
          - ReadWriteOnce
        resources:
          requests:
            storage: 10Gi
        storageClassName: hicap-new
        
