store

package
v0.0.0-...-f26c881 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2018 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigMapLister

type ConfigMapLister struct {
	cache.Store
}

ConfigMapLister makes a Store that lists Configmaps.

func (*ConfigMapLister) ByKey

func (cml *ConfigMapLister) ByKey(key string) (*apiv1.ConfigMap, error)

ByKey searches for a configmap in the local configmaps Store

type Controller

type Controller struct {
	Ingress   cache.Controller
	Endpoint  cache.Controller
	Service   cache.Controller
	Secret    cache.Controller
	Configmap cache.Controller
}

Controller defines the required controllers that interact against the api server

func (*Controller) Run

func (c *Controller) Run(stopCh chan struct{})

Run initiates the synchronization of the controllers against the api server

type EndpointLister

type EndpointLister struct {
	cache.Store
}

EndpointLister makes a Store that lists Endpoints.

func (*EndpointLister) GetServiceEndpoints

func (s *EndpointLister) GetServiceEndpoints(svc *apiv1.Service) (*apiv1.Endpoints, error)

GetServiceEndpoints returns the endpoints of a service, matched on service name.

type Event

type Event struct {
	Type EventType
	Obj  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 IngressAnnotationsLister

type IngressAnnotationsLister struct {
	cache.Store
}

IngressAnnotationsLister makes a Store that lists annotations in Ingress rules.

type IngressLister

type IngressLister struct {
	cache.Store
}

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
	ConfigMap         ConfigMapLister
	IngressAnnotation IngressAnnotationsLister
}

Lister returns the stores for ingresses, services, endpoints, secrets and configmaps.

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

func (SSLCertTracker) ByKey

func (s SSLCertTracker) ByKey(key string) (*ingress.SSLCert, error)

ByKey searches for an ingress in the local ingress Store

type SecretLister

type SecretLister struct {
	cache.Store
}

SecretLister makes a Store that lists Secrets.

func (*SecretLister) ByKey

func (sl *SecretLister) ByKey(key string) (*apiv1.Secret, error)

ByKey searches for a secret in the local secrets Store

type ServiceLister

type ServiceLister struct {
	cache.Store
}

ServiceLister makes a Store that lists Services.

func (*ServiceLister) ByKey

func (sl *ServiceLister) ByKey(key string) (*apiv1.Service, error)

ByKey searches for a service in the local secrets Store

type Storer

type Storer interface {
	// GetBackendConfiguration returns the nginx configuration stored in a configmap
	GetBackendConfiguration() ngx_config.Configuration

	// GetConfigMap returns a ConfigmMap using the namespace and name as key
	GetConfigMap(key string) (*apiv1.ConfigMap, error)

	// GetSecret returns a Secret using the namespace and name as key
	GetSecret(key string) (*apiv1.Secret, error)

	// GetService returns a Service using the namespace and name as key
	GetService(key string) (*apiv1.Service, error)

	GetServiceEndpoints(svc *apiv1.Service) (*apiv1.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

	// GetIngressAnnotations returns the annotations associated to an Ingress
	GetIngressAnnotations(ing *extensions.Ingress) (*annotations.Ingress, error)

	// GetLocalSecret returns the local copy of a Secret
	GetLocalSecret(name string) (*ingress.SSLCert, error)

	// ListLocalSecrets returns the list of local Secrets
	ListLocalSecrets() []*ingress.SSLCert

	// GetAuthCertificate resolves a given secret name into an SSL certificate.
	// The secret must contain 3 keys named:
	//   ca.crt: contains the certificate chain used for authentication
	GetAuthCertificate(string) (*resolver.AuthSSLCert, error)

	// GetDefaultBackend returns the default backend configuration
	GetDefaultBackend() defaults.Backend

	// Run initiates the synchronization of the controllers
	Run(stopCh chan struct{})

	// ReadSecrets extracts information about secrets from an Ingress rule
	ReadSecrets(*extensions.Ingress)
}

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,
	fs file.Filesystem,
	updateCh *channels.RingChannel) Storer

New creates a new object store to be used in the ingress controller

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL