apiVersion: apps/v1
kind: Deployment
metadata:
  name: invoice
spec:
  selector:
      matchLabels:
        app: invoice
  replicas: 2
  template:
      metadata:
        labels:
            app: invoice
      spec:
        containers:
        - name: invoice
          image: vany0114/duber.invoice.api
          imagePullPolicy: Always
          resources:
            requests:
              memory: "128Mi"
              cpu: "100m"
            limits:
              memory: "256Mi"
              cpu: "500m"
          envFrom:
            - configMapRef:
                name: env-config
          livenessProbe:
            httpGet:
              port: 80
              path: /liveness
            initialDelaySeconds: 10
            periodSeconds: 10
          readinessProbe:
            httpGet:
              path: /readiness
              port: 80
            initialDelaySeconds: 30
            periodSeconds: 60
            timeoutSeconds: 5
          ports:
            - containerPort: 80