apiVersion: apps/v1
kind: Deployment
metadata:
  name: ratings
  labels:
    service: ratings
spec:
  replicas: 1
  selector:
    matchLabels:
      service: ratings
  template:
    metadata:
      labels:
        service: ratings
    spec:
      {{ if .Values.psp.enabled }}
      serviceAccountName: robot-shop
      {{ end }}
      containers:
      - name: ratings
        image: {{ .Values.image.repo }}/rs-ratings:{{ .Values.image.version }}
        imagePullPolicy: {{ .Values.image.pullPolicy }}
        ports:
        - containerPort: 80
        resources:
          limits:
            cpu: 200m
            memory: 100Mi
          requests:
            cpu: 100m
            memory: 50Mi
        readinessProbe:
          httpGet:
            path: /_health
            port: 80
          initialDelaySeconds: 5
          periodSeconds: 5
          failureThreshold: 30
          successThreshold: 1
      restartPolicy: Always
