apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  labels:
    app: modeldb
    component: backend
    ksonnet.io/component: katib
  name: modeldb-backend
  namespace: kubeflow
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: modeldb
        component: backend
      name: modeldb-backend
    spec:
      containers:
      - args:
        - modeldb-db
        image: "{{ .Values.katib.modeldbImage.repository }}:{{ .Values.katib.modeldbImage.tag }}"
        name: modeldb-backend
        ports:
        - containerPort: 6543
          name: api
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  labels:
    app: modeldb
    component: db
    ksonnet.io/component: katib
  name: modeldb-db
  namespace: kubeflow
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: modeldb
        component: db
      name: modeldb-db
    spec:
      containers:
      - image: "{{ .Values.katib.modeldbDatabaseImage.repository }}:{{ .Values.katib.modeldbDatabaseImage.tag }}"
        name: modeldb-db
        ports:
        - containerPort: 27017
          name: dbapi
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  labels:
    app: modeldb
    component: frontend
    ksonnet.io/component: katib
  name: modeldb-frontend
  namespace: kubeflow
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: modeldb
        component: frontend
      name: modeldb-frontend
    spec:
      containers:
      - args:
        - modeldb-backend
        env:
        - name: ROOT_PATH
          value: /katib
        # image: gcr.io/kubeflow-images-public/katib/katib-frontend:v0.1.2-alpha-45-g3dce496
        image: "{{ .Values.katib.modeldbFrontendImage.repository }}:{{ .Values.katib.modeldbFrontendImage.tag }}"
        imagePullPolicy: IfNotPresent
        name: modeldb-frontend
        ports:
        - containerPort: 3000
          name: webapi
