pod

package
v0.0.0-...-aba7421 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MetricResTypePod = common.MetricResTypePod
)

Functions

func StartPodController

func StartPodController(mgr ctrl.Manager, subnetPortService *subnetport.SubnetPortService, subnetService servicecommon.SubnetServiceProvider, vpcService servicecommon.VPCServiceProvider, nodeService servicecommon.NodeServiceReader)

Types

type PodReconciler

type PodReconciler struct {
	client.Client
	Scheme *apimachineryruntime.Scheme

	SubnetPortService *subnetport.SubnetPortService
	SubnetService     servicecommon.SubnetServiceProvider
	VPCService        servicecommon.VPCServiceProvider
	NodeServiceReader servicecommon.NodeServiceReader
	Recorder          record.EventRecorder
}

PodReconciler reconciles a Pod object

func (*PodReconciler) GarbageCollector

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

GarbageCollector collect Pod which has been removed from crd. cancel is used to break the loop during UT

func (*PodReconciler) GetNodeByName

func (r *PodReconciler) GetNodeByName(nodeName string) (*model.HostTransportNode, error)

func (*PodReconciler) GetSubnetPathForPod

func (r *PodReconciler) GetSubnetPathForPod(ctx context.Context, pod *v1.Pod) (string, error)

func (*PodReconciler) Reconcile

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

func (*PodReconciler) SetupWithManager

func (r *PodReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*PodReconciler) Start

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

Start setup manager and launch GC

Jump to

Keyboard shortcuts

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