Documentation ¶
Index ¶
- Constants
- func CanSupportIntegration(opts ...jobframework.Option) (bool, error)
- func GetWorkloadNameForPod(podName string) string
- func IsPodOwnerManagedByKueue(p *Pod) bool
- func NewReconciler(c client.Client, record record.EventRecorder, opts ...jobframework.Option) jobframework.JobReconcilerInterface
- func SetupIndexes(ctx context.Context, indexer client.FieldIndexer) error
- func SetupWebhook(mgr ctrl.Manager, opts ...jobframework.Option) error
- type Pod
- func (p *Pod) ConstructComposableWorkload(ctx context.Context, c client.Client, r record.EventRecorder) (*kueue.Workload, error)
- func (p *Pod) EnsureWorkloadOwnedByAllMembers(ctx context.Context, c client.Client, r record.EventRecorder, ...) error
- func (p *Pod) Finalize(ctx context.Context, c client.Client) error
- func (p *Pod) FindMatchingWorkloads(ctx context.Context, c client.Client, r record.EventRecorder) (*kueue.Workload, []*kueue.Workload, error)
- func (p *Pod) Finished() (metav1.Condition, bool)
- func (p *Pod) GVK() schema.GroupVersionKind
- func (p *Pod) IsActive() bool
- func (p *Pod) IsSuspended() bool
- func (p *Pod) ListChildWorkloads(ctx context.Context, c client.Client, key types.NamespacedName) (*kueue.WorkloadList, error)
- func (p *Pod) Load(ctx context.Context, c client.Client, key *types.NamespacedName) (removeFinalizers bool, err error)
- func (p *Pod) Object() client.Object
- func (p *Pod) PodSets() []kueue.PodSet
- func (p *Pod) PodsReady() bool
- func (p *Pod) ReclaimablePods() ([]kueue.ReclaimablePod, error)
- func (p *Pod) RestorePodSetsInfo(_ []podset.PodSetInfo) bool
- func (p *Pod) Run(ctx context.Context, c client.Client, podSetsInfo []podset.PodSetInfo, ...) error
- func (p *Pod) RunWithPodSetsInfo(_ []podset.PodSetInfo) error
- func (p *Pod) Skip() bool
- func (p *Pod) Stop(ctx context.Context, c client.Client, _ []podset.PodSetInfo, ...) ([]client.Object, error)
- func (p *Pod) Suspend()
- type PodWebhook
- func (w *PodWebhook) Default(ctx context.Context, obj runtime.Object) error
- func (w *PodWebhook) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
- func (w *PodWebhook) ValidateDelete(context.Context, runtime.Object) (admission.Warnings, error)
- func (w *PodWebhook) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
- type Reconciler
Constants ¶
View Source
const ( SchedulingGateName = "kueue.x-k8s.io/admission" FrameworkName = "pod" ConditionTypeTerminationTarget = "TerminationTarget" IsGroupWorkloadAnnotationKey = "kueue.x-k8s.io/is-group-workload" IsGroupWorkloadAnnotationValue = "true" )
View Source
const ( ReasonExcessPodDeleted = "ExcessPodDeleted" ReasonOwnerReferencesAdded = "OwnerReferencesAdded" )
Event reasons used by the pod controller
View Source
const ( ManagedLabelKey = "kueue.x-k8s.io/managed" ManagedLabelValue = "true" PodFinalizer = ManagedLabelKey GroupNameLabel = "kueue.x-k8s.io/pod-group-name" GroupTotalCountAnnotation = "kueue.x-k8s.io/pod-group-total-count" RoleHashAnnotation = "kueue.x-k8s.io/role-hash" RetriableInGroupAnnotation = "kueue.x-k8s.io/retriable-in-group" )
Variables ¶
This section is empty.
Functions ¶
func CanSupportIntegration ¶ added in v0.6.0
func CanSupportIntegration(opts ...jobframework.Option) (bool, error)
func GetWorkloadNameForPod ¶
func NewReconciler ¶
func NewReconciler(c client.Client, record record.EventRecorder, opts ...jobframework.Option) jobframework.JobReconcilerInterface
func SetupIndexes ¶
func SetupIndexes(ctx context.Context, indexer client.FieldIndexer) error
func SetupWebhook ¶
func SetupWebhook(mgr ctrl.Manager, opts ...jobframework.Option) error
SetupWebhook configures the webhook for pods.
Types ¶
type Pod ¶
type Pod struct {
// contains filtered or unexported fields
}
func (*Pod) ConstructComposableWorkload ¶ added in v0.6.0
func (*Pod) EnsureWorkloadOwnedByAllMembers ¶ added in v0.6.0
func (*Pod) FindMatchingWorkloads ¶ added in v0.6.0
func (*Pod) Finished ¶
Finished means whether the job is completed/failed or not, condition represents the workload finished condition.
func (*Pod) GVK ¶
func (p *Pod) GVK() schema.GroupVersionKind
GVK returns GVK (Group Version Kind) for the job.
func (*Pod) IsSuspended ¶
IsSuspended returns whether the job is suspended or not.
func (*Pod) ListChildWorkloads ¶ added in v0.6.0
func (p *Pod) ListChildWorkloads(ctx context.Context, c client.Client, key types.NamespacedName) (*kueue.WorkloadList, error)
func (*Pod) Load ¶ added in v0.6.0
func (p *Pod) Load(ctx context.Context, c client.Client, key *types.NamespacedName) (removeFinalizers bool, err error)
Load loads all pods in the group
func (*Pod) ReclaimablePods ¶ added in v0.6.0
func (p *Pod) ReclaimablePods() ([]kueue.ReclaimablePod, error)
func (*Pod) RestorePodSetsInfo ¶
func (p *Pod) RestorePodSetsInfo(_ []podset.PodSetInfo) bool
RestorePodSetsInfo will restore the original node affinity and podSet counts of the job.
func (*Pod) Run ¶ added in v0.6.0
func (p *Pod) Run(ctx context.Context, c client.Client, podSetsInfo []podset.PodSetInfo, recorder record.EventRecorder, msg string) error
Run will inject the node affinity and podSet counts extracting from workload to job and unsuspend it.
func (*Pod) RunWithPodSetsInfo ¶
func (p *Pod) RunWithPodSetsInfo(_ []podset.PodSetInfo) error
RunWithPodSetsInfo will inject the node affinity and podSet counts extracting from workload to job and unsuspend it.
func (*Pod) Stop ¶
func (p *Pod) Stop(ctx context.Context, c client.Client, _ []podset.PodSetInfo, stopReason jobframework.StopReason, eventMsg string) ([]client.Object, error)
type PodWebhook ¶
type PodWebhook struct {
// contains filtered or unexported fields
}
func (*PodWebhook) ValidateCreate ¶
func (*PodWebhook) ValidateDelete ¶
func (*PodWebhook) ValidateUpdate ¶
type Reconciler ¶ added in v0.6.0
type Reconciler struct { *jobframework.JobReconciler // contains filtered or unexported fields }
func (*Reconciler) SetupWithManager ¶ added in v0.6.0
func (r *Reconciler) SetupWithManager(mgr ctrl.Manager) error
Click to show internal directories.
Click to hide internal directories.