---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: katib-ui
  namespace: kubeflow
  labels:
    katib.kubeflow.org/component: ui
spec:
  replicas: 1
  selector:
    matchLabels:
      katib.kubeflow.org/component: ui
  template:
    metadata:
      labels:
        katib.kubeflow.org/component: ui
        sidecar.istio.io/inject: "false"
    spec:
      securityContext:
        seccompProfile:
          type: RuntimeDefault
      containers:
        - name: katib-ui
          image: ghcr.io/kubeflow/katib/katib-ui
          command:
            - "./katib-ui"
          args:
            - "--port=8080"
          env:
            - name: KATIB_CORE_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
          ports:
            - name: ui
              containerPort: 8080
          securityContext:
            runAsNonRoot: true
            allowPrivilegeEscalation: false
            runAsUser: 1000
            capabilities:
              drop:
              - ALL
      serviceAccountName: katib-ui
