Documentation ¶
Index ¶
- Constants
- Variables
- func CheckFlag(list []string, searchString string) bool
- func RegisterBigIPSchemaTypes()
- func RemoveUnReferredHealthMonitors(rsCfg *ResourceConfig, fullPoolName string, monitors AnnotationHealthMonitors)
- func RemoveUnusedHealthMonitors(rsCfg *ResourceConfig)
- type BigIPv4FormatChecker
- type BigIPv6FormatChecker
- type EventNotifier
- type FwdRuleMap
- type HostFwdRuleMap
- type IngressList
- type Manager
- func (appMgr *Manager) AddNamespace(namespace string, cfgMapSelector labels.Selector, resyncPeriod time.Duration) error
- func (appMgr *Manager) AddNamespaceLabelInformer(labelSelector labels.Selector, resyncPeriod time.Duration) error
- func (appMgr *Manager) AddNodeInformer(resyncPeriod time.Duration) error
- func (appMgr *Manager) GetAllWatchedNamespaces() []string
- func (appMgr *Manager) GetNamespaceLabelInformer() cache.SharedIndexInformer
- func (appMgr *Manager) GetPodsForService(namespace, serviceName string) ([]*v1.Pod, error)
- func (appMgr *Manager) GetServicesForPod(pod *v1.Pod) []*v1.Service
- func (appMgr *Manager) GetWatchedNamespaces() []string
- func (appMgr *Manager) GetWatchedNamespacesLockless() []string
- func (appMgr *Manager) HandleTranslateAddress(sKey serviceQueueKey, stats *vsSyncStats)
- func (appMgr *Manager) IsNodePort() bool
- func (appMgr *Manager) ProcessNodeUpdate(obj interface{})
- func (appMgr *Manager) Run(stopCh <-chan struct{})
- func (appMgr *Manager) UseNodeInternal() bool
- type NPLAnnoations
- type NPLAnnotation
- type NamespaceEventNotifier
- type NamespaceEventNotifierMap
- type NewBroadcasterFunc
- type Node
- type NodeList
- type Params
- type ProcessedHostPath
- type ResourceMap
- type RouteConfig
- type RouteList
- type RoutesMap
- type ServiceFwdRuleMap
- type SvcEndPointsCache
- type WatchedNamespaces
Constants ¶
const ( // Kinds of Resources Namespaces = "namespaces" Services = "services" Endpoints = "endpoints" Pod = "pod" Nodes = "nodes" Configmaps = "configmaps" Ingresses = "ingresses" Routes = "routes" Secrets = "secrets" IngressClasses = "ingressclasses" NPLPodAnnotation = "nodeportlocal.antrea.io" NPLSvcAnnotation = "nodeportlocal.antrea.io/enabled" // CNI OVN_K8S = "ovn-k8s" OVNK8sNodeSubnetAnnotation = "k8s.ovn.org/node-subnets" OVNK8sNodeIPAnnotation = "k8s.ovn.org/node-primary-ifaddr" // k8s.ovn.org/host-addresses is changed to k8s.ovn.org/host-cidrs in openshift 4.14 OVNK8sNodeIPAnnotation2 = "k8s.ovn.org/host-addresses" OVNK8sNodeIPAnnotation3 = "k8s.ovn.org/host-cidrs" CILIUM_K8S = "cilium-k8s" CiliumK8sNodeSubnetAnnotation12 = "io.cilium.network.ipv4-pod-cidr" CiliumK8sNodeSubnetAnnotation13 = "network.cilium.io/ipv4-pod-cidr" )
const (
CCCLAgent = "cccl"
)
const (
F5RouterName = "F5 BIG-IP"
)
Variables ¶
var K8SCoreServices = map[string]bool{ "kube-dns": true, "kube-scheduler": true, "kube-controller-manager": true, "kube-apiserver": true, "docker-registry": true, "kubernetes": true, "registry-console": true, "router": true, "kubelet": true, "console": true, "alertmanager-main": true, "alertmanager-operated": true, "cluster-monitoring-operator": true, "kube-state-metrics": true, "node-exporter": true, "prometheus-k8s": true, "prometheus-operated": true, "prometheus-operatorwebconsole": true, "kube-proxy": true, "flannel": true, "etcd": true, "antrea": true, }
var OSCPCoreServices = map[string]bool{ "openshift": true, "metrics": true, "api": true, "check-endpoints": true, "oauth-openshift": true, "cco-metrics": true, "machine-approver": true, "node-tuning-operator": true, "performance-addon-operator-service": true, "cluster-storage-operator-metrics": true, "csi-snapshot-controller-operator-metrics": true, "csi-snapshot-webhook": true, "cluster-version-operator": true, "downloads": true, "controller-manager": true, "dns-default": true, "image-registry-operator": true, "router-internal-default": true, "apiserver": true, "scheduler": true, "cluster-autoscaler-operator": true, "cluster-baremetal-operator-service": true, "cluster-baremetal-webhook-service": true, "machine-api-controllers": true, "machine-api-operator": true, "machine-api-operator-webhook": true, "machine-config-controller": true, "machine-config-daemon": true, "certified-operators": true, "community-operators": true, "marketplace-operator-metrics": true, "redhat-marketplace": true, "redhat-operators": true, "openshift-state-metrics": true, "telemeter-client": true, "thanos-querier": true, "multus-admission-controller": true, "network-metrics-service": true, "network-check-source": true, "network-check-target": true, "catalog-operator-metrics": true, "olm-operator-metrics": true, "packageserver-service": true, "sdn": true, "sdn-controller": true, }
Functions ¶
func RemoveUnReferredHealthMonitors ¶
func RemoveUnReferredHealthMonitors(rsCfg *ResourceConfig, fullPoolName string, monitors AnnotationHealthMonitors)
func RemoveUnusedHealthMonitors ¶
func RemoveUnusedHealthMonitors(rsCfg *ResourceConfig)
RemoveUnusedHealthMonitors removes unused health monitors if there are any
Types ¶
type BigIPv4FormatChecker ¶
type BigIPv4FormatChecker struct{}
Big-IP ipv4/ipv6 checkers
func (BigIPv4FormatChecker) IsFormat ¶
func (f BigIPv4FormatChecker) IsFormat(input interface{}) bool
type BigIPv6FormatChecker ¶
type BigIPv6FormatChecker struct{}
func (BigIPv6FormatChecker) IsFormat ¶
func (f BigIPv6FormatChecker) IsFormat(input interface{}) bool
type EventNotifier ¶
type EventNotifier struct {
// contains filtered or unexported fields
}
func NewEventNotifier ¶
func NewEventNotifier(bfunc NewBroadcasterFunc) *EventNotifier
func (*EventNotifier) CreateNotifierForNamespace ¶
func (en *EventNotifier) CreateNotifierForNamespace( namespace string, coreIntf corev1.CoreV1Interface, ) *NamespaceEventNotifier
Create a notifier for a namespace, or return the existing one
func (*EventNotifier) DeleteNotifierForNamespace ¶
func (en *EventNotifier) DeleteNotifierForNamespace(namespace string)
func (*EventNotifier) GetNotifierForNamespace ¶
func (en *EventNotifier) GetNotifierForNamespace( namespace string, ) *NamespaceEventNotifier
Get the notifier for a namespace
type FwdRuleMap ¶
key is path regex, data unused. Using a map as go doesn't have a set type.
type HostFwdRuleMap ¶
type HostFwdRuleMap map[string]FwdRuleMap
key is fqdn host name, data is map of paths.
type IngressList ¶ added in v2.14.0
func (IngressList) Len ¶ added in v2.14.0
func (slice IngressList) Len() int
func (IngressList) Less ¶ added in v2.14.0
func (slice IngressList) Less(i, j int) bool
func (IngressList) Swap ¶ added in v2.14.0
func (slice IngressList) Swap(i, j int)
type Manager ¶
type Manager struct { DynamicNS bool WatchedNS WatchedNamespaces AgentCIS cisAgent.CISAgentInterface TeemData *teem.TeemsData AgentName string // contains filtered or unexported fields }
func NewManager ¶
Create and return a new app manager that meets the Manager interface
func (*Manager) AddNamespace ¶
func (*Manager) AddNamespaceLabelInformer ¶
func (appMgr *Manager) AddNamespaceLabelInformer( labelSelector labels.Selector, resyncPeriod time.Duration, ) error
AddNamespaceLabelInformer spins an informer to watch all namespaces with matching label
func (*Manager) AddNodeInformer ¶ added in v2.14.0
AddNodeInformer to watch the node udpates
func (*Manager) GetAllWatchedNamespaces ¶
Get all Namespaces being watched based on Namespaces provided, Namespace Label or all
func (*Manager) GetNamespaceLabelInformer ¶
func (appMgr *Manager) GetNamespaceLabelInformer() cache.SharedIndexInformer
func (*Manager) GetPodsForService ¶
func (*Manager) GetServicesForPod ¶
func (*Manager) GetWatchedNamespaces ¶
func (*Manager) GetWatchedNamespacesLockless ¶
func (*Manager) HandleTranslateAddress ¶
func (appMgr *Manager) HandleTranslateAddress(sKey serviceQueueKey, stats *vsSyncStats)
HandleTranslateAddress - Sets Address Translate flag for Virtual Server
func (*Manager) IsNodePort ¶
func (*Manager) ProcessNodeUpdate ¶
func (appMgr *Manager) ProcessNodeUpdate( obj interface{}, )
Check for a change in Node state
func (*Manager) UseNodeInternal ¶
type NPLAnnotation ¶
type NPLAnnotation struct { PodPort int32 `json:"podPort"` NodeIP string `json:"nodeIP"` NodePort int32 `json:"nodePort"` }
NPL information from pod annotation
type NamespaceEventNotifier ¶
type NamespaceEventNotifier struct {
// contains filtered or unexported fields
}
func (*NamespaceEventNotifier) RecordEvent ¶
func (nen *NamespaceEventNotifier) RecordEvent( obj runtime.Object, eventType, reason, message string, )
type NamespaceEventNotifierMap ¶
type NamespaceEventNotifierMap map[string]*NamespaceEventNotifier
type NewBroadcasterFunc ¶
type NewBroadcasterFunc func() record.EventBroadcaster
type Params ¶
type Params struct { KubeClient kubernetes.Interface RouteClientV1 routeclient.RouteV1Interface UseNodeInternal bool IsNodePort bool RouteConfig RouteConfig ResolveIngress string DefaultIngIP string VsSnatPoolName string NodeLabelSelector string UseSecrets bool SchemaLocal string EventChan chan interface{} ConfigWriter writer.Writer ManageConfigMaps bool ManageIngress bool ManageIngressClassOnly bool HubMode bool IngressClass string Agent string SchemaLocalPath string TrustedCertsCfgmap string // Data group path DgPath string AgRspChan chan interface{} ProcessAgentLabels func(map[string]string, string, string) bool UserAgent string DefaultRouteDomain int PoolMemberType string //vxlan VXLANName string VXLANMode string CiliumTunnelName string StaticRoutingMode bool OrchestrationCNI string StaticRouteNodeCIDR string // contains filtered or unexported fields }
Struct to allow NewManager to receive all or only specific parameters.
type ProcessedHostPath ¶
Store of processed host-Path map
type ResourceMap ¶
type ResourceMap map[int32][]*ResourceConfig
type RouteConfig ¶
type RouteConfig struct { RouteVSAddr string RouteLabel string HttpVs string HttpsVs string ClientSSL string ServerSSL string }
Configuration options for Routes in OpenShift
type ServiceFwdRuleMap ¶
type ServiceFwdRuleMap map[serviceQueueKey]HostFwdRuleMap
key is namespace/serviceName, data is map of host to paths.
func NewServiceFwdRuleMap ¶
func NewServiceFwdRuleMap() ServiceFwdRuleMap
func (ServiceFwdRuleMap) AddEntry ¶
func (sfrm ServiceFwdRuleMap) AddEntry(ns, svc, host, path string)
func (ServiceFwdRuleMap) AddToDataGroup ¶
func (sfrm ServiceFwdRuleMap) AddToDataGroup(dgMap DataGroupNamespaceMap, partition string)
type SvcEndPointsCache ¶
type SvcEndPointsCache struct {
// contains filtered or unexported fields
}
type WatchedNamespaces ¶
Watched Namespaces for global availability.