Documentation
¶
Index ¶
- type ConfigMap
- type Endpoints
- type HAProxySrv
- type Ingress
- type IngressPath
- type IngressRule
- type IngressTLS
- type K8s
- func (k K8s) Clean()
- func (k K8s) EventConfigMap(ns *Namespace, data *ConfigMap, configMapArgs map[string]utils.NamespaceValue) (updateRequired bool, configMap string)
- func (k K8s) EventEndpoints(ns *Namespace, data *Endpoints, ...) (updateRequired bool)
- func (k K8s) EventIngress(ns *Namespace, data *Ingress, controllerClass string) (updateRequired bool)
- func (k K8s) EventNamespace(ns *Namespace, data *Namespace) (updateRequired bool)
- func (k K8s) EventSecret(ns *Namespace, data *Secret) (updateRequired bool)
- func (k K8s) EventService(ns *Namespace, data *Service) (updateRequired bool)
- func (k K8s) GetNamespace(name string) *Namespace
- func (k K8s) GetValueFromAnnotations(annotationName string, annotations ...MapStringW) (data *StringW, err error)
- func (k K8s) SetDefaultAnnotation(annotation, value string)
- type MapStringW
- func (a *MapStringW) Clean()
- func (a *MapStringW) Clone() MapStringW
- func (a *MapStringW) Equal(b MapStringW) bool
- func (a *MapStringW) Get(name string) (data *StringW, err error)
- func (a *MapStringW) SetStatus(old MapStringW) (different bool)
- func (a *MapStringW) SetStatusState(state Status)
- func (a *MapStringW) String() string
- type Namespace
- type NamespacesWatch
- type PortEndpoints
- type Secret
- type Service
- type ServicePort
- type Status
- type StringW
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigMap ¶
type ConfigMap struct { Namespace string Name string Annotations MapStringW Status Status }
ConfigMap is useful data from k8s structures about configmap
type Endpoints ¶
type Endpoints struct { Namespace string Service StringW Ports map[string]*PortEndpoints Status Status }
Endpoints describes endpoints of a service
type HAProxySrv ¶
type Ingress ¶
type Ingress struct { // Required for K8s.UpdateIngressStatus to select proper versioned Client Set APIVersion string Namespace string Name string Annotations MapStringW Rules map[string]*IngressRule DefaultBackend *IngressPath TLS map[string]*IngressTLS Status Status }
Ingress is useful data from k8s structures about ingress
func ConvertToIngress ¶
ConvertToIngress detects the interface{} provided by the SharedInformer and select the proper strategy to convert and return the resource as a store.Ingress struct
type IngressPath ¶
type IngressPath struct { ServiceName string ServicePortInt int64 ServicePortString string Path string ExactPathMatch bool IsDefaultBackend bool Status Status }
IngressPath is useful data from k8s structures about ingress path
func (*IngressPath) Equal ¶
func (a *IngressPath) Equal(b *IngressPath) bool
Equal checks if Ingress Paths are equal
type IngressRule ¶
type IngressRule struct { Host string Paths map[string]*IngressPath Status Status }
IngressRule is useful data from k8s structures about ingress rule
func (*IngressRule) Equal ¶
func (a *IngressRule) Equal(b *IngressRule) bool
Equal checks if Ingress Rules are equal
type IngressTLS ¶
IngressTLS describes the transport layer security associated with an Ingress.
func (*IngressTLS) Equal ¶
func (a *IngressTLS) Equal(b *IngressTLS) bool
Equal checks if Ingress secrets are equal
type K8s ¶
type K8s struct { Namespaces map[string]*Namespace ConfigMaps map[string]*ConfigMap NamespacesAccess NamespacesWatch }
func NewK8sStore ¶
func NewK8sStore() K8s
func (K8s) EventConfigMap ¶
func (K8s) EventEndpoints ¶
func (k K8s) EventEndpoints(ns *Namespace, data *Endpoints, updateHAproxySrvs func(oldEndpoints, newEndpoints *PortEndpoints)) (updateRequired bool)
func (K8s) EventIngress ¶
func (K8s) EventNamespace ¶
func (K8s) EventSecret ¶
func (K8s) EventService ¶
func (K8s) GetNamespace ¶
GetNamespace returns Namespace. Creates one if not existing
func (K8s) GetValueFromAnnotations ¶
func (k K8s) GetValueFromAnnotations(annotationName string, annotations ...MapStringW) (data *StringW, err error)
GetValueFromAnnotations returns value by checking in multiple annotations. moves through list until it finds value if value is new or deleted, we check for next state to correctly set watch & value
func (K8s) SetDefaultAnnotation ¶
type MapStringW ¶
MapStringW stores values and enables
func ConvertToMapStringW ¶
func ConvertToMapStringW(annotations map[string]string) MapStringW
ConvertToMapStringW removes prefixes in annotation
func (*MapStringW) Equal ¶
func (a *MapStringW) Equal(b MapStringW) bool
Equal compares if two maps are equal
func (*MapStringW) Get ¶
func (a *MapStringW) Get(name string) (data *StringW, err error)
Get checks if name exists and if not, returns default value if defined
func (*MapStringW) SetStatus ¶
func (a *MapStringW) SetStatus(old MapStringW) (different bool)
SetStatus sets Status state for all items in map
func (*MapStringW) SetStatusState ¶
func (a *MapStringW) SetStatusState(state Status)
SetStatusState sets all watches to desired state
func (*MapStringW) String ¶
func (a *MapStringW) String() string
Get checks if name exists and if not, returns default value if defined
type Namespace ¶
type Namespace struct { Name string Relevant bool Ingresses map[string]*Ingress Endpoints map[string]*Endpoints Services map[string]*Service Secret map[string]*Secret Status Status // contains filtered or unexported fields }
Namespace is useful data from k8s structures about namespace
type NamespacesWatch ¶
type PortEndpoints ¶
type PortEndpoints struct { Port int64 BackendName string AddrsUsed map[string]struct{} AddrRemain map[string]struct{} HAProxySrvs map[string]*HAProxySrv }
PortEndpoints describes endpionts of a service port
func (*PortEndpoints) Equal ¶
func (a *PortEndpoints) Equal(b *PortEndpoints) bool
Equal checks if two service ports have same endpoints
type Service ¶
type Service struct { Namespace string Name string Ports []ServicePort Addresses []string //Used only for publish-service DNS string Annotations MapStringW Selector MapStringW Status Status }
Service is useful data from k8s structures about service
type ServicePort ¶
ServicePort describes port of a service
func (*ServicePort) Equal ¶
func (a *ServicePort) Equal(b *ServicePort) bool