Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GCManager ¶
type GCManager interface {
Start(ctx context.Context) error
GetPodDatabase() PodDBer
TriggerGCAll()
Health()
}
func NewGCManager ¶
func NewGCManager(client client.Client, config *GarbageCollectionConfig, crdMgr ctrl.Manager, wepManager workloadendpointmanager.WorkloadEndpointManager, ippoolManager ippoolmanager.IPPoolManager, podManager podmanager.PodManager) (GCManager, error)
type GarbageCollectionConfig ¶
type GarbageCollectionConfig struct {
LogLevel string
EnableGCIP bool
EnableGCForTerminatingPod bool
ReleaseIPWorkerNum int
GCIPChannelBuffer int
MaxPodEntryDatabaseCap int
DefaultGCIntervalDuration time.Duration
TracePodGapDuration time.Duration
GCSignalTimeoutDuration time.Duration
GCSignalGapDuration time.Duration
AdditionalGraceDelay time.Duration
}
type PodDBer ¶
type PodDBer interface {
GetPodEntry(podName, namespace string) PodEntry
DeletePodEntry(podName, namespace string)
ApplyPodEntry(podEntry *PodEntry) error
ListAllPodEntries() []PodEntry
}
func NewPodDBer ¶
type PodDatabase ¶
PodDatabase represents controller PodEntry database
func (*PodDatabase) ApplyPodEntry ¶
func (p *PodDatabase) ApplyPodEntry(podEntry *PodEntry) error
func (*PodDatabase) DeletePodEntry ¶
func (p *PodDatabase) DeletePodEntry(podName, namespace string)
func (*PodDatabase) GetPodEntry ¶
func (p *PodDatabase) GetPodEntry(podName, namespace string) PodEntry
func (*PodDatabase) ListAllPodEntries ¶
func (p *PodDatabase) ListAllPodEntries() []PodEntry
type PodEntry ¶
type PodEntry struct {
PodName string
Namespace string
NodeName string
EntryUpdateTime time.Time
TracingStartTime time.Time
TracingGracefulTime time.Duration
TracingStopTime time.Time
PodTracingReason types.PodStatus
}
PodEntry represents a pod cache
type SpiderGC ¶
type SpiderGC struct {
KClient client.Client
PodDB PodDBer
// contains filtered or unexported fields
}
func (*SpiderGC) GetPodDatabase ¶
func (*SpiderGC) Reconcile ¶
func (s *SpiderGC) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)
Reconcile notice: if reconcile received an error, then the correspond request will requeue.
func (*SpiderGC) TriggerGCAll ¶
func (s *SpiderGC) TriggerGCAll()
Click to show internal directories.
Click to hide internal directories.