Documentation ¶
Index ¶
- func UseEndpointSlices(kubeClient kubernetes.Interface) bool
- type Client
- func (c *Client) CreateMlSecret(namespace, controllerDeploymentName, secretName string) error
- func (c *Client) Errorf(svc *v1.Service, kind, msg string, args ...interface{})
- func (c *Client) Infof(svc *v1.Service, kind, msg string, args ...interface{})
- func (c *Client) PodIPs(namespace, labels string) ([]string, error)
- func (c *Client) Run(stopCh <-chan struct{}) error
- func (c *Client) UpdateStatus(svc *v1.Service) error
- type Config
- type Listener
- func (l *Listener) ConfigHandler(logger log.Logger, config *config.Config) controllers.SyncState
- func (l *Listener) NodeHandler(logger log.Logger, node *v1.Node) controllers.SyncState
- func (l *Listener) PoolHandler(logger log.Logger, pools map[string]*config.Pool) controllers.SyncState
- func (l *Listener) ServiceHandler(logger log.Logger, serviceName string, svc *v1.Service, ...) controllers.SyncState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UseEndpointSlices ¶ added in v0.10.0
func UseEndpointSlices(kubeClient kubernetes.Interface) bool
UseEndpointSlices detect if Endpoints Slices are enabled in the cluster.
Types ¶
type Client ¶
type Client struct { ForceSync func() // contains filtered or unexported fields }
Client watches a Kubernetes cluster and translates events into Controller method calls.
func New ¶ added in v0.4.0
New connects to masterAddr, using kubeconfig to authenticate.
The client uses processName to identify itself to the cluster (e.g. when logging events).
func (*Client) CreateMlSecret ¶ added in v0.10.0
CreateMlSecret create the memberlist secret.
func (*Client) PodIPs ¶ added in v0.9.4
PodIPs returns the IPs of all the pods matched by the labels string.
type Config ¶ added in v0.6.0
type Config struct { ProcessName string NodeName string MetricsHost string MetricsPort int EnablePprof bool ReadEndpoints bool Logger log.Logger DisableEpSlices bool Namespace string ValidateConfig config.Validate EnableWebhook bool DisableCertRotation bool CertDir string CertServiceName string LoadBalancerClass string Listener }
Config specifies the configuration of the Kubernetes client/watcher.
type Listener ¶ added in v0.13.0
type Listener struct { sync.Mutex ServiceChanged func(log.Logger, string, *v1.Service, epslices.EpsOrSlices) controllers.SyncState ConfigChanged func(log.Logger, *config.Config) controllers.SyncState PoolChanged func(log.Logger, map[string]*config.Pool) controllers.SyncState NodeChanged func(log.Logger, *v1.Node) controllers.SyncState }
func (*Listener) ConfigHandler ¶ added in v0.13.0
func (*Listener) NodeHandler ¶ added in v0.13.0
func (*Listener) PoolHandler ¶ added in v0.13.0
func (*Listener) ServiceHandler ¶ added in v0.13.0
func (l *Listener) ServiceHandler(logger log.Logger, serviceName string, svc *v1.Service, endpointsOrSlices epslices.EpsOrSlices) controllers.SyncState
Click to show internal directories.
Click to hide internal directories.