Documentation ¶
Index ¶
- Variables
- type CnController
- func (cc *CnController) ClearResources(ctx context.Context, src *srapi.StarRocksCluster) error
- func (cc *CnController) ClearWarehouse(ctx context.Context, namespace string, name string) error
- func (cc *CnController) GetCnConfig(ctx context.Context, cnSpec *srapi.StarRocksCnSpec, namespace string) (map[string]interface{}, error)
- func (cc *CnController) GetControllerName() string
- func (cc *CnController) SyncCluster(ctx context.Context, src *srapi.StarRocksCluster) error
- func (cc *CnController) SyncCnSpec(ctx context.Context, object object.StarRocksObject, ...) error
- func (cc *CnController) SyncWarehouse(ctx context.Context, warehouse *srapi.StarRocksWarehouse) error
- func (cc *CnController) UpdateClusterStatus(ctx context.Context, src *srapi.StarRocksCluster) error
- func (cc *CnController) UpdateStatus(ctx context.Context, object object.StarRocksObject, ...) error
- func (cc *CnController) UpdateWarehouseStatus(ctx context.Context, warehouse *srapi.StarRocksWarehouse) error
- type SQLExecutor
Constants ¶
This section is empty.
Variables ¶
var FeNotReadyError = errors.New("component fe is not ready")
var GetFeFeatureInfoError = errors.New("failed to invoke FE /api/v2/feature or FE does not support multi-warehouse feature")
var SpecMissingError = errors.New("spec.template or spec.starRocksCluster is missing")
var StarRocksClusterMissingError = errors.New("custom resource StarRocksCluster is missing")
var StarRocksClusterRunModeError = errors.New("StarRocks Cluster should run in shared_data mode")
Functions ¶
This section is empty.
Types ¶
type CnController ¶
type CnController struct { Recorder record.EventRecorder // contains filtered or unexported fields }
func New ¶
func New(k8sClient client.Client, recorderFor subc.GetEventRecorderForFunc) *CnController
func (*CnController) ClearResources ¶
func (cc *CnController) ClearResources(ctx context.Context, src *srapi.StarRocksCluster) error
ClearResources clear the deployed resource about cn. statefulset, services, hpa.
func (*CnController) ClearWarehouse ¶
ClearWarehouse clear the warehouse resource. It is different from ClearResources, which need to clear the CN related resources of StarRocksCluster. ClearWarehouse only has CN related resources, when the warehouse CR is deleted, sub resources of CN will be deleted by k8s.
func (*CnController) GetCnConfig ¶ added in v1.9.8
func (cc *CnController) GetCnConfig(ctx context.Context, cnSpec *srapi.StarRocksCnSpec, namespace string) (map[string]interface{}, error)
func (*CnController) GetControllerName ¶
func (cc *CnController) GetControllerName() string
func (*CnController) SyncCluster ¶
func (cc *CnController) SyncCluster(ctx context.Context, src *srapi.StarRocksCluster) error
func (*CnController) SyncCnSpec ¶
func (cc *CnController) SyncCnSpec(ctx context.Context, object object.StarRocksObject, cnSpec *srapi.StarRocksCnSpec, cnStatus *srapi.StarRocksCnStatus) error
func (*CnController) SyncWarehouse ¶
func (cc *CnController) SyncWarehouse(ctx context.Context, warehouse *srapi.StarRocksWarehouse) error
func (*CnController) UpdateClusterStatus ¶
func (cc *CnController) UpdateClusterStatus(ctx context.Context, src *srapi.StarRocksCluster) error
UpdateClusterStatus update the status of StarRocksCluster.
func (*CnController) UpdateStatus ¶
func (cc *CnController) UpdateStatus(ctx context.Context, object object.StarRocksObject, cnSpec *srapi.StarRocksCnSpec, cnStatus *srapi.StarRocksCnStatus) error
func (*CnController) UpdateWarehouseStatus ¶
func (cc *CnController) UpdateWarehouseStatus(ctx context.Context, warehouse *srapi.StarRocksWarehouse) error
UpdateWarehouseStatus updates the status of StarRocksWarehouse.
type SQLExecutor ¶
type SQLExecutor struct { RootPassword string FeServiceName string FeServiceNamespace string FeServicePort string }
SQLExecutor is used to execute sql statements. Component CN needs to connect to mysql and execute sql statements. E.g.: When StarRocksWarehouse is deleted, the related 'DROP WAREHOUSE <name>' statement needs to be executed.
func NewSQLExecutor ¶
func NewSQLExecutor(ctx context.Context, k8sClient client.Client, namespace, aliasName string) (*SQLExecutor, error)
NewSQLExecutor creates a SQLExecutor instance. It will get the root password, fe service name, and fe service port from the environment variables of the component CN.