Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EndpointLister ¶
EndpointLister makes a Store that lists Endpoints.
func (*EndpointLister) GetServiceEndpoints ¶
GetServiceEndpoints returns the endpoints of a service, matched on service name.
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 configuration object is created or updated ConfigurationEvent EventType = "CONFIGURATION" )
type Informer ¶
type Informer struct {
Ingress cache.SharedIndexInformer
Endpoint cache.SharedIndexInformer
Service cache.SharedIndexInformer
Secret cache.SharedIndexInformer
Configuration cache.SharedIndexInformer
Kong struct {
Plugin cache.SharedIndexInformer
Consumer cache.SharedIndexInformer
Credential cache.SharedIndexInformer
Configuration cache.SharedIndexInformer
}
}
Informer defines the required SharedIndexInformers that interact with the API server.
type IngressAnnotationsLister ¶
IngressAnnotationsLister makes a Store that lists annotations in Ingress rules.
type IngressLister ¶
IngressLister makes a Store that lists Ingress.
func (IngressLister) ByKey ¶
func (il IngressLister) ByKey(key string) (*extensions.Ingress, error)
ByKey searches for an ingress in the local ingress Store
type Lister ¶
type Lister struct {
Ingress IngressLister
Service ServiceLister
Endpoint EndpointLister
Secret SecretLister
Kong struct {
Plugin cache.Store
Consumer cache.Store
Credential cache.Store
Configuration cache.Store
}
}
Lister returns the stores for ingresses, services, endpoints and secrets.
type ObjectRefMap ¶
type ObjectRefMap interface {
Insert(consumer string, ref ...string)
Delete(consumer string)
Len() int
Has(ref string) bool
HasConsumer(consumer string) bool
Reference(ref string) []string
ReferencedBy(consumer string) []string
}
ObjectRefMap is a map of references from object(s) to object (1:n). It is used to keep track of which data objects (Secrets) are used within Ingress objects.
func NewObjectRefMap ¶
func NewObjectRefMap() ObjectRefMap
NewObjectRefMap returns a new ObjectRefMap.
type SSLCertTracker ¶
type SSLCertTracker struct {
cache.ThreadSafeStore
}
SSLCertTracker holds a store of referenced Secrets in Ingress rules
func NewSSLCertTracker ¶
func NewSSLCertTracker() *SSLCertTracker
NewSSLCertTracker creates a new SSLCertTracker store
type SecretLister ¶
SecretLister makes a Store that lists Secrets.
type ServiceLister ¶
ServiceLister makes a Store that lists Services.
type Storer ¶
type Storer interface {
// GetSecret returns a Secret using the namespace and name as key
GetSecret(key string) (*corev1.Secret, error)
// GetService returns a Service using the namespace and name as key
GetService(key string) (*corev1.Service, error)
GetServiceEndpoints(svc *corev1.Service) (*corev1.Endpoints, error)
// GetSecret returns an Ingress using the namespace and name as key
GetIngress(key string) (*extensions.Ingress, error)
// ListIngresses returns the list of Ingresses
ListIngresses() []*extensions.Ingress
// GetLocalSSLCert returns the local copy of a SSLCert
GetLocalSSLCert(name string) (*ingress.SSLCert, error)
// ListLocalSSLCerts returns the list of local SSLCerts
ListLocalSSLCerts() []*ingress.SSLCert
// Run initiates the synchronization of the controllers
Run(stopCh chan struct{})
GetKongPlugin(namespace, name string) (*pluginv1.KongPlugin, error)
GetKongConsumer(namespace, name string) (*consumerv1.KongConsumer, error)
GetKongIngress(namespace, name string) (*configurationv1.KongIngress, error)
ListKongConsumers() []*consumerv1.KongConsumer
ListKongCredentials() []*credentialv1.KongCredential
}
Storer is the interface that wraps the required methods to gather information about ingresses, services, secrets and ingress annotations.
func New ¶
func New(checkOCSP bool, namespace, configmap, tcp, udp, defaultSSLCertificate string, resyncPeriod time.Duration, client clientset.Interface, clientConf *rest.Config, fs file.Filesystem, updateCh *channels.RingChannel) Storer
New creates a new object store to be used in the ingress controller