apiVersion: apps/v1
kind: Deployment
metadata:
  name: px-lighthouse
  namespace: kube-test
  labels:
    tier: px-web-console
spec:
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  selector:
    matchLabels:
      tier: px-web-console
  replicas: 1
  template:
    metadata:
      labels:
        tier: px-web-console
    spec:
      initContainers:
      - name: config-init
        image: portworx/lh-config-sync:2.1.1
        imagePullPolicy: Always
        args:
        - "init"
        env:
        - name: PX_NAMESPACE
          value: kube-test
        volumeMounts:
        - name: config
          mountPath: /config/lh
      containers:
      - name: px-lighthouse
        image: portworx/px-lighthouse:2.1.1
        imagePullPolicy: Always
        args: [ "-kubernetes", "true" ]
        ports:
        - containerPort: 80
        - containerPort: 443
        volumeMounts:
        - name: config
          mountPath: /config/lh
      - name: config-sync
        image: portworx/lh-config-sync:2.1.1
        imagePullPolicy: Always
        args:
        - "sync"
        env:
        - name: PX_NAMESPACE
          value: kube-test
        volumeMounts:
        - name: config
          mountPath: /config/lh
      - name: stork-connector
        image: portworx/lh-stork-connector:2.1.1
        imagePullPolicy: Always
      serviceAccountName: px-lighthouse
      volumes:
      - name: config
        emptyDir: {}
