Documentation ¶
Index ¶
- Constants
- Variables
- func HandleNodeTolerationAndTaints(stopCh <-chan struct{})
- func HasCCEIsUpCondition(n *corev1.Node, reason string, status corev1.ConditionStatus) bool
- func RunNetResourceSetGC(ctx context.Context, interval time.Duration)
- func StartSynchronizingCCEEndpoint(ctx context.Context, endpointManager EndpointEventHandler) error
- func StartSynchronizingCPSTS(ctx context.Context) error
- func StartSynchronizingENI(ctx context.Context, eniManager syncer.ENIEventHandler) error
- func StartSynchronizingNetResourceSets(ctx context.Context, nodeManager NodeEventHandler) error
- func StartSynchronizingPSTS(ctx context.Context) error
- func StartSynchronizingSecurityGroup(ctx context.Context, sgManager syncer.SecurityGroupEventHandler) error
- func StartSynchronizingSubnet(ctx context.Context, subnetManager syncer.SubnetEventHandler) error
- func StartWatchers(stopCh <-chan struct{})
- func WaitForCacheSync(stopCh <-chan struct{})
- type CCEEndpointUpdaterImpl
- func (c *CCEEndpointUpdaterImpl) Create(node *ccev2.CCEEndpoint) (*ccev2.CCEEndpoint, error)
- func (c *CCEEndpointUpdaterImpl) Delete(namespace, name string) error
- func (c *CCEEndpointUpdaterImpl) GetByIP(ip string) ([]*ccev2.CCEEndpoint, error)
- func (c *CCEEndpointUpdaterImpl) Lister() cce_lister.CCEEndpointLister
- func (c *CCEEndpointUpdaterImpl) Update(newResource *ccev2.CCEEndpoint) (*ccev2.CCEEndpoint, error)
- func (c *CCEEndpointUpdaterImpl) UpdateStatus(newResource *ccev2.CCEEndpoint) (*ccev2.CCEEndpoint, error)
- type CPSTSEventHandler
- type ENIUpdater
- type EndpointEventHandler
- type NetResourceSetUpdateImplementation
- func (c *NetResourceSetUpdateImplementation) Create(node *ccev2.NetResourceSet) (*ccev2.NetResourceSet, error)
- func (c *NetResourceSetUpdateImplementation) Get(node string) (*ccev2.NetResourceSet, error)
- func (c *NetResourceSetUpdateImplementation) GetByInstanceID(instanceID string) ([]*ccev2.NetResourceSet, error)
- func (c *NetResourceSetUpdateImplementation) Lister() listerv2.NetResourceSetLister
- func (c *NetResourceSetUpdateImplementation) Update(origNode, node *ccev2.NetResourceSet) (*ccev2.NetResourceSet, error)
- func (c *NetResourceSetUpdateImplementation) UpdateStatus(origNode, node *ccev2.NetResourceSet) (*ccev2.NetResourceSet, error)
- type NodeEventHandler
- type NodeUpdater
- type PSTSEventHandler
- type PodUpdater
Constants ¶
View Source
const ( IndexIPToEndpoint = "ipToEndpoint" IndexIPToENI = "ipToENI" IndexInstanceIDToNRS = "instanceIDToNRS" )
View Source
const (
)
View Source
const PodNodeNameIndex = "pod-node"
Variables ¶
View Source
var ( // PodStore has a minimal copy of all pods running in the cluster. // Warning: The pods stored in the cache are not intended to be used for Update // operations in k8s as some of its fields are not populated. PodStore cache.Store // PodClient cache client to use pod updater PodClient = &PodUpdater{} )
View Source
var CCEEndpointClient = &CCEEndpointUpdaterImpl{}
View Source
var CCESubnetClient = &subnetUpdaterImpl{}
View Source
var ENIClient = &eniUpdaterImpl{}
View Source
var (
NetResourceSetClient = &NetResourceSetUpdateImplementation{}
)
View Source
var (
NodeClient = &NodeUpdater{}
)
View Source
var SecurityGroupClient = &sgUpdaterImpl{}
Functions ¶
func HandleNodeTolerationAndTaints ¶
func HandleNodeTolerationAndTaints(stopCh <-chan struct{})
HandleNodeTolerationAndTaints remove node
func HasCCEIsUpCondition ¶
HasCCEIsUpCondition returns true if the given k8s node has the cce node condition set. warning: we cannot judge the reason why the node is not ready, because many external network plug-ins, such as Cilium, also modify this field
func RunNetResourceSetGC ¶
RunNetResourceSetGC performs garbage collector for cce node resource
func StartSynchronizingCCEEndpoint ¶
func StartSynchronizingCCEEndpoint(ctx context.Context, endpointManager EndpointEventHandler) error
func StartSynchronizingCPSTS ¶
func StartSynchronizingENI ¶
func StartSynchronizingENI(ctx context.Context, eniManager syncer.ENIEventHandler) error
func StartSynchronizingNetResourceSets ¶
func StartSynchronizingNetResourceSets(ctx context.Context, nodeManager NodeEventHandler) error
func StartSynchronizingPSTS ¶
func StartSynchronizingSecurityGroup ¶
func StartSynchronizingSecurityGroup(ctx context.Context, sgManager syncer.SecurityGroupEventHandler) error
func StartSynchronizingSubnet ¶
func StartSynchronizingSubnet(ctx context.Context, subnetManager syncer.SubnetEventHandler) error
func StartWatchers ¶
func StartWatchers(stopCh <-chan struct{})
func WaitForCacheSync ¶
func WaitForCacheSync(stopCh <-chan struct{})
Types ¶
type CCEEndpointUpdaterImpl ¶
type CCEEndpointUpdaterImpl struct { }
func (*CCEEndpointUpdaterImpl) Create ¶
func (c *CCEEndpointUpdaterImpl) Create(node *ccev2.CCEEndpoint) (*ccev2.CCEEndpoint, error)
func (*CCEEndpointUpdaterImpl) Delete ¶
func (c *CCEEndpointUpdaterImpl) Delete(namespace, name string) error
func (*CCEEndpointUpdaterImpl) GetByIP ¶
func (c *CCEEndpointUpdaterImpl) GetByIP(ip string) ([]*ccev2.CCEEndpoint, error)
GetByIP get CCEEndpoint by ip
func (*CCEEndpointUpdaterImpl) Lister ¶
func (c *CCEEndpointUpdaterImpl) Lister() cce_lister.CCEEndpointLister
func (*CCEEndpointUpdaterImpl) Update ¶
func (c *CCEEndpointUpdaterImpl) Update(newResource *ccev2.CCEEndpoint) (*ccev2.CCEEndpoint, error)
func (*CCEEndpointUpdaterImpl) UpdateStatus ¶
func (c *CCEEndpointUpdaterImpl) UpdateStatus(newResource *ccev2.CCEEndpoint) (*ccev2.CCEEndpoint, error)
type CPSTSEventHandler ¶
type CPSTSEventHandler interface { Update(resource *ccev2alpha1.ClusterPodSubnetTopologySpread) error Delete(namespace, pstsName string) error }
CPSTSEventHandler should implement the behavior to handle PSTS
type ENIUpdater ¶
type EndpointEventHandler ¶
type EndpointEventHandler interface { Create(resource *ccev2.CCEEndpoint) error Update(resource *ccev2.CCEEndpoint) error Delete(namespace, endpointName string) error Resync(context.Context) error }
EndpointEventHandler should implement the behavior to handle CCEEndpoint
type NetResourceSetUpdateImplementation ¶
type NetResourceSetUpdateImplementation struct{}
func (*NetResourceSetUpdateImplementation) Create ¶
func (c *NetResourceSetUpdateImplementation) Create(node *ccev2.NetResourceSet) (*ccev2.NetResourceSet, error)
func (*NetResourceSetUpdateImplementation) Get ¶
func (c *NetResourceSetUpdateImplementation) Get(node string) (*ccev2.NetResourceSet, error)
func (*NetResourceSetUpdateImplementation) GetByInstanceID ¶
func (c *NetResourceSetUpdateImplementation) GetByInstanceID(instanceID string) ([]*ccev2.NetResourceSet, error)
GetByIP get CCEEndpoint by ip
func (*NetResourceSetUpdateImplementation) Lister ¶
func (c *NetResourceSetUpdateImplementation) Lister() listerv2.NetResourceSetLister
func (*NetResourceSetUpdateImplementation) Update ¶
func (c *NetResourceSetUpdateImplementation) Update(origNode, node *ccev2.NetResourceSet) (*ccev2.NetResourceSet, error)
func (*NetResourceSetUpdateImplementation) UpdateStatus ¶
func (c *NetResourceSetUpdateImplementation) UpdateStatus(origNode, node *ccev2.NetResourceSet) (*ccev2.NetResourceSet, error)
type NodeEventHandler ¶
type NodeEventHandler interface { Create(resource *ccev2.NetResourceSet) error Update(resource *ccev2.NetResourceSet) error Delete(nodeName string) error Resync(context.Context, time.Time) ResourceType() string }
NodeEventHandler should implement the behavior to handle NetResourceSet
type NodeUpdater ¶
type NodeUpdater struct { }
func (*NodeUpdater) Lister ¶
func (*NodeUpdater) Lister() listv1.NodeLister
func (*NodeUpdater) NodeInterface ¶
func (*NodeUpdater) NodeInterface() typev1.NodeInterface
type PSTSEventHandler ¶
type PSTSEventHandler interface { Update(resource *ccev2.PodSubnetTopologySpread) error Delete(namespace, pstsName string) error }
PSTSEventHandler should implement the behavior to handle PSTS
type PodUpdater ¶
type PodUpdater struct { }
func (*PodUpdater) Lister ¶
func (*PodUpdater) Lister() listv1.PodLister
func (*PodUpdater) PodInterface ¶
func (*PodUpdater) PodInterface(namespace string) typev1.PodInterface
Click to show internal directories.
Click to hide internal directories.