Documentation ¶
Overview ¶
Package proxy contains the OpenShift SDN code that runs as part of the service proxy
Index ¶
- type EndpointsHandler
- type HybridProxier
- func (p *HybridProxier) OnEndpointSliceAdd(slice *discoveryv1.EndpointSlice)
- func (p *HybridProxier) OnEndpointSliceDelete(slice *discoveryv1.EndpointSlice)
- func (p *HybridProxier) OnEndpointSliceUpdate(oldSlice, slice *discoveryv1.EndpointSlice)
- func (p *HybridProxier) OnEndpointSlicesSynced()
- func (p *HybridProxier) OnEndpointsAdd(endpoints *corev1.Endpoints)
- func (p *HybridProxier) OnEndpointsDelete(endpoints *corev1.Endpoints)
- func (p *HybridProxier) OnEndpointsSynced()
- func (p *HybridProxier) OnEndpointsUpdate(oldEndpoints, endpoints *corev1.Endpoints)
- func (proxier *HybridProxier) OnNodeAdd(node *corev1.Node)
- func (proxier *HybridProxier) OnNodeDelete(node *corev1.Node)
- func (proxier *HybridProxier) OnNodeSynced()
- func (proxier *HybridProxier) OnNodeUpdate(oldNode, node *corev1.Node)
- func (p *HybridProxier) OnServiceAdd(service *corev1.Service)
- func (p *HybridProxier) OnServiceDelete(service *corev1.Service)
- func (p *HybridProxier) OnServiceSynced()
- func (p *HybridProxier) OnServiceUpdate(oldService, service *corev1.Service)
- func (p *HybridProxier) ReloadIPTables()
- func (p *HybridProxier) SetSyncRunner(b *async.BoundedFrequencyRunner)
- func (p *HybridProxier) Sync()
- func (p *HybridProxier) SyncLoop()
- func (p *HybridProxier) SyncProxyRules()
- type HybridizableProxy
- type OsdnProxy
- func (proxy *OsdnProxy) OnEndpointSliceAdd(slice *discoveryv1.EndpointSlice)
- func (proxy *OsdnProxy) OnEndpointSliceDelete(slice *discoveryv1.EndpointSlice)
- func (proxy *OsdnProxy) OnEndpointSliceUpdate(old, slice *discoveryv1.EndpointSlice)
- func (proxy *OsdnProxy) OnEndpointSlicesSynced()
- func (proxy *OsdnProxy) OnEndpointsAdd(ep *corev1.Endpoints)
- func (proxy *OsdnProxy) OnEndpointsDelete(ep *corev1.Endpoints)
- func (proxy *OsdnProxy) OnEndpointsSynced()
- func (proxy *OsdnProxy) OnEndpointsUpdate(old, ep *corev1.Endpoints)
- func (proxier *OsdnProxy) OnNodeAdd(node *corev1.Node)
- func (proxier *OsdnProxy) OnNodeDelete(node *corev1.Node)
- func (proxier *OsdnProxy) OnNodeSynced()
- func (proxier *OsdnProxy) OnNodeUpdate(oldNode, node *corev1.Node)
- func (proxy *OsdnProxy) OnServiceAdd(service *corev1.Service)
- func (proxy *OsdnProxy) OnServiceDelete(service *corev1.Service)
- func (proxy *OsdnProxy) OnServiceSynced()
- func (proxy *OsdnProxy) OnServiceUpdate(oldService, service *corev1.Service)
- func (proxy *OsdnProxy) ReloadIPTables() error
- func (proxy *OsdnProxy) SetBaseProxies(mainProxy, unidlingProxy HybridizableProxy)
- func (proxy *OsdnProxy) Start(waitChan chan<- bool) error
- func (proxy *OsdnProxy) Sync()
- func (proxy *OsdnProxy) SyncLoop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EndpointsHandler ¶
type EndpointsHandler interface { OnEndpointsAdd(endpoints *corev1.Endpoints) OnEndpointsUpdate(oldEndpoints, endpoints *corev1.Endpoints) OnEndpointsDelete(endpoints *corev1.Endpoints) OnEndpointsSynced() }
Legacy config.EndpointHandler interface
type HybridProxier ¶
type HybridProxier struct {
// contains filtered or unexported fields
}
HybridProxier runs an unidling proxy and a primary proxy at the same time, delegating idled services to the unidling proxy and other services to the primary proxy.
func NewHybridProxier ¶
func NewHybridProxier( mainProxy HybridizableProxy, unidlingProxy HybridizableProxy, minSyncPeriod time.Duration, serviceLister corev1listers.ServiceLister, ) *HybridProxier
func (*HybridProxier) OnEndpointSliceAdd ¶
func (p *HybridProxier) OnEndpointSliceAdd(slice *discoveryv1.EndpointSlice)
func (*HybridProxier) OnEndpointSliceDelete ¶
func (p *HybridProxier) OnEndpointSliceDelete(slice *discoveryv1.EndpointSlice)
func (*HybridProxier) OnEndpointSliceUpdate ¶
func (p *HybridProxier) OnEndpointSliceUpdate(oldSlice, slice *discoveryv1.EndpointSlice)
func (*HybridProxier) OnEndpointSlicesSynced ¶
func (p *HybridProxier) OnEndpointSlicesSynced()
func (*HybridProxier) OnEndpointsAdd ¶
func (p *HybridProxier) OnEndpointsAdd(endpoints *corev1.Endpoints)
func (*HybridProxier) OnEndpointsDelete ¶
func (p *HybridProxier) OnEndpointsDelete(endpoints *corev1.Endpoints)
func (*HybridProxier) OnEndpointsSynced ¶
func (p *HybridProxier) OnEndpointsSynced()
func (*HybridProxier) OnEndpointsUpdate ¶
func (p *HybridProxier) OnEndpointsUpdate(oldEndpoints, endpoints *corev1.Endpoints)
func (*HybridProxier) OnNodeAdd ¶
func (proxier *HybridProxier) OnNodeAdd(node *corev1.Node)
func (*HybridProxier) OnNodeDelete ¶
func (proxier *HybridProxier) OnNodeDelete(node *corev1.Node)
func (*HybridProxier) OnNodeSynced ¶
func (proxier *HybridProxier) OnNodeSynced()
func (*HybridProxier) OnNodeUpdate ¶
func (proxier *HybridProxier) OnNodeUpdate(oldNode, node *corev1.Node)
func (*HybridProxier) OnServiceAdd ¶
func (p *HybridProxier) OnServiceAdd(service *corev1.Service)
func (*HybridProxier) OnServiceDelete ¶
func (p *HybridProxier) OnServiceDelete(service *corev1.Service)
func (*HybridProxier) OnServiceSynced ¶
func (p *HybridProxier) OnServiceSynced()
func (*HybridProxier) OnServiceUpdate ¶
func (p *HybridProxier) OnServiceUpdate(oldService, service *corev1.Service)
func (*HybridProxier) ReloadIPTables ¶
func (p *HybridProxier) ReloadIPTables()
func (*HybridProxier) SetSyncRunner ¶
func (p *HybridProxier) SetSyncRunner(b *async.BoundedFrequencyRunner)
func (*HybridProxier) Sync ¶
func (p *HybridProxier) Sync()
Sync is called to synchronize the proxier state to iptables this doesn't take immediate effect - rather, it requests that the BoundedFrequencyRunner call syncProxyRules()
func (*HybridProxier) SyncLoop ¶
func (p *HybridProxier) SyncLoop()
SyncLoop runs periodic work. This is expected to run as a goroutine or as the main loop of the app. It does not return.
func (*HybridProxier) SyncProxyRules ¶
func (p *HybridProxier) SyncProxyRules()
type HybridizableProxy ¶
type HybridizableProxy interface { proxy.Provider SyncProxyRules() SetSyncRunner(b *async.BoundedFrequencyRunner) ReloadIPTables() }
HybridizableProxy is an extra interface we layer on top of Provider
type OsdnProxy ¶
func New ¶
func New(kClient kubernetes.Interface, kubeInformers informers.SharedInformerFactory, osdnClient osdnclient.Interface, osdnInformers osdninformers.SharedInformerFactory, minSyncPeriod time.Duration) (*OsdnProxy, error)
Called by higher layers to create the proxy plugin instance
func (*OsdnProxy) OnEndpointSliceAdd ¶
func (proxy *OsdnProxy) OnEndpointSliceAdd(slice *discoveryv1.EndpointSlice)
func (*OsdnProxy) OnEndpointSliceDelete ¶
func (proxy *OsdnProxy) OnEndpointSliceDelete(slice *discoveryv1.EndpointSlice)
func (*OsdnProxy) OnEndpointSliceUpdate ¶
func (proxy *OsdnProxy) OnEndpointSliceUpdate(old, slice *discoveryv1.EndpointSlice)
func (*OsdnProxy) OnEndpointSlicesSynced ¶
func (proxy *OsdnProxy) OnEndpointSlicesSynced()
func (*OsdnProxy) OnEndpointsAdd ¶
func (*OsdnProxy) OnEndpointsDelete ¶
func (*OsdnProxy) OnEndpointsSynced ¶
func (proxy *OsdnProxy) OnEndpointsSynced()
func (*OsdnProxy) OnEndpointsUpdate ¶
func (*OsdnProxy) OnNodeDelete ¶
func (*OsdnProxy) OnNodeSynced ¶
func (proxier *OsdnProxy) OnNodeSynced()
func (*OsdnProxy) OnNodeUpdate ¶
func (*OsdnProxy) OnServiceAdd ¶
func (*OsdnProxy) OnServiceDelete ¶
func (*OsdnProxy) OnServiceSynced ¶
func (proxy *OsdnProxy) OnServiceSynced()
func (*OsdnProxy) OnServiceUpdate ¶
func (*OsdnProxy) ReloadIPTables ¶
func (*OsdnProxy) SetBaseProxies ¶
func (proxy *OsdnProxy) SetBaseProxies(mainProxy, unidlingProxy HybridizableProxy)