apiVersion: apps/v1
kind: Deployment
metadata:
  name: katib-db-manager
  namespace: kubeflow
  labels:
    app: katib
    app.kubernetes.io/component: katib
    app.kubernetes.io/name: katib-controller
    component: db-manager
spec:
  replicas: 1
  selector:
    matchLabels:
      app: katib
      app.kubernetes.io/component: katib
      app.kubernetes.io/name: katib-controller
      component: db-manager
  template:
    metadata:
      name: katib-db-manager
      labels:
        app: katib
        app.kubernetes.io/component: katib
        app.kubernetes.io/name: katib-controller
        component: db-manager
      annotations:
        sidecar.istio.io/inject: "false"
    spec:
      containers:
      - name: katib-db-manager
        image: gcr.io/gcp-private-dev/mirror/gcr.io/kubeflow-images-public/katib/v1alpha3/katib-db-manager:917164a
        command:
        - ./katib-db-manager
        ports:
        - name: api
          containerPort: 6789
        env:
        - name: DB_NAME
          value: mysql
        - name: DB_PASSWORD
          valueFrom:
            secretKeyRef:
              name: katib-mysql-secrets
              key: MYSQL_ROOT_PASSWORD
        livenessProbe:
          exec:
            command:
            - /bin/grpc_health_probe
            - -addr=:6789
          failureThreshold: 5
          initialDelaySeconds: 10
          periodSeconds: 60
        readinessProbe:
          exec:
            command:
            - /bin/grpc_health_probe
            - -addr=:6789
          initialDelaySeconds: 5
        imagePullPolicy: IfNotPresent
