subnet

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ResultNormal            = common.ResultNormal
	ResultRequeue           = common.ResultRequeue
	ResultRequeueAfter5mins = common.ResultRequeueAfter5mins
	MetricResTypeSubnet     = common.MetricResTypeSubnet
)
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("labels of namespace are not changed", "name", oldObj.Name)
			return false
		}
		return true
	},
	DeleteFunc: func(e event.DeleteEvent) bool {
		return false
	},
}

Functions

func StartSubnetController

func StartSubnetController(mgr ctrl.Manager, commonService servicecommon.Service) error

Types

type EnqueueRequestForNamespace

type EnqueueRequestForNamespace struct {
	Client client.Client
}

func (*EnqueueRequestForNamespace) Create

func (*EnqueueRequestForNamespace) Delete

func (*EnqueueRequestForNamespace) Generic

func (*EnqueueRequestForNamespace) Update

type SubnetReconciler

type SubnetReconciler struct {
	Client  client.Client
	Scheme  *apimachineryruntime.Scheme
	Service *subnet.SubnetService
}

SubnetReconciler reconciles a SubnetSet object

func (*SubnetReconciler) DeleteSubnet

func (r *SubnetReconciler) DeleteSubnet(obj v1alpha1.Subnet) error

func (*SubnetReconciler) GarbageCollector

func (r *SubnetReconciler) GarbageCollector(cancel chan bool, timeout time.Duration)

func (*SubnetReconciler) Reconcile

func (r *SubnetReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*SubnetReconciler) Start

func (r *SubnetReconciler) Start(mgr ctrl.Manager) error

Start setup manager

Jump to

Keyboard shortcuts

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