# k3d-with-mlops — local-dev + Argo Workflows + Dagster + MLflow.
#
# Composite template: stacks the cell + mlops_stack building blocks.
# Targets a developer who needs to exercise the MLOps surface end-to-end
# without spinning up a cloud cell.

name: alphaswarm-k3d-with-mlops
slug: k3d-with-mlops
module_kind: composite
description: |
  Local-dev cell stacked with the MLOps overlay. k3d cluster + base
  workloads + Argo Workflows + Argo Events + the Spark operator +
  Dagster (opt-in) + KServe + BentoML / Yatai. Use this when iterating
  on Skill / Predictor flows without a cloud bill.

cloud_provider: local
environment: local

provider:
  kind: local

backend:
  kind: local
  config:
    path: data/terraform/state/k3d-with-mlops.tfstate

variables:
  - name: cell_name
    type: string
    default: k3d-mlops
  - name: cell_replicas
    type: number
    default: 1
  - name: ingress_host
    type: string
    default: aqp.localhost
  - name: mlops_namespace
    type: string
    default: alphaswarm-mlops
  - name: dagster_enabled
    type: bool
    default: true
    description: Toggle the Dagster overlay; disable to skip its long install path.
  - name: kserve_enabled
    type: bool
    default: true
  - name: bentoml_enabled
    type: bool
    default: true

modules:
  - name: cell
    source: ../../modules/cell
    variables:
      cell_name: "${var.cell_name}"
      replicas: "${var.cell_replicas}"
      ingress_host: "${var.ingress_host}"
  - name: mlops
    source: ../../modules/mlops_stack
    variables:
      mlops_namespace: "${var.mlops_namespace}"
      dagster_enabled: "${var.dagster_enabled}"
      kserve_enabled: "${var.kserve_enabled}"
      bentoml_enabled: "${var.bentoml_enabled}"

required_providers:
  kubernetes:
    source: hashicorp/kubernetes
    version: ~> 2.30
  helm:
    source: hashicorp/helm
    version: ~> 2.15

annotations:
  alphaswarm.io/template-name: k3d-with-mlops
  alphaswarm.io/template-kind: composite
  alphaswarm.io/composition: cell + mlops_stack
  alphaswarm.io/target-cost-monthly: "$0"
