kind: Deployment
apiVersion: apps/v1
metadata:
  name: api
  labels:
    app: api
spec:
  replicas: 1
  selector:
    matchLabels:
      app: api
  template:
    metadata:
      labels:
        app: api
    spec:
      restartPolicy: Always
      imagePullSecrets:
      - name: regcred
      containers:
      - name: api
        image: registry.digitalocean.com/paralect/ship-api:{{ .Values.imagesVersion }}
        imagePullPolicy: Always
        livenessProbe:
          httpGet:
            path: /health
            port: 3001
          initialDelaySeconds: 100
          periodSeconds: 10
        ports:
        - containerPort: 3001
          protocol: TCP
      nodeSelector:
        doks.digitalocean.com/node-pool: pool-app
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 0
      maxSurge: 1
