apiVersion: apps/v1
kind: Deployment
metadata:
  name: recommendationservice
spec:
  selector:
    matchLabels:
      app: recommendationservice
  template:
    metadata:
      labels:
        app: recommendationservice
    spec:
      terminationGracePeriodSeconds: 5
      containers:
        - name: server
          image: gcr.io/google-samples/microservices-demo/recommendationservice:v0.1.3
          ports:
            - containerPort: 8080
          readinessProbe:
            periodSeconds: 5
            exec:
              command: ["/bin/grpc_health_probe", "-addr=:8080"]
          livenessProbe:
            periodSeconds: 5
            exec:
              command: ["/bin/grpc_health_probe", "-addr=:8080"]
          env:
            - name: PORT
              value: "8080"
            - name: PRODUCT_CATALOG_SERVICE_ADDR
              value: "productcatalogservice:3550"
            - name: ENABLE_PROFILER
              value: "0"
          resources:
            requests:
              cpu: 100m
              memory: 220Mi
            limits:
              cpu: 200m
              memory: 450Mi