Documentation
¶
Index ¶
- Variables
- func StartSubnetSetController(mgr ctrl.Manager, commonService servicecommon.Service) error
- type EnqueueRequestForNamespace
- func (e *EnqueueRequestForNamespace) Create(_ context.Context, _ event.CreateEvent, _ workqueue.RateLimitingInterface)
- func (e *EnqueueRequestForNamespace) Delete(_ context.Context, _ event.DeleteEvent, _ workqueue.RateLimitingInterface)
- func (e *EnqueueRequestForNamespace) Generic(_ context.Context, _ event.GenericEvent, _ workqueue.RateLimitingInterface)
- func (e *EnqueueRequestForNamespace) Update(_ context.Context, updateEvent event.UpdateEvent, ...)
- type SubnetSetReconciler
- func (r *SubnetSetReconciler) DeleteSubnetForSubnetSet(obj v1alpha1.SubnetSet, updataStatus bool) error
- func (r *SubnetSetReconciler) GarbageCollector(cancel chan bool, timeout time.Duration)
- func (r *SubnetSetReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *SubnetSetReconciler) Start(mgr ctrl.Manager) error
- type VPCHandler
- func (h *VPCHandler) Create(_ context.Context, e event.CreateEvent, _ workqueue.RateLimitingInterface)
- func (h *VPCHandler) Delete(_ context.Context, e event.DeleteEvent, _ workqueue.RateLimitingInterface)
- func (h *VPCHandler) Generic(_ context.Context, _ event.GenericEvent, _ workqueue.RateLimitingInterface)
- func (h *VPCHandler) Update(_ context.Context, _ event.UpdateEvent, _ workqueue.RateLimitingInterface)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ResultNormal = common.ResultNormal ResultRequeue = common.ResultRequeue ResultRequeueAfter5mins = common.ResultRequeueAfter5mins MetricResTypeSubnetSet = common.MetricResTypeSubnetSet )
View Source
var PredicateFuncsNs = predicate.Funcs{ CreateFunc: func(e event.CreateEvent) bool { return false }, UpdateFunc: func(e event.UpdateEvent) bool { oldObj := e.ObjectOld.(*v1.Namespace) newObj := e.ObjectNew.(*v1.Namespace) log.V(1).Info("receive namespace update event", "name", oldObj.Name) if reflect.DeepEqual(oldObj.ObjectMeta.Labels, newObj.ObjectMeta.Labels) { log.Info("label of namespace is not changed, ignore it", "name", oldObj.Name) return false } return true }, DeleteFunc: func(e event.DeleteEvent) bool { return false }, }
View Source
var VPCPredicate = predicate.Funcs{ CreateFunc: func(e event.CreateEvent) bool { return true }, UpdateFunc: func(e event.UpdateEvent) bool { return false }, DeleteFunc: func(e event.DeleteEvent) bool { return true }, GenericFunc: func(genericEvent event.GenericEvent) bool { return false }, }
Functions ¶
func StartSubnetSetController ¶
func StartSubnetSetController(mgr ctrl.Manager, commonService servicecommon.Service) error
Types ¶
type EnqueueRequestForNamespace ¶
func (*EnqueueRequestForNamespace) Create ¶
func (e *EnqueueRequestForNamespace) Create(_ context.Context, _ event.CreateEvent, _ workqueue.RateLimitingInterface)
func (*EnqueueRequestForNamespace) Delete ¶
func (e *EnqueueRequestForNamespace) Delete(_ context.Context, _ event.DeleteEvent, _ workqueue.RateLimitingInterface)
func (*EnqueueRequestForNamespace) Generic ¶
func (e *EnqueueRequestForNamespace) Generic(_ context.Context, _ event.GenericEvent, _ workqueue.RateLimitingInterface)
func (*EnqueueRequestForNamespace) Update ¶
func (e *EnqueueRequestForNamespace) Update(_ context.Context, updateEvent event.UpdateEvent, l workqueue.RateLimitingInterface)
type SubnetSetReconciler ¶
type SubnetSetReconciler struct { Client client.Client Scheme *apimachineryruntime.Scheme Service *subnet.SubnetService }
SubnetSetReconciler reconciles a SubnetSet object
func (*SubnetSetReconciler) DeleteSubnetForSubnetSet ¶
func (r *SubnetSetReconciler) DeleteSubnetForSubnetSet(obj v1alpha1.SubnetSet, updataStatus bool) error
func (*SubnetSetReconciler) GarbageCollector ¶
func (r *SubnetSetReconciler) GarbageCollector(cancel chan bool, timeout time.Duration)
GarbageCollector collect Subnet which there is no port attached on it. cancel is used to break the loop during UT
type VPCHandler ¶
func (*VPCHandler) Create ¶
func (h *VPCHandler) Create(_ context.Context, e event.CreateEvent, _ workqueue.RateLimitingInterface)
func (*VPCHandler) Delete ¶
func (h *VPCHandler) Delete(_ context.Context, e event.DeleteEvent, _ workqueue.RateLimitingInterface)
func (*VPCHandler) Generic ¶
func (h *VPCHandler) Generic(_ context.Context, _ event.GenericEvent, _ workqueue.RateLimitingInterface)
func (*VPCHandler) Update ¶
func (h *VPCHandler) Update(_ context.Context, _ event.UpdateEvent, _ workqueue.RateLimitingInterface)
Click to show internal directories.
Click to hide internal directories.