Documentation ¶
Overview ¶
Package ha takes care of concerns related to running the application in high availability mode.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HAService ¶
type HAService struct {
// contains filtered or unexported fields
}
HAService is the main type of the package. It takes care of concerns related to running the application in high availability mode. When running in active/passive replication mode, HAService ensures that all requests go to the active replica. HAService implements ctlmgr.Runnable. For information about individual fields, see NewHAService().
func NewHAService ¶
func NewHAService( manager ctlmgr.Manager, namespace string, servingIPAddress string, servingPort int, parentLogger logr.Logger) *HAService
NewHAService creates a new HAService instance.
manager is the ctlmgr.Manager instance which orchestrates the leader election process upon which HA operation relies.
namespace is the K8s namespace in which this process and associated artefacts belong.
servingIPAddress is the IP address at which custom metrics from this process can be consumed.
servingPort is the network port at which custom metrics from this process can be consumed.
func (*HAService) Start ¶
Start implements ctlmgr.Runnable.Start. The HAService.manager runs this function when this process becomes the leader. The function ensures that the single endpoint for the gardener-metrics-provider service points to this process' server endpoint, thus ensuring that all requests go to the leader.