apiVersion: apps/v1
kind: Deployment
metadata:
  name: vibank-back
spec:
  replicas: 2
  selector:
    matchLabels:
      app: vibank-back
  template:
    metadata:
      labels:
        app: vibank-back
    spec:
      containers:
      - name: vibank-back
        image: sockmal/vibank-back:1.4.0
        env:
          - name: MLAB_API_KEY
            valueFrom:
              secretKeyRef:
                name: vibank-back-secret
                key: mlabapikey
          - name: JWT_TOKEN
            valueFrom:
              secretKeyRef:
                name: vibank-back-secret
                key: jwttoken
        ports:
        - containerPort: 3000
        resources:
          requests:
            memory: "60Mi"
            cpu: "50m"
          limits:
            memory: "256Mi"
            cpu: "600m"
        livenessProbe:
          httpGet:
            path: /
            port: 3000
          initialDelaySeconds: 15
          periodSeconds: 60
        readinessProbe:
          httpGet:
            path: /
            port: 3000
          initialDelaySeconds: 15
          periodSeconds: 60