The managed-trino module manages Trino instances in Deckhouse Platform (DP). Trino is a fast Open Source distributed SQL engine built for big data analytics. The module provides:

  • Automatic Deployment: Creates a Trino instance using a simple YAML configuration.
  • Standalone: Supports deployment of a standalone instance.
  • External Connections: Supports working with the Hive Metastore metadata store, as well as with S3 storage.
  • Configuration Management: Separate TrinoClass resource for templating service creation and flexible validation of user parameters.
  • Status: Displays the current status of the deployed Trino instance.

For more details about module settings and usage examples, refer to the module documentation.

Module architecture

The following assumptions are used to simplify the diagram:

  • The diagram shows direct communication between containers in different Pods. In practice, components communicate through Kubernetes Services (internal load balancers). Service names are omitted when obvious from context. In other cases, a service name is shown above the arrow.
  • Pods can run with multiple replicas, but only one replica of each Pod is shown in the diagram.

The level-2 C4 architecture of the managed-trino module and its interactions with other components of DP are shown in the following diagram:

Managed-trino module architecture

Module components

The module consists of the following components:

  1. Managed-trino-operator (Deployment): Kubernetes operator consisting of a single container manager that performs the following operations:

    • Reconciles Trino custom resources in all user namespaces. The Trino and TrinoClass custom resources define the settings of the Trino instance.

    • Creates and manages Deployment, Service, Secret, and ConfigMap resources related to the Trino instance.

    • Validates and mutates Trino custom resources using the Validating/Mutating Admission Controllers mechanism.

  2. D8ms-trn-<INSTANCE_NAME> (Deployment): A component consisting of a single trino container that starts and runs the Trino instance. It is created by the managed-trino-operator component for each Trino custom resource.

Module interactions

The module interacts with the following components:

  1. Hive Metastore instance: Processes data in the metadata store.

  2. Object storage: Processes data in the object storage.

  3. Kube-apiserver:

    • Manages Trino custom resources.
    • Watches TrinoClass custom resources.
    • Manages Deployment, Service, Secret, and ConfigMap resources.

The following external components interact with the module:

  1. Kube-apiserver: Validates and mutates Trino custom resources.

  2. User applications: Send requests to the Trino instance.

Additional resources