apiVersion: apps/v1
kind: Deployment
metadata:
  name: eatk8s-shopper
  labels:
    app: eatk8s-shopper
spec:
  replicas: 1
  selector:
    matchLabels:
      app: eatk8s-shopper
  template:
    metadata:
      labels:
        app: eatk8s-shopper
    spec:
      containers:
      - name: eatk8s-shopper
        image:  docker.io/mreider/eatk8s:latest
        resources:
          requests:
            cpu: 100m
            memory: 32Mi
          limits:
            memory: 64Mi
            cpu: 100m
        ports:
        - containerPort: 8080
          name: api
        env:
          - name: REDIS_HOST
            value: redis
          - name: REDIS_PORT
            value: "6379"
          - name: SHOPPER_HOST
            value: eatk8s-shopper-service
          - name: SHOPPER_PORT
            value: "8080"
          - name: GROCER_HOST
            value: eatk8s-grocer-service
          - name: GROCER_PORT
            value: "8080"
        args: ["./grocer-start.sh"]
        livenessProbe:
              httpGet:
                path: /
                port: 8080
              initialDelaySeconds: 300
              periodSeconds: 60
