controllers

package
v0.0.0-...-f5de34e Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ChaosControllerName = "chaos-controller"
	ChaosFinalizerName  = "shardingsphere.apache.org/finalizer"
)
View Source
const (
	StorageNodeControllerName = "storage-node-controller"
	FinalizerName             = "shardingsphere.apache.org/finalizer"

	AnnotationKeyRegisterStorageUnitEnabled = "shardingsphere.apache.org/register-storage-unit-enabled"
	AnnotationKeyComputeNodeName            = "shardingsphere.apache.org/compute-node-name"
	AnnotationKeyLogicDatabaseName          = "shardingsphere.apache.org/logic-database-name"

	ShardingSphereProtocolType = "proxy-frontend-database-protocol-type"
)
View Source
const (
	//WaitingForReady Time selection reference kubelet restart time
	WaitingForReady = 10 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoScalerReconciler

type AutoScalerReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	Log    logr.Logger

	Builder   reconcile.Builder
	Resources kubernetes.Resources
}

AutoScalerReconciler is a controller for the shardingsphere cluster

func (*AutoScalerReconciler) Reconcile

func (r *AutoScalerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

+kubebuilder:rbac:groups=shardingsphere.apache.org,resources=computenodes,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=autoscaling/v2,resources=horizontalpodautoscaler,verbs=get;list;watch;create;update;patch;delete Reconcile handles main function of this controller

func (*AutoScalerReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager

type ChaosReconciler

type ChaosReconciler struct {
	client.Client

	Scheme    *runtime.Scheme
	Log       logr.Logger
	Events    record.EventRecorder
	ClientSet *clientset.Clientset

	Chaos chaosmesh.Chaos

	Job       job.Job
	ExecCtrls []*ExecCtrl
	ConfigMap configmap.ConfigMap
}

ChaosReconciler is a controller for the Chaos

func (*ChaosReconciler) Reconcile

func (r *ChaosReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile handles main function of this controller

func (*ChaosReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type ComputeNodeReconciler

type ComputeNodeReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	Log    logr.Logger

	Builder   reconcile.Builder
	Resources kubernetes.Resources

	Deployment deployment.Deployment
	Service    service.Service
	ConfigMap  configmap.ConfigMap
}

ComputeNodeReconciler is a controller for the compute node

func (*ComputeNodeReconciler) Reconcile

func (r *ComputeNodeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile handles main function of this controller

func (*ComputeNodeReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager

type ExecCtrl

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

type ProxyConfigReconciler

type ProxyConfigReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	Log    logr.Logger
}

ProxyConfigReconciler reconciles a ShardingSphereProxyServerConfig object

func (*ProxyConfigReconciler) Reconcile

func (r *ProxyConfigReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile the ProxyConfig

func (*ProxyConfigReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type ProxyReconciler

type ProxyReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	Log    logr.Logger
}

ProxyReconciler reconciles a ShardingSphereProxy object

func (*ProxyReconciler) Reconcile

func (r *ProxyReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

func (*ProxyReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type StorageNodeReconciler

type StorageNodeReconciler struct {
	client.Client
	Scheme   *runtime.Scheme
	Log      logr.Logger
	Recorder record.EventRecorder
	Service  service.Service

	AwsRegion          string
	AwsAccessKeyID     string
	AwsSecretAccessKey string
	AwsSessions        dbmeshaws.Sessions

	CNPG cloudnativepg.CloudNativePG
}

StorageNodeReconciler is a controller for storage nodes

func (*StorageNodeReconciler) Reconcile

func (r *StorageNodeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile handles main function of this controller nolint:gocognit

func (*StorageNodeReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager

Jump to

Keyboard shortcuts

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