Operator Architecture
On this page
This document describes the architecture of Doris Operator and how it works.
Architecture

DorisCluster, DorisInitializer, DorisMonitor, DorisClusterAutoscalerare custom resources defined by CRD.
DorisClusterdescribes the desired state of the Doris cluster;DorisMonitordescribes the monitoring components of the Doris cluster;DorisInitializerdescribes the desired initialization Job of the Doris cluster;DorisClusterAutoscalerdescribes the automatic scaling of the Doris cluster;
The following components are responsible for the orchestration and scheduling logic in a Doris cluster:
doris-controller-manageris a set of custom controllers in Kubernetes. These controllers constantly compare the desired state recorded in the ``DorisCluster` object with the actual state of the Doris cluster. They adjust the resources in Kubernetes to drive the Doris cluster to meet the desired state and complete the corresponding control logic according to other CRs;doris-admission-webhookis a dynamic admission controller in Kubernetes, which completes the modification, verification, operation, and maintenance of Pod, StatefulSet, and other related resources.
Control flow
The diagram below illustrates the control flow analysis of the Doris Operator:

The overall control flow is described as follows:
- The user creates a
DorisClusterobject and other CR objects through kubectl, such asDorisMonitor; - Doris Operator watches
DorisClusterand other related objects, and constantly adjust theStatefulSet,Deployment,Service, and other objects of FE, BE, Broker, Monitor or other components based on the actual state of the cluster; - Kubernetes’ native controllers create, update, or delete the corresponding
Podbased on objects such asStatefulSet,Deployment, andJob;
Based on the above declarative control flow, Doris Operator automatically performs health check and fault recovery for
the cluster nodes. You can easily modify the DorisCluster object declaration to perform operations such as deployment,
upgrade, and scaling.