Documentation ¶
Overview ¶
-
- Copyright (c) 2016-2019, F5 Networks, Inc. *
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
Index ¶
- Constants
- Variables
- func DeepEqualJSON(decl1, decl2 as3Declaration) bool
- func ExtractVirtualAddressAndPort(str string) (string, int)
- func NewObjectDependencies(obj interface{}) (ObjectDependency, ObjectDependencies)
- func RegisterBigIPSchemaTypes()
- func ValidateAndOverrideAS3JsonData(srcJsonData string, dstJsonData string) string
- func ValidateJSONStringAndFetchObject(jsonData string, jsonObj *map[string]interface{}) error
- type AS3Config
- type AS3ConfigMap
- type AS3Manager
- type AnnotationHealthMonitor
- type AnnotationHealthMonitors
- type BigIPConfig
- type BigIPv4FormatChecker
- type BigIPv6FormatChecker
- type ConfigMap
- type CustomProfile
- type CustomProfileStore
- type DataGroupNamespaceMap
- type EventNotifier
- type F5Resources
- type FlattenConflictFunc
- type FwdRuleMap
- type HostFwdRuleMap
- type IApp
- type IRule
- type IRulesMap
- type InternalDataGroup
- type InternalDataGroupMap
- type InternalDataGroupRecord
- type InternalDataGroupRecords
- type InternalF5Resources
- type InternalF5ResourcesGroup
- 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) ConfigWriter() writer.Writer
- func (appMgr *Manager) DeleteCISManagedPartition()
- func (appMgr *Manager) GetAllWatchedNamespaces() []string
- func (appMgr *Manager) GetBIGIPTrustedCerts() string
- func (appMgr *Manager) GetNamespaceLabelInformer() cache.SharedIndexInformer
- func (appMgr *Manager) GetWatchedNamespaces() []string
- func (appMgr *Manager) IsNodePort() bool
- func (appMgr *Manager) ProcessNodeUpdate(obj interface{}, err error)
- func (appMgr *Manager) Run(stopCh <-chan struct{})
- func (appMgr *Manager) SetupAS3Informers() error
- func (appMgr *Manager) UseNodeInternal() bool
- type Member
- type Monitor
- type Monitors
- type NamespaceEventNotifier
- type NamespaceEventNotifierMap
- type NewBroadcasterFunc
- type Node
- type ObjectDependencies
- type ObjectDependency
- type ObjectDependencyMap
- type Params
- type PartitionMap
- type Policies
- type Policy
- type Pool
- type Pools
- type ProfileRef
- type ProfileRefs
- type Record
- type ResourceConfig
- func (rc *ResourceConfig) AddRuleToPolicy(policyName string, rule *Rule)
- func (rc *ResourceConfig) DeleteRouteProfile(namespace, name string)
- func (rc *ResourceConfig) DeleteRuleFromPolicy(policyName string, rule *Rule, ...)
- func (rc *ResourceConfig) FindPolicy(controlType string) *Policy
- func (cfg *ResourceConfig) GetName() string
- func (cfg *ResourceConfig) GetPartition() string
- func (rc *ResourceConfig) MergeRules(mergedRulesMap map[string]map[string]mergedRuleEntry)
- func (rc *ResourceConfig) RemoveMonitor(pool string) bool
- func (rc *ResourceConfig) RemovePolicy(policy Policy)
- func (rc *ResourceConfig) RemovePool(namespace, poolName string, appMgr *Manager) (bool, *serviceKey)
- func (rc *ResourceConfig) RemovePoolAt(offset int) bool
- func (rc *ResourceConfig) SetMonitor(pool *Pool, monitor Monitor) bool
- func (rc *ResourceConfig) SetPolicy(policy Policy)
- func (rc *ResourceConfig) SortMonitors()
- func (rc *ResourceConfig) UnmergeRule(ruleName string, mergedRulesMap map[string]map[string]mergedRuleEntry) bool
- type ResourceConfigMap
- type ResourceConfigs
- type ResourceEnumFunc
- type ResourceInterface
- type ResourceMap
- type Resources
- func (rs *Resources) Assign(svcKey serviceKey, name string, cfg *ResourceConfig)
- func (rs *Resources) CountOf(svcKey serviceKey) int
- func (rs *Resources) Delete(svcKey serviceKey, name string) bool
- func (rs *Resources) DeleteKeyRef(sKey serviceKey, name string) bool
- func (rs *Resources) ForEach(f ResourceEnumFunc)
- func (rs *Resources) Get(svcKey serviceKey, name string) (*ResourceConfig, bool)
- func (rs *Resources) GetAll(svcKey serviceKey) ResourceConfigs
- func (rs *Resources) GetAllResources() ResourceConfigs
- func (rs *Resources) GetAllWithName(name string) (ResourceConfigs, []serviceKey)
- func (rs *Resources) GetByName(name string) (*ResourceConfig, bool)
- func (rs *Resources) Init()
- func (rs *Resources) PoolCount() int
- func (rs *Resources) UpdateDependencies(newKey ObjectDependency, newDeps ObjectDependencies, ...) ([]ObjectDependency, []ObjectDependency)
- func (rs *Resources) VirtualCount() int
- type RouteConfig
- type RouteService
- type Routes
- type RoutesMap
- type Rule
- type Rules
- type ServiceFwdRuleMap
- type SourceAddrTranslation
- type Virtual
- func (v *Virtual) AddIRule(ruleName string) bool
- func (v *Virtual) AddOrUpdateProfile(prof ProfileRef) bool
- func (v *Virtual) GetProfileCountByContext(context string) int
- func (v *Virtual) ReferencesProfile(profile CustomProfile) bool
- func (v *Virtual) RemoveIRule(ruleName string) bool
- func (v *Virtual) RemoveProfile(prof ProfileRef) bool
- func (v *Virtual) SetVirtualAddress(bindAddr string, port int32)
- func (v *Virtual) ToString() string
- type Virtuals
- type WatchedNamespaces
Constants ¶
const ( HTTP virtuals = iota HTTPS HTTPANDS )
Determines which virtual server needs a specific feature applied.
const AppRootDep = "App-Root-Annotation"
const DEFAULT_BALANCE string = "round-robin"
const DEFAULT_HTTPS_PORT int32 = 443
const DEFAULT_HTTP_PORT int32 = 80
const DEFAULT_MODE string = "tcp"
const DefaultConfigMapLabel = "f5type in (virtual-server)"
const RuleDep = "Rule"
const ServiceDep = "Service"
const URLDep = "URL-Rewrite-Annotation"
const WhitelistDep = "Whitelist-Annotation"
Variables ¶
var DEFAULT_PARTITION string
FIXME: remove this global variable.
var RoutesProcessed []*routeapi.Route
Functions ¶
func DeepEqualJSON ¶ added in v1.13.0
func DeepEqualJSON(decl1, decl2 as3Declaration) bool
func ExtractVirtualAddressAndPort ¶ added in v1.14.0
func NewObjectDependencies ¶ added in v1.4.1
func NewObjectDependencies( obj interface{}, ) (ObjectDependency, ObjectDependencies)
NewObjectDependencies parses an object and returns a map of its dependencies
func RegisterBigIPSchemaTypes ¶ added in v1.3.0
func RegisterBigIPSchemaTypes()
Add new data format to the library
func ValidateAndOverrideAS3JsonData ¶ added in v1.12.0
func ValidateJSONStringAndFetchObject ¶ added in v1.12.0
Types ¶
type AS3Config ¶ added in v1.13.0
type AS3Config struct {
// contains filtered or unexported fields
}
AS3Config consists of all the AS3 related configurations
type AS3ConfigMap ¶ added in v1.13.0
type AS3ConfigMap struct { Name string // AS3 specific ConfigMap name Data as3Declaration // if AS3 Name is present, populate this with AS3 template data. }
ActiveAS3ConfigMap user defined ConfigMap for global availability.
type AS3Manager ¶ added in v1.13.0
type AS3Manager struct { // Watched namespaces WatchedNS WatchedNamespaces As3SchemaLatest string // Override existing as3 declaration with this configmap OverrideAS3Decl string // Path of schemas reside locally SchemaLocalPath string // Flag to check schema validation using reference or string As3SchemaFlag bool // Processed routes for updating Admit Status RoutesProcessed RoutesMap // POSTs configuration to BIG-IP using AS3 PostManager *postmanager.PostManager // To put list of tenants in BIG-IP REST call URL that are in AS3 declaration FilterTenants bool // contains filtered or unexported fields }
AS3Manager holds all the AS3 orchestration specific Data
type AnnotationHealthMonitor ¶ added in v1.3.0
type AnnotationHealthMonitor struct { Path string `json:"path"` Interval int `json:"interval"` Send string `json:"send"` Recv string `json:"recv"` Timeout int `json:"timeout"` Type string `json:"type"` }
This is the format for each item in the health monitor annotation used in the Ingress and Route objects.
type AnnotationHealthMonitors ¶ added in v1.3.0
type AnnotationHealthMonitors []AnnotationHealthMonitor
type BigIPConfig ¶
type BigIPConfig struct { Virtuals Virtuals `json:"virtualServers,omitempty"` Pools Pools `json:"pools,omitempty"` Monitors Monitors `json:"monitors,omitempty"` Policies []Policy `json:"l7Policies,omitempty"` CustomProfiles []CustomProfile `json:"customProfiles,omitempty"` IRules []IRule `json:"iRules,omitempty"` InternalDataGroups []InternalDataGroup `json:"internalDataGroups,omitempty"` IApps []IApp `json:"iapps,omitempty"` }
Config of all resources to configure on the BIG-IP
func (*BigIPConfig) SortMonitors ¶ added in v1.2.0
func (cfg *BigIPConfig) SortMonitors()
func (*BigIPConfig) SortPools ¶ added in v1.2.0
func (cfg *BigIPConfig) SortPools()
func (*BigIPConfig) SortVirtuals ¶ added in v1.2.0
func (cfg *BigIPConfig) SortVirtuals()
type BigIPv4FormatChecker ¶ added in v1.3.0
type BigIPv4FormatChecker struct{}
Big-IP ipv4/ipv6 checkers
func (BigIPv4FormatChecker) IsFormat ¶ added in v1.3.0
func (f BigIPv4FormatChecker) IsFormat(input interface{}) bool
type BigIPv6FormatChecker ¶ added in v1.3.0
type BigIPv6FormatChecker struct{}
func (BigIPv6FormatChecker) IsFormat ¶ added in v1.3.0
func (f BigIPv6FormatChecker) IsFormat(input interface{}) bool
type ConfigMap ¶
type ConfigMap struct {
VirtualServer struct {
Backend configMapBackend `json:"backend"`
Frontend configMapFrontend `json:"frontend"`
} `json:"virtualServer"`
}
Used to unmarshal ConfigMap data
type CustomProfile ¶ added in v1.2.0
type CustomProfile struct { Name string `json:"name"` Partition string `json:"-"` Context string `json:"context"` // 'clientside', 'serverside', or 'all' Cert string `json:"cert"` Key string `json:"key"` ServerName string `json:"serverName,omitempty"` SNIDefault bool `json:"sniDefault,omitempty"` PeerCertMode string `json:"peerCertMode,omitempty"` CAFile string `json:"caFile,omitempty"` }
SSL Profile loaded from Secret or Route object
func NewCustomProfile ¶ added in v1.2.0
func NewCustomProfile( profile ProfileRef, cert, key, serverName string, sni bool, peerCertMode, caFile string, ) CustomProfile
type CustomProfileStore ¶ added in v1.2.0
Store of CustomProfiles
func NewCustomProfiles ¶ added in v1.2.0
func NewCustomProfiles() *CustomProfileStore
Contructor for CustomProfiles
type DataGroupNamespaceMap ¶ added in v1.4.0
type DataGroupNamespaceMap map[string]*InternalDataGroup
func (DataGroupNamespaceMap) FlattenNamespaces ¶ added in v1.4.0
func (dgnm DataGroupNamespaceMap) FlattenNamespaces() *InternalDataGroup
type EventNotifier ¶ added in v1.4.0
type EventNotifier struct {
// contains filtered or unexported fields
}
func NewEventNotifier ¶ added in v1.4.0
func NewEventNotifier(bfunc NewBroadcasterFunc) *EventNotifier
type F5Resources ¶ added in v1.11.0
type F5Resources struct { Virtual virtuals // 0 - HTTP, 1 - HTTPS, 2 - HTTP/S WAFPolicy string }
type FlattenConflictFunc ¶ added in v1.4.0
DataGroup flattening.
type FwdRuleMap ¶ added in v1.4.0
key is path regex, data unused. Using a map as go doesn't have a set type.
type HostFwdRuleMap ¶ added in v1.4.0
type HostFwdRuleMap map[string]FwdRuleMap
key is fqdn host name, data is map of paths.
type IApp ¶ added in v1.2.0
type IApp struct { Name string `json:"name"` Partition string `json:"-"` IApp string `json:"template"` IAppPoolMemberTable *iappPoolMemberTable `json:"poolMemberTable,omitempty"` IAppOptions map[string]string `json:"options,omitempty"` IAppTables map[string]iappTableEntry `json:"tables,omitempty"` IAppVariables map[string]string `json:"variables,omitempty"` }
IApp
type IRule ¶ added in v1.2.0
type IRule struct { Name string `json:"name"` Partition string `json:"-"` Code string `json:"apiAnonymous"` }
iRules
type InternalDataGroup ¶ added in v1.2.0
type InternalDataGroup struct { Name string `json:"name"` Partition string `json:"-"` Records InternalDataGroupRecords `json:"records"` }
func NewInternalDataGroup ¶ added in v1.2.0
func NewInternalDataGroup(name, partition string) *InternalDataGroup
func (*InternalDataGroup) AddOrUpdateRecord ¶ added in v1.2.0
func (idg *InternalDataGroup) AddOrUpdateRecord(name, data string) bool
func (*InternalDataGroup) RemoveRecord ¶ added in v1.2.0
func (idg *InternalDataGroup) RemoveRecord(name string) bool
type InternalDataGroupMap ¶ added in v1.2.0
type InternalDataGroupMap map[nameRef]DataGroupNamespaceMap
type InternalDataGroupRecord ¶ added in v1.2.0
type InternalDataGroupRecords ¶ added in v1.2.0
type InternalDataGroupRecords []InternalDataGroupRecord
func (InternalDataGroupRecords) Len ¶ added in v1.2.0
func (slice InternalDataGroupRecords) Len() int
func (InternalDataGroupRecords) Less ¶ added in v1.2.0
func (slice InternalDataGroupRecords) Less(i, j int) bool
func (InternalDataGroupRecords) Swap ¶ added in v1.2.0
func (slice InternalDataGroupRecords) Swap(i, j int)
type InternalF5Resources ¶ added in v1.11.0
type InternalF5Resources map[Record]F5Resources
type InternalF5ResourcesGroup ¶ added in v1.11.1
type InternalF5ResourcesGroup map[string]InternalF5Resources
Routes annotation features that are possible by an AS3 declaration can be added here. Initially enabling a WAF policy is added as an AS3 feature. | Host + Path | Virtual Server to Apply | WAF Policy Name | |-------------|-------------------------|-----------------| Host + Path is a unique record. The columns can be extended to add future features. InternalF5ResourcesGroup takes OpenShift/Kubernetes namespace as key
type Manager ¶
type Manager struct { // Orchestration agent: AS3 or CCCL Agent string AS3Manager // 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 (*Manager) ConfigWriter ¶
func (*Manager) DeleteCISManagedPartition ¶ added in v1.12.0
func (appMgr *Manager) DeleteCISManagedPartition()
func (*Manager) GetAllWatchedNamespaces ¶ added in v1.9.2
Get all Namespaces being watched based on Namespaces provided, Namespace Label or all
func (*Manager) GetBIGIPTrustedCerts ¶ added in v1.13.0
Read certificate from configmap
func (*Manager) GetNamespaceLabelInformer ¶
func (appMgr *Manager) GetNamespaceLabelInformer() cache.SharedIndexInformer
func (*Manager) GetWatchedNamespaces ¶
func (*Manager) IsNodePort ¶
func (*Manager) ProcessNodeUpdate ¶
Check for a change in Node state
func (*Manager) SetupAS3Informers ¶ added in v1.9.1
SetupAS3Informers returns an appInformer that includes the following set of informers. CfgMapInformer and SvcInformer are label based and endptInformer is not label based. These informers are event based informer and do not poll on the resources.
func (*Manager) UseNodeInternal ¶
type Member ¶ added in v1.2.0
type Member struct { Address string `json:"address"` Port int32 `json:"port"` Session string `json:"session,omitempty"` }
Pool Member
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,omitempty"` Timeout int `json:"timeout,omitempty"` }
Pool health monitor
type NamespaceEventNotifier ¶ added in v1.4.0
type NamespaceEventNotifier struct {
// contains filtered or unexported fields
}
type NamespaceEventNotifierMap ¶ added in v1.4.0
type NamespaceEventNotifierMap map[string]*NamespaceEventNotifier
type NewBroadcasterFunc ¶ added in v1.4.0
type NewBroadcasterFunc func() record.EventBroadcaster
type ObjectDependencies ¶ added in v1.4.1
type ObjectDependencies map[ObjectDependency]int
ObjectDependencies contains each dependency and its use count (usually 1)
type ObjectDependency ¶ added in v1.4.1
ObjectDependency identifies a K8s Object
type ObjectDependencyMap ¶ added in v1.4.1
type ObjectDependencyMap map[ObjectDependency]ObjectDependencies
ObjectDependencyMap key is an Ingress or Route and the value is a map of other objects it depends on - typically services.
type Params ¶
type Params struct { KubeClient kubernetes.Interface RouteClientV1 routeclient.RouteV1Interface ConfigWriter writer.Writer UseNodeInternal bool IsNodePort bool RouteConfig RouteConfig ResolveIngress string DefaultIngIP string VsSnatPoolName string NodeLabelSelector string UseSecrets bool EventChan chan interface{} SchemaLocal string ManageConfigMaps bool ManageIngress bool ManageIngressClassOnly bool IngressClass string AS3Validation bool SSLInsecure bool EnableTLS string TLS13CipherGroupReference string Ciphers string TrustedCertsCfgmap string Agent string OverrideAS3Decl string SchemaLocalPath string FilterTenants bool // contains filtered or unexported fields }
Struct to allow NewManager to receive all or only specific parameters.
type PartitionMap ¶ added in v1.2.0
type PartitionMap map[string]*BigIPConfig
Configs for each BIG-IP partition
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"` }
Virtual policy
func (*Policy) RemoveRuleAt ¶ added in v1.4.0
func (*Policy) RemoveRules ¶ added in v1.4.0
type Pool ¶
type Pool struct { Name string `json:"name"` Partition string `json:"-"` ServiceName string `json:"-"` ServicePort int32 `json:"-"` Balance string `json:"loadBalancingMode"` Members []Member `json:"members"` MonitorNames []string `json:"monitors,omitempty"` }
Pool config
type ProfileRef ¶ added in v1.2.0
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:"-"` }
Reference to pre-existing profiles
type ProfileRefs ¶ added in v1.2.0
type ProfileRefs []ProfileRef
func (ProfileRefs) Len ¶ added in v1.2.0
func (slice ProfileRefs) Len() int
func (ProfileRefs) Less ¶ added in v1.2.0
func (slice ProfileRefs) Less(i, j int) bool
func (ProfileRefs) Swap ¶ added in v1.2.0
func (slice ProfileRefs) Swap(i, j int)
type ResourceConfig ¶
type ResourceConfig struct { MetaData metaData `json:"-"` Virtual Virtual `json:"virtual,omitempty"` IApp IApp `json:"iapp,omitempty"` Pools Pools `json:"pools,omitempty"` Monitors Monitors `json:"monitors,omitempty"` Policies Policies `json:"policies,omitempty"` }
Config for a single resource (ConfigMap, Ingress, or Route)
func (*ResourceConfig) AddRuleToPolicy ¶ added in v1.2.0
func (rc *ResourceConfig) AddRuleToPolicy( policyName string, rule *Rule, )
func (*ResourceConfig) DeleteRouteProfile ¶ added in v1.7.0
func (rc *ResourceConfig) DeleteRouteProfile(namespace, name string)
func (*ResourceConfig) DeleteRuleFromPolicy ¶ added in v1.4.0
func (rc *ResourceConfig) DeleteRuleFromPolicy( policyName string, rule *Rule, mergedRulesMap map[string]map[string]mergedRuleEntry, )
func (*ResourceConfig) FindPolicy ¶
func (rc *ResourceConfig) FindPolicy(controlType string) *Policy
func (*ResourceConfig) GetName ¶ added in v1.4.0
func (cfg *ResourceConfig) GetName() string
func (*ResourceConfig) GetPartition ¶ added in v1.4.0
func (cfg *ResourceConfig) GetPartition() string
func (*ResourceConfig) MergeRules ¶ added in v1.5.0
func (rc *ResourceConfig) MergeRules(mergedRulesMap map[string]map[string]mergedRuleEntry)
func (*ResourceConfig) RemoveMonitor ¶ added in v1.3.0
func (rc *ResourceConfig) RemoveMonitor(pool string) bool
func (*ResourceConfig) RemovePolicy ¶
func (rc *ResourceConfig) RemovePolicy(policy Policy)
func (*ResourceConfig) RemovePool ¶ added in v1.4.1
func (rc *ResourceConfig) RemovePool( namespace, poolName string, appMgr *Manager, ) (bool, *serviceKey)
func (*ResourceConfig) RemovePoolAt ¶ added in v1.4.0
func (rc *ResourceConfig) RemovePoolAt(offset int) bool
func (*ResourceConfig) SetMonitor ¶
func (rc *ResourceConfig) SetMonitor(pool *Pool, monitor Monitor) bool
func (*ResourceConfig) SetPolicy ¶
func (rc *ResourceConfig) SetPolicy(policy Policy)
func (*ResourceConfig) SortMonitors ¶
func (rc *ResourceConfig) SortMonitors()
func (*ResourceConfig) UnmergeRule ¶ added in v1.5.0
func (rc *ResourceConfig) UnmergeRule(ruleName string, mergedRulesMap map[string]map[string]mergedRuleEntry) bool
type ResourceConfigMap ¶
type ResourceConfigMap map[string]*ResourceConfig
Key is resource name, value is pointer to config. May be shared.
type ResourceConfigs ¶
type ResourceConfigs []*ResourceConfig
type ResourceEnumFunc ¶
type ResourceEnumFunc func(key serviceKey, cfg *ResourceConfig)
callback type for ForEach()
type ResourceInterface ¶
type ResourceInterface interface { Init() Assign(key serviceKey, name string, cfg *ResourceConfig) PoolCount() int VirtualCount() int CountOf(key serviceKey) int Get(key serviceKey, name string) (*ResourceConfig, bool) GetAll(key serviceKey) ResourceConfigs GetAllWithName(name string) (ResourceConfigs, []serviceKey) GetAllResources() ResourceConfigs Delete(key serviceKey, name string) bool ForEach(f ResourceEnumFunc) DependencyDiff(key ObjectDependency, newDeps ObjectDependencies) ([]ObjectDependency, []ObjectDependency) }
type ResourceMap ¶
type ResourceMap map[int32][]*ResourceConfig
type Resources ¶
Map of Resource configs
func (*Resources) Assign ¶
func (rs *Resources) Assign(svcKey serviceKey, name string, cfg *ResourceConfig)
Add or update a Resource config, identified by key.
func (*Resources) DeleteKeyRef ¶ added in v1.4.0
Remove a svcKey's reference to a config (pool was removed)
func (*Resources) ForEach ¶
func (rs *Resources) ForEach(f ResourceEnumFunc)
Iterate over all configurations, calling the supplied callback with each.
func (*Resources) Get ¶
func (rs *Resources) Get(svcKey serviceKey, name string) (*ResourceConfig, bool)
Get a specific Resource cfg
func (*Resources) GetAll ¶
func (rs *Resources) GetAll(svcKey serviceKey) ResourceConfigs
Get all configurations for a specific backend
func (*Resources) GetAllResources ¶ added in v1.4.0
func (rs *Resources) GetAllResources() ResourceConfigs
func (*Resources) GetAllWithName ¶
func (rs *Resources) GetAllWithName(name string) (ResourceConfigs, []serviceKey)
Get all configurations with a specific name, spanning multiple backends This is for multi-service ingress
func (*Resources) GetByName ¶ added in v1.4.0
func (rs *Resources) GetByName(name string) (*ResourceConfig, bool)
Get a specific Resource cfg
func (*Resources) UpdateDependencies ¶ added in v1.4.1
func (rs *Resources) UpdateDependencies( newKey ObjectDependency, newDeps ObjectDependencies, svcDepKey ObjectDependency, lookupFunc func(key ObjectDependency) bool, ) ([]ObjectDependency, []ObjectDependency)
UpdateDependencies will keep the rs.objDeps map updated, and return two arrays identifying what has changed - added for dependencies that were added, and removed for dependencies that were removed.
func (*Resources) VirtualCount ¶ added in v1.4.0
Count of all virtuals currently stored.
type RouteConfig ¶ added in v1.2.0
type RouteConfig struct { RouteVSAddr string RouteLabel string HttpVs string HttpsVs string ClientSSL string ServerSSL string }
Configuration options for Routes in OpenShift
type RouteService ¶ added in v1.4.0
type RouteService struct {
// contains filtered or unexported fields
}
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 ServiceFwdRuleMap ¶ added in v1.4.0
type ServiceFwdRuleMap map[serviceQueueKey]HostFwdRuleMap
key is namespace/serviceName, data is map of host to paths.
func NewServiceFwdRuleMap ¶ added in v1.4.0
func NewServiceFwdRuleMap() ServiceFwdRuleMap
func (ServiceFwdRuleMap) AddEntry ¶ added in v1.4.0
func (sfrm ServiceFwdRuleMap) AddEntry(ns, svc, host, path string)
func (ServiceFwdRuleMap) AddToDataGroup ¶ added in v1.4.0
func (sfrm ServiceFwdRuleMap) AddToDataGroup(dgMap DataGroupNamespaceMap)
type SourceAddrTranslation ¶ added in v1.5.0
Virtual Server Source Address Translation
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"` IRules []string `json:"rules,omitempty"` Profiles ProfileRefs `json:"profiles,omitempty"` Description string `json:"description,omitempty"` VirtualAddress *virtualAddress `json:"-"` }
Virtual server config
func (*Virtual) AddOrUpdateProfile ¶ added in v1.2.0
func (v *Virtual) AddOrUpdateProfile(prof ProfileRef) bool
func (*Virtual) GetProfileCountByContext ¶ added in v1.2.0
func (*Virtual) ReferencesProfile ¶ added in v1.2.0
func (v *Virtual) ReferencesProfile(profile CustomProfile) bool
func (*Virtual) RemoveIRule ¶ added in v1.4.2
Removes an IRule reference from a Virtual object
func (*Virtual) RemoveProfile ¶ added in v1.2.0
func (v *Virtual) RemoveProfile(prof ProfileRef) bool
func (*Virtual) SetVirtualAddress ¶ added in v1.4.0
type Virtuals ¶ added in v1.2.0
type Virtuals []Virtual
type WatchedNamespaces ¶ added in v1.9.2
Watched Namespaces for global availability.