apiVersion: apps/v1
kind: Deployment
metadata:
  name: trip-viewer-deployment
  namespace: web
  labels:
    app: trips
    component: trip-viewer
spec:
  selector:
    matchLabels:
      app: trips
      component: trip-viewer
  replicas: 2 # tells deployment to run 2 pods matching the template
  template:
    metadata:
      labels:
        app: trips
        component: trip-viewer
    spec:
      containers:
      - name: trip-viewer
        image: registryucj0309.azurecr.io/tripviewer2:1.0
        ports:
        - containerPort: 80
        env:
        - name: USERPROFILE_API_ENDPOINT
          value: http://user-service.api
        - name: TRIPS_API_ENDPOINT
          value: http://trips-service.api
        - name: WCF_ENDPOINT
          value: http://wcf-service.win
      nodeSelector:
        kubernetes.io/os: linux