apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: restaurant
  name: restaurant
spec:
  replicas: 2
  selector:
    matchLabels:
      app: restaurant
  template:
    metadata:
      labels:
        app: restaurant
    spec:
      containers:
        - image: restaurant:latest
          name: restaurant
          imagePullPolicy: IfNotPresent
          envFrom:
            - configMapRef:
                name: restaurant
          readinessProbe:
            httpGet:
              path: /actuator/health/readiness
              port: 8080
            initialDelaySeconds: 30
            timeoutSeconds: 1
            periodSeconds: 15
          livenessProbe:
            httpGet:
              path: /actuator/health/liveness
              port: 8080
            initialDelaySeconds: 45
            timeoutSeconds: 1
            periodSeconds: 15
