apiVersion: apps/v1
kind: Deployment
metadata:
  name: product-info-service-deployment
  labels:
    app: product-info-service
spec:
  replicas: 1
  selector:
    matchLabels:
      app: product-info-service
  template:
    metadata:
      labels:
        app: product-info-service
    spec:
      containers:
      - name: product-info-service
        image: benjaminsh/blue_cart_product_info_service:latest
        ports:
        - containerPort: 3000
        env:
        - name: MONGO_DB_USERNAME
          valueFrom:
            secretKeyRef:
              name: bluecartsecrets
              key:  MONGO_DB_USERNAME
        - name: MONGO_DB_PASSWORD
          valueFrom:
            secretKeyRef:
              name: bluecartsecrets
              key:  MONGO_DB_PASSWORD
        - name: MONGO_DB_CLUSTER_ADDRESS
          valueFrom:
            secretKeyRef:
              name: bluecartsecrets
              key:  MONGO_DB_CLUSTER_ADDRESS