apiVersion: apps/v1
kind: Deployment
metadata:
  name: shoppingclient-deployment
  labels:
    app: shoppingclient
spec:
  replicas: 1
  selector:
    matchLabels:
      app: shoppingclient
  template:
    metadata:
      labels:
        app: shoppingclient
    spec:
      containers:
        - name: shoppingclient
          image: mehmetozkaya/shoppingclient:latest
          imagePullPolicy: IfNotPresent
          ports:
            - containerPort: 80
          env:
            - name: ASPNETCORE_ENVIRONMENT
              value: Development
            - name: ShoppingAPIUrl
              valueFrom:
                  configMapKeyRef:
                    name: shoppingapi-configmap
                    key: shoppingapi_url
          resources:
            requests:
              memory: "64Mi"
              cpu: "250m"
            limits:
              memory: "128Mi"
              cpu: "500m"