Documentation ¶
Index ¶
- func FailedToSchedule(pod *v1.Pod) bool
- func HasDoNotDisrupt(pod *v1.Pod) bool
- func HasPodAntiAffinity(pod *v1.Pod) bool
- func HasRequiredPodAntiAffinity(pod *v1.Pod) bool
- func IsActive(pod *v1.Pod) bool
- func IsDisruptable(pod *v1.Pod) bool
- func IsEvictable(pod *v1.Pod) bool
- func IsOwnedBy(pod *v1.Pod, gvks []schema.GroupVersionKind) bool
- func IsOwnedByDaemonSet(pod *v1.Pod) bool
- func IsOwnedByNode(pod *v1.Pod) bool
- func IsOwnedByStatefulSet(pod *v1.Pod) bool
- func IsPreempting(pod *v1.Pod) bool
- func IsProvisionable(pod *v1.Pod) bool
- func IsReschedulable(pod *v1.Pod) bool
- func IsScheduled(pod *v1.Pod) bool
- func IsStuckTerminating(pod *v1.Pod, clk clock.Clock) bool
- func IsTerminal(pod *v1.Pod) bool
- func IsTerminating(pod *v1.Pod) bool
- func IsWaitingEviction(pod *v1.Pod, clk clock.Clock) bool
- func ToleratesDisruptionNoScheduleTaint(pod *v1.Pod) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FailedToSchedule ¶
FailedToSchedule ensures that the kube-scheduler has seen this pod and has intentionally marked this pod with a condition, noting that it thinks that the pod can't schedule anywhere It does this by marking the pod status condition "PodScheduled" as "Unschedulable" Note that it's possible that other schedulers may be scheduling another pod and may have a different semantic (e.g. Fargate on AWS marks with MATCH_NODE_SELECTOR_FAILED). If that's the case, Karpenter won't react to this pod because the scheduler didn't add this specific condition.
func HasDoNotDisrupt ¶
func HasPodAntiAffinity ¶
HasPodAntiAffinity returns true if a non-empty PodAntiAffinity is defined in the pod spec
func HasRequiredPodAntiAffinity ¶
HasRequiredPodAntiAffinity returns true if a non-empty PodAntiAffinity/RequiredDuringSchedulingIgnoredDuringExecution is defined in the pod spec
func IsActive ¶ added in v0.34.0
IsActive checks if Karpenter should consider this pod as running by ensuring that the pod: - Isn't a terminal pod (Failed or Succeeded) - Isn't actively terminating
func IsDisruptable ¶ added in v0.34.0
IsDisruptable checks if a pod can be disrupted based on validating the `karpenter.sh/do-not-disrupt` annotation on the pod. It checks whether the following is true for the pod: - Has the `karpenter.sh/do-not-disrupt` annotation - Is an actively running pod
func IsEvictable ¶ added in v0.34.0
IsEvictable checks if a pod is evictable by Karpenter by ensuring that the pod: - Is an active pod (isn't terminal or actively terminating) - Doesn't tolerate the "karpenter.sh/disruption=disrupting" taint - Isn't a mirror pod (https://kubernetes.io/docs/tasks/configure-pod-container/static-pod/)
func IsOwnedByDaemonSet ¶
func IsOwnedByNode ¶
IsOwnedByNode returns true if the pod is a static pod owned by a specific node
func IsOwnedByStatefulSet ¶ added in v0.34.0
func IsPreempting ¶
func IsProvisionable ¶
IsProvisionable checks if a pod needs to be scheduled to new capacity by Karpenter by ensuring that the pod: - Has been marked as "Unschedulable" in the PodScheduled reason by the kube-scheduler - Has not been bound to a node - Isn't currently preempting other pods on the cluster and about to schedule - Isn't owned by a DaemonSet - Isn't a mirror pod (https://kubernetes.io/docs/tasks/configure-pod-container/static-pod/)
func IsReschedulable ¶ added in v0.34.0
IsReschedulable checks if a Karpenter should consider this pod when re-scheduling to new capacity by ensuring that the pod: - Is an active pod (isn't terminal or actively terminating) OR Is owned by a StatefulSet and Is Terminating - Isn't owned by a DaemonSet - Isn't a mirror pod (https://kubernetes.io/docs/tasks/configure-pod-container/static-pod/)
func IsScheduled ¶
func IsStuckTerminating ¶ added in v0.34.0
func IsTerminal ¶
func IsTerminating ¶
func IsWaitingEviction ¶ added in v0.34.0
IsWaitingEviction checks if this is a pod that we are waiting to be removed from the node by ensuring that the pod: - Isn't a terminal pod (Failed or Succeeded) - Isn't a pod that has been terminating past its terminationGracePeriodSeconds - Doesn't tolerate the "karpenter.sh/disruption=disrupting" taint - Isn't a mirror pod (https://kubernetes.io/docs/tasks/configure-pod-container/static-pod/)
func ToleratesDisruptionNoScheduleTaint ¶
ToleratesDisruptionNoScheduleTaint returns true if the pod tolerates karpenter.sh/disruption:NoSchedule=Disrupting taint
Types ¶
This section is empty.