Documentation ¶
Index ¶
Constants ¶
View Source
const ( ReasonCrashLoopBackOff = "CrashLoopBackOff" EventReasonPodDisruptionBudgetDeleted = "PodDisruptionBudgetDeleted" EventReasonBlockingDetected = "BlockingPodDisruptionBudget" EventReasonMultipleDetected = "MultiplePodDisruptionBudgets" EventReasonBlockingCrashLoopDetected = "BlockingPodDisruptionBudgetWithCrashLoop" EventReasonBlockingNotReadyStateDetected = "BlockingPodDisruptionBudgetWithNotReadyState" EventMessageDeletedFmt = "The PodDisruptionBudget %v has been deleted by pdb-reaper due to violation" EventMessageBlockingFmt = "The PodDisruptionBudget %v has been marked for deletion due to misconfiguration/not allowing disruptions" EventMessageMultipleFmt = "The PodDisruptionBudget %v has been marked for deletion due to multiple budgets targeting same pods" EventMessageCrashLoopFmt = "The PodDisruptionBudget %v has been marked for deletion due to pods in CrashLoopBackOff blocking disruptions" EventMessageNotReadyFmt = "The PodDisruptionBudget %v has been marked for deletion due to pods in not-ready blocking disruptions" PdbReaperResultMetricName = "governor_pdb_reaper_result" )
Variables ¶
Functions ¶
Types ¶
type Args ¶
type Args struct { K8sConfigPath string DryRun bool LocalMode bool ReapMisconfigured bool ReapMultiple bool ReapCrashLoop bool AllCrashLoop bool ExcludedNamespaces []string CrashLoopRestartCount int ReapNotReady bool ReapNotReadyThreshold int AllNotReady bool PromPushgateway string }
Args is the argument struct for pdb-reaper
type ReaperContext ¶
type ReaperContext struct { KubernetesClient kubernetes.Interface KubernetesConfigPath string DryRun bool LocalMode bool ReapMisconfigured bool ReapMultiple bool ReapCrashLoop bool AllCrashLoop bool CrashLoopRestartCount int ReapNotReady bool ReapNotReadyThreshold int AllNotReady bool ReapablePodDisruptionBudgets []policyv1.PodDisruptionBudget ClusterBlockingPodDisruptionBudgets map[string][]policyv1.PodDisruptionBudget NamespacesWithMultiplePodDisruptionBudgets map[string][]policyv1.PodDisruptionBudget ExcludedNamespaces []string ReapablePodDisruptionBudgetsCount int ReapedPodDisruptionBudgetCount int PromPushgateway string MetricsAPI common.MetricsAPI }
ReaperContext holds the context of the pdb-reaper and target cluster
func NewReaperContext ¶
func NewReaperContext(args *Args) *ReaperContext
Click to show internal directories.
Click to hide internal directories.