apiVersion: apps/v1
kind: Deployment
metadata:
  name: morphling-ui
  namespace: morphling-system
  labels:
    app: morphling
    component: ui
spec:
  replicas: 1
  selector:
    matchLabels:
      app: morphling
      component: ui
  template:
    metadata:
      name: morphling-ui
      labels:
        app: morphling
        component: ui
    spec:
      containers:
        - name: morphling-ui
          image: kubedl/morphling-ui
          imagePullPolicy: Always
          command:
            - '/backend-server'
          args:
            - '--port=9091'
          env:
            - name: MORPHLING_UI_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
          ports:
            - name: ui
              containerPort: 9091
      serviceAccountName: morphling-ui
