version: 1
kind: stack

requires:
  - kubernetes

components:
  - name: istio-base
    source:
      dir: components/istio-base
      git:
        remote: https://github.com/agilestacks/kubeflow-components.git
        subDir: istio-base
        ref: develop

  - name: istio-discovery
    source:
      dir: components/istio-discovery
      git:
        remote: https://github.com/agilestacks/kubeflow-components.git
        subDir: istio-discovery
        ref: develop
    depends:
      - istio-base

  - name: istio-ingressgateway
    source:
      dir: components/istio-ingressgateway
      git:
        remote: https://github.com/agilestacks/kubeflow-components.git
        subDir: istio-ingressgateway
    depends:
      - istio-discovery

  - name: dex
    source:
      dir: components/dex
      git:
        remote: https://github.com/agilestacks/kubeflow-components.git
        subDir: dex
        ref: develop

  - name: minio
    source:
      dir: components/minio
      git:
        remote: https://github.com/agilestacks/kubeflow-components.git
        subDir: minio
        ref: develop

  - name: argo-db
    source:
      dir: components/postgresql
      git:
        remote: https://github.com/agilestacks/kubeflow-components.git
        subDir: postgresql
        ref: develop

  - name: kubeflow-db
    source:
      dir: components/mysql
      git:
        remote: https://github.com/agilestacks/kubeflow-components.git
        subDir: mysql
        ref: develop

  - name: etcd
    source:
      dir: components/etcd
      git:
        remote: https://github.com/agilestacks/kubeflow-components.git
        subDir: etcd
        ref: develop        

  - name: argo
    source:
      dir: components/argo
      git:
        remote: https://github.com/agilestacks/kubeflow-components.git
        subDir: argo
        ref: develop
    depends:
      - argo-db
      - minio
      - dex

  - name: kubeflow-common
    source:
      dir: components/kubeflow-common
      git:
        remote: https://github.com/agilestacks/kubeflow-components.git
        subDir: kubeflow-common
        ref: develop
    depends:
      - dex

  - name: kubeflow-authn
    source:
      dir: components/kubeflow-authn
      git:
        remote: https://github.com/agilestacks/kubeflow-components.git
        subDir: kubeflow-authn
        ref: develop
    depends:
      - dex
      - kubeflow-common
      - istio-ingressgateway

  - name: kubeflow-profiles
    source:
      dir: components/kubeflow-profiles
      git:
        remote: https://github.com/agilestacks/kubeflow-components.git
        subDir: kubeflow-profiles
        ref: develop
    depends:
      - istio-ingressgateway
      - kubeflow-authn
      - kubeflow-common

  - name: kubeflow-volumes
    source:
      dir: components/kubeflow-volumes
      git:
        remote: https://github.com/agilestacks/kubeflow-components.git
        subDir: kubeflow-volumes
        ref: develop
    depends:
      - kubeflow-common
      - kubeflow-profiles
      - istio-ingressgateway

  - name: kubeflow-tensorboard
    source:
      dir: components/kubeflow-tensorboard
      git:
        remote: https://github.com/agilestacks/kubeflow-components.git
        subDir: kubeflow-tensorboard
        ref: develop
    depends:
      - kubeflow-common
      - kubeflow-profiles
      - istio-ingressgateway

  - name: kubeflow-katib
    source:
      dir: components/kubeflow-katib
      git:
        remote: https://github.com/agilestacks/kubeflow-components.git
        subDir: kubeflow-katib
        ref: develop
    depends:
      - kubeflow-common
      - kubeflow-db

  - name: kubeflow-webhooks
    source:
      dir: components/kubeflow-webhooks
      git:
        remote: https://github.com/agilestacks/kubeflow-components.git
        subDir: kubeflow-webhooks
        ref: develop
    depends:
      - kubeflow-common

  - name: kubeflow-jupyter
    source:
      dir: components/kubeflow-jupyter
      git:
        remote: https://github.com/agilestacks/kubeflow-components.git
        subDir: kubeflow-jupyter
        ref: develop
    depends:
      - istio-ingressgateway
      - kubeflow-common
      - kubeflow-profiles
      - kubeflow-webhooks

  - name: kubeflow-metadata
    source:
      dir: components/kubeflow-metadata
      git:
        remote: https://github.com/agilestacks/kubeflow-components.git
        subDir: kubeflow-metadata
        ref: develop
    depends:
      - kubeflow-common
      - kubeflow-db

  - name: kubeflow-pipelines
    source:
      dir: components/kubeflow-pipeline
      git:
        remote: https://github.com/agilestacks/kubeflow-components.git
        subDir: kubeflow-pipeline
        ref: develop
    depends:
      - kubeflow-profiles
      - kubeflow-metadata
      - kubeflow-db
      - minio

  - name: kubeflow-centraldashboard
    source:
      dir: components/kubeflow-centraldashboard
      git:
        remote: https://github.com/agilestacks/kubeflow-components.git
        subDir: kubeflow-centraldashboard
        ref: develop
    depends:
      - istio-ingressgateway
      - kubeflow-profiles
      - kubeflow-common

  - name: replikate
    source:
      dir: ../apps/replikate/kustomize/
      ref: develop
    depends:
      - minio
      - argo
      - istio-ingressgateway

extensions:
  include:
    - params.yaml
    - params-db.yaml
    - params-inference.yaml
    - params-ingress.yaml
    - params-kubeflow.yaml
    - params-minio.yaml
  configure:
    - kubernetes
    - bin/configure-cluster
    - bin/configure-oidc
    - env
  deploy:
    before:
      - kubernetes
      - bin/check-cluster
