apiVersion: apps/v1
kind: Deployment
metadata:
  name: reservation
  namespace: storagerent
  labels:
    app: reservation
spec:
  replicas: 1
  selector:
    matchLabels:
      app: reservation
  template:
    metadata:
      labels:
        app: reservation
    spec:
      containers:
        - name: reservation
          image: 740569282574.dkr.ecr.ap-northeast-1.amazonaws.com/reservation:v1
          ports:
            - containerPort: 8080
          env:
            - name: prop.storage.url
              valueFrom:
                configMapKeyRef:
                  name: storagerent-config
                  key: prop.storage.url
            - name: prop.payment.url
              valueFrom:
                configMapKeyRef:
                  name: storagerent-config
                  key: prop.payment.url
          readinessProbe:
            httpGet:
              path: '/actuator/health'
              port: 8080
            initialDelaySeconds: 10
            timeoutSeconds: 2
            periodSeconds: 5
            failureThreshold: 10
          livenessProbe:
            httpGet:
              path: '/actuator/health'
              port: 8080
            initialDelaySeconds: 120
            timeoutSeconds: 2
            periodSeconds: 5
            failureThreshold: 5
