tablegroup

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package tablegroup implements the controller for the TableGroup resource.

The TableGroup controller acts as a "middle-manager" in the Multigres hierarchy, sitting between the root MultigresCluster and the leaf Shard resources.

Responsibilities:

  1. Shard Lifecycle Management: It watches TableGroup resources and creates, updates, or deletes (prunes) child Shard resources to match the list of fully resolved shard specifications provided in the TableGroup spec.

  2. Status Aggregation: It monitors the status of all owned Shards and aggregates them into the TableGroup's status (e.g., ReadyShards / TotalShards), providing a summarized view for the parent MultigresCluster controller.

Design Note: This controller is intentionally "dumb" regarding configuration logic. It does not perform template resolution or defaulting. It expects fully resolved specs to be pushed down from the parent MultigresCluster controller, and its only job is to enforce that state on the child Shards.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildShard

BuildShard constructs the desired Shard resource.

Types

type TableGroupReconciler

type TableGroupReconciler struct {
	client.Client
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder
}

TableGroupReconciler reconciles a TableGroup object.

func (*TableGroupReconciler) Reconcile

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

Reconcile reads the state of the TableGroup and ensures its child Shards are in the desired state.

+kubebuilder:rbac:groups=multigres.com,resources=tablegroups,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=multigres.com,resources=tablegroups/status,verbs=get;update;patch +kubebuilder:rbac:groups=multigres.com,resources=tablegroups/finalizers,verbs=update +kubebuilder:rbac:groups=multigres.com,resources=shards,verbs=get;list;watch;create;update;patch;delete

func (*TableGroupReconciler) SetupWithManager

func (r *TableGroupReconciler) SetupWithManager(
	mgr ctrl.Manager,
	opts ...controller.Options,
) 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