Documentation ¶
Index ¶
- Constants
- Variables
- type BigIPConfig
- type ConfigMap
- type IngressHealthMonitor
- type IngressHealthMonitors
- 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 Monitor
- type Monitors
- type Params
- type Policy
- type Pool
- type ResourceConfig
- 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 Rule
- type Rules
- type Virtual
Constants ¶
const DefaultConfigMapLabel = "f5type in (virtual-server)"
Variables ¶
var DEFAULT_BALANCE string = "round-robin"
var DEFAULT_HTTPS_PORT int32 = 443
var DEFAULT_HTTP_PORT int32 = 80
var DEFAULT_MODE string = "tcp"
var DEFAULT_PARTITION string
Functions ¶
This section is empty.
Types ¶
type BigIPConfig ¶
type BigIPConfig struct { Virtuals []Virtual `json:"virtualServers,omitempty"` Pools []Pool `json:"pools,omitempty"` Monitors []Monitor `json:"monitors,omitempty"` Policies []Policy `json:"l7Policies,omitempty"` }
Config of all resources to configure on the BIG-IP
type ConfigMap ¶
type ConfigMap struct { VirtualServer struct { Backend configMapBackend `json:"backend"` Frontend Virtual `json:"frontend"` } `json:"virtualServer"` }
Used to unmarshal ConfigMap data
type IngressHealthMonitor ¶
type IngressHealthMonitor 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 object.
type IngressHealthMonitors ¶
type IngressHealthMonitors []IngressHealthMonitor
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 Monitor ¶
type Monitor struct { Name string `json:"name"` Partition string `json:"partition"` Interval int `json:"interval,omitempty"` Protocol string `json:"protocol"` Send string `json:"send,omitempty"` Timeout int `json:"timeout,omitempty"` }
Pool health monitor
type Params ¶
type Params struct { KubeClient kubernetes.Interface ConfigWriter writer.Writer UseNodeInternal bool IsNodePort bool InitialState bool // Unit testing only EventRecorder record.EventRecorder // Unit testing only // contains filtered or unexported fields }
Struct to allow NewManager to receive all or only specific parameters.
type Policy ¶
type Policy struct { Name string `json:"name"` Partition string `json:"partition"` 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"` ServiceName string `json:"serviceName"` ServicePort int32 `json:"servicePort"` PoolMemberAddrs []string `json:"poolMemberAddrs"` MonitorNames []string `json:"monitor"` }
Pool config
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 or Ingress)
func (*ResourceConfig) FindPolicy ¶
func (rc *ResourceConfig) FindPolicy(controlType string) *Policy
func (*ResourceConfig) RemovePolicy ¶
func (rc *ResourceConfig) RemovePolicy(toFind nameRef)
func (*ResourceConfig) SetMonitor ¶
func (rc *ResourceConfig) SetMonitor(pool *Pool, monitor Monitor)
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
func (ResourceConfigs) Len ¶
func (slice ResourceConfigs) Len() int
func (ResourceConfigs) Less ¶
func (slice ResourceConfigs) Less(i, j int) bool
func (ResourceConfigs) Swap ¶
func (slice ResourceConfigs) Swap(i, j int)
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 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"` // Mutual parameter, partition Partition string `json:"partition"` // VirtualServer parameters Balance string `json:"balance,omitempty"` Mode string `json:"mode,omitempty"` VirtualAddress *virtualAddress `json:"virtualAddress,omitempty"` SslProfile *sslProfile `json:"sslProfile,omitempty"` Policies []nameRef `json:"policies,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.