Documentation ¶
Index ¶
- Constants
- Variables
- type HAProxyController
- type K8s
- func (k *K8s) EventsConfigfMaps(channel chan SyncDataEvent, stop chan struct{}, ...)
- func (k *K8s) EventsEndpoints(channel chan SyncDataEvent, stop chan struct{}, ...)
- func (k *K8s) EventsIngressClass(channel chan SyncDataEvent, stop chan struct{}, ...)
- func (k *K8s) EventsIngresses(channel chan SyncDataEvent, stop chan struct{}, ...)
- func (k *K8s) EventsNamespaces(channel chan SyncDataEvent, stop chan struct{}, ...)
- func (k *K8s) EventsSecrets(channel chan SyncDataEvent, stop chan struct{}, ...)
- func (k *K8s) EventsServices(channel chan SyncDataEvent, 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 SyncDataEvent
- type SyncType
- type UpdateHandler
Constants ¶
View Source
const ( CONTROLLER_CLASS = "haproxy.org/ingress-controller" // SyncType values COMMAND SyncType = "COMMAND" CONFIGMAP SyncType = "CONFIGMAP" ENDPOINTS SyncType = "ENDPOINTS" INGRESS SyncType = "INGRESS" INGRESS_CLASS SyncType = "INGRESS_CLASS" NAMESPACE SyncType = "NAMESPACE" SERVICE SyncType = "SERVICE" SECRET SyncType = "SECRET" // Modes HTTP Mode = "http" TCP Mode = "tcp" // Status ADDED = store.ADDED DELETED = store.DELETED ERROR = store.ERROR EMPTY = store.EMPTY MODIFIED = store.MODIFIED )
View Source
const (
TRACE_API = false
)
TRACE_API outputs all k8s events received from k8s API nolint golint
Variables ¶
View Source
var ErrIgnored = errors.New("ignored resource")
Functions ¶
This section is empty.
Types ¶
type HAProxyController ¶
type HAProxyController struct { Cfg config.ControllerCfg Client api.HAProxyClient OSArgs utils.OSArgs Store store.K8s PublishService *store.Service AuxCfgModTime int64 // contains filtered or unexported fields }
HAProxyController is ingress controller
func (*HAProxyController) Start ¶
func (c *HAProxyController) Start()
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()
SyncData gets all kubernetes changes, aggregates them and apply to HAProxy. All the changes must come through this function
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 SyncDataEvent, stop chan struct{}, informer cache.SharedIndexInformer)
func (*K8s) EventsEndpoints ¶
func (k *K8s) EventsEndpoints(channel chan SyncDataEvent, stop chan struct{}, informer cache.SharedIndexInformer)
func (*K8s) EventsIngressClass ¶ added in v1.5.0
func (k *K8s) EventsIngressClass(channel chan SyncDataEvent, stop chan struct{}, informer cache.SharedIndexInformer)
func (*K8s) EventsIngresses ¶
func (k *K8s) EventsIngresses(channel chan SyncDataEvent, stop chan struct{}, informer cache.SharedIndexInformer)
func (*K8s) EventsNamespaces ¶
func (k *K8s) EventsNamespaces(channel chan SyncDataEvent, stop chan struct{}, informer cache.SharedIndexInformer)
func (*K8s) EventsSecrets ¶
func (k *K8s) EventsSecrets(channel chan SyncDataEvent, stop chan struct{}, informer cache.SharedIndexInformer)
func (*K8s) EventsServices ¶
func (k *K8s) EventsServices(channel chan SyncDataEvent, stop chan struct{}, informer cache.SharedIndexInformer, publishSvc *store.Service)
func (*K8s) GetPublishServiceAddresses ¶
func (*K8s) IsNetworkingV1ApiSupported ¶ added in v1.5.0
func (*K8s) IsNetworkingV1Beta1ApiSupported ¶ added in v1.5.0
type SyncDataEvent ¶
type SyncDataEvent struct { SyncType Namespace string Data interface{} // contains filtered or unexported fields }
SyncDataEvent represents converted k8s received message
type UpdateHandler ¶ added in v1.5.0
type UpdateHandler interface {
Update(k store.K8s, cfg *config.ControllerCfg, api api.HAProxyClient) (reload bool, err error)
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.