Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { sendconfig.Kong KongCustomEntitiesSecret string KubeClient clientset.Interface KongConfigClient configClientSet.Interface KnativeClient knativeClientSet.Interface ResyncPeriod time.Duration SyncRateLimit float32 EnableReverseSync bool Namespace string IngressClass string // optional PublishService string PublishStatusAddress string UpdateStatus bool UpdateStatusOnShutdown bool ElectionID string IngressAPI util.IngressAPI EnableKnativeIngressSupport bool Logger logrus.FieldLogger // DumpConfig writes generated config to a temp directory for manual inspection and debugging. DumpConfig util.ConfigDumpMode // DumpDir specifies the target directory for dumps enabled by `DumpConfig`. DumpDir string }
Configuration contains all the settings required by an Ingress controller
type EndpointsEventHandler ¶ added in v1.1.1
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 ¶ added in v1.1.1
func (reh EndpointsEventHandler) OnAdd(obj interface{})
OnAdd is invoked whenever a resource is added.
func (EndpointsEventHandler) OnDelete ¶ added in v1.1.1
func (reh EndpointsEventHandler) OnDelete(obj interface{})
OnDelete is invoked whenever a resource is deleted.
func (EndpointsEventHandler) OnUpdate ¶ added in v1.1.1
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 ¶ added in v1.1.1
type Event struct { Type EventType Obj interface{} Old interface{} }
Event holds the context of an event
type EventType ¶ added in v1.1.1
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 configuration object is created or updated ConfigurationEvent EventType = "CONFIGURATION" )
type KongController ¶ added in v1.1.1
type KongController struct { PluginSchemaStore util.PluginSchemaStore Logger logrus.FieldLogger // contains filtered or unexported fields }
KongController ...
func NewKongController ¶ added in v1.1.1
func NewKongController(ctx context.Context, config *Configuration, updateCh *channels.RingChannel, store store.Storer) (*KongController, error)
NewKongController creates a new Ingress controller.
func (*KongController) OnUpdate ¶ added in v1.1.1
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 (*KongController) Start ¶ added in v1.1.1
func (n *KongController) Start()
Start starts a new master process running in foreground, blocking until the next call to Stop.
func (*KongController) Stop ¶ added in v1.1.1
func (n *KongController) Stop() error
Stop stops the master process gracefully.
type ResourceEventHandler ¶ added in v1.1.1
type ResourceEventHandler struct {
UpdateCh *channels.RingChannel
}
ResourceEventHandler is "ingress.class" aware resource handler.
func (ResourceEventHandler) OnAdd ¶ added in v1.1.1
func (reh ResourceEventHandler) OnAdd(obj interface{})
func (ResourceEventHandler) OnDelete ¶ added in v1.1.1
func (reh ResourceEventHandler) OnDelete(obj interface{})
OnDelete is invoked whenever a resource is deleted.
func (ResourceEventHandler) OnUpdate ¶ added in v1.1.1
func (reh ResourceEventHandler) OnUpdate(old, cur interface{})
OnUpdate is invoked whenever a resource is changed. old holds the previous resource and cur is the updated resource.