Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Manba ElectionID string KubeClient kubernetes.Interface IngressClass string ResyncPeriod time.Duration SyncRateLimit float32 UpdateStatus bool PublishService string PublishStatusAddress string Concurrency int }
Config contains all the settings required by an Ingress controller
type EndpointsEventHandler ¶
type EndpointsEventHandler struct {
UpdateCh *channels.RingChannel
}
EndpointsEventHandler handles create, update and delete events for endpoint resources in k8s. It is not ingress.class aware and the OnUpdate method filters out events with same set of endpoints.
func (EndpointsEventHandler) OnAdd ¶
func (reh EndpointsEventHandler) OnAdd(obj interface{})
OnAdd is invoked whenever a resource is added.
func (EndpointsEventHandler) OnDelete ¶
func (reh EndpointsEventHandler) OnDelete(obj interface{})
OnDelete is invoked whenever a resource is deleted.
func (EndpointsEventHandler) OnUpdate ¶
func (reh EndpointsEventHandler) OnUpdate(old, cur interface{})
OnUpdate is invoked whenever an Endpoint is changed. If the endpoints are same as before, an update is not sent on the UpdateCh.
type Event ¶
type Event struct { Type EventType Obj interface{} Old interface{} }
Event holds the context of an event.
type EventType ¶
type EventType string
EventType type of event associated with an informer
const ( // CreateEvent event associated with new objects in an informer CreateEvent EventType = "CREATE" // UpdateEvent event associated with an object update in an informer UpdateEvent EventType = "UPDATE" // DeleteEvent event associated when an object is removed from an informer DeleteEvent EventType = "DELETE" // ConfigurationEvent event associated when a controller configuration object is created or updated ConfigurationEvent EventType = "CONFIGURATION" )
type Manba ¶
type Manba struct {
Client manbaClient.Client
}
Manba Represents a Manba client and connection information
type ManbaController ¶
type ManbaController struct {
// contains filtered or unexported fields
}
ManbaController listen ingress and update raw data in manba
func NewManbaController ¶
func NewManbaController(cfg Config, updateCh *channels.RingChannel, store store.Store) (*ManbaController, error)
NewManbaController creates a new Manba Ingress controller.
func (*ManbaController) OnUpdate ¶
func (m *ManbaController) OnUpdate(state *parser.ManbaState) error
OnUpdate is called periodically by syncQueue to keep the configuration in sync. returning nil implies the synchronization finished correctly. Returning an error means requeue the update.
func (*ManbaController) Stop ¶
func (m *ManbaController) Stop() error
Stop gracefully stops the controller
type ResourceEventHandler ¶
type ResourceEventHandler struct { IsValidIngresClass func(object metav1.Object) bool UpdateCh *channels.RingChannel }
ResourceEventHandler is "ingress.class" aware resource handler.
func (ResourceEventHandler) OnAdd ¶
func (r ResourceEventHandler) OnAdd(obj interface{})
OnAdd is invoked whenever a resource is added.
func (ResourceEventHandler) OnDelete ¶
func (r ResourceEventHandler) OnDelete(obj interface{})
OnDelete is invoked whenever a resource is deleted
func (ResourceEventHandler) OnUpdate ¶
func (r ResourceEventHandler) OnUpdate(old, obj interface{})
OnUpdate is invoked whenever a resource is updated.