controllers

package
v1.9.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPhaseFromComponent

func GetPhaseFromComponent(componentStatus *srapi.StarRocksComponentStatus) srapi.Phase

GetPhaseFromComponent return the Phase of Cluster or Warehouse based on the component status. It returns empty string if not sure the phase.

func SetupClusterReconciler

func SetupClusterReconciler(mgr ctrl.Manager) error

func SetupWarehouseReconciler

func SetupWarehouseReconciler(mgr ctrl.Manager, namespace string) error

SetupWarehouseReconciler Why do we need a namespace parameter?

  1. Warehouse CRD is an optional feature, and user may not install it.
  2. We try to use list Warehouses operation to check if Warehouse CRD exists or not.
  3. By Default, It needs the cluster scope permission.

Types

type StarRocksClusterReconciler

type StarRocksClusterReconciler struct {
	client.Client
	Recorder record.EventRecorder
	Scs      []subcontrollers.ClusterSubController
}

StarRocksClusterReconciler reconciles a StarRocksCluster object

func (*StarRocksClusterReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.12.1/pkg/reconcile

func (*StarRocksClusterReconciler) SetupWithManager

func (r *StarRocksClusterReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*StarRocksClusterReconciler) UpdateStarRocksCluster

func (r *StarRocksClusterReconciler) UpdateStarRocksCluster(ctx context.Context, src *srapi.StarRocksCluster) error

UpdateStarRocksCluster update the starrockscluster metadata, spec.

func (*StarRocksClusterReconciler) UpdateStarRocksClusterStatus

func (r *StarRocksClusterReconciler) UpdateStarRocksClusterStatus(ctx context.Context, src *srapi.StarRocksCluster) error

UpdateStarRocksClusterStatus update the status of src.

type StarRocksWarehouseReconciler

type StarRocksWarehouseReconciler struct {
	client.Client
	// contains filtered or unexported fields
}

StarRocksWarehouseReconciler reconciles a StarRocksWarehouse object

func (*StarRocksWarehouseReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. For more details, check Reconcile and its Result here: https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.12.1/pkg/reconcile

func (*StarRocksWarehouseReconciler) SetupWithManager

func (r *StarRocksWarehouseReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*StarRocksWarehouseReconciler) UpdateStarRocksWarehouseStatus

func (r *StarRocksWarehouseReconciler) UpdateStarRocksWarehouseStatus(ctx context.Context, warehouse *srapi.StarRocksWarehouse) error

UpdateStarRocksWarehouseStatus update the status of warehouse.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL