apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: centraldashboard
  name: centraldashboard
spec:
  replicas: 1
  selector:
    matchLabels:
      app: centraldashboard
  template:
    metadata:
      labels:
        app: centraldashboard
        sidecar.istio.io/inject: "true"
    spec:
      securityContext:
        seccompProfile:
          type: RuntimeDefault
      containers:
      - name: centraldashboard
        image: ghcr.io/kubeflow/kubeflow/central-dashboard
        imagePullPolicy: IfNotPresent
        livenessProbe:
          httpGet:
            path: /healthz
            port: 8082
          initialDelaySeconds: 30
          periodSeconds: 30
        ports:
        - containerPort: 8082
          protocol: TCP
        env:
        - name: USERID_HEADER
          value: CD_USERID_HEADER_PLACEHOLDER
        - name: USERID_PREFIX
          value: CD_USERID_PREFIX_PLACEHOLDER
        - name: PROFILES_KFAM_SERVICE_HOST
          value: profiles-kfam.kubeflow
        - name: REGISTRATION_FLOW
          value: CD_REGISTRATION_FLOW_PLACEHOLDER
        - name: DASHBOARD_CONFIGMAP
          value: CD_CONFIGMAP_NAME_PLACEHOLDER
        - name: LOGOUT_URL
          value: '/oauth2/sign_out'
        - name: POD_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: COLLECT_METRICS
          value: CD_COLLECT_METRICS
        securityContext:
          runAsNonRoot: true
          allowPrivilegeEscalation: false
          runAsUser: 1000
          capabilities:
            drop:
            - ALL
      serviceAccountName: centraldashboard
