appmanager

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2017 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultConfigMapLabel = "f5type in (virtual-server)"

Variables

View Source
var DEFAULT_BALANCE string = "round-robin"
View Source
var DEFAULT_HTTPS_PORT int32 = 443
View Source
var DEFAULT_HTTP_PORT int32 = 80
View Source
var DEFAULT_MODE string = "tcp"
View Source
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

func NewManager(params *Params) *Manager

Create and return a new app manager that meets the Manager interface

func (*Manager) AddNamespace

func (appMgr *Manager) AddNamespace(
	namespace string,
	cfgMapSelector labels.Selector,
	resyncPeriod time.Duration,
) error

func (*Manager) AddNamespaceLabelInformer

func (appMgr *Manager) AddNamespaceLabelInformer(
	labelSelector labels.Selector,
	resyncPeriod time.Duration,
) error

func (*Manager) ConfigWriter

func (appMgr *Manager) ConfigWriter() writer.Writer

func (*Manager) GetNamespaceLabelInformer

func (appMgr *Manager) GetNamespaceLabelInformer() cache.SharedIndexInformer

func (*Manager) GetWatchedNamespaces

func (appMgr *Manager) GetWatchedNamespaces() []string

func (*Manager) IsNodePort

func (appMgr *Manager) IsNodePort() bool

func (*Manager) ProcessNodeUpdate

func (appMgr *Manager) ProcessNodeUpdate(
	obj interface{}, err error,
)

Check for a change in Node state

func (*Manager) Run

func (appMgr *Manager) Run(stopCh <-chan struct{})

func (*Manager) UseNodeInternal

func (appMgr *Manager) UseNodeInternal() bool

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 Monitors

type Monitors []Monitor

func (Monitors) Len

func (slice Monitors) Len() int

func (Monitors) Less

func (slice Monitors) Less(i, j int) bool

func (Monitors) Swap

func (slice Monitors) Swap(i, j int)

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

type Resources struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Map of Resource configs

func NewResources

func NewResources() *Resources

Constructor for Resources

func (*Resources) Assign

func (rs *Resources) Assign(key serviceKey, name string, cfg *ResourceConfig)

Add or update a Resource config, identified by key.

func (*Resources) Count

func (rs *Resources) Count() int

Count of all configurations currently stored.

func (*Resources) CountOf

func (rs *Resources) CountOf(key serviceKey) int

Count of all configurations for a specific backend.

func (*Resources) Delete

func (rs *Resources) Delete(key serviceKey, name string) bool

Remove a specific resource configuration.

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

func (*Resources) Init

func (rs *Resources) Init()

Receiver to initialize the object.

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 Rules

type Rules []*Rule

func (Rules) Len

func (r Rules) Len() int

func (Rules) Less

func (r Rules) Less(i, j int) bool

func (Rules) Swap

func (r Rules) Swap(i, j int)

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

func (v *Virtual) AddFrontendSslProfileName(name string)

Wrappers around the ssl profile name to simplify its use due to the pointer and nested depth.

func (*Virtual) GetFrontendSslProfileNames

func (v *Virtual) GetFrontendSslProfileNames() []string

func (*Virtual) RemoveFrontendSslProfileName

func (v *Virtual) RemoveFrontendSslProfileName(name string) bool

func (*Virtual) ToString

func (v *Virtual) ToString() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL