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