Documentation ¶
Index ¶
- type Service
- func (s *Service) GetBackendName() (name string, err error)
- func (s *Service) GetResource() *store.Service
- func (s *Service) HandleBackend(client api.HAProxyClient, store store.K8s) (reload bool, err error)
- func (s *Service) HandleHAProxySrvs(client api.HAProxyClient, store store.K8s) (reload bool)
- func (s *Service) SetDefaultBackend(k store.K8s, cfg *configuration.ControllerCfg, api api.HAProxyClient, ...) (reload bool, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶ added in v1.7.1
type Service struct {
// contains filtered or unexported fields
}
func New ¶ added in v1.7.1
func New(k store.K8s, path *store.IngressPath, certs *certs.Certificates, tcpService bool, annList ...map[string]string) (*Service, error)
New returns a Service instance to handle the k8s IngressPath resource given in params. An error will be returned if there is no k8s Service resource corresponding to the service description in IngressPath.
func (*Service) GetBackendName ¶ added in v1.7.1
GetBackendName checks if servicePort provided in IngressPath exists and construct corresponding backend name Backend name is in format "ServiceNS_ServiceName_PortName"
func (*Service) GetResource ¶ added in v1.7.1
func (*Service) HandleBackend ¶ added in v1.7.1
HandleBackend processes a Service and creates/updates corresponding backend configuration in HAProxy
func (*Service) HandleHAProxySrvs ¶ added in v1.7.1
HandleHAProxySrvs handles the haproxy backend servers of the corresponding IngressPath (service + port)
func (*Service) SetDefaultBackend ¶ added in v1.7.1
func (s *Service) SetDefaultBackend(k store.K8s, cfg *configuration.ControllerCfg, api api.HAProxyClient, frontends []string) (reload bool, err error)
SetDefaultBackend configures the default service in kubernetes ingress resource as haproxy default backend of the frontends in params.