apiVersion: apps/v1beta2 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
  name: flui-us-webapp-front
  labels:
    service: webapp
    app: flui-us-front
spec:
#  replicas: 2 # tells deployment to run 2 pods matching the template
  selector:
      matchLabels:
        service: webapp
        app: flui-us-front
  template: # create pods using pod definition in this template
    metadata:
      # unlike pod-nginx.yaml, the name is not included in the meta data as a unique name is
      # generated from the deployment name
      labels:
        service: webapp
        app: flui-us-front
    spec:
      containers:
      - name: flui-us-webapp-front
        image: fluiai.azurecr.io/flui-us-webapp-front
        ports:
        - containerPort: 8080
        env:
          - name: NODE_NAME
            valueFrom:
              fieldRef:
                fieldPath: spec.nodeName
          - name: POD_NAME
            valueFrom:
              fieldRef:
                fieldPath: metadata.name
          - name: POD_NAMESPACE
            valueFrom:
              fieldRef:
                fieldPath: metadata.namespace
          - name: POD_IP
            valueFrom:
              fieldRef:
                fieldPath: status.podIP
      imagePullSecrets:
      - name: acr-auth
      imagePullPolicy: Always