apiVersion: apps/v1
kind: Deployment
metadata:
  name: ratings-web
spec:
  selector:
    matchLabels:
      app: ratings-web
  template:
    metadata:
      labels:
        app: ratings-web # the label for the pods and the deployments
    spec:
      containers:
        - name: ratings-web
          image: codacrserv01.azurecr.io/ratings-web:v1 # IMPORTANT: update with your own repository
          imagePullPolicy: Always
          ports:
            - containerPort: 8080 # the application listens to this port
          env:
            - name: API # the application expects to connect to the API at this endpoint
              value: http://ratings-api.ratingsapp.svc.cluster.local
          resources:
            requests: # minimum resources required
              cpu: 250m
              memory: 64Mi
            limits: # maximum resources allocated
              cpu: 500m
              memory: 512Mi
