Documentation ¶
Index ¶
- Constants
- type Informer
- type IngressLister
- type Lister
- type NodeLister
- type NotExistsError
- type SecretLister
- type ServiceInfo
- type ServiceLister
- type Store
- func (s *Store) GetIngress(key string) (*networkv1.Ingress, error)
- func (s *Store) GetIngressServiceInfo(ingress *networkv1.Ingress) (map[string]ServiceInfo, error)
- func (s *Store) GetNodesIpList() []string
- func (s *Store) GetSecret(key string) (*corev1.Secret, error)
- func (s *Store) GetService(key string) (*corev1.Service, error)
- func (s *Store) ListIngress() []*networkv1.Ingress
- func (s *Store) Run(stopCh chan struct{})
- type Storer
Constants ¶
const (
MasterNodeAnnotationKey = "node-role.kubernetes.io/master"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Informer ¶
type Informer struct { Ingress cache.SharedIndexInformer Service cache.SharedIndexInformer Secret cache.SharedIndexInformer Node cache.SharedIndexInformer }
type IngressLister ¶
IngressLister makes a Store that lists Ingress.
func (IngressLister) ByKey ¶
func (l IngressLister) ByKey(key string) (*networkv1.Ingress, error)
ByKey returns the Ingress matching key in the local Ingress Store.
func (IngressLister) ListIngress ¶
func (l IngressLister) ListIngress() []*networkv1.Ingress
ListIngress returns a list of ingresses.
type Lister ¶
type Lister struct { Ingress IngressLister Service ServiceLister Secret SecretLister Node NodeLister }
type NodeLister ¶
SecretLister makes a Store that lists Secrets.
func (*NodeLister) NodesIpList ¶
func (l *NodeLister) NodesIpList() []string
NodesIpList returns nodes ips
type NotExistsError ¶
type NotExistsError string
NotExistsError is returned when an object does not exist in a local store.
func (NotExistsError) Error ¶
func (e NotExistsError) Error() string
Error implements the error interface.
type SecretLister ¶
SecretLister makes a Store that lists Secrets.
type ServiceInfo ¶
type ServiceInfo struct { Hosts []string NodeIps []string NodePort int Annotations map[string]string }
ServiceInfo represents helper struct for ingress service
type ServiceLister ¶
ServiceLister makes a Store that lists Services.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store represents cache store, implements Storer
func New ¶
func New( namespace string, resyncPeriod time.Duration, client *kubernetes.Clientset, ingressClass string, recorder record.EventRecorder, queue workqueue.RateLimitingInterface, ) *Store
New creates a new store. Add informers and it handlers.
func (*Store) GetIngress ¶
GetIngress returns the Ingress matching key.
func (*Store) GetIngressServiceInfo ¶
GetIngressServiceInfo returns ingress services info.
func (*Store) GetNodesIpList ¶
GetNodesIpList returns nodes ips
func (*Store) GetService ¶
GetService returns the Service matching key.
func (*Store) ListIngress ¶
ListIngress returns a list of ingresses.
type Storer ¶
type Storer interface { Run(chan struct{}) GetSecret(key string) (*corev1.Secret, error) GetIngress(key string) (*networkv1.Ingress, error) ListIngress() []*networkv1.Ingress GetService(key string) (*corev1.Service, error) GetNodesIpList() []string GetIngressServiceInfo(ingress *networkv1.Ingress) (map[string]ServiceInfo, error) }
Storer is the interface that wraps the required methods to gather information about ingresses, services, secrets and ingress annotations.