manager

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2022 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RisingWaveAction_SyncMetaService                       = "SyncMetaService"
	RisingWaveAction_SyncMetaDeployments                   = "SyncMetaDeployments"
	RisingWaveAction_WaitBeforeMetaServiceIsAvailable      = "WaitBeforeMetaServiceIsAvailable"
	RisingWaveAction_WaitBeforeMetaDeploymentsReady        = "WaitBeforeMetaDeploymentsReady"
	RisingWaveAction_SyncFrontendService                   = "SyncFrontendService"
	RisingWaveAction_SyncFrontendDeployments               = "SyncFrontendDeployments"
	RisingWaveAction_WaitBeforeFrontendDeploymentsReady    = "WaitBeforeFrontendDeploymentsReady"
	RisingWaveAction_SyncComputeService                    = "SyncComputeService"
	RisingWaveAction_SyncComputeStatefulSets               = "SyncComputeStatefulSets"
	RisingWaveAction_WaitBeforeComputeStatefulSetsReady    = "WaitBeforeComputeStatefulSetsReady"
	RisingWaveAction_SyncCompactorService                  = "SyncCompactorService"
	RisingWaveAction_SyncCompactorDeployments              = "SyncCompactorDeployments"
	RisingWaveAction_WaitBeforeCompactorDeploymentsReady   = "WaitBeforeCompactorDeploymentsReady"
	RisingWaveAction_SyncConfigConfigMap                   = "SyncConfigConfigMap"
	RisingWaveAction_SyncServiceMonitor                    = "SyncServiceMonitor"
	RisingWaveAction_CollectRunningStatisticsAndSyncStatus = "CollectRunningStatisticsAndSyncStatus"
)

Pre-defined actions in RisingWaveControllerManager.

Variables

This section is empty.

Functions

This section is empty.

Types

type RisingWaveControllerManager

type RisingWaveControllerManager struct {
	// contains filtered or unexported fields
}

RisingWaveControllerManager encapsulates the states and actions used by RisingWaveController.

func NewRisingWaveControllerManager

NewRisingWaveControllerManager returns a new RisingWaveControllerManager with given state and implementation.

func (*RisingWaveControllerManager) CollectRunningStatisticsAndSyncStatus

func (m *RisingWaveControllerManager) CollectRunningStatisticsAndSyncStatus() ctrlkit.Action

CollectRunningStatisticsAndSyncStatus generates the action of "CollectRunningStatisticsAndSyncStatus".

func (*RisingWaveControllerManager) NewAction

func (m *RisingWaveControllerManager) NewAction(description string, f func(context.Context, logr.Logger) (ctrl.Result, error)) ctrlkit.Action

NewAction returns a new action controlled by the manager.

func (*RisingWaveControllerManager) SyncCompactorDeployments

func (m *RisingWaveControllerManager) SyncCompactorDeployments() ctrlkit.Action

SyncCompactorDeployments generates the action of "SyncCompactorDeployments".

func (*RisingWaveControllerManager) SyncCompactorService

func (m *RisingWaveControllerManager) SyncCompactorService() ctrlkit.Action

SyncCompactorService generates the action of "SyncCompactorService".

func (*RisingWaveControllerManager) SyncComputeService

func (m *RisingWaveControllerManager) SyncComputeService() ctrlkit.Action

SyncComputeService generates the action of "SyncComputeService".

func (*RisingWaveControllerManager) SyncComputeStatefulSets

func (m *RisingWaveControllerManager) SyncComputeStatefulSets() ctrlkit.Action

SyncComputeStatefulSets generates the action of "SyncComputeStatefulSets".

func (*RisingWaveControllerManager) SyncConfigConfigMap

func (m *RisingWaveControllerManager) SyncConfigConfigMap() ctrlkit.Action

SyncConfigConfigMap generates the action of "SyncConfigConfigMap".

func (*RisingWaveControllerManager) SyncFrontendDeployments

func (m *RisingWaveControllerManager) SyncFrontendDeployments() ctrlkit.Action

SyncFrontendDeployments generates the action of "SyncFrontendDeployments".

func (*RisingWaveControllerManager) SyncFrontendService

func (m *RisingWaveControllerManager) SyncFrontendService() ctrlkit.Action

SyncFrontendService generates the action of "SyncFrontendService".

func (*RisingWaveControllerManager) SyncMetaDeployments

func (m *RisingWaveControllerManager) SyncMetaDeployments() ctrlkit.Action

SyncMetaDeployments generates the action of "SyncMetaDeployments".

func (*RisingWaveControllerManager) SyncMetaService

func (m *RisingWaveControllerManager) SyncMetaService() ctrlkit.Action

SyncMetaService generates the action of "SyncMetaService".

func (*RisingWaveControllerManager) SyncServiceMonitor

func (m *RisingWaveControllerManager) SyncServiceMonitor() ctrlkit.Action

SyncServiceMonitor generates the action of "SyncServiceMonitor".

func (*RisingWaveControllerManager) WaitBeforeCompactorDeploymentsReady

func (m *RisingWaveControllerManager) WaitBeforeCompactorDeploymentsReady() ctrlkit.Action

WaitBeforeCompactorDeploymentsReady generates the action of "WaitBeforeCompactorDeploymentsReady".

func (*RisingWaveControllerManager) WaitBeforeComputeStatefulSetsReady

func (m *RisingWaveControllerManager) WaitBeforeComputeStatefulSetsReady() ctrlkit.Action

WaitBeforeComputeStatefulSetsReady generates the action of "WaitBeforeComputeStatefulSetsReady".

func (*RisingWaveControllerManager) WaitBeforeFrontendDeploymentsReady

func (m *RisingWaveControllerManager) WaitBeforeFrontendDeploymentsReady() ctrlkit.Action

WaitBeforeFrontendDeploymentsReady generates the action of "WaitBeforeFrontendDeploymentsReady".

func (*RisingWaveControllerManager) WaitBeforeMetaDeploymentsReady

func (m *RisingWaveControllerManager) WaitBeforeMetaDeploymentsReady() ctrlkit.Action

WaitBeforeMetaDeploymentsReady generates the action of "WaitBeforeMetaDeploymentsReady".

func (*RisingWaveControllerManager) WaitBeforeMetaServiceIsAvailable

func (m *RisingWaveControllerManager) WaitBeforeMetaServiceIsAvailable() ctrlkit.Action

WaitBeforeMetaServiceIsAvailable generates the action of "WaitBeforeMetaServiceIsAvailable".

type RisingWaveControllerManagerImpl

type RisingWaveControllerManagerImpl interface {
	// SyncMetaService creates or updates the service for meta nodes.
	SyncMetaService(ctx context.Context, logger logr.Logger, metaService *corev1.Service) (ctrl.Result, error)

	// SyncMetaDeployments creates or updates the deployments for meta nodes.
	SyncMetaDeployments(ctx context.Context, logger logr.Logger, metaDeployments []appsv1.Deployment) (ctrl.Result, error)

	// WaitBeforeMetaServiceIsAvailable waits (aborts the workflow) before the meta service is available.
	WaitBeforeMetaServiceIsAvailable(ctx context.Context, logger logr.Logger, metaService *corev1.Service) (ctrl.Result, error)

	// WaitBeforeMetaDeploymentsReady waits (aborts the workflow) before the meta deployments are ready.
	WaitBeforeMetaDeploymentsReady(ctx context.Context, logger logr.Logger, metaDeployments []appsv1.Deployment) (ctrl.Result, error)

	// SyncFrontendService creates or updates the service for frontend nodes.
	SyncFrontendService(ctx context.Context, logger logr.Logger, frontendService *corev1.Service) (ctrl.Result, error)

	// SyncFrontendDeployments creates or updates the deployments for frontend nodes.
	SyncFrontendDeployments(ctx context.Context, logger logr.Logger, frontendDeployments []appsv1.Deployment) (ctrl.Result, error)

	// WaitBeforeFrontendDeploymentsReady waits (aborts the workflow) before the frontend deployments are ready.
	WaitBeforeFrontendDeploymentsReady(ctx context.Context, logger logr.Logger, frontendDeployments []appsv1.Deployment) (ctrl.Result, error)

	// SyncComputeService creates or updates the service for compute nodes.
	SyncComputeService(ctx context.Context, logger logr.Logger, computeService *corev1.Service) (ctrl.Result, error)

	// SyncComputeStatefulSets creates or updates the statefulsets for compute nodes.
	SyncComputeStatefulSets(ctx context.Context, logger logr.Logger, computeStatefulSets []appsv1.StatefulSet) (ctrl.Result, error)

	// WaitBeforeComputeStatefulSetsReady waits (aborts the workflow) before the compute statefulsets are ready.
	WaitBeforeComputeStatefulSetsReady(ctx context.Context, logger logr.Logger, computeStatefulSets []appsv1.StatefulSet) (ctrl.Result, error)

	// SyncCompactorService creates or updates the service for compactor nodes.
	SyncCompactorService(ctx context.Context, logger logr.Logger, compactorService *corev1.Service) (ctrl.Result, error)

	// SyncCompactorDeployments creates or updates the deployments for compactor nodes.
	SyncCompactorDeployments(ctx context.Context, logger logr.Logger, compactorDeployments []appsv1.Deployment) (ctrl.Result, error)

	// WaitBeforeCompactorDeploymentsReady waits (aborts the workflow) before the compactor deployments are ready.
	WaitBeforeCompactorDeploymentsReady(ctx context.Context, logger logr.Logger, compactorDeployments []appsv1.Deployment) (ctrl.Result, error)

	// SyncConfigConfigMap creates or updates the configmap for RisingWave configs.
	SyncConfigConfigMap(ctx context.Context, logger logr.Logger, configConfigMap *corev1.ConfigMap) (ctrl.Result, error)

	// SyncServiceMonitor creates or updates the service monitor for RisingWave.
	SyncServiceMonitor(ctx context.Context, logger logr.Logger, serviceMonitor *monitoringv1.ServiceMonitor) (ctrl.Result, error)

	// CollectRunningStatisticsAndSyncStatus collects running statistics and sync them into the status.
	CollectRunningStatisticsAndSyncStatus(ctx context.Context, logger logr.Logger, frontendService *corev1.Service, metaService *corev1.Service, computeService *corev1.Service, compactorService *corev1.Service, metaDeployments []appsv1.Deployment, frontendDeployments []appsv1.Deployment, computeStatefulSets []appsv1.StatefulSet, compactorDeployments []appsv1.Deployment, configConfigMap *corev1.ConfigMap) (ctrl.Result, error)
}

RisingWaveControllerManagerImpl declares the implementation interface for RisingWaveControllerManager.

func NewRisingWaveControllerManagerImpl

func NewRisingWaveControllerManagerImpl(client client.Client, risingwaveManager *object.RisingWaveManager, messageStore *event.MessageStore) RisingWaveControllerManagerImpl

type RisingWaveControllerManagerOption

type RisingWaveControllerManagerOption func(*RisingWaveControllerManager)

func RisingWaveControllerManager_WithActionHook

func RisingWaveControllerManager_WithActionHook(hook ctrlkit.ActionHook) RisingWaveControllerManagerOption

type RisingWaveControllerManagerState

type RisingWaveControllerManagerState struct {
	client.Reader
	// contains filtered or unexported fields
}

RisingWaveControllerManagerState is the state manager of RisingWaveControllerManager.

func NewRisingWaveControllerManagerState

func NewRisingWaveControllerManagerState(reader client.Reader, target *risingwavev1alpha1.RisingWave) RisingWaveControllerManagerState

NewRisingWaveControllerManagerState returns a RisingWaveControllerManagerState (target is not copied).

func (*RisingWaveControllerManagerState) GetCompactorDeployments

func (s *RisingWaveControllerManagerState) GetCompactorDeployments(ctx context.Context) ([]appsv1.Deployment, error)

GetCompactorDeployments lists compactorDeployments with the following selectors:

  • labels/risingwave/component=compactor
  • labels/risingwave/name=${target.Name}
  • owned

func (*RisingWaveControllerManagerState) GetCompactorService

func (s *RisingWaveControllerManagerState) GetCompactorService(ctx context.Context) (*corev1.Service, error)

GetCompactorService gets compactorService with name equals to ${target.Name}-compactor.

func (*RisingWaveControllerManagerState) GetComputeService

func (s *RisingWaveControllerManagerState) GetComputeService(ctx context.Context) (*corev1.Service, error)

GetComputeService gets computeService with name equals to ${target.Name}-compute.

func (*RisingWaveControllerManagerState) GetComputeStatefulSets

func (s *RisingWaveControllerManagerState) GetComputeStatefulSets(ctx context.Context) ([]appsv1.StatefulSet, error)

GetComputeStatefulSets lists computeStatefulSets with the following selectors:

  • labels/risingwave/component=compute
  • labels/risingwave/name=${target.Name}
  • owned

func (*RisingWaveControllerManagerState) GetConfigConfigMap

func (s *RisingWaveControllerManagerState) GetConfigConfigMap(ctx context.Context) (*corev1.ConfigMap, error)

GetConfigConfigMap gets configConfigMap with name equals to ${target.Name}-config.

func (*RisingWaveControllerManagerState) GetFrontendDeployments

func (s *RisingWaveControllerManagerState) GetFrontendDeployments(ctx context.Context) ([]appsv1.Deployment, error)

GetFrontendDeployments lists frontendDeployments with the following selectors:

  • labels/risingwave/component=frontend
  • labels/risingwave/name=${target.Name}
  • owned

func (*RisingWaveControllerManagerState) GetFrontendService

func (s *RisingWaveControllerManagerState) GetFrontendService(ctx context.Context) (*corev1.Service, error)

GetFrontendService gets frontendService with name equals to ${target.Name}-frontend.

func (*RisingWaveControllerManagerState) GetMetaDeployments

func (s *RisingWaveControllerManagerState) GetMetaDeployments(ctx context.Context) ([]appsv1.Deployment, error)

GetMetaDeployments lists metaDeployments with the following selectors:

  • labels/risingwave/component=meta
  • labels/risingwave/name=${target.Name}
  • owned

func (*RisingWaveControllerManagerState) GetMetaService

GetMetaService gets metaService with name equals to ${target.Name}-meta.

func (*RisingWaveControllerManagerState) GetServiceMonitor

GetServiceMonitor gets serviceMonitor with name equals to risingwave-${target.Name}.

Jump to

Keyboard shortcuts

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