apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    service.name: tower32
  name: tower32
  # namespace: test
spec:
  replicas: 2
  selector:
    matchLabels:
      service.name: tower32
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 50%
      maxSurge: 1
  minReadySeconds: 30
  template:
    metadata:
      labels:
        service.name: tower32
    spec:
      securityContext:
        runAsUser: 0
        fsGroup: 0
      containers:
      - env:
        - name: NODE_ENV
          value: "production"
        # - name: GOOGLE_APPLICATION_CREDENTIALS
        #   value: "/export/config/google.json"
        image: test:5000/tower32:latest
        name: tower32
        resources: {}
          # requests:
          #   memory: "512Mi"
          #   cpu: "512m"
          # limits:
          #   memory: "1024Mi"
          #   cpu: "1024m"
        ports:
        - containerPort: 3001
          protocol: TCP
        volumeMounts:
        - name: data-pvc
          mountPath: "/export/data/"
        # readinessProbe:
        #   failureThreshold: 3
        #   httpGet:
        #     path: /health
        #     port: 3001
        #     scheme: HTTP
        #   initialDelaySeconds: 5
        #   periodSeconds: 10
        #   successThreshold: 1
        #   timeoutSeconds: 1
        # livenessProbe:
        #   failureThreshold: 3
        #   httpGet:
        #     path: /health
        #     port: 3001
        #     scheme: HTTP
        #   initialDelaySeconds: 5
        #   periodSeconds: 10
        #   successThreshold: 1
        #   timeoutSeconds: 1
        imagePullPolicy: IfNotPresent
      restartPolicy: Always
      # imagePullSecrets:
      #   - name: registry-credentials
      terminationGracePeriodSeconds: 30
      volumes:
      - name: data-pvc
        persistentVolumeClaim:
          claimName: data
