Documentation ¶
Index ¶
- Constants
- Variables
- type Configuration
- type ErrorFile
- type HAProxyController
- type HTTPS
- type K8s
- func (k *K8s) EventsConfigfMaps(channel chan *store.ConfigMap, stop chan struct{}, ...)
- func (k *K8s) EventsEndpoints(channel chan *store.Endpoints, stop chan struct{}, ...)
- func (k *K8s) EventsIngressClass(channel chan *store.IngressClass, stop chan struct{}, ...)
- func (k *K8s) EventsIngresses(channel chan *store.Ingress, stop chan struct{}, ...)
- func (k *K8s) EventsNamespaces(channel chan *store.Namespace, stop chan struct{}, ...)
- func (k *K8s) EventsSecrets(channel chan *store.Secret, stop chan struct{}, ...)
- func (k *K8s) EventsServices(channel chan *store.Service, stop chan struct{}, ...)
- func (k *K8s) GetPublishServiceAddresses(service *corev1.Service, publishSvc *store.Service)
- func (k *K8s) IsNetworkingV1ApiSupported() bool
- func (k *K8s) IsNetworkingV1Beta1ApiSupported() bool
- func (k *K8s) UpdateIngressStatus(ingress *store.Ingress, publishSvc *store.Service) (err error)
- type Mode
- type ProxyProtocol
- type RefreshHandler
- type SyncDataEvent
- type SyncType
- type TCPHandler
- type UpdateHandler
Constants ¶
const ( CONTROLLER_CLASS = "haproxy.org/ingress-controller" // Configmaps Main = "main" TCPServices = "tcpservices" Errorfiles = "errorfiles" //sections FrontendHTTP = "http" FrontendHTTPS = "https" FrontendSSL = "ssl" SSLDefaultBaceknd = "ssl" //Status ADDED = store.ADDED DELETED = store.DELETED ERROR = store.ERROR EMPTY = store.EMPTY MODIFIED = store.MODIFIED // MapFiles SNI = "sni" HOST = "host" PATH_EXACT = "path-exact" PATH_PREFIX = "path-prefix" )
nolint
const (
TRACE_API = false
)
TRACE_API outputs all k8s events received from k8s API nolint golint
Variables ¶
var ( HAProxyBinary string HAProxyCFG string HAProxyCfgDir string HAProxyCertDir string HAProxyFtCertDir string HAProxyBdCertDir string HAProxyCaCertDir string HAProxyStateDir string HAProxyMapDir string HAProxyErrFileDir string HAProxyRuntimeSocket string HAProxyPIDFile string TransactionDir string )
var ErrIgnored = errors.New("Ignored resource") //nolint golint
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { MapFiles haproxy.Maps HAProxyRules *haproxy.Rules Certificates *haproxy.Certificates IngressRoutes ingress.Routes HTTPS bool SSLPassthrough bool }
func (*Configuration) Clean ¶
func (c *Configuration) Clean()
Clean cleans all the statuses of various data that was changed deletes them completely or just resets them if needed
func (*Configuration) HAProxyRulesInit ¶ added in v1.5.0
func (c *Configuration) HAProxyRulesInit() error
type ErrorFile ¶ added in v1.5.0
type ErrorFile struct {
// contains filtered or unexported fields
}
func (ErrorFile) Update ¶ added in v1.5.0
func (e ErrorFile) Update(k store.K8s, cfg *Configuration, api api.HAProxyClient) (reload bool, err error)
type HAProxyController ¶
type HAProxyController struct { Store store.K8s PublishService *store.Service IngressClass string Client api.HAProxyClient UpdateHandlers []UpdateHandler // contains filtered or unexported fields }
HAProxyController is ingress controller
func (*HAProxyController) Start ¶
func (c *HAProxyController) Start(osArgs utils.OSArgs)
Start initializes and runs HAProxyController
func (*HAProxyController) Stop ¶ added in v1.5.1
func (c *HAProxyController) Stop()
Stop handles shutting down HAProxyController
func (*HAProxyController) SyncData ¶
func (c *HAProxyController) SyncData(chConfigMapReceivedAndProcessed chan bool)
SyncData gets all kubernetes changes, aggregates them and apply to HAProxy. All the changes must come through this function
type HTTPS ¶ added in v1.5.0
type HTTPS struct {
// contains filtered or unexported fields
}
func (HTTPS) Update ¶ added in v1.5.0
func (h HTTPS) Update(k store.K8s, cfg *Configuration, api api.HAProxyClient) (reload bool, err error)
type K8s ¶
type K8s struct { API *kubernetes.Clientset Logger utils.Logger }
K8s is structure with all data required to synchronize with k8s
func GetKubernetesClient ¶
GetKubernetesClient returns new client that communicates with k8s
func GetRemoteKubernetesClient ¶
GetRemoteKubernetesClient returns new client that communicates with k8s
func (*K8s) EventsConfigfMaps ¶
func (k *K8s) EventsConfigfMaps(channel chan *store.ConfigMap, stop chan struct{}, informer cache.SharedIndexInformer)
func (*K8s) EventsEndpoints ¶
func (k *K8s) EventsEndpoints(channel chan *store.Endpoints, stop chan struct{}, informer cache.SharedIndexInformer)
func (*K8s) EventsIngressClass ¶ added in v1.5.0
func (k *K8s) EventsIngressClass(channel chan *store.IngressClass, stop chan struct{}, informer cache.SharedIndexInformer)
func (*K8s) EventsIngresses ¶
func (k *K8s) EventsIngresses(channel chan *store.Ingress, stop chan struct{}, informer cache.SharedIndexInformer)
func (*K8s) EventsNamespaces ¶
func (k *K8s) EventsNamespaces(channel chan *store.Namespace, stop chan struct{}, informer cache.SharedIndexInformer)
func (*K8s) EventsSecrets ¶
func (k *K8s) EventsSecrets(channel chan *store.Secret, stop chan struct{}, informer cache.SharedIndexInformer)
func (*K8s) EventsServices ¶
func (*K8s) GetPublishServiceAddresses ¶
func (*K8s) IsNetworkingV1ApiSupported ¶ added in v1.5.0
func (*K8s) IsNetworkingV1Beta1ApiSupported ¶ added in v1.5.0
type ProxyProtocol ¶ added in v1.5.0
type ProxyProtocol struct{}
func (ProxyProtocol) Update ¶ added in v1.5.0
func (p ProxyProtocol) Update(k store.K8s, cfg *Configuration, api api.HAProxyClient) (reload bool, err error)
type RefreshHandler ¶ added in v1.5.0
type RefreshHandler struct{}
func (RefreshHandler) Update ¶ added in v1.5.0
func (h RefreshHandler) Update(k store.K8s, cfg *Configuration, api api.HAProxyClient) (reload bool, err error)
type SyncDataEvent ¶
type SyncDataEvent struct { SyncType Namespace string Data interface{} // contains filtered or unexported fields }
SyncDataEvent represents converted k8s received message
type TCPHandler ¶ added in v1.5.0
type TCPHandler struct { }
func (TCPHandler) Update ¶ added in v1.5.0
func (t TCPHandler) Update(k store.K8s, cfg *Configuration, api api.HAProxyClient) (reload bool, err error)
type UpdateHandler ¶ added in v1.5.0
type UpdateHandler interface {
Update(k store.K8s, cfg *Configuration, api api.HAProxyClient) (reload bool, err error)
}