Documentation
¶
Index ¶
- Constants
- Variables
- func AS3NameFormatter(name string) string
- func DeepEqualJSON(decl1, decl2 as3Declaration) bool
- func JoinBigipPath(partition, objName string) string
- type Agent
- type AgentParams
- type AlternateBackend
- type AnalyticsProfiles
- type AnnotationsUsed
- type AutoMonitorType
- type BaseRouteConfig
- type BigIPSSLProfiles
- type BlockAffinitycidr
- type CRInformer
- type CacheIPAM
- type ClusterConfig
- type ClusterDetails
- type ClusterHandler
- type CommonInformer
- type Controller
- func (ctlr *Controller) CISHealthCheck()
- func (ctlr *Controller) CISHealthCheckHandler() http.Handler
- func (ctlr *Controller) GetHostFromHostPath(hostPath string) string
- func (ctlr *Controller) GetNodePodCIDRMap() []BlockAffinitycidr
- func (ctlr *Controller) GetPodsForService(namespace, serviceName, clusterName string, nplAnnotationRequired bool) []*v1.Pod
- func (ctlr *Controller) GetPoolBackendsForSvcTypeLB(svc *v1.Service, svcPort v1.ServicePort, clusterName string, ...) []SvcBackendCxt
- func (ctlr *Controller) GetPoolBackendsForTS(pool *cisapiv1.TSPool, rscNamespace string) []SvcBackendCxt
- func (ctlr *Controller) GetPoolBackendsForVS(pool *cisapiv1.VSPool, rscNamespace string) []SvcBackendCxt
- func (ctlr *Controller) GetRouteBackends(route *routeapi.Route, clusterSvcs []cisapiv1.MultiClusterServiceReference) []RouteBackendCxt
- func (ctlr *Controller) GetService(namespace, serviceName, clusterName string) *v1.Service
- func (ctlr *Controller) GetServiceRouteWithoutHealthAnnotation(svcKey MultiClusterServiceKey) *routeapi.Route
- func (ctlr *Controller) GetServicesForPod(pod *v1.Pod, clusterName string) *v1.Service
- func (ctlr *Controller) HandlePathBasedABIRule(rsCfg *ResourceConfig, vsHost string, tlsTerminationType string)
- func (ctlr *Controller) HandlePathBasedABIRuleTS(rsCfg *ResourceConfig)
- func (ctlr *Controller) ProcessAssociatedExternalDNS(hostnames []string)
- func (ctlr *Controller) ProcessNodeUpdate(obj interface{}, clusterName string)
- func (ctlr *Controller) ProcessRouteEDNS(hosts []string)
- func (ctlr *Controller) RemoveIPAMCRHostSpec(ipamCR *ficV1.IPAM, key string, index int) (res *ficV1.IPAM, err error)
- func (ctlr *Controller) SetupNodeProcessing(clusterName string) error
- func (ctlr *Controller) Start()
- func (ctlr *Controller) StartInformers(clusterName string)
- func (ctlr *Controller) Stop()
- func (ctlr *Controller) StopInformers(clusterName string)
- func (ctlr *Controller) UpdatePoolHealthMonitors(svcKey MultiClusterServiceKey)
- func (ctlr *Controller) UpdatePoolMembersForNodeUpdate(clusterName string)
- func (ctlr *Controller) VerifyIPAMAssociatedHostGroupExists(key string) bool
- type ControllerMode
- type CustomProfile
- type CustomProfileStore
- type DataGroupNamespaceMap
- type DefaultRouteGroupConfig
- type DefaultSSLProfile
- type DynamicInformers
- type EventNotifier
- type ExtendedRouteGroupConfig
- type ExtendedRouteGroupSpec
- type GSLBPool
- type GTMConfig
- type GTMParams
- type GTMPartitionConfig
- type GTMPostManager
- type HAClusterConfig
- type HAMode
- type HAModeType
- type IRule
- type IRulesMap
- type InformerStore
- type InternalDataGroup
- type InternalDataGroupMap
- type InternalDataGroupRecord
- type InternalDataGroupRecords
- type L4AppsStore
- type LTMConfig
- type Meta
- type Monitor
- type MonitorName
- type Monitors
- type MultiClusterResourceStore
- type MultiClusterServiceConfig
- type MultiClusterServiceKey
- type MultiPoolPersistence
- type NPLAnnoations
- type NPLAnnotation
- type NPLStore
- type NRInformer
- type NSInformer
- type NameRef
- type NamespaceEventNotifier
- type NamespaceEventNotifierMap
- type NewBroadcasterFunc
- type Node
- type NodeInformer
- type NodeList
- type Params
- type PartitionConfig
- type PersistMetaData
- type Policies
- type Policy
- type Pool
- type PoolIdentifier
- type PoolMember
- type PoolMemberCache
- type Pools
- type PostManager
- type PostParams
- type PrimaryClusterHealthProbeParams
- type ProcessedHostPath
- type ProfileAdapt
- type ProfileHTTP2
- type ProfileRef
- type ProfileRefs
- type ProfileTCP
- type ResourceConfig
- type ResourceConfigRequest
- type ResourceConfigs
- type ResourceEvent
- type ResourceMap
- type ResourceStatus
- type ResourceStore
- type RouteBackendCxt
- type Rule
- type Rules
- type SecretKey
- type ServiceAddress
- type ServiceTypeLBHealthMonitor
- type Services
- type SourceAddrTranslation
- type StatusUpdate
- type SvcBackendCxt
- type TLSCipher
- type TLSContext
- type TLSVersion
- type VSSpecProperties
- type Virtual
- type Virtuals
- type WideIP
- type WideIPs
Constants ¶
const ( KubernetesMode ControllerMode = "kubernetes" OpenShiftMode ControllerMode = "openshift" CustomResourceMode ControllerMode = "customresource" Create = "Create" Update = "Update" Delete = "Delete" // DefaultNativeResourceLabel is a label used for kubernetes/openshift Resources. DefaultNativeResourceLabel = "f5nr in (true)" F5RouterName = "F5 BIG-IP" HTTP = "http" HTTPS = "https" //OVN K8S 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 CNI CILIUM_K8S = "cilium-k8s" CiliumK8sNodeSubnetAnnotation12 = "io.cilium.network.ipv4-pod-cidr" CiliumK8sNodeSubnetAnnotation13 = "network.cilium.io/ipv4-pod-cidr" //Calico CNI CALICO_K8S = "calico-k8s" CALICO_API_BLOCK_AFFINITIES = "/apis/crd.projectcalico.org/v1/blockaffinities" CALICONodeIPAnnotation = "projectcalico.org/IPv4Address" BLOCKAFFINITIES = "blockaffinities" CommonPartition = "Common" )
const ( // DefaultCustomResourceLabel is a label used for F5 Custom Resources. DefaultCustomResourceLabelKey = "f5cr" DefaultCustomResourceLabel = DefaultCustomResourceLabelKey + " in (true)" // VirtualServer is a F5 Custom Resource Kind. VirtualServer = "VirtualServer" // TLSProfile is a F5 Custom Resource Kind TLSProfile = "TLSProfile" // IngressLink is a Custom Resource used by both F5 and Nginx IngressLink = "IngressLink" // TransportServer is a F5 Custom Resource Kind TransportServer = "TransportServer" // ExternalDNS is a F5 Custom Resource Kind ExternalDNS = "ExternalDNS" // Policy is collection of BIG-IP profiles, LTM policies and iRules CustomPolicy = "CustomPolicy" // IPAM is a F5 Custom Resource Kind IPAM = "IPAM" // Service is a k8s native Service Resource. Service = "Service" //Pod is a k8s native object Pod = "Pod" //Secret is a k8s native object K8sSecret = "Secret" // Endpoints is a k8s native Endpoint Resource. Endpoints = "Endpoints" // Namespace is k8s namespace Namespace = "Namespace" // ConfigMap is k8s native ConfigMap resource ConfigMap = "ConfigMap" // Route is OpenShift Route Route = "Route" // Node update NodeUpdate = "Node" NodePort = "nodeport" Cluster = "cluster" PoolLBMemberRatio = "ratio-member" Local = "local" StandAloneCIS = "standalone" SecondaryCIS = "secondary" PrimaryCIS = "primary" // Namespace is k8s namespace HACIS = "HACIS" // Primary cluster health probe DefaultProbeInterval = 60 DefaultRetryInterval = 15 PolicyControlForward = "forwarding" // Namespace for IPAM CRD DefaultIPAMNamespace = "kube-system" // TLS Terminations TLSEdge = "edge" AllowSourceRange = "allowSourceRange" DefaultPool = "defaultPool" TLSReencrypt = "reencrypt" TLSPassthrough = "passthrough" TLSRedirectInsecure = "redirect" TLSAllowInsecure = "allow" TLSNoInsecure = "none" LBServiceIPAMLabelAnnotation = "cis.f5.com/ipamLabel" LBServiceIPAnnotation = "cis.f5.com/ip" LBServiceHostAnnotation = "cis.f5.com/host" LBServicePartitionAnnotation = "cis.f5.com/partition" LBServiceMultiClusterServicesAnnotation = "cis.f5.com/multiClusterServices" HealthMonitorAnnotation = "cis.f5.com/health" LBServicePolicyNameAnnotation = "cis.f5.com/policyName" LegacyHealthMonitorAnnotation = "virtual-server.f5.com/health" PodConcurrentConnectionsAnnotation = "virtual-server.f5.com/pod-concurrent-connections" //Antrea NodePortLocal support NPLPodAnnotation = "nodeportlocal.antrea.io" NPLSvcAnnotation = "nodeportlocal.antrea.io/enabled" NodePortLocal = "nodeportlocal" Auto = "auto" )
const ( DEFAULT_MODE string = "tcp" DEFAULT_BALANCE string = "round-robin" DEFAULT_HTTP_PORT int32 = 80 DEFAULT_HTTPS_PORT int32 = 443 DEFAULT_SNAT string = "auto" // Constants for CustomProfile.Type as defined in CCCL CustomProfileAll string = "all" CustomProfileClient string = "clientside" CustomProfileServer string = "serverside" // Constants for CustomProfile.PeerCertMode PeerCertRequired = "require" PeerCertIgnored = "ignore" PeerCertDefault = PeerCertIgnored // Constants HttpRedirectIRuleName = "http_redirect_irule" // Constants HttpRedirectNoHostIRuleName = "http_redirect_irule_nohost" // Internal data group for https redirect HttpsRedirectDgName = "https_redirect_dg" TLSIRuleName = "tls_irule" ABPathIRuleName = "ab_deployment_path_irule" )
const ( // reference for profiles stored in BIG-IP BIGIP = "bigip" // reference for profiles stores as secrets in k8s cluster Secret = "secret" // refrence for profiles stored a mix of secret and bigip Hybrid = "hybrid" // reference for routes Certificate = "certificate" // reference for service“ ServiceRef = "service" )
constants for TLS references
const ( PolicySSLOption = "policySSL" AnnotationSSLOption = "annotation" RouteCertificateSSLOption = "routeCertificate" DefaultSSLOption = "defaultSSL" InvalidSSLOption = "invalid" )
constants for SSL options
const ( DataGroupAllowSourceRangeType = "ip" AllowSourceRangeDgName = "allowSourceRange" )
Allow Source Range
const ( StatusOk = "OK" StatusError = "ERROR" )
const ( Active discoveryMode = "active-active" StandBy discoveryMode = "active-standby" Ratio discoveryMode = "ratio" DefaultMode discoveryMode = "default" None AutoMonitorType = "none" ReadinessProbe AutoMonitorType = "readiness-probe" ServiceEndpoint AutoMonitorType = "service-endpoint" )
const ( SourceAddress = "sourceAddress" DestinationAddress = "destinationAddress" CookieRewrite = "cookieRewrite" CookieInsert = "cookieInsert" CookiePassive = "cookiePassive" CookieHash = "cookieHash" Hash = "hash" Carp = "carp" Universal = "universal" Disable = "none" )
const ( NotEnabled = iota InvalidInput NotRequested Requested Allocated )
const AbDeploymentDgName = "ab_deployment_dg"
Internal data group for ab deployment routes.
const DataGroupType = "string"
Internal DataGroup Default Type
const DefaultPoolsDgName = "default_pool_servername_dg"
Internal data group for default pool of a virtual server.
const EdgeHostsDgName = "ssl_edge_servername_dg"
Internal data group for edge termination.
const EdgeServerSslDgName = "ssl_edge_serverssl_dg"
Internal data group for edge termination that maps the host name to the false. This will help Irule to understand ssl should be disabled on serverside.
const PassthroughHostsDgName = "ssl_passthrough_servername_dg"
Internal data group for passthrough termination.
const ReencryptHostsDgName = "ssl_reencrypt_servername_dg"
Internal data group for reencrypt termination.
const ReencryptServerSslDgName = "ssl_reencrypt_serverssl_dg"
Internal data group for reencrypt termination that maps the host name to the server ssl profile.
Variables ¶
var ( // CalicoBlockaffinity : Calico's BlockAffinity CRD resource identifier CalicoBlockaffinity = schema.GroupVersionResource{ Group: "crd.projectcalico.org", Version: "v1", Resource: "blockaffinities", } )
var DEFAULT_GTM_PARTITION string
var DEFAULT_PARTITION string
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, "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 AS3NameFormatter ¶
AS3NameFormatter formarts resources names according to AS3 convention TODO: Should we use this? Or this will be done in agent?
func DeepEqualJSON ¶
func DeepEqualJSON(decl1, decl2 as3Declaration) bool
func JoinBigipPath ¶
Types ¶
type Agent ¶
type Agent struct { *PostManager Partition string ConfigWriter writer.Writer EventChan chan interface{} PythonDriverPID int HttpAddress string EnableIPV6 bool HAMode bool GTMPostManager *GTMPostManager // contains filtered or unexported fields }
func NewAgent ¶
func NewAgent(params AgentParams) *Agent
func (*Agent) PostConfig ¶
func (agent *Agent) PostConfig(rsConfig ResourceConfigRequest)
func (*Agent) PostGTMConfig ¶
func (agent *Agent) PostGTMConfig(config ResourceConfigRequest)
type AgentParams ¶
type AgentParams struct { PostParams PostParams GTMParams PostParams PrimaryClusterHealthProbeParams PrimaryClusterHealthProbeParams // VxlnParams VXLANParams Partition string LogLevel string VerifyInterval int VXLANName string PythonBaseDir string UserAgent string HttpAddress string EnableIPV6 bool DisableARP bool CCCLGTMAgent bool StaticRoutingMode bool MultiClusterMode string }
type AlternateBackend ¶ added in v2.13.0
type AlternateBackend struct { Service string `json:"service"` ServiceNamespace string `json:"serviceNamespace,omitempty"` Weight int32 `json:"weight,omitempty"` }
AlternateBackends lists backend svc of A/B
type AnalyticsProfiles ¶ added in v2.13.0
type AnalyticsProfiles struct {
HTTPAnalyticsProfile string `json:"http,omitempty"`
}
type AnnotationsUsed ¶ added in v2.12.0
type AutoMonitorType ¶ added in v2.15.0
type AutoMonitorType string
type BaseRouteConfig ¶
type BaseRouteConfig struct { TLSCipher TLSCipher `yaml:"tlsCipher"` DefaultTLS DefaultSSLProfile `yaml:"defaultTLS,omitempty"` DefaultRouteGroupConfig DefaultRouteGroupConfig `yaml:"defaultRouteGroup,omitempty"` AutoMonitor AutoMonitorType `yaml:"autoMonitor,omitempty"` AutoMonitorTimeout int `yaml:"autoMonitorTimeout,omitempty"` }
type BigIPSSLProfiles ¶
type BigIPSSLProfiles struct {
// contains filtered or unexported fields
}
type BlockAffinitycidr ¶ added in v2.19.1
type BlockAffinitycidr struct {
// contains filtered or unexported fields
}
type CRInformer ¶
type CRInformer struct {
// contains filtered or unexported fields
}
CRInformer defines the structure of Custom Resource Informer
type ClusterConfig ¶ added in v2.19.0
type ClusterConfig struct { *InformerStore // contains filtered or unexported fields }
ClusterConfig holds configuration specific for cluster
type ClusterDetails ¶ added in v2.14.0
type ClusterDetails struct { ClusterName string `yaml:"clusterName"` Secret string `yaml:"secret"` Ratio *int `yaml:"ratio"` AdminState clustermanager.AdminState `yaml:"adminState"` ServiceTypeLBDiscovery bool `yaml:"serviceTypeLBDiscovery"` }
type ClusterHandler ¶ added in v2.19.0
type ClusterHandler struct { ClusterConfigs map[string]*ClusterConfig HAPairClusterName string LocalClusterName string sync.RWMutex // contains filtered or unexported fields }
func NewClusterHandler ¶ added in v2.19.0
func NewClusterHandler(LocalClusterName string) *ClusterHandler
NewClusterHandler initializes the ClusterHandler with the required structures for each cluster.
func (*ClusterHandler) ProcessEvents ¶ added in v2.19.0
func (ch *ClusterHandler) ProcessEvents()
ProcessEvents processes events from the eventQueue, applying deduplication and passing unique events to the controller.
func (*ClusterHandler) RecordEvent ¶ added in v2.19.0
func (ch *ClusterHandler) RecordEvent(resourceEvent ResourceEvent)
RecordEvent handles all supported resource events, currently only serviceTypeLB events are handled
func (*ClusterHandler) ResourceEventWatcher ¶ added in v2.19.0
func (ch *ClusterHandler) ResourceEventWatcher()
ResourceEventWatcher watches for resource events
func (*ClusterHandler) ResourceStatusUpdater ¶ added in v2.19.0
func (ch *ClusterHandler) ResourceStatusUpdater()
ResourceStatusUpdater is a go routine that listens to the resourceStatusUpdateChan
func (*ClusterHandler) UpdateResourceStatus ¶ added in v2.19.0
func (ch *ClusterHandler) UpdateResourceStatus(rscStatus ResourceStatus)
UpdateResourceStatus updates the status of the resource
type CommonInformer ¶
type CommonInformer struct {
// contains filtered or unexported fields
}
type Controller ¶
type Controller struct { Partition string Agent *Agent PoolMemberType string UseNodeInternal bool TeemData *teem.TeemsData StaticRoutingMode bool OrchestrationCNI string StaticRouteNodeCIDR string ResourceStatusVSAddressMap map[resourceRef]string // contains filtered or unexported fields }
Controller defines the structure of K-Native and Custom Resource Controller
func NewController ¶
func NewController(params Params, startController bool) *Controller
NewController creates a new Controller Instance.
func (*Controller) CISHealthCheck ¶ added in v2.15.0
func (ctlr *Controller) CISHealthCheck()
func (*Controller) CISHealthCheckHandler ¶ added in v2.15.0
func (ctlr *Controller) CISHealthCheckHandler() http.Handler
func (*Controller) GetHostFromHostPath ¶
func (ctlr *Controller) GetHostFromHostPath(hostPath string) string
func (*Controller) GetNodePodCIDRMap ¶ added in v2.17.0
func (ctlr *Controller) GetNodePodCIDRMap() []BlockAffinitycidr
func (*Controller) GetPodsForService ¶
func (ctlr *Controller) GetPodsForService(namespace, serviceName, clusterName string, nplAnnotationRequired bool) []*v1.Pod
GetPodsForService returns podList with labels set to svc selector
func (*Controller) GetPoolBackendsForSvcTypeLB ¶ added in v2.19.0
func (ctlr *Controller) GetPoolBackendsForSvcTypeLB(svc *v1.Service, svcPort v1.ServicePort, clusterName string, multiClusterServices []cisapiv1.MultiClusterServiceReference) []SvcBackendCxt
GetPoolBackendsForSvcTypeLB returns the services associated with the ServiceTypeLB (svc names + weight)
func (*Controller) GetPoolBackendsForTS ¶ added in v2.19.0
func (ctlr *Controller) GetPoolBackendsForTS(pool *cisapiv1.TSPool, rscNamespace string) []SvcBackendCxt
return the services associated with a virtualserver pool (svc names + weight)
func (*Controller) GetPoolBackendsForVS ¶ added in v2.19.0
func (ctlr *Controller) GetPoolBackendsForVS(pool *cisapiv1.VSPool, rscNamespace string) []SvcBackendCxt
return the services associated with a virtualserver pool (svc names + weight)
func (*Controller) GetRouteBackends ¶ added in v2.14.0
func (ctlr *Controller) GetRouteBackends(route *routeapi.Route, clusterSvcs []cisapiv1.MultiClusterServiceReference) []RouteBackendCxt
GetRouteBackends returns the services associated with a route (names + weight)
func (*Controller) GetService ¶
func (ctlr *Controller) GetService(namespace, serviceName, clusterName string) *v1.Service
returns service obj with servicename
func (*Controller) GetServiceRouteWithoutHealthAnnotation ¶
func (ctlr *Controller) GetServiceRouteWithoutHealthAnnotation(svcKey MultiClusterServiceKey) *routeapi.Route
func (*Controller) GetServicesForPod ¶
func (*Controller) HandlePathBasedABIRule ¶
func (ctlr *Controller) HandlePathBasedABIRule( rsCfg *ResourceConfig, vsHost string, tlsTerminationType string, )
func (*Controller) HandlePathBasedABIRuleTS ¶ added in v2.19.0
func (ctlr *Controller) HandlePathBasedABIRuleTS(rsCfg *ResourceConfig)
func (*Controller) ProcessAssociatedExternalDNS ¶
func (ctlr *Controller) ProcessAssociatedExternalDNS(hostnames []string)
func (*Controller) ProcessNodeUpdate ¶
func (ctlr *Controller) ProcessNodeUpdate(obj interface{}, clusterName string)
ProcessNodeUpdate Check for a change in Node state
func (*Controller) ProcessRouteEDNS ¶
func (ctlr *Controller) ProcessRouteEDNS(hosts []string)
func (*Controller) RemoveIPAMCRHostSpec ¶
func (*Controller) SetupNodeProcessing ¶
func (ctlr *Controller) SetupNodeProcessing(clusterName string) error
func (*Controller) StartInformers ¶ added in v2.19.0
func (ctlr *Controller) StartInformers(clusterName string)
func (*Controller) StopInformers ¶ added in v2.19.0
func (ctlr *Controller) StopInformers(clusterName string)
func (*Controller) UpdatePoolHealthMonitors ¶
func (ctlr *Controller) UpdatePoolHealthMonitors(svcKey MultiClusterServiceKey)
UpdatePoolHealthMonitors we need to call this method on update of pod/ pool members update
func (*Controller) UpdatePoolMembersForNodeUpdate ¶ added in v2.14.0
func (ctlr *Controller) UpdatePoolMembersForNodeUpdate(clusterName string)
func (*Controller) VerifyIPAMAssociatedHostGroupExists ¶
func (ctlr *Controller) VerifyIPAMAssociatedHostGroupExists(key string) bool
Get List of VirtualServers associated with the IPAM resource
type ControllerMode ¶
type ControllerMode string
type CustomProfile ¶
type CustomProfile struct { Name string `json:"name"` Partition string `json:"-"` Context string `json:"context"` // 'clientside', 'serverside', or 'all' Ciphers string `json:"ciphers,omitempty"` CipherGroup string `json:"cipherGroup,omitempty"` TLS1_0Enabled *bool `json:"tls1_0Enabled"` TLS1_1Enabled *bool `json:"tls1_1Enabled"` TLS1_2Enabled *bool `json:"tls1_2Enabled"` TLS1_3Enabled *bool `json:"tls1_3Enabled"` ServerName string `json:"serverName,omitempty"` SNIDefault bool `json:"sniDefault,omitempty"` PeerCertMode string `json:"peerCertMode,omitempty"` CAFile string `json:"caFile,omitempty"` ChainCA string `json:"chainCA,omitempty"` Certificates []certificate RenegotiationEnabled *bool `json:"renegotiationEnabled,omitempty"` }
SSL Profile loaded from Secret or Route object
func NewCustomProfile ¶
func NewCustomProfile( profile ProfileRef, certificates []certificate, serverName string, sni bool, peerCertMode, caFile string, chainCA string, tlsCipher TLSCipher, renegotiation *bool, ) CustomProfile
type CustomProfileStore ¶
type CustomProfileStore struct { sync.Mutex Profs map[SecretKey]CustomProfile }
Store of CustomProfiles
type DataGroupNamespaceMap ¶
type DataGroupNamespaceMap map[string]*InternalDataGroup
type DefaultRouteGroupConfig ¶
type DefaultRouteGroupConfig struct { BigIpPartition string `yaml:"bigIpPartition"` // bigip Partition DefaultRouteGroupSpec ExtendedRouteGroupSpec `yaml:",inline"` }
type DefaultSSLProfile ¶
type DynamicInformers ¶ added in v2.19.1
type DynamicInformers struct { CalicoBlockAffinityInformer informers.GenericInformer // contains filtered or unexported fields }
DynamicInformers holds informers for third party integration
type EventNotifier ¶ added in v2.19.0
type EventNotifier struct {
// contains filtered or unexported fields
}
func NewEventNotifier ¶ added in v2.19.0
func NewEventNotifier(bfunc NewBroadcasterFunc) *EventNotifier
func (*EventNotifier) CreateNotifierForNamespace ¶ added in v2.19.0
func (en *EventNotifier) CreateNotifierForNamespace( namespace string, coreIntf corev1.CoreV1Interface, ) *NamespaceEventNotifier
Create a notifier for a namespace, or return the existing one
func (*EventNotifier) DeleteNotifierForNamespace ¶ added in v2.19.0
func (en *EventNotifier) DeleteNotifierForNamespace(namespace string)
func (*EventNotifier) GetNotifierForNamespace ¶ added in v2.19.0
func (en *EventNotifier) GetNotifierForNamespace( namespace string, ) *NamespaceEventNotifier
Get the notifier for a namespace
type ExtendedRouteGroupConfig ¶
type ExtendedRouteGroupConfig struct { Namespace string `yaml:"namespace"` // Group Identifier NamespaceLabel string `yaml:"namespaceLabel"` // Group Identifier BigIpPartition string `yaml:"bigIpPartition"` // bigip Partition ExtendedRouteGroupSpec `yaml:",inline"` }
type ExtendedRouteGroupSpec ¶
type GSLBPool ¶
type GSLBPool struct { Name string `json:"name"` RecordType string `json:"recordType"` LBMethod string `json:"LoadBalancingMode"` LBModeFallBack string `json:"fallbackMode"` PriorityOrder int `json:"order"` Ratio int `json:"ratio"` Members []string `json:"members"` Monitors []Monitor `json:"monitors,omitempty"` DataServer string }
type GTMPartitionConfig ¶
type GTMPostManager ¶ added in v2.15.0
type GTMPostManager struct { *PostManager Partition string }
func NewGTMPostManager ¶ added in v2.15.0
func NewGTMPostManager(params AgentParams) *GTMPostManager
func (*GTMPostManager) PostGTMConfig ¶ added in v2.15.0
func (gtmPostManager *GTMPostManager) PostGTMConfig(rsConfig ResourceConfigRequest)
type HAClusterConfig ¶ added in v2.14.0
type HAClusterConfig struct { //HAMode HAMode `yaml:"mode"` PrimaryClusterEndPoint string `yaml:"primaryEndPoint"` ProbeInterval int `yaml:"probeInterval"` RetryInterval int `yaml:"retryInterval"` PrimaryCluster ClusterDetails `yaml:"primaryCluster"` SecondaryCluster ClusterDetails `yaml:"secondaryCluster"` }
type HAMode ¶ added in v2.14.0
type HAMode struct {
// type can be active-active, active-standby, ratio
Type discoveryMode `yaml:"type"`
}
type HAModeType ¶ added in v2.14.0
type HAModeType string
type IRule ¶
type IRule struct { Name string `json:"name"` Partition string `json:"-"` Code string `json:"apiAnonymous"` }
iRules
type InformerStore ¶ added in v2.19.0
type InformerStore struct {
// contains filtered or unexported fields
}
type InternalDataGroup ¶
type InternalDataGroup struct { Name string `json:"name"` Partition string `json:"-"` Type string `json:"-"` Records InternalDataGroupRecords `json:"records"` }
func (*InternalDataGroup) AddOrUpdateRecord ¶
func (idg *InternalDataGroup) AddOrUpdateRecord(name, data string) bool
func (*InternalDataGroup) RemoveRecord ¶
func (idg *InternalDataGroup) RemoveRecord(name string) bool
type InternalDataGroupMap ¶
type InternalDataGroupMap map[NameRef]DataGroupNamespaceMap
type InternalDataGroupRecord ¶
type InternalDataGroupRecords ¶
type InternalDataGroupRecords []InternalDataGroupRecord
func (InternalDataGroupRecords) Len ¶
func (slice InternalDataGroupRecords) Len() int
func (InternalDataGroupRecords) Less ¶
func (slice InternalDataGroupRecords) Less(i, j int) bool
func (InternalDataGroupRecords) Swap ¶
func (slice InternalDataGroupRecords) Swap(i, j int)
type L4AppsStore ¶ added in v2.19.0
type L4AppsStore map[l4AppConfig]resourceRef
L4AppsStore contains TypeLB service details.key is IP
type LTMConfig ¶
type LTMConfig map[string]*PartitionConfig
LTMConfig contain partition based ResourceMap
func (LTMConfig) GetAllPoolMembers ¶
func (lc LTMConfig) GetAllPoolMembers() []PoolMember
type Monitor ¶
type Monitor struct { Name string `json:"name"` Partition string `json:"-"` Interval int `json:"interval,omitempty"` Type string `json:"type,omitempty"` Send string `json:"send,omitempty"` Recv string `json:"recv"` Timeout int `json:"timeout,omitempty"` TargetPort int32 `json:"targetPort,omitempty"` Path string `json:"path,omitempty"` TimeUntilUp *int `json:"timeUntilUp,omitempty"` SSLProfile string `json:"sslProfile,omitempty"` }
Monitor is Pool health monitor
type MonitorName ¶
type MultiClusterResourceStore ¶ added in v2.14.0
type MultiClusterServiceConfig ¶ added in v2.14.0
type MultiClusterServiceConfig struct {
// contains filtered or unexported fields
}
type MultiClusterServiceKey ¶ added in v2.14.0
type MultiClusterServiceKey struct {
// contains filtered or unexported fields
}
type MultiPoolPersistence ¶ added in v2.15.0
type NPLAnnotation ¶
type NPLAnnotation struct { PodPort int32 `json:"podPort"` NodeIP string `json:"nodeIP"` NodePort int32 `json:"nodePort"` }
NPL information from pod annotation
type NPLStore ¶
type NPLStore map[string]NPLAnnoations
key is namespace/pod. stores list of npl annotation on pod
type NRInformer ¶
type NRInformer struct {
// contains filtered or unexported fields
}
NRInformer is informer context for Native Resources of Kubernetes/Openshift
type NSInformer ¶
type NSInformer struct {
// contains filtered or unexported fields
}
type NamespaceEventNotifier ¶ added in v2.19.0
type NamespaceEventNotifier struct {
// contains filtered or unexported fields
}
func (*NamespaceEventNotifier) RecordEvent ¶ added in v2.19.0
func (nen *NamespaceEventNotifier) RecordEvent( obj runtime.Object, eventType, reason, message string, )
type NamespaceEventNotifierMap ¶ added in v2.19.0
type NamespaceEventNotifierMap map[string]*NamespaceEventNotifier
type NewBroadcasterFunc ¶ added in v2.19.0
type NewBroadcasterFunc func() record.EventBroadcaster
type NodeInformer ¶ added in v2.14.0
type NodeInformer struct {
// contains filtered or unexported fields
}
type Params ¶
type Params struct { Config *rest.Config Namespaces []string NamespaceLabel string Partition string Agent *Agent PoolMemberType string VXLANName string VXLANMode string CiliumTunnelName string UseNodeInternal bool NodePollInterval int NodeLabelSelector string IPAM bool IPAMClusterLabel string DefaultRouteDomain int32 Mode ControllerMode GlobalExtendedSpecConfigmap string RouteLabel string StaticRoutingMode bool OrchestrationCNI string StaticRouteNodeCIDR string MultiClusterMode string LoadBalancerClass string ManageLoadBalancerClassOnly bool IpamNamespace string LocalClusterName string }
Params defines parameters
type PartitionConfig ¶
type PartitionConfig struct { ResourceMap ResourceMap Priority *int PriorityMutex sync.RWMutex }
PartitionConfig contains ResourceMap and priority of partition
type PersistMetaData ¶ added in v2.16.0
type PersistMetaData struct { Name string `json:"name,omitempty"` Netmask string `json:"netmask,omitempty"` Key string `json:"key,omitempty"` Timeout int32 `json:"timeout,omitempty"` Expiry string `json:"expiry,omitempty"` Offset int32 `json:"offset,omitempty"` Length int32 `json:"length,omitempty"` }
type Policy ¶
type Policy struct { Name string `json:"name"` Partition string `json:"-"` SubPath string `json:"subPath,omitempty"` Controls []string `json:"controls,omitempty"` Description string `json:"description,omitempty"` Legacy bool `json:"legacy,omitempty"` Requires []string `json:"requires,omitempty"` Rules Rules `json:"rules,omitempty"` Strategy string `json:"strategy,omitempty"` }
Policy Virtual policy
type Pool ¶
type Pool struct { Name string `json:"name"` Partition string `json:"-"` ServiceName string `json:"-"` ServiceNamespace string `json:"-"` ServicePort intstr.IntOrString `json:"-"` ServicePortUsed bool `json:"-"` Balance string `json:"loadBalancingMethod,omitempty"` Members []PoolMember `json:"members"` NodeMemberLabel string `json:"-"` MonitorNames []MonitorName `json:"monitors,omitempty"` MinimumMonitors intstr.IntOrString `json:"minimumMonitors,omitempty"` ReselectTries int32 `json:"reselectTries,omitempty"` ServiceDownAction string `json:"serviceDownAction,omitempty"` SlowRampTime int32 `json:"slowRampTime,omitempty"` Weight int32 `json:"weight,omitempty"` AlternateBackends []AlternateBackend `json:"alternateBackends"` MultiClusterServices []cisapiv1.MultiClusterServiceReference `json:"_"` Cluster string `json:"-"` ConnectionLimit int32 `json:"-"` ImplicitSvcSearchEnabled bool `json:"-"` BigIPRouteDomain int32 `json:"bigipRouteDomain,omitempty"` }
Pool config
type PoolIdentifier ¶ added in v2.14.0
type PoolIdentifier struct {
// contains filtered or unexported fields
}
type PoolMember ¶
type PoolMember struct { Address string `json:"address"` Port int32 `json:"port"` MemberType string `json:"memberType"` SvcPort int32 `json:"svcPort,omitempty"` Session string `json:"session,omitempty"` AdminState string `json:"adminState,omitempty"` ConnectionLimit int32 `json:"connectionLimit,omitempty"` Ratio int `json:"ratio,omitempty"` }
type PoolMemberCache ¶
type PoolMemberCache map[MultiClusterServiceKey]*poolMembersInfo
PoolMemberCache key is namespace/service
type PostManager ¶
type PostManager struct { PostParams PrimaryClusterHealthProbeParams PrimaryClusterHealthProbeParams AS3VersionInfo as3VersionInfo // contains filtered or unexported fields }
func NewPostManager ¶
func NewPostManager(params AgentParams, gtmPostMgr bool) *PostManager
func (*PostManager) GetAS3DeclarationFromBigIP ¶ added in v2.14.0
func (postMgr *PostManager) GetAS3DeclarationFromBigIP() (map[string]interface{}, error)
func (*PostManager) GetBigipAS3Version ¶
func (postMgr *PostManager) GetBigipAS3Version() (string, string, string, error)
func (*PostManager) GetBigipRegKey ¶
func (postMgr *PostManager) GetBigipRegKey() (string, error)
GetBigipRegKey ...
func (*PostManager) IsBigIPAppServicesAvailable ¶ added in v2.15.0
func (postMgr *PostManager) IsBigIPAppServicesAvailable() error
Method to verify if App Services are installed or CIS as3 version is compatible with BIG-IP, it will return with error if any one of the requirements are not met
type PostParams ¶
type PrimaryClusterHealthProbeParams ¶ added in v2.14.0
type ProcessedHostPath ¶
Store of CustomProfiles
type ProfileAdapt ¶ added in v2.18.0
type ProfileHTTP2 ¶ added in v2.13.0
type ProfileRef ¶
type ProfileRef struct { Name string `json:"name"` Partition string `json:"partition"` Context string `json:"context"` // 'clientside', 'serverside', or 'all' // Used as reference to which Namespace/Ingress this profile came from // (for deletion purposes) Namespace string `json:"-"` BigIPProfile bool `json:"-"` }
ProfileRef is a Reference to pre-existing profiles
func ConvertStringToProfileRef ¶
func ConvertStringToProfileRef(profileName, context, ns string) ProfileRef
ConvertStringToProfileRef converts strings to profile references
type ProfileRefs ¶
type ProfileRefs []ProfileRef
ProfileRefs is a list of ProfileRef
func (ProfileRefs) Len ¶
func (slice ProfileRefs) Len() int
func (ProfileRefs) Less ¶
func (slice ProfileRefs) Less(i, j int) bool
func (ProfileRefs) Swap ¶
func (slice ProfileRefs) Swap(i, j int)
type ProfileTCP ¶
type ResourceConfig ¶
type ResourceConfig struct { MetaData metaData `json:"-"` Virtual Virtual `json:"virtual,omitempty"` Pools Pools `json:"pools,omitempty"` Policies Policies `json:"policies,omitempty"` Monitors []Monitor `json:"monitors,omitempty"` ServiceAddress []ServiceAddress `json:"serviceAddress,omitempty"` IRulesMap IRulesMap IntDgMap InternalDataGroupMap // contains filtered or unexported fields }
ResourceConfig contains a set of LTM resources to create a Virtual Server
func (*ResourceConfig) AddRuleToPolicy ¶
func (rsCfg *ResourceConfig) AddRuleToPolicy(policyName, partition string, rules *Rules)
func (*ResourceConfig) FindPolicy ¶
func (rc *ResourceConfig) FindPolicy(controlType string) *Policy
FindPolicy gets the information of a policy
func (*ResourceConfig) GetName ¶
func (cfg *ResourceConfig) GetName() string
func (*ResourceConfig) SetPolicy ¶
func (rc *ResourceConfig) SetPolicy(policy Policy)
SetPolicy sets a policy
type ResourceConfigRequest ¶
type ResourceConfigRequest struct {
// contains filtered or unexported fields
}
type ResourceConfigs ¶
type ResourceConfigs []*ResourceConfig
ResourceConfigs is group of ResourceConfig
type ResourceEvent ¶ added in v2.19.0
type ResourceEvent struct {
// contains filtered or unexported fields
}
type ResourceMap ¶
type ResourceMap map[string]*ResourceConfig
ResourceMap key is resource name, value is pointer to config. May be shared.
type ResourceStatus ¶ added in v2.19.0
type ResourceStatus struct { ResourceObj interface{} ResourceKey resourceRef UpdateAttempts int Timestamp metav1.Time IPSet bool // helps in event creation of LB service as it helps to know if the status update is for IP setting or unsetting ClearKeyFromCache bool // helps clear the cache in case of delete events }
type ResourceStore ¶
type ResourceStore struct {
// contains filtered or unexported fields
}
ResourceStore contain processed LTM and GTM resource data
func NewResourceStore ¶
func NewResourceStore() *ResourceStore
NewResourceStore is Constructor for ResourceStore
func (*ResourceStore) Init ¶
func (rs *ResourceStore) Init()
Init is Receiver to initialize the object.
type RouteBackendCxt ¶
type Rule ¶
type Rule struct { Name string `json:"name"` FullURI string `json:"-"` Ordinal int `json:"ordinal,omitempty"` Actions []*action `json:"actions,omitempty"` Conditions []*condition `json:"conditions,omitempty"` }
Rule config for a Policy
type ServiceAddress ¶
type ServiceAddress struct { ArpEnabled bool `json:"arpEnabled,omitempty"` ICMPEcho string `json:"icmpEcho,omitempty"` RouteAdvertisement string `json:"routeAdvertisement,omitempty"` TrafficGroup string `json:"trafficGroup,omitempty"` SpanningEnabled bool `json:"spanningEnabled,omitempty"` }
ServiceAddress Service IP address definition (BIG-IP virtual-address).
type ServiceTypeLBHealthMonitor ¶
type ServiceTypeLBHealthMonitor struct { Interval int `json:"interval"` Timeout int `json:"timeout"` }
This is the format for each item in the health monitor annotation used in the ServiceType LB objects.
type SourceAddrTranslation ¶
SourceAddrTranslation is Virtual Server Source Address Translation
type StatusUpdate ¶ added in v2.19.0
type StatusUpdate struct { ResourceStatusUpdateTracker sync.Map // Tracks the last time a resource was updated, helps to ensure latest status update ResourceStatusUpdateChan chan ResourceStatus // Channel holds the resource status // contains filtered or unexported fields }
func NewStatusUpdater ¶ added in v2.19.0
func NewStatusUpdater() *StatusUpdate
NewStatusUpdater creates a new statusUpdater
type SvcBackendCxt ¶ added in v2.13.0
type TLSContext ¶
type TLSContext struct {
// contains filtered or unexported fields
}
type TLSVersion ¶
type TLSVersion string
const ( TLSVerion1_0 TLSVersion = "1.0" TLSVerion1_1 TLSVersion = "1.1" TLSVerion1_2 TLSVersion = "1.2" TLSVerion1_3 TLSVersion = "1.3" )
type VSSpecProperties ¶ added in v2.12.0
type VSSpecProperties struct {
PoolWAF bool
}
type Virtual ¶
type Virtual struct { Name string `json:"name"` PoolName string `json:"pool,omitempty"` Partition string `json:"-"` Destination string `json:"destination"` Enabled bool `json:"enabled"` IpProtocol string `json:"ipProtocol,omitempty"` SourceAddrTranslation SourceAddrTranslation `json:"sourceAddressTranslation,omitempty"` Policies []nameRef `json:"policies,omitempty"` Profiles ProfileRefs `json:"profiles,omitempty"` IRules []string `json:"rules,omitempty"` Description string `json:"description,omitempty"` VirtualAddress *virtualAddress `json:"-"` AdditionalVirtualAddresses []string `json:"additionalVirtualAddresses,omitempty"` BigIPRouteDomain int32 `json:"bigipRouteDomain,omitempty"` SNAT string `json:"snat,omitempty"` ConnectionMirroring string `json:"connectionMirroring,omitempty"` WAF string `json:"waf,omitempty"` Firewall string `json:"firewallPolicy,omitempty"` LogProfiles []string `json:"logProfiles,omitempty"` ProfileL4 string `json:"profileL4,omitempty"` ProfileMultiplex string `json:"profileMultiplex,omitempty"` HTTPCompressionProfile string `json:"profileHTTPCompression,omitempty"` ProfileWebSocket string `json:"profileWebSocket,omitempty"` ProfileDOS string `json:"profileDOS,omitempty"` ProfileBotDefense string `json:"profileBotDefense,omitempty"` TCP ProfileTCP `json:"tcp,omitempty"` HTTP2 ProfileHTTP2 `json:"http2,omitempty"` Mode string `json:"mode,omitempty"` TranslateServerAddress bool `json:"translateServerAddress"` TranslateServerPort bool `json:"translateServerPort"` Source string `json:"source,omitempty"` AllowVLANs []string `json:"allowVlans,omitempty"` PersistenceProfile string `json:"persistenceProfile,omitempty"` TLSTermination string `json:"-"` AllowSourceRange []string `json:"allowSourceRange,omitempty"` HttpMrfRoutingEnabled *bool `json:"httpMrfRoutingEnabled,omitempty"` IpIntelligencePolicy string `json:"ipIntelligencePolicy,omitempty"` AutoLastHop string `json:"lastHop,omitempty"` AnalyticsProfiles AnalyticsProfiles `json:"analyticsProfiles,omitempty"` MultiPoolPersistence MultiPoolPersistence `json:"multiPoolPersistence,omitempty"` HTMLProfile string `json:"htmlProfile,omitempty"` ProfileAccess string `json:"profileAccess,omitempty"` PolicyPerRequestAccess string `json:"policyPerRequestAccess,omitempty"` FTPProfile string `json:"ftpProfile,omitempty"` ProfileAdapt ProfileAdapt `json:"profileAdapt,omitempty"` }
Virtual server config
func (*Virtual) AddOrUpdateProfile ¶
func (v *Virtual) AddOrUpdateProfile(prof ProfileRef) bool
AddOrUpdateProfile updates profile to rsCfg
func (*Virtual) SetVirtualAddress ¶
SetVirtualAddress sets a VirtualAddress
type WideIP ¶
type WideIP struct { DomainName string `json:"name"` ClientSubnetPreferred *bool `json:"clientSubnetPreferred,omitempty"` RecordType string `json:"recordType"` LBMethod string `json:"LoadBalancingMode"` PersistenceEnabled bool `json:"persistenceEnabled"` PersistCidrIPv4 uint8 `json:"persistCidrIpv4"` PersistCidrIPv6 uint8 `json:"persistCidrIpv6"` TTLPersistence uint32 `json:"ttlPersistence"` Pools []GSLBPool `json:"pools"` UID string }
Source Files
¶
- backend.go
- clusterHandler.go
- constants.go
- controller.go
- eventNotifier.go
- gtmBackend.go
- informers.go
- multiClusterHealthProbeManager.go
- multiClusterInformers.go
- multiClusterWorker.go
- nativeResourceWorker.go
- node_poll_handler.go
- postManager.go
- profile.go
- pythonDriver.go
- resourceConfig.go
- responseHandler.go
- routing.go
- statusUpdateUtils.go
- types.go
- validate.go
- worker.go