apiVersion: apps/v1
kind: Deployment
metadata:
  name: reservation
  labels:
    app: reservation
spec:
  replicas: 3
  selector:
    matchLabels:
      app: reservation
  template:
    metadata:
      labels:
        app: reservation
    spec:
      containers:
        - name: reservation
          image: user09acr.azurecr.io/reservation:latest
          ports:
            - containerPort: 8080
          envFrom: 
            - configMapRef:
                name: reservation
          readinessProbe:
            httpGet:
              path: '/actuator/health'
              port: 8080
            initialDelaySeconds: 10
            timeoutSeconds: 2
            periodSeconds: 5
            failureThreshold: 10
          livenessProbe:
            httpGet:
              path: '/actuator/health'
              port: 8080
            initialDelaySeconds: 300
            timeoutSeconds: 2
            periodSeconds: 5
            failureThreshold: 5
          resources:
            requests:
              memory: 512Mi
              cpu: 500m
            limits:
              memory: 512Mi
              cpu: 500m
          volumeMounts:
            - name: volume
              mountPath: "/apps/data"
      volumes:
        - name: volume
          persistentVolumeClaim:
            claimName: reservation-pvc