// Deployment model
deployment {

  environment local 'Local kind-cluster' {
    description 'Local kind-cluster environment for EDP, typically run by edpbuilder'
    technology 'Kind'
    icon tech:kubernetes

    namespace backstage {
      instanceOf edp.ui.backstage
      instanceOf edp.ui.database
    }

    namespace argocd {
      instanceOf edp.argoCD.argocdAppController
      instanceOf edp.argoCD.argocdAppSetController
      instanceOf edp.argoCD.argocdRedis
      instanceOf edp.argoCD.argocdRepoServer
      instanceOf edp.argoCD.argocdServer
    }

    namespace gitea {
      instanceOf edp.forgejo
      instanceOf edp.forgejoRunner
    }

    namespace keycloak {
      instanceOf edp.keycloak.keycloak
      instanceOf edp.keycloak.keycloakDB
    }

    namespace crossplane 'crossplane-system' {
      instanceOf edp.crossplane.crossplane
      instanceOf edp.crossplane.crossplaneFunction
      instanceOf edp.crossplane.crossplaneRbacManager
      instanceOf edp.crossplane.providerArgoCD
      instanceOf edp.crossplane.providerKind
      instanceOf edp.crossplane.providerShell
    }

    namespace externalSecrets 'external-secrets' {
      instanceOf edp.externalSecrets.certController
      instanceOf edp.externalSecrets.externalSecrets
      instanceOf edp.externalSecrets.webhook
    }

    namespace velero {
      instanceOf edp.velero.velero
    }

    namespace minio 'minio-backup' {
      instanceOf edp.minio.minio
    }

    namespace monitoring {
      instanceOf edp.monitoring.alloy
      instanceOf edp.monitoring.distributor
      instanceOf edp.monitoring.gateway
      instanceOf edp.monitoring.ingestor
      instanceOf edp.monitoring.querier
      instanceOf edp.monitoring.queryFrontend
    }

    namespace ingressNginx 'ingress-nginx'{
      instanceOf edp.ingressNginx.ingressNginx
    }

    namespace openbao 'openbao' {
      instanceOf edp.openbao.openbao
      instanceOf edp.openbao.agentInjector
    }

    namespace fibonacci 'fibonacci-app' {
      instanceOf edp.testApp.fibonacci
    }

    namespace mailhog 'mailhog' {
      instanceOf edp.mailhog.mailhog
    }

    namespace spark 'spark' {
      instanceOf edp.spark.sparkoperator
    }
  }
}

