Documentation ¶
Index ¶
- Constants
- Variables
- func GetWorkloadNameForPod(podName string) string
- func IsPodOwnerManagedByKueue(p *Pod) bool
- func SetupIndexes(ctx context.Context, indexer client.FieldIndexer) error
- func SetupWebhook(mgr ctrl.Manager, opts ...jobframework.Option) error
- type Pod
- func (p *Pod) Finalize(ctx context.Context, c client.Client) 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) Object() client.Object
- func (p *Pod) PodSets() []kueue.PodSet
- func (p *Pod) PodsReady() bool
- func (p *Pod) RestorePodSetsInfo(nodeSelectors []podset.PodSetInfo) bool
- func (p *Pod) RunWithPodSetsInfo(podSetsInfo []podset.PodSetInfo) error
- func (p *Pod) Skip() bool
- func (p *Pod) Stop(ctx context.Context, c client.Client, _ []podset.PodSetInfo, eventMsg string) (bool, 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)
Constants ¶
View Source
const ( SchedulingGateName = "kueue.x-k8s.io/admission" FrameworkName = "pod" ConditionTypeTerminationTarget = "TerminationTarget" )
View Source
const ( ManagedLabelKey = "kueue.x-k8s.io/managed" ManagedLabelValue = "true" PodFinalizer = ManagedLabelKey )
Variables ¶
View Source
var NewReconciler = jobframework.NewGenericReconciler( func() jobframework.GenericJob { return &Pod{} }, nil)
Functions ¶
func GetWorkloadNameForPod ¶
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 ¶
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) RestorePodSetsInfo ¶
func (p *Pod) RestorePodSetsInfo(nodeSelectors []podset.PodSetInfo) bool
RestorePodSetsInfo will restore the original node affinity and podSet counts of the job.
func (*Pod) RunWithPodSetsInfo ¶
func (p *Pod) RunWithPodSetsInfo(podSetsInfo []podset.PodSetInfo) error
RunWithPodSetsInfo will inject the node affinity and podSet counts extracting from workload to job and unsuspend it.
type PodWebhook ¶
type PodWebhook struct {
// contains filtered or unexported fields
}
func (*PodWebhook) ValidateCreate ¶
func (*PodWebhook) ValidateDelete ¶
func (*PodWebhook) ValidateUpdate ¶
Click to show internal directories.
Click to hide internal directories.