Skip to content

models-as-a-service: Dataflow

Controller Watches

Kubernetes resources this controller monitors for changes. Each watch triggers reconciliation when the watched resource is created, updated, or deleted.

Type GVK Source
For maas/v1alpha1/ExternalModel maas-controller/pkg/reconciler/externalmodel/reconciler.go:299
For maas/v1alpha1/MaaSAuthPolicy maas-controller/pkg/controller/maas/maasauthpolicy_controller.go:1176
For maas/v1alpha1/MaaSModelRef maas-controller/pkg/controller/maas/maasmodelref_controller.go:326
For maas/v1alpha1/MaaSSubscription maas-controller/pkg/controller/maas/maassubscription_controller.go:971
For maas/v1alpha1/Tenant maas-controller/pkg/controller/maas/tenant_controller.go:178
Watches apis/v1/HTTPRoute maas-controller/pkg/controller/maas/maasauthpolicy_controller.go:1182
Watches apis/v1/HTTPRoute maas-controller/pkg/controller/maas/maasmodelref_controller.go:332
Watches apis/v1/HTTPRoute maas-controller/pkg/controller/maas/maassubscription_controller.go:984
Watches maas/v1alpha1/MaaSModelRef maas-controller/pkg/controller/maas/maasauthpolicy_controller.go:1186
Watches maas/v1alpha1/MaaSModelRef maas-controller/pkg/controller/maas/maassubscription_controller.go:988
Watches serving/v1alpha1/LLMInferenceService maas-controller/pkg/controller/maas/maasmodelref_controller.go:337

Reconciliation Flow

How the controller interacts with the Kubernetes API during reconciliation.

sequenceDiagram
    %% Static dataflow for models-as-a-service

    participant KubernetesAPI as Kubernetes API
    participant maas_api as maas-api
    participant maas_controller as maas-controller
    participant payload_processing as payload-processing

    KubernetesAPI->>+maas_api: Watch ExternalModel (reconcile)
    KubernetesAPI->>+maas_api: Watch MaaSAuthPolicy (reconcile)
    KubernetesAPI->>+maas_api: Watch MaaSModelRef (reconcile)
    KubernetesAPI->>+maas_api: Watch MaaSSubscription (reconcile)
    KubernetesAPI->>+maas_api: Watch Tenant (reconcile)
    KubernetesAPI-->>+maas_api: Watch HTTPRoute (informer)
    KubernetesAPI-->>+maas_api: Watch HTTPRoute (informer)
    KubernetesAPI-->>+maas_api: Watch HTTPRoute (informer)
    KubernetesAPI-->>+maas_api: Watch MaaSModelRef (informer)
    KubernetesAPI-->>+maas_api: Watch MaaSModelRef (informer)
    KubernetesAPI-->>+maas_api: Watch LLMInferenceService (informer)

    Note over maas_api: Exposed Services
    Note right of maas_api: maas-api:8080/TCP [http]
    Note right of maas_api: maas-api:0/TCP []
    Note right of maas_api: maas-api:8443/TCP [https]
    Note right of maas_api: payload-processing:9004/TCP []

HTTP Endpoints

Method Path Source
OPTIONS /*path maas-api/cmd/main.go:81
DELETE /:id maas-api/cmd/main.go:177
GET /:id maas-api/cmd/main.go:176
* /api-keys maas-api/cmd/main.go:172
POST /api-keys/cleanup maas-api/cmd/main.go:182
POST /api-keys/validate maas-api/cmd/main.go:181
POST /bulk-revoke maas-api/cmd/main.go:175
GET /health maas-api/cmd/main.go:142
* /internal/v1 maas-api/cmd/main.go:180
GET /metrics maas-api/cmd/main.go:143
GET /model/:model-id/subscriptions maas-api/cmd/main.go:169
GET /models maas-api/cmd/main.go:165
POST /search maas-api/cmd/main.go:174
GET /subscriptions maas-api/cmd/main.go:168
POST /subscriptions/select maas-api/cmd/main.go:183
* /v1 maas-api/cmd/main.go:149
* /v1 maas-api/test/fixtures/server_setup.go:116

Configuration

ConfigMaps and Helm values that control this component's runtime behavior.