Documentation ¶
Index ¶
- type Service
- func (s *Service) GetBackendName() (name string, err error)
- func (s *Service) GetResource() *store.Service
- func (s *Service) HandleBackend(storeK8s store.K8s, client api.HAProxyClient, a annotations.Annotations) (err error)
- func (s *Service) HandleHAProxySrvs(k8s store.K8s, client api.HAProxyClient)
- func (s *Service) SetDefaultBackend(k store.K8s, h haproxy.HAProxy, frontends []string, a annotations.Annotations) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func New ¶
func New(k store.K8s, path *store.IngressPath, certs certs.Certificates, tcpService bool, ingress *store.Ingress, 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 NewLocal ¶
func NewLocal(k store.K8s, path *store.IngressPath, backend *models.Backend, annList ...map[string]string) (*Service, error)
NewLocal returns a Service instance to handle the k8s IngressPath resource given in params.
func (*Service) GetBackendName ¶
GetBackendName checks if servicePort provided in IngressPath exists and construct corresponding backend name Backend name is in format "ServiceNS_ServiceName_PortName"
func (*Service) GetResource ¶
func (*Service) HandleBackend ¶
func (s *Service) HandleBackend(storeK8s store.K8s, client api.HAProxyClient, a annotations.Annotations) (err error)
HandleBackend processes a Service and creates/updates corresponding backend configuration in HAProxy
func (*Service) HandleHAProxySrvs ¶
func (s *Service) HandleHAProxySrvs(k8s store.K8s, client api.HAProxyClient)
HandleHAProxySrvs handles the haproxy backend servers of the corresponding IngressPath (service + port)
func (*Service) SetDefaultBackend ¶
func (s *Service) SetDefaultBackend(k store.K8s, h haproxy.HAProxy, frontends []string, a annotations.Annotations) (err error)
SetDefaultBackend configures the default service in kubernetes ingress resource as haproxy default backend of the frontends in params.