Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cleaner ¶
type Cleaner interface { // Start starts the cleaner loop. // The cleaner loop discovers stale allocations and clean up them. Start(ctx context.Context) }
Cleaner is the interface of the cleaner package. The cleaner periodically scan the store and check for allocations which doesn't have related Pod in the k8s API. If allocation has no Pod for more than X checks, then the cleaner will release the allocation. Also, the cleaner will remove pool entries in the store if the pool has no allocation and pool configuration is unavailable in the Kubernetes API.
func New ¶
func New(cachedClient client.Client, directClient client.Client, store storePkg.Store, poolConfReader pool.ConfigReader, checkInterval time.Duration, checkCountBeforeRelease int) Cleaner
New creates and initialize new cleaner instance "checkInterval" defines delay between checks for stale allocations. "checkCountBeforeRelease: defines how many check to do before remove the allocation
Click to show internal directories.
Click to hide internal directories.