apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: ml-pipeline
    app.kubernetes.io/component: api-service
    app.kubernetes.io/name: api-service
  name: ml-pipeline
  namespace: kubeflow
spec:
  selector:
    matchLabels:
      app: ml-pipeline
      app.kubernetes.io/component: api-service
      app.kubernetes.io/name: api-service
  template:
    metadata:
      annotations:
        sidecar.istio.io/inject: "false"
      labels:
        app: ml-pipeline
        app.kubernetes.io/component: api-service
        app.kubernetes.io/name: api-service
    spec:
      containers:
      - command:
        - apiserver
        - --config=/etc/ml-pipeline-config
        - --sampleconfig=/config/sample_config.json
        - -logtostderr=true
        env:
        - name: POD_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        image: gcr.io/ml-pipeline/api-server:0.2.5
        imagePullPolicy: IfNotPresent
        name: ml-pipeline-api-server
        ports:
        - containerPort: 8888
        - containerPort: 8887
        volumeMounts:
        - mountPath: /etc/ml-pipeline-config
          name: config-volume
      serviceAccountName: ml-pipeline
      volumes:
      - configMap:
          name: ml-pipeline-config
        name: config-volume
