apiVersion: apps/v1
kind: Deployment
metadata:
  name: restaurant
  labels:
    app: restaurant
spec:
  replicas: 1
  selector:
    matchLabels:
      app: restaurant
  template:
    metadata:
      labels:
        app: restaurant
    spec:
      containers:
      - image: ronaldcrb/restaurant
        name: restaurant
        envFrom:
          - secretRef:
              name: restaurant
        resources:
          requests:
            memory: "64Mi"
            cpu: "250m"
          limits:
            memory: "128Mi"
            cpu: "500m"
        
        readinessProbe:
          httpGet:
            path: /healthz
            port: 8080
          initialDelaySeconds: 10
          periodSeconds: 10
          failureThreshold: 2
          successThreshold: 1
          timeoutSeconds: 1
          
        livenessProbe:
          httpGet:
            path: /healthz
            port: 8080
          initialDelaySeconds: 10
          periodSeconds: 10
          failureThreshold: 3
          successThreshold: 1
          timeoutSeconds: 1
          