Documentation
¶
Overview ¶
Package cell implements the controller for the Cell resource.
The Cell controller manages the MultiGateway component, which serves as the entry point for client connections within a failure domain (cell). Its responsibilities include:
MultiGateway Deployment: Creates and maintains a Deployment that runs the MultiGateway proxy. This component routes client queries to the appropriate shards based on the topology configuration.
MultiGateway Service: Exposes the MultiGateway Deployment via a Kubernetes Service, providing a stable endpoint for clients within the cell.
Status Aggregation: Monitors the Deployment's availability and updates the Cell's status conditions accordingly. Reports ready replica counts and overall health phase.
The Cell controller is part of the resource-handler module and operates at the "leaf" level of the resource hierarchy, directly managing Kubernetes-native resources (Deployments and Services) rather than other Custom Resources.
Index ¶
- Constants
- func BuildMultiGatewayDeployment(cell *multigresv1alpha1.Cell, scheme *runtime.Scheme) (*appsv1.Deployment, error)
- func BuildMultiGatewayDeploymentName(cell *multigresv1alpha1.Cell) string
- func BuildMultiGatewayService(cell *multigresv1alpha1.Cell, scheme *runtime.Scheme) (*corev1.Service, error)
- func BuildMultiGatewayServiceName(cell *multigresv1alpha1.Cell) string
- type CellReconciler
Constants ¶
const ( // MultiGatewayComponentName is the component label value for MultiGateway resources MultiGatewayComponentName = metadata.ComponentMultiGateway // DefaultMultiGatewayReplicas is the default number of MultiGateway replicas DefaultMultiGatewayReplicas int32 = 2 // MultiGatewayHTTPPort is the default port for HTTP connections MultiGatewayHTTPPort int32 = 15100 // MultiGatewayGRPCPort is the default port for GRPC connections MultiGatewayGRPCPort int32 = 15170 // MultiGatewayPostgresPort is the port for database connections, // used by both the container and the Kubernetes Service. MultiGatewayPostgresPort int32 = 5432 )
Variables ¶
This section is empty.
Functions ¶
func BuildMultiGatewayDeployment ¶
func BuildMultiGatewayDeployment( cell *multigresv1alpha1.Cell, scheme *runtime.Scheme, ) (*appsv1.Deployment, error)
BuildMultiGatewayDeployment creates a Deployment for the MultiGateway component.
func BuildMultiGatewayDeploymentName ¶
func BuildMultiGatewayDeploymentName(cell *multigresv1alpha1.Cell) string
BuildMultiGatewayDeploymentName generates the Deployment name. It uses DefaultConstraints (253 chars) to use readable long names.
func BuildMultiGatewayService ¶
func BuildMultiGatewayService( cell *multigresv1alpha1.Cell, scheme *runtime.Scheme, ) (*corev1.Service, error)
BuildMultiGatewayService creates a Service for the MultiGateway component.
func BuildMultiGatewayServiceName ¶
func BuildMultiGatewayServiceName(cell *multigresv1alpha1.Cell) string
BuildMultiGatewayServiceName generates the Service name. It uses ServiceConstraints (63 chars) for DNS safety.
Types ¶
type CellReconciler ¶
CellReconciler reconciles a Cell object.
func (*CellReconciler) Reconcile ¶
Reconcile manages the MultiGateway deployment and per-cell services for a Cell.
func (*CellReconciler) SetupWithManager ¶
func (r *CellReconciler) SetupWithManager(mgr ctrl.Manager, opts ...controller.Options) error
SetupWithManager sets up the controller with the Manager.