The managed-opensearch module manages instances of OpenSearch in Deckhouse Platform (DP). OpenSearch is an Open Source search and analytics engine designed for working with large volumes of data in real time.
The module provides:
- Automatic Deployment: Creates an OpenSearch instance using a simple YAML configuration.
- Configuration Management: Separate OpensearchClass resource for templating service creation and flexible validation of user parameters.
- Class-oriented Management: Supports sizing policies and CEL validations.
- Long-term Storage: Supports PersistentVolumeClaim parameters for data.
- Status: Displays the current status of the deployed OpenSearch 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-opensearch module and its interactions with other components of DP are shown in the following diagram:
Module components
The module consists of the following components:
-
Managed-opensearch-operator (Deployment): Kubernetes operator consisting of a single container manager that performs the following operations:
-
Reconciles Opensearch custom resources in all user namespaces. The Opensearch and OpensearchClass custom resources define the settings of the OpenSearch instance.
-
Creates and manages StatefulSet, Service, Secret, and PersistentVolumeClaim resources related to the OpenSearch instance.
-
-
Managed-opensearch-webhook (Deployment): A component consisting of a single container manager.
It validates and mutates Opensearch custom resources using the Validating/Mutating Admission Controllers mechanism.
-
D8ms-osch-<INSTANCE_NAME> (StatefulSet): A component consisting of a single opensearch container that starts and runs the OpenSearch instance. It is created by the managed-opensearch-operator component.
Module interactions
The module interacts with the kube-apiserver component:
- Manages Opensearch and Certificate custom resources.
- Watches OpensearchClass custom resources.
- Manages StatefulSet, Service, Secret, and PersistentVolumeClaim resources.
The following external components interact with the module:
-
Kube-apiserver: Validates and mutates Opensearch custom resources.
-
User applications: Send requests to the OpenSearch instance.