Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterBigIPSchemaTypes()
- type AnnotationHealthMonitor
- type AnnotationHealthMonitors
- type BigIPConfig
- type BigIPv4FormatChecker
- type BigIPv6FormatChecker
- type ConfigMap
- type CustomProfile
- type CustomProfileStore
- type IApp
- type IRule
- type IRulesMap
- type InternalDataGroup
- type InternalDataGroupMap
- type InternalDataGroupRecord
- type InternalDataGroupRecords
- 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) 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) UseNodeInternal() bool
- type Member
- type Monitor
- type Monitors
- type Params
- type PartitionMap
- type Policy
- type Pool
- type Pools
- type ProfileRef
- type ProfileRefs
- type ResourceConfig
- func (rc *ResourceConfig) AddRuleToPolicy(policyName string, rule *Rule)
- func (rc *ResourceConfig) FindPolicy(controlType string) *Policy
- func (rc *ResourceConfig) HandleRouteTls(tls *routeapi.TLSConfig, protocol string, policyName string, rule *Rule)
- func (rc *ResourceConfig) RemoveMonitor(pool, monitor string) bool
- func (rc *ResourceConfig) RemovePolicy(toFind nameRef)
- func (rc *ResourceConfig) SetMonitor(pool *Pool, monitor Monitor) bool
- func (rc *ResourceConfig) SetPolicy(policy Policy)
- func (rc *ResourceConfig) SortMonitors()
- type ResourceConfigMap
- type ResourceConfigs
- type ResourceEnumFunc
- type ResourceInterface
- type ResourceMap
- type Resources
- func (rs *Resources) Assign(key serviceKey, name string, cfg *ResourceConfig)
- func (rs *Resources) Count() int
- func (rs *Resources) CountOf(key serviceKey) int
- func (rs *Resources) Delete(key serviceKey, name string) bool
- func (rs *Resources) ForEach(f ResourceEnumFunc)
- func (rs *Resources) Get(key serviceKey, name string) (*ResourceConfig, bool)
- func (rs *Resources) GetAll(key serviceKey) (ResourceConfigMap, bool)
- func (rs *Resources) GetAllWithName(name string) (ResourceConfigs, []serviceKey)
- func (rs *Resources) Init()
- type RouteConfig
- type Routes
- type Rule
- type Rules
- type Virtual
- func (v *Virtual) AddFrontendSslProfileName(name string) bool
- func (v *Virtual) AddIRule(ruleName string) bool
- func (v *Virtual) AddOrUpdateProfile(prof ProfileRef) bool
- func (v *Virtual) GetFrontendSslProfileNames() []string
- func (v *Virtual) GetProfileCountByContext(context string) int
- func (v *Virtual) ReferencesProfile(profile CustomProfile) bool
- func (v *Virtual) RemoveFrontendSslProfileName(name string) bool
- func (v *Virtual) RemoveProfile(prof ProfileRef) bool
- func (v *Virtual) ToString() string
- type Virtuals
Constants ¶
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)"
Variables ¶
var DEFAULT_PARTITION string
FIXME: remove this global variable.
Functions ¶
func RegisterBigIPSchemaTypes ¶ added in v1.3.0
func RegisterBigIPSchemaTypes()
Add new data format to the library
Types ¶
type AnnotationHealthMonitor ¶ added in v1.3.0
type AnnotationHealthMonitor struct { Path string `json:"path"` Interval int `json:"interval"` Send string `json:"send"` Timeout int `json:"timeout"` }
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 string) bool
type BigIPv6FormatChecker ¶ added in v1.3.0
type BigIPv6FormatChecker struct{}
func (BigIPv6FormatChecker) IsFormat ¶ added in v1.3.0
func (f BigIPv6FormatChecker) IsFormat(input string) bool
type ConfigMap ¶
type ConfigMap struct { VirtualServer struct { Backend configMapBackend `json:"backend"` Frontend Virtual `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:"partition,omitempty"` 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"` }
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, cProfiles CustomProfileStore, ) 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 IApp ¶ added in v1.2.0
type IApp struct { Name string `json:"name"` Partition string `json:"partition,omitempty"` 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:"partition,omitempty"` Code string `json:"apiAnonymous"` }
iRules
type InternalDataGroup ¶ added in v1.2.0
type InternalDataGroup struct { Name string `json:"name"` Partition string `json:"partition,omitempty"` 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]*InternalDataGroup
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 Manager ¶
type Manager struct {
// 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) 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) 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:"partition,omitempty"` Interval int `json:"interval,omitempty"` Protocol string `json:"protocol,omitempty"` Type string `json:"type,omitempty"` Send string `json:"send,omitempty"` Timeout int `json:"timeout,omitempty"` }
Pool health monitor
type Params ¶
type Params struct { KubeClient kubernetes.Interface RouteClientV1 rest.Interface ConfigWriter writer.Writer UseNodeInternal bool IsNodePort bool RouteConfig RouteConfig ResolveIngress string InitialState bool // Unit testing only EventRecorder record.EventRecorder // Unit testing only NodeLabelSelector string UseSecrets 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:"partition,omitempty"` 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 []*Rule `json:"rules,omitempty"` Strategy string `json:"strategy,omitempty"` }
Virtual policy
type Pool ¶
type Pool struct { Name string `json:"name"` Partition string `json:"partition,omitempty"` Balance string `json:"loadBalancingMode"` ServiceName string `json:"serviceName,omitempty"` ServicePort int32 `json:"servicePort,omitempty"` 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' }
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"` Pools []Pool `json:"pools,omitempty"` Monitors Monitors `json:"monitors,omitempty"` Policies []Policy `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) FindPolicy ¶
func (rc *ResourceConfig) FindPolicy(controlType string) *Policy
func (*ResourceConfig) HandleRouteTls ¶ added in v1.2.0
func (*ResourceConfig) RemoveMonitor ¶ added in v1.3.0
func (rc *ResourceConfig) RemoveMonitor(pool, monitor string) bool
func (*ResourceConfig) RemovePolicy ¶
func (rc *ResourceConfig) RemovePolicy(toFind nameRef)
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()
type ResourceConfigMap ¶
type ResourceConfigMap map[string]*ResourceConfig
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) Count() int CountOf(key serviceKey) int Get(key serviceKey, name string) (*ResourceConfig, bool) GetAll(key serviceKey) (ResourceConfigMap, bool) GetAllWithName(name string) (ResourceConfigs, []serviceKey) Delete(key serviceKey, name string) bool ForEach(f ResourceEnumFunc) }
type ResourceMap ¶
type ResourceMap map[int32][]*ResourceConfig
type Resources ¶
Map of Resource configs
func (*Resources) Assign ¶
func (rs *Resources) Assign(key serviceKey, name string, cfg *ResourceConfig)
Add or update a Resource config, identified by key.
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(key serviceKey, name string) (*ResourceConfig, bool)
Get a specific Resource cfg
func (*Resources) GetAll ¶
func (rs *Resources) GetAll(key serviceKey) (ResourceConfigMap, bool)
Get all configurations for a specific backend
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
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 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 Virtual ¶
type Virtual struct { VirtualServerName string `json:"name"` PoolName string `json:"pool,omitempty"` // Mutual parameter, partition Partition string `json:"partition,omitempty"` // VirtualServer parameters Balance string `json:"balance,omitempty"` Mode string `json:"mode,omitempty"` VirtualAddress *virtualAddress `json:"virtualAddress,omitempty"` Destination string `json:"destination,omitempty"` Enabled bool `json:"enabled,omitempty"` IpProtocol string `json:"ipProtocol,omitempty"` SourceAddrTranslation sourceAddrTranslation `json:"sourceAddressTranslation,omitempty"` SslProfile *sslProfile `json:"sslProfile,omitempty"` Policies []nameRef `json:"policies,omitempty"` IRules []string `json:"rules,omitempty"` // FIXME: All profiles should reside in Profiles, just server ssl ones now. Profiles ProfileRefs `json:"profiles,omitempty"` // iApp parameters IApp string `json:"iapp,omitempty"` IAppPoolMemberTable *iappPoolMemberTable `json:"iappPoolMemberTable,omitempty"` IAppOptions map[string]string `json:"iappOptions,omitempty"` IAppTables map[string]iappTableEntry `json:"iappTables,omitempty"` IAppVariables map[string]string `json:"iappVariables,omitempty"` }
Virtual server config
func (*Virtual) AddFrontendSslProfileName ¶
Wrappers around the ssl profile name to simplify its use due to the pointer and nested depth.
func (*Virtual) AddOrUpdateProfile ¶ added in v1.2.0
func (v *Virtual) AddOrUpdateProfile(prof ProfileRef) bool
func (*Virtual) GetFrontendSslProfileNames ¶
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) RemoveFrontendSslProfileName ¶
func (*Virtual) RemoveProfile ¶ added in v1.2.0
func (v *Virtual) RemoveProfile(prof ProfileRef) bool