reconciler

package
v0.0.0-...-22a2038 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FeConfHashAnnotationKey     = fmt.Sprintf("%s/fe-config", dapi.GroupVersion.Group)
	BeConfHashAnnotationKey     = fmt.Sprintf("%s/be-config", dapi.GroupVersion.Group)
	CnConfHashAnnotationKey     = fmt.Sprintf("%s/cn-config", dapi.GroupVersion.Group)
	BrokerConfHashAnnotationKey = fmt.Sprintf("%s/broker-config", dapi.GroupVersion.Group)
)
View Source
var (
	PrometheusConfHashAnnotationKey = fmt.Sprintf("%s/prometheus-conf", dapi.GroupVersion.Group)
	GrafanaConfHashAnnotationKey    = fmt.Sprintf("%s/grafana-conf", dapi.GroupVersion.Group)
	LokiConfHashAnnotationKey       = fmt.Sprintf("%s/loki-conf", dapi.GroupVersion.Group)
	PromtailConfHashAnnotationKey   = fmt.Sprintf("%s/promtail-conf", dapi.GroupVersion.Group)
)
View Source
var (
	InitializerConfHashAnnotationKey = fmt.Sprintf("%s/initr-config", dapi.GroupVersion.Group)
)

Functions

This section is empty.

Types

type ClusterStageRecResult

type ClusterStageRecResult struct {
	Stage  dapi.DorisClusterOprStage
	Status dapi.OprStageStatus
	Action dapi.OprStageAction
	Err    error
}

ClusterStageRecResult represents the result of a stage reconciliation for DorisCluster

func (*ClusterStageRecResult) AsDorisClusterRecStatus

func (r *ClusterStageRecResult) AsDorisClusterRecStatus() dapi.DorisClusterRecStatus

type DorisAutoScalerReconciler

type DorisAutoScalerReconciler struct {
	ReconcileContext
	CR *dapi.DorisAutoscaler
}

DorisAutoScalerReconciler reconciles a DorisCluster object

func (*DorisAutoScalerReconciler) Reconcile

Reconcile hpa resources

func (*DorisAutoScalerReconciler) Sync

Sync status of hpa resources

type DorisClusterReconciler

type DorisClusterReconciler struct {
	ReconcileContext
	CR *dapi.DorisCluster
}

DorisClusterReconciler reconciles a DorisCluster object

func (*DorisClusterReconciler) Reconcile

Reconcile all sub components

func (*DorisClusterReconciler) Sync

Sync all subcomponents status.

type DorisInitializerReconciler

type DorisInitializerReconciler struct {
	ReconcileContext
	CR *dapi.DorisInitializer
}

func (*DorisInitializerReconciler) Reconcile

Reconcile initializer resources

func (*DorisInitializerReconciler) Sync

Sync initializer resources status

type DorisMonitorReconciler

type DorisMonitorReconciler struct {
	ReconcileContext
	CR *dapi.DorisMonitor
}

DorisMonitorReconciler reconciles a DorisMonitor object

func (*DorisMonitorReconciler) Reconcile

Reconcile all sub components of DorisMonitor

func (*DorisMonitorReconciler) Sync

Sync all subcomponents status of DorisMonitor

type MonitorStageRecResult

type MonitorStageRecResult struct {
	Stage  dapi.DorisMonitorOprStage
	Status dapi.OprStageStatus
	Action dapi.OprStageAction
	Err    error
}

func (*MonitorStageRecResult) AsDorisClusterRecStatus

func (r *MonitorStageRecResult) AsDorisClusterRecStatus() dapi.DorisMonitorRecStatus

type PendingError

type PendingError struct {
	Reason string
}

func NewPendingError

func NewPendingError(format string, a ...any) *PendingError

func (PendingError) Error

func (e PendingError) Error() string

type ReconcileContext

type ReconcileContext struct {
	client.Client
	Schema *runtime.Scheme
	Ctx    context.Context
	Log    logr.Logger
}

ReconcileContext is the context for reconciling CRD.

func NewReconcileContext

func NewReconcileContext(client client.Client, schema *runtime.Scheme, ctx context.Context) ReconcileContext

func (*ReconcileContext) CreateOrUpdate

func (r *ReconcileContext) CreateOrUpdate(obj client.Object, objType client.Object) error

CreateOrUpdate creates or updates the kubernetes object.

func (*ReconcileContext) CreateWhenNotExist

func (r *ReconcileContext) CreateWhenNotExist(obj client.Object, objType client.Object) error

CreateWhenNotExist creates the kubernetes object if it does not exist.

func (*ReconcileContext) DeleteWhenExist

func (r *ReconcileContext) DeleteWhenExist(key types.NamespacedName, objType client.Object, deleteOpts ...client.DeleteOption) error

DeleteWhenExist deletes the kubernetes object if it exists.

func (*ReconcileContext) Exist

func (r *ReconcileContext) Exist(key types.NamespacedName, objType client.Object) (bool, error)

Exist checks if the kubernetes object exists.

func (*ReconcileContext) FindRefDorisAutoScaler

func (r *ReconcileContext) FindRefDorisAutoScaler(dorisClusterRef client.ObjectKey) (*dapi.DorisAutoscaler, error)

FindRefDorisAutoScaler finds the DorisAutoscaler CR that refer to the DorisCluster CR. A DorisCluster CR can only be bound to one additional DorisAutoScaler CR.

func (*ReconcileContext) FindRefDorisInitializer

func (r *ReconcileContext) FindRefDorisInitializer(dorisClusterRef client.ObjectKey) (*dapi.DorisInitializer, error)

FindRefDorisInitializer finds the DorisInitializer CR that refer to the DorisCluster CR. A DorisCluster CR can only be bound to one additional DorisInitializer CR.

func (*ReconcileContext) Replace

func (r *ReconcileContext) Replace(obj client.Object, objType client.Object, timeout time.Duration) error

Replace deletes and creates the kubernetes object.

Jump to

Keyboard shortcuts

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