apiVersion: apps/v1
kind: Deployment
metadata:
  name: ratings
  labels:
    service: ratings
spec:
  replicas: 1
  selector:
    matchLabels:
      service: ratings
  template:
    metadata:
      labels:
        service: ratings
    spec:
      containers:
      - name: ratings
        image: rs-ratings:0.0.1
        #env:
        #- name: RATING_PDO_URL
        #  value: mysql:host=rating-mysql;port=3307;dbname=ratings;charset=utf8mb4
        envFrom:
          - configMapRef:
              name: ecommerce-config
        ports:
        - containerPort: 80
        resources:
          limits:
            cpu: 200m
            memory: 100Mi
          requests:
            cpu: 100m
            memory: 50Mi
      restartPolicy: Always
