Documentation ¶
Index ¶
- Constants
- func BeForbiddenError() types.GomegaMatcher
- func BeNotFoundError() types.GomegaMatcher
- func CheckLatestEvent(ctx context.Context, k8sClient client.Client, eventReason string, ...) (bool, error)
- func NewClientBuilder() *fake.ClientBuilder
- func NewFakeClient(objs ...client.Object) client.Client
- func PodSpecForRequest(request map[corev1.ResourceName]string) corev1.PodSpec
- func SingleContainerForRequest(request map[corev1.ResourceName]string) []corev1.Container
- type AdmissionWrapper
- type ClusterQueueWrapper
- func (c *ClusterQueueWrapper) Cohort(cohort string) *ClusterQueueWrapper
- func (c *ClusterQueueWrapper) NamespaceSelector(s *metav1.LabelSelector) *ClusterQueueWrapper
- func (c *ClusterQueueWrapper) Obj() *kueue.ClusterQueue
- func (c *ClusterQueueWrapper) Preemption(p kueue.ClusterQueuePreemption) *ClusterQueueWrapper
- func (c *ClusterQueueWrapper) QueueingStrategy(strategy kueue.QueueingStrategy) *ClusterQueueWrapper
- func (c *ClusterQueueWrapper) ResourceGroup(flavors ...kueue.FlavorQuotas) *ClusterQueueWrapper
- type FlavorQuotasWrapper
- type LimitRangeWrapper
- type LocalQueueWrapper
- type PodSetWrapper
- type PriorityClassWrapper
- type ResourceFlavorWrapper
- type RuntimeClassWrapper
- type WorkloadWrapper
- func (w *WorkloadWrapper) Admit(a *kueue.Admission) *WorkloadWrapper
- func (w *WorkloadWrapper) Condition(condition metav1.Condition) *WorkloadWrapper
- func (w *WorkloadWrapper) Creation(t time.Time) *WorkloadWrapper
- func (w *WorkloadWrapper) Limit(r corev1.ResourceName, q string) *WorkloadWrapper
- func (w *WorkloadWrapper) NodeSelector(kv map[string]string) *WorkloadWrapper
- func (w *WorkloadWrapper) Obj() *kueue.Workload
- func (w *WorkloadWrapper) PodSets(podSets ...kueue.PodSet) *WorkloadWrapper
- func (w *WorkloadWrapper) Priority(priority int32) *WorkloadWrapper
- func (w *WorkloadWrapper) PriorityClass(priorityClassName string) *WorkloadWrapper
- func (w *WorkloadWrapper) Queue(q string) *WorkloadWrapper
- func (w *WorkloadWrapper) Request(r corev1.ResourceName, q string) *WorkloadWrapper
- func (w *WorkloadWrapper) RuntimeClass(name string) *WorkloadWrapper
- func (w *WorkloadWrapper) Toleration(t corev1.Toleration) *WorkloadWrapper
Constants ¶
const ( Ki = 1 << 10 Mi = Ki * Ki Gi = Ki * Mi )
Variables ¶
This section is empty.
Functions ¶
func BeForbiddenError ¶ added in v0.3.0
func BeForbiddenError() types.GomegaMatcher
func BeNotFoundError ¶ added in v0.2.0
func BeNotFoundError() types.GomegaMatcher
func CheckLatestEvent ¶
func CheckLatestEvent(ctx context.Context, k8sClient client.Client, eventReason string, eventType string, eventNote string) (bool, error)
CheckLatestEvent will return true if the latest event is as you want.
func NewClientBuilder ¶ added in v0.3.0
func NewClientBuilder() *fake.ClientBuilder
func PodSpecForRequest ¶
func PodSpecForRequest(request map[corev1.ResourceName]string) corev1.PodSpec
func SingleContainerForRequest ¶ added in v0.3.0
func SingleContainerForRequest(request map[corev1.ResourceName]string) []corev1.Container
Types ¶
type AdmissionWrapper ¶
AdmissionWrapper wraps an Admission
func MakeAdmission ¶
func MakeAdmission(cq string, podSetNames ...string) *AdmissionWrapper
func (*AdmissionWrapper) Assignment ¶ added in v0.3.0
func (w *AdmissionWrapper) Assignment(r corev1.ResourceName, f kueue.ResourceFlavorReference, value string) *AdmissionWrapper
func (*AdmissionWrapper) Obj ¶
func (w *AdmissionWrapper) Obj() *kueue.Admission
func (*AdmissionWrapper) PodSets ¶ added in v0.3.0
func (w *AdmissionWrapper) PodSets(podSets ...kueue.PodSetAssignment) *AdmissionWrapper
type ClusterQueueWrapper ¶
type ClusterQueueWrapper struct{ kueue.ClusterQueue }
ClusterQueueWrapper wraps a ClusterQueue.
func MakeClusterQueue ¶
func MakeClusterQueue(name string) *ClusterQueueWrapper
MakeClusterQueue creates a wrapper for a ClusterQueue with a select-all NamespaceSelector.
func (*ClusterQueueWrapper) Cohort ¶
func (c *ClusterQueueWrapper) Cohort(cohort string) *ClusterQueueWrapper
Cohort sets the borrowing cohort.
func (*ClusterQueueWrapper) NamespaceSelector ¶
func (c *ClusterQueueWrapper) NamespaceSelector(s *metav1.LabelSelector) *ClusterQueueWrapper
NamespaceSelector sets the namespace selector.
func (*ClusterQueueWrapper) Obj ¶
func (c *ClusterQueueWrapper) Obj() *kueue.ClusterQueue
Obj returns the inner ClusterQueue.
func (*ClusterQueueWrapper) Preemption ¶ added in v0.3.0
func (c *ClusterQueueWrapper) Preemption(p kueue.ClusterQueuePreemption) *ClusterQueueWrapper
Preemption sets the preeemption policies.
func (*ClusterQueueWrapper) QueueingStrategy ¶
func (c *ClusterQueueWrapper) QueueingStrategy(strategy kueue.QueueingStrategy) *ClusterQueueWrapper
QueueingStrategy sets the queueing strategy in this ClusterQueue.
func (*ClusterQueueWrapper) ResourceGroup ¶ added in v0.3.0
func (c *ClusterQueueWrapper) ResourceGroup(flavors ...kueue.FlavorQuotas) *ClusterQueueWrapper
ResourceGroup adds a ResourceGroup with flavors.
type FlavorQuotasWrapper ¶ added in v0.3.0
type FlavorQuotasWrapper struct{ kueue.FlavorQuotas }
FlavorQuotasWrapper wraps a FlavorQuotas object.
func MakeFlavorQuotas ¶ added in v0.3.0
func MakeFlavorQuotas(name string) *FlavorQuotasWrapper
MakeFlavorQuotas creates a wrapper for a resource flavor.
func (*FlavorQuotasWrapper) Obj ¶ added in v0.3.0
func (f *FlavorQuotasWrapper) Obj() *kueue.FlavorQuotas
Obj returns the inner flavor.
func (*FlavorQuotasWrapper) Resource ¶ added in v0.3.0
func (f *FlavorQuotasWrapper) Resource(name corev1.ResourceName, qs ...string) *FlavorQuotasWrapper
type LimitRangeWrapper ¶ added in v0.3.0
type LimitRangeWrapper struct{ corev1.LimitRange }
func MakeLimitRange ¶ added in v0.3.0
func MakeLimitRange(name, namespace string) *LimitRangeWrapper
func (*LimitRangeWrapper) Obj ¶ added in v0.3.0
func (lr *LimitRangeWrapper) Obj() *corev1.LimitRange
func (*LimitRangeWrapper) WithType ¶ added in v0.3.0
func (lr *LimitRangeWrapper) WithType(t corev1.LimitType) *LimitRangeWrapper
func (*LimitRangeWrapper) WithValue ¶ added in v0.3.0
func (lr *LimitRangeWrapper) WithValue(member string, t corev1.ResourceName, q string) *LimitRangeWrapper
type LocalQueueWrapper ¶ added in v0.2.0
type LocalQueueWrapper struct{ kueue.LocalQueue }
LocalQueueWrapper wraps a Queue.
func MakeLocalQueue ¶ added in v0.2.0
func MakeLocalQueue(name, ns string) *LocalQueueWrapper
MakeLocalQueue creates a wrapper for a LocalQueue.
func (*LocalQueueWrapper) ClusterQueue ¶ added in v0.2.0
func (q *LocalQueueWrapper) ClusterQueue(c string) *LocalQueueWrapper
ClusterQueue updates the clusterQueue the queue points to.
func (*LocalQueueWrapper) Obj ¶ added in v0.2.0
func (q *LocalQueueWrapper) Obj() *kueue.LocalQueue
Obj returns the inner LocalQueue.
func (*LocalQueueWrapper) PendingWorkloads ¶ added in v0.2.0
func (q *LocalQueueWrapper) PendingWorkloads(n int32) *LocalQueueWrapper
PendingWorkloads updates the pendingWorkloads in status.
type PodSetWrapper ¶ added in v0.3.0
func MakePodSet ¶ added in v0.3.0
func MakePodSet(name string, count int) *PodSetWrapper
func (*PodSetWrapper) Obj ¶ added in v0.3.0
func (p *PodSetWrapper) Obj() *kueue.PodSet
func (*PodSetWrapper) Request ¶ added in v0.3.0
func (p *PodSetWrapper) Request(r corev1.ResourceName, q string) *PodSetWrapper
func (*PodSetWrapper) Toleration ¶ added in v0.3.0
func (p *PodSetWrapper) Toleration(t corev1.Toleration) *PodSetWrapper
type PriorityClassWrapper ¶
type PriorityClassWrapper struct {
schedulingv1.PriorityClass
}
PriorityClassWrapper wraps a PriorityClass.
func MakePriorityClass ¶
func MakePriorityClass(name string) *PriorityClassWrapper
MakePriorityClass creates a wrapper for a PriorityClass.
func (*PriorityClassWrapper) Obj ¶
func (p *PriorityClassWrapper) Obj() *schedulingv1.PriorityClass
Obj returns the inner PriorityClass.
func (*PriorityClassWrapper) PriorityValue ¶
func (p *PriorityClassWrapper) PriorityValue(v int32) *PriorityClassWrapper
PriorityValue update value of PriorityClass。
type ResourceFlavorWrapper ¶
type ResourceFlavorWrapper struct{ kueue.ResourceFlavor }
ResourceFlavorWrapper wraps a ResourceFlavor.
func MakeResourceFlavor ¶
func MakeResourceFlavor(name string) *ResourceFlavorWrapper
MakeResourceFlavor creates a wrapper for a ResourceFlavor.
func (*ResourceFlavorWrapper) Label ¶
func (rf *ResourceFlavorWrapper) Label(k, v string) *ResourceFlavorWrapper
Label add a label kueue and value pair to the ResourceFlavor.
func (*ResourceFlavorWrapper) Obj ¶
func (rf *ResourceFlavorWrapper) Obj() *kueue.ResourceFlavor
Obj returns the inner ResourceFlavor.
func (*ResourceFlavorWrapper) Taint ¶
func (rf *ResourceFlavorWrapper) Taint(t corev1.Taint) *ResourceFlavorWrapper
Taint adds a taint to the ResourceFlavor.
type RuntimeClassWrapper ¶ added in v0.2.0
type RuntimeClassWrapper struct{ nodev1.RuntimeClass }
RuntimeClassWrapper wraps a RuntimeClass.
func MakeRuntimeClass ¶ added in v0.2.0
func MakeRuntimeClass(name, handler string) *RuntimeClassWrapper
MakeRuntimeClass creates a wrapper for a Runtime.
func (*RuntimeClassWrapper) Obj ¶ added in v0.2.0
func (rc *RuntimeClassWrapper) Obj() *nodev1.RuntimeClass
Obj returns the inner flavor.
func (*RuntimeClassWrapper) PodOverhead ¶ added in v0.2.0
func (rc *RuntimeClassWrapper) PodOverhead(resources corev1.ResourceList) *RuntimeClassWrapper
PodOverhead adds a Overhead to the RuntimeClass.
type WorkloadWrapper ¶
func MakeWorkload ¶
func MakeWorkload(name, ns string) *WorkloadWrapper
MakeWorkload creates a wrapper for a Workload with a single pod with a single container.
func (*WorkloadWrapper) Admit ¶
func (w *WorkloadWrapper) Admit(a *kueue.Admission) *WorkloadWrapper
func (*WorkloadWrapper) Condition ¶ added in v0.3.0
func (w *WorkloadWrapper) Condition(condition metav1.Condition) *WorkloadWrapper
func (*WorkloadWrapper) Creation ¶
func (w *WorkloadWrapper) Creation(t time.Time) *WorkloadWrapper
func (*WorkloadWrapper) Limit ¶ added in v0.3.0
func (w *WorkloadWrapper) Limit(r corev1.ResourceName, q string) *WorkloadWrapper
func (*WorkloadWrapper) NodeSelector ¶ added in v0.2.0
func (w *WorkloadWrapper) NodeSelector(kv map[string]string) *WorkloadWrapper
func (*WorkloadWrapper) Obj ¶
func (w *WorkloadWrapper) Obj() *kueue.Workload
func (*WorkloadWrapper) PodSets ¶ added in v0.2.0
func (w *WorkloadWrapper) PodSets(podSets ...kueue.PodSet) *WorkloadWrapper
func (*WorkloadWrapper) Priority ¶ added in v0.2.0
func (w *WorkloadWrapper) Priority(priority int32) *WorkloadWrapper
func (*WorkloadWrapper) PriorityClass ¶
func (w *WorkloadWrapper) PriorityClass(priorityClassName string) *WorkloadWrapper
func (*WorkloadWrapper) Queue ¶
func (w *WorkloadWrapper) Queue(q string) *WorkloadWrapper
func (*WorkloadWrapper) Request ¶
func (w *WorkloadWrapper) Request(r corev1.ResourceName, q string) *WorkloadWrapper
func (*WorkloadWrapper) RuntimeClass ¶ added in v0.2.0
func (w *WorkloadWrapper) RuntimeClass(name string) *WorkloadWrapper
func (*WorkloadWrapper) Toleration ¶ added in v0.2.0
func (w *WorkloadWrapper) Toleration(t corev1.Toleration) *WorkloadWrapper