apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: ml-pipeline-visualizationserver
  name: ml-pipeline-visualizationserver
spec:
  selector:
    matchLabels:
      app: ml-pipeline-visualizationserver
  template:
    metadata:
      labels:
        app: ml-pipeline-visualizationserver
      annotations:
        cluster-autoscaler.kubernetes.io/safe-to-evict: "true"
    spec:
      securityContext:
        seccompProfile:
          type: RuntimeDefault
      containers:
      - image: ghcr.io/kubeflow/kfp-visualization-server:dummy
        imagePullPolicy: IfNotPresent
        name: ml-pipeline-visualizationserver
        ports:
        - name: http
          containerPort: 8888
        readinessProbe:
          exec:
            command:
              - wget
              - -q # quiet
              - -S # show server response
              - -O
              - "-" # Redirect output to stdout
              - http://localhost:8888/
          initialDelaySeconds: 3
          periodSeconds: 5
          timeoutSeconds: 2
        livenessProbe:
          exec:
            command:
              - wget
              - -q # quiet
              - -S # show server response
              - -O
              - "-" # Redirect output to stdout
              - http://localhost:8888/
          initialDelaySeconds: 3
          periodSeconds: 5
          timeoutSeconds: 2
        securityContext:
          allowPrivilegeEscalation: false
          runAsNonRoot: true
          runAsUser: 1000
          runAsGroup: 0
          capabilities:
            drop:
            - ALL
        resources:
            requests:
              cpu: 30m
              memory: 500Mi
      serviceAccountName: ml-pipeline-visualizationserver
