apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app.kubernetes.io/component: metadata
    app.kubernetes.io/name: metadata
    component: server
    kustomize.component: metadata
  name: metadata-deployment
  namespace: kubeflow
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/component: metadata
      app.kubernetes.io/name: metadata
      component: server
      kustomize.component: metadata
  template:
    metadata:
      annotations:
        sidecar.istio.io/inject: "false"
      labels:
        app.kubernetes.io/component: metadata
        app.kubernetes.io/name: metadata
        component: server
        kustomize.component: metadata
    spec:
      containers:
      - command:
        - ./server/server
        - --http_port=8080
        - --mysql_service_host=metadata-db
        - --mysql_service_port=$(MYSQL_PORT)
        - --mysql_service_user=$(MYSQL_USER_NAME)
        - --mysql_service_password=$(MYSQL_ROOT_PASSWORD)
        - --mlmd_db_name=$(MYSQL_DATABASE)
        envFrom:
        - configMapRef:
            name: metadata-db-parameters
        - secretRef:
            name: metadata-db-secrets
        image: gcr.io/kubeflow-images-public/metadata:v0.1.11
        livenessProbe:
          httpGet:
            httpHeaders:
            - name: ContentType
              value: application/json
            path: /api/v1alpha1/artifact_types
            port: backendapi
          initialDelaySeconds: 3
          periodSeconds: 5
          timeoutSeconds: 2
        name: container
        ports:
        - containerPort: 8080
          name: backendapi
        readinessProbe:
          httpGet:
            httpHeaders:
            - name: ContentType
              value: application/json
            path: /api/v1alpha1/artifact_types
            port: backendapi
          initialDelaySeconds: 3
          periodSeconds: 5
          timeoutSeconds: 2
