package
0.3.0
Repository: https://github.com/traas-stack/kapacity.git
Documentation: pkg.go.dev

# Functions

AbsInt32 returns the absolute value of an int32 number.
AddPodCondition adds a pod condition if not exists.
AddPodReadinessGate adds the provided condition to the pod's readiness gates.
No description provided by the author
CopyMapValues copies all the values from src map to dst map, overwriting any existing one.
ExponentialBackoffWithContext works similar like wait.ExponentialBackoffWithContext but with below differences: * It does not stop when the cap of backoff is reached.
GetPodNames generate a list of pod names from a list of pod objects.
IsCronActive returns if the given time is in the range specified by the start cron and end cron as well as the next time of the end cron.
IsMapValueChanged compares two maps' values key by key, if any value in oldValues map differs from the one in newValues map, it returns true, otherwise returns false.
IsPodActive returns if the given pod has not terminated.
IsPodRunning returns if the given pod's phase is running and is not being deleted.
MaxInt32 returns the biggest one between two int32 numbers.
MinInt32 returns the smallest one between two int32 numbers.
NewControllerRef creates a controller owner reference pointing to the given owner.
NewCtrlPodLister creates a corev1listers.PodLister wrapper for given controller-runtime client.
ParseScaleSelector parses the selector string got from Kubernetes scale API to labels.Selector.
SetConditionInList sets the specific condition type on the given condition list to the specified value with the given reason and message.

# Constants

No description provided by the author