Documentation ¶
Index ¶
- Constants
- func AsIndexer(builder *fake.ClientBuilder) client.FieldIndexer
- func BeAPIError(name errorMatcher) types.GomegaMatcher
- func BeForbiddenError() types.GomegaMatcher
- func BeNotFoundError() types.GomegaMatcher
- func CheckLatestEvent(ctx context.Context, k8sClient client.Client, eventReason string, ...) (bool, error)
- func ContextWithLog(t *testing.T) (context.Context, logr.Logger)
- func NewClientBuilder(addToSchemes ...func(s *runtime.Scheme) error) *fake.ClientBuilder
- func NewFakeClient(objs ...client.Object) client.Client
- func NewFakeClientSSAAsSM(objs ...client.Object) client.Client
- func PodSpecForRequest(request map[corev1.ResourceName]string) corev1.PodSpec
- func RestConfigToKubeConfig(restConfig *rest.Config) ([]byte, error)
- func SetDuringTest[T any](val *T, newVal T) func()
- func SingleContainerForRequest(request map[corev1.ResourceName]string) []corev1.Container
- func SortEvents(ei, ej EventRecord) bool
- func TreatSSAAsStrategicMerge(ctx context.Context, clnt client.Client, subResourceName string, ...) error
- type AdmissionCheckStrategyRuleWrapper
- type AdmissionCheckWrapper
- func (ac *AdmissionCheckWrapper) Active(status metav1.ConditionStatus) *AdmissionCheckWrapper
- func (ac *AdmissionCheckWrapper) ApplyToAllFlavors(applyToAllFlavors bool, reason, message string, observedGeneration int64) *AdmissionCheckWrapper
- func (ac *AdmissionCheckWrapper) Condition(cond metav1.Condition) *AdmissionCheckWrapper
- func (ac *AdmissionCheckWrapper) ControllerName(c string) *AdmissionCheckWrapper
- func (ac *AdmissionCheckWrapper) Generation(num int64) *AdmissionCheckWrapper
- func (ac *AdmissionCheckWrapper) Obj() *kueue.AdmissionCheck
- func (ac *AdmissionCheckWrapper) Parameters(apigroup, kind, name string) *AdmissionCheckWrapper
- func (ac *AdmissionCheckWrapper) SingleInstanceInClusterQueue(singleInstance bool, reason, message string, observedGeneration int64) *AdmissionCheckWrapper
- type AdmissionWrapper
- func (w *AdmissionWrapper) Assignment(r corev1.ResourceName, f kueue.ResourceFlavorReference, value string) *AdmissionWrapper
- func (w *AdmissionWrapper) AssignmentPodCount(value int32) *AdmissionWrapper
- func (w *AdmissionWrapper) Obj() *kueue.Admission
- func (w *AdmissionWrapper) PodSets(podSets ...kueue.PodSetAssignment) *AdmissionWrapper
- type ClusterQueueWrapper
- func (c *ClusterQueueWrapper) AdmissionCheckStrategy(acs ...kueue.AdmissionCheckStrategyRule) *ClusterQueueWrapper
- func (c *ClusterQueueWrapper) AdmissionChecks(checks ...string) *ClusterQueueWrapper
- func (c *ClusterQueueWrapper) AdmittedWorkloads(n int32) *ClusterQueueWrapper
- func (c *ClusterQueueWrapper) Cohort(cohort string) *ClusterQueueWrapper
- func (c *ClusterQueueWrapper) Condition(conditionType string, status metav1.ConditionStatus, reason, message string) *ClusterQueueWrapper
- func (c *ClusterQueueWrapper) Creation(t time.Time) *ClusterQueueWrapper
- func (c *ClusterQueueWrapper) FairWeight(w resource.Quantity) *ClusterQueueWrapper
- func (c *ClusterQueueWrapper) FlavorFungibility(p kueue.FlavorFungibility) *ClusterQueueWrapper
- func (c *ClusterQueueWrapper) Generation(num int64) *ClusterQueueWrapper
- func (c *ClusterQueueWrapper) Label(k, v string) *ClusterQueueWrapper
- func (c *ClusterQueueWrapper) NamespaceSelector(s *metav1.LabelSelector) *ClusterQueueWrapper
- func (c *ClusterQueueWrapper) Obj() *kueue.ClusterQueue
- func (c *ClusterQueueWrapper) PendingWorkloads(n int32) *ClusterQueueWrapper
- func (c *ClusterQueueWrapper) Preemption(p kueue.ClusterQueuePreemption) *ClusterQueueWrapper
- func (c *ClusterQueueWrapper) QueueingStrategy(strategy kueue.QueueingStrategy) *ClusterQueueWrapper
- func (c *ClusterQueueWrapper) ResourceGroup(flavors ...kueue.FlavorQuotas) *ClusterQueueWrapper
- func (c *ClusterQueueWrapper) StopPolicy(p kueue.StopPolicy) *ClusterQueueWrapper
- type ContainerWrapper
- type EventRecord
- type EventRecorder
- type FlavorQuotasWrapper
- type LimitRangeWrapper
- type LocalQueueWrapper
- func (q *LocalQueueWrapper) AdmittedWorkloads(n int32) *LocalQueueWrapper
- func (q *LocalQueueWrapper) ClusterQueue(c string) *LocalQueueWrapper
- func (q *LocalQueueWrapper) Condition(conditionType string, status metav1.ConditionStatus, reason, message string, ...) *LocalQueueWrapper
- func (q *LocalQueueWrapper) Creation(t time.Time) *LocalQueueWrapper
- func (q *LocalQueueWrapper) Generation(num int64) *LocalQueueWrapper
- func (q *LocalQueueWrapper) Label(k, v string) *LocalQueueWrapper
- func (q *LocalQueueWrapper) Obj() *kueue.LocalQueue
- func (q *LocalQueueWrapper) PendingWorkloads(n int32) *LocalQueueWrapper
- type MultiKueueClusterWrapper
- func (mkc *MultiKueueClusterWrapper) Active(state metav1.ConditionStatus, reason, message string, generation int64) *MultiKueueClusterWrapper
- func (mkc *MultiKueueClusterWrapper) Generation(num int64) *MultiKueueClusterWrapper
- func (mkc *MultiKueueClusterWrapper) KubeConfig(locationType kueuealpha.LocationType, location string) *MultiKueueClusterWrapper
- func (mkc *MultiKueueClusterWrapper) Obj() *kueuealpha.MultiKueueCluster
- type MultiKueueConfigWrapper
- type PodSetWrapper
- func (p *PodSetWrapper) Annotations(kv map[string]string) *PodSetWrapper
- func (p *PodSetWrapper) Containers(containers ...corev1.Container) *PodSetWrapper
- func (p *PodSetWrapper) Image(image string) *PodSetWrapper
- func (p *PodSetWrapper) InitContainers(containers ...corev1.Container) *PodSetWrapper
- func (p *PodSetWrapper) Labels(kv map[string]string) *PodSetWrapper
- func (p *PodSetWrapper) Limit(r corev1.ResourceName, q string) *PodSetWrapper
- func (p *PodSetWrapper) NodeName(name string) *PodSetWrapper
- func (p *PodSetWrapper) NodeSelector(kv map[string]string) *PodSetWrapper
- func (p *PodSetWrapper) Obj() *kueue.PodSet
- func (p *PodSetWrapper) PodOverHead(resources corev1.ResourceList) *PodSetWrapper
- func (p *PodSetWrapper) PriorityClass(pc string) *PodSetWrapper
- func (p *PodSetWrapper) Request(r corev1.ResourceName, q string) *PodSetWrapper
- func (p *PodSetWrapper) RuntimeClass(name string) *PodSetWrapper
- func (p *PodSetWrapper) SchedulingGates(sg ...corev1.PodSchedulingGate) *PodSetWrapper
- func (p *PodSetWrapper) SetMinimumCount(mc int32) *PodSetWrapper
- func (p *PodSetWrapper) Toleration(t corev1.Toleration) *PodSetWrapper
- type PriorityClassWrapper
- type ResourceFlavorWrapper
- func (rf *ResourceFlavorWrapper) Label(k, v string) *ResourceFlavorWrapper
- func (rf *ResourceFlavorWrapper) Obj() *kueue.ResourceFlavor
- func (rf *ResourceFlavorWrapper) Taint(t corev1.Taint) *ResourceFlavorWrapper
- func (rf *ResourceFlavorWrapper) Toleration(t corev1.Toleration) *ResourceFlavorWrapper
- type RuntimeClassWrapper
- type WorkloadPriorityClassWrapper
- type WorkloadWrapper
- func (w *WorkloadWrapper) Active(a bool) *WorkloadWrapper
- func (w *WorkloadWrapper) Admission(admission *kueue.Admission) *WorkloadWrapper
- func (w *WorkloadWrapper) AdmissionCheck(ac kueue.AdmissionCheckState) *WorkloadWrapper
- func (w *WorkloadWrapper) AdmissionChecks(checks ...kueue.AdmissionCheckState) *WorkloadWrapper
- func (w *WorkloadWrapper) Admitted(a bool) *WorkloadWrapper
- func (w *WorkloadWrapper) Annotations(annotations map[string]string) *WorkloadWrapper
- func (w *WorkloadWrapper) Clone() *WorkloadWrapper
- func (w *WorkloadWrapper) Condition(condition metav1.Condition) *WorkloadWrapper
- func (w *WorkloadWrapper) Conditions(conditions ...metav1.Condition) *WorkloadWrapper
- func (w *WorkloadWrapper) ControllerReference(gvk schema.GroupVersionKind, name, uid string) *WorkloadWrapper
- func (w *WorkloadWrapper) Creation(t time.Time) *WorkloadWrapper
- func (w *WorkloadWrapper) DeletionTimestamp(t time.Time) *WorkloadWrapper
- func (w *WorkloadWrapper) Finalizers(fin ...string) *WorkloadWrapper
- func (w *WorkloadWrapper) Finished() *WorkloadWrapper
- func (w *WorkloadWrapper) Generation(num int64) *WorkloadWrapper
- func (w *WorkloadWrapper) Label(k, v string) *WorkloadWrapper
- func (w *WorkloadWrapper) Labels(l map[string]string) *WorkloadWrapper
- func (w *WorkloadWrapper) Limit(r corev1.ResourceName, q string) *WorkloadWrapper
- func (w *WorkloadWrapper) Name(name string) *WorkloadWrapper
- func (w *WorkloadWrapper) NodeSelector(kv map[string]string) *WorkloadWrapper
- func (w *WorkloadWrapper) Obj() *kueue.Workload
- func (w *WorkloadWrapper) OwnerReference(gvk schema.GroupVersionKind, name, uid string) *WorkloadWrapper
- 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) PriorityClassSource(source string) *WorkloadWrapper
- func (w *WorkloadWrapper) Queue(q string) *WorkloadWrapper
- func (w *WorkloadWrapper) QuotaReservedTime(t time.Time) *WorkloadWrapper
- func (w *WorkloadWrapper) ReclaimablePods(rps ...kueue.ReclaimablePod) *WorkloadWrapper
- func (w *WorkloadWrapper) Request(r corev1.ResourceName, q string) *WorkloadWrapper
- func (w *WorkloadWrapper) RequeueState(count *int32, requeueAt *metav1.Time) *WorkloadWrapper
- func (w *WorkloadWrapper) ReserveQuota(a *kueue.Admission) *WorkloadWrapper
- func (w *WorkloadWrapper) ReserveQuotaAt(a *kueue.Admission, now time.Time) *WorkloadWrapper
- func (w *WorkloadWrapper) ResourceVersion(v string) *WorkloadWrapper
- func (w *WorkloadWrapper) RuntimeClass(name string) *WorkloadWrapper
- func (w *WorkloadWrapper) SetOrReplaceCondition(condition metav1.Condition) *WorkloadWrapper
- func (w *WorkloadWrapper) SimpleReserveQuota(cq, flavor string, now time.Time) *WorkloadWrapper
- func (w *WorkloadWrapper) Toleration(t corev1.Toleration) *WorkloadWrapper
- func (w *WorkloadWrapper) UID(uid types.UID) *WorkloadWrapper
Constants ¶
const ( NotFoundError errorMatcher = iota ForbiddenError InvalidError )
const ( Ki = 1 << 10 Mi = Ki * Ki Gi = Ki * Mi )
Variables ¶
This section is empty.
Functions ¶
func AsIndexer ¶ added in v0.4.0
func AsIndexer(builder *fake.ClientBuilder) client.FieldIndexer
func BeAPIError ¶ added in v0.7.0
func BeAPIError(name errorMatcher) types.GomegaMatcher
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 ContextWithLog ¶ added in v0.4.0
func NewClientBuilder ¶ added in v0.3.0
func NewClientBuilder(addToSchemes ...func(s *runtime.Scheme) error) *fake.ClientBuilder
func NewFakeClientSSAAsSM ¶ added in v0.6.3
func PodSpecForRequest ¶
func PodSpecForRequest(request map[corev1.ResourceName]string) corev1.PodSpec
func RestConfigToKubeConfig ¶ added in v0.7.0
func SetDuringTest ¶ added in v0.5.2
func SetDuringTest[T any](val *T, newVal T) func()
func SingleContainerForRequest ¶ added in v0.3.0
func SingleContainerForRequest(request map[corev1.ResourceName]string) []corev1.Container
func SortEvents ¶ added in v0.6.0
func SortEvents(ei, ej EventRecord) bool
func TreatSSAAsStrategicMerge ¶ added in v0.6.3
func TreatSSAAsStrategicMerge(ctx context.Context, clnt client.Client, subResourceName string, obj client.Object, patch client.Patch, opts ...client.SubResourcePatchOption) error
TreatSSAAsStrategicMerge - can be used as a SubResourcePatch interceptor function to treat SSA patches as StrategicMergePatchType. Note: By doing so the values set in the patch will be updated but the call will have no knowledge of FieldManagement when it comes to detecting conflicts between managers or removing fields that are missing from the patch.
Types ¶
type AdmissionCheckStrategyRuleWrapper ¶ added in v0.7.0
type AdmissionCheckStrategyRuleWrapper struct {
kueue.AdmissionCheckStrategyRule
}
func MakeAdmissionCheckStrategyRule ¶ added in v0.7.0
func MakeAdmissionCheckStrategyRule(name string, flavors ...kueue.ResourceFlavorReference) *AdmissionCheckStrategyRuleWrapper
func (*AdmissionCheckStrategyRuleWrapper) Obj ¶ added in v0.7.0
func (acs *AdmissionCheckStrategyRuleWrapper) Obj() *kueue.AdmissionCheckStrategyRule
func (*AdmissionCheckStrategyRuleWrapper) OnFlavors ¶ added in v0.7.0
func (acs *AdmissionCheckStrategyRuleWrapper) OnFlavors(flavors []kueue.ResourceFlavorReference) *AdmissionCheckStrategyRuleWrapper
type AdmissionCheckWrapper ¶ added in v0.5.0
type AdmissionCheckWrapper struct{ kueue.AdmissionCheck }
func MakeAdmissionCheck ¶ added in v0.5.0
func MakeAdmissionCheck(name string) *AdmissionCheckWrapper
func (*AdmissionCheckWrapper) Active ¶ added in v0.5.0
func (ac *AdmissionCheckWrapper) Active(status metav1.ConditionStatus) *AdmissionCheckWrapper
func (*AdmissionCheckWrapper) ApplyToAllFlavors ¶ added in v0.7.0
func (ac *AdmissionCheckWrapper) ApplyToAllFlavors(applyToAllFlavors bool, reason, message string, observedGeneration int64) *AdmissionCheckWrapper
func (*AdmissionCheckWrapper) Condition ¶ added in v0.6.0
func (ac *AdmissionCheckWrapper) Condition(cond metav1.Condition) *AdmissionCheckWrapper
func (*AdmissionCheckWrapper) ControllerName ¶ added in v0.5.0
func (ac *AdmissionCheckWrapper) ControllerName(c string) *AdmissionCheckWrapper
func (*AdmissionCheckWrapper) Generation ¶ added in v0.7.0
func (ac *AdmissionCheckWrapper) Generation(num int64) *AdmissionCheckWrapper
Generation sets the generation of the AdmissionCheck.
func (*AdmissionCheckWrapper) Obj ¶ added in v0.5.0
func (ac *AdmissionCheckWrapper) Obj() *kueue.AdmissionCheck
func (*AdmissionCheckWrapper) Parameters ¶ added in v0.5.0
func (ac *AdmissionCheckWrapper) Parameters(apigroup, kind, name string) *AdmissionCheckWrapper
func (*AdmissionCheckWrapper) SingleInstanceInClusterQueue ¶ added in v0.7.0
func (ac *AdmissionCheckWrapper) SingleInstanceInClusterQueue(singleInstance bool, reason, message string, observedGeneration int64) *AdmissionCheckWrapper
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) AssignmentPodCount ¶ added in v0.4.0
func (w *AdmissionWrapper) AssignmentPodCount(value int32) *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) AdmissionCheckStrategy ¶ added in v0.7.0
func (c *ClusterQueueWrapper) AdmissionCheckStrategy(acs ...kueue.AdmissionCheckStrategyRule) *ClusterQueueWrapper
func (*ClusterQueueWrapper) AdmissionChecks ¶ added in v0.5.0
func (c *ClusterQueueWrapper) AdmissionChecks(checks ...string) *ClusterQueueWrapper
AdmissionChecks replaces the queue additional checks
func (*ClusterQueueWrapper) AdmittedWorkloads ¶ added in v0.7.0
func (c *ClusterQueueWrapper) AdmittedWorkloads(n int32) *ClusterQueueWrapper
AdmittedWorkloads sets the admittedWorkloads in status.
func (*ClusterQueueWrapper) Cohort ¶
func (c *ClusterQueueWrapper) Cohort(cohort string) *ClusterQueueWrapper
Cohort sets the borrowing cohort.
func (*ClusterQueueWrapper) Condition ¶ added in v0.6.0
func (c *ClusterQueueWrapper) Condition(conditionType string, status metav1.ConditionStatus, reason, message string) *ClusterQueueWrapper
Condition sets a condition on the ClusterQueue.
func (*ClusterQueueWrapper) Creation ¶ added in v0.7.0
func (c *ClusterQueueWrapper) Creation(t time.Time) *ClusterQueueWrapper
Creation sets the creation timestamp of the ClusterQueue.
func (*ClusterQueueWrapper) FairWeight ¶ added in v0.7.0
func (c *ClusterQueueWrapper) FairWeight(w resource.Quantity) *ClusterQueueWrapper
func (*ClusterQueueWrapper) FlavorFungibility ¶ added in v0.5.0
func (c *ClusterQueueWrapper) FlavorFungibility(p kueue.FlavorFungibility) *ClusterQueueWrapper
FlavorFungibility sets the flavorFungibility policies.
func (*ClusterQueueWrapper) Generation ¶ added in v0.7.0
func (c *ClusterQueueWrapper) Generation(num int64) *ClusterQueueWrapper
Generation sets the generation of the ClusterQueue.
func (*ClusterQueueWrapper) Label ¶ added in v0.7.0
func (c *ClusterQueueWrapper) Label(k, v string) *ClusterQueueWrapper
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) PendingWorkloads ¶ added in v0.7.0
func (c *ClusterQueueWrapper) PendingWorkloads(n int32) *ClusterQueueWrapper
PendingWorkloads sets the pendingWorkloads in status.
func (*ClusterQueueWrapper) Preemption ¶ added in v0.3.0
func (c *ClusterQueueWrapper) Preemption(p kueue.ClusterQueuePreemption) *ClusterQueueWrapper
Preemption sets the preemption 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.
func (*ClusterQueueWrapper) StopPolicy ¶ added in v0.6.0
func (c *ClusterQueueWrapper) StopPolicy(p kueue.StopPolicy) *ClusterQueueWrapper
StopPolicy sets the stop policy.
type ContainerWrapper ¶ added in v0.6.3
ContainerWrapper wraps a corev1.Container.
func MakeContainer ¶ added in v0.6.3
func MakeContainer() *ContainerWrapper
MakeContainer wraps a ContainerWrapper with an empty ResourceList.
func (*ContainerWrapper) AsSidecar ¶ added in v0.6.3
func (c *ContainerWrapper) AsSidecar() *ContainerWrapper
AsSidecar makes the container a sidecar when used as an Init Container.
func (*ContainerWrapper) Obj ¶ added in v0.6.3
func (c *ContainerWrapper) Obj() *corev1.Container
Obj returns the inner corev1.Container.
func (*ContainerWrapper) WithResourceReq ¶ added in v0.6.3
func (c *ContainerWrapper) WithResourceReq(resourceName corev1.ResourceName, quantity string) *ContainerWrapper
WithResourceReq appends a resource request to the container.
type EventRecord ¶ added in v0.5.2
type EventRecord struct { Key types.NamespacedName EventType string Reason string Message string }
type EventRecorder ¶ added in v0.5.2
type EventRecorder struct { RecordedEvents []EventRecord // contains filtered or unexported fields }
func (*EventRecorder) AnnotatedEventf ¶ added in v0.5.2
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) AdmittedWorkloads ¶ added in v0.7.0
func (q *LocalQueueWrapper) AdmittedWorkloads(n int32) *LocalQueueWrapper
AdmittedWorkloads updates the admittedWorkloads in status.
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) Condition ¶ added in v0.7.0
func (q *LocalQueueWrapper) Condition(conditionType string, status metav1.ConditionStatus, reason, message string, generation int64) *LocalQueueWrapper
Condition sets a condition on the LocalQueue.
func (*LocalQueueWrapper) Creation ¶ added in v0.7.0
func (q *LocalQueueWrapper) Creation(t time.Time) *LocalQueueWrapper
Creation sets the creation timestamp of the LocalQueue.
func (*LocalQueueWrapper) Generation ¶ added in v0.7.0
func (q *LocalQueueWrapper) Generation(num int64) *LocalQueueWrapper
Generation sets the generation of the LocalQueue.
func (*LocalQueueWrapper) Label ¶ added in v0.7.0
func (q *LocalQueueWrapper) Label(k, v string) *LocalQueueWrapper
Label sets the label on the LocalQueue.
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 MultiKueueClusterWrapper ¶ added in v0.6.0
type MultiKueueClusterWrapper struct {
kueuealpha.MultiKueueCluster
}
func MakeMultiKueueCluster ¶ added in v0.6.0
func MakeMultiKueueCluster(name string) *MultiKueueClusterWrapper
func (*MultiKueueClusterWrapper) Active ¶ added in v0.6.0
func (mkc *MultiKueueClusterWrapper) Active(state metav1.ConditionStatus, reason, message string, generation int64) *MultiKueueClusterWrapper
func (*MultiKueueClusterWrapper) Generation ¶ added in v0.7.0
func (mkc *MultiKueueClusterWrapper) Generation(num int64) *MultiKueueClusterWrapper
Generation sets the generation of the MultiKueueCluster.
func (*MultiKueueClusterWrapper) KubeConfig ¶ added in v0.6.0
func (mkc *MultiKueueClusterWrapper) KubeConfig(locationType kueuealpha.LocationType, location string) *MultiKueueClusterWrapper
func (*MultiKueueClusterWrapper) Obj ¶ added in v0.6.0
func (mkc *MultiKueueClusterWrapper) Obj() *kueuealpha.MultiKueueCluster
type MultiKueueConfigWrapper ¶ added in v0.6.0
type MultiKueueConfigWrapper struct {
kueuealpha.MultiKueueConfig
}
func MakeMultiKueueConfig ¶ added in v0.6.0
func MakeMultiKueueConfig(name string) *MultiKueueConfigWrapper
func (*MultiKueueConfigWrapper) Clusters ¶ added in v0.6.0
func (mkc *MultiKueueConfigWrapper) Clusters(clusters ...string) *MultiKueueConfigWrapper
func (*MultiKueueConfigWrapper) Obj ¶ added in v0.6.0
func (mkc *MultiKueueConfigWrapper) Obj() *kueuealpha.MultiKueueConfig
type PodSetWrapper ¶ added in v0.3.0
func MakePodSet ¶ added in v0.3.0
func MakePodSet(name string, count int) *PodSetWrapper
func (*PodSetWrapper) Annotations ¶ added in v0.5.0
func (p *PodSetWrapper) Annotations(kv map[string]string) *PodSetWrapper
func (*PodSetWrapper) Containers ¶ added in v0.4.0
func (p *PodSetWrapper) Containers(containers ...corev1.Container) *PodSetWrapper
func (*PodSetWrapper) Image ¶ added in v0.5.0
func (p *PodSetWrapper) Image(image string) *PodSetWrapper
func (*PodSetWrapper) InitContainers ¶ added in v0.4.0
func (p *PodSetWrapper) InitContainers(containers ...corev1.Container) *PodSetWrapper
func (*PodSetWrapper) Labels ¶ added in v0.5.0
func (p *PodSetWrapper) Labels(kv map[string]string) *PodSetWrapper
func (*PodSetWrapper) Limit ¶ added in v0.5.0
func (p *PodSetWrapper) Limit(r corev1.ResourceName, q string) *PodSetWrapper
func (*PodSetWrapper) NodeName ¶ added in v0.6.3
func (p *PodSetWrapper) NodeName(name string) *PodSetWrapper
func (*PodSetWrapper) NodeSelector ¶ added in v0.4.0
func (p *PodSetWrapper) NodeSelector(kv map[string]string) *PodSetWrapper
func (*PodSetWrapper) Obj ¶ added in v0.3.0
func (p *PodSetWrapper) Obj() *kueue.PodSet
func (*PodSetWrapper) PodOverHead ¶ added in v0.6.0
func (p *PodSetWrapper) PodOverHead(resources corev1.ResourceList) *PodSetWrapper
func (*PodSetWrapper) PriorityClass ¶ added in v0.5.0
func (p *PodSetWrapper) PriorityClass(pc string) *PodSetWrapper
func (*PodSetWrapper) Request ¶ added in v0.3.0
func (p *PodSetWrapper) Request(r corev1.ResourceName, q string) *PodSetWrapper
func (*PodSetWrapper) RuntimeClass ¶ added in v0.6.0
func (p *PodSetWrapper) RuntimeClass(name string) *PodSetWrapper
func (*PodSetWrapper) SchedulingGates ¶ added in v0.5.0
func (p *PodSetWrapper) SchedulingGates(sg ...corev1.PodSchedulingGate) *PodSetWrapper
func (*PodSetWrapper) SetMinimumCount ¶ added in v0.4.0
func (p *PodSetWrapper) SetMinimumCount(mc int32) *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.
func (*ResourceFlavorWrapper) Toleration ¶ added in v0.5.0
func (rf *ResourceFlavorWrapper) Toleration(t corev1.Toleration) *ResourceFlavorWrapper
Toleration 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 an Overhead to the RuntimeClass.
type WorkloadPriorityClassWrapper ¶ added in v0.5.0
type WorkloadPriorityClassWrapper struct {
kueue.WorkloadPriorityClass
}
WorkloadPriorityClassWrapper wraps a WorkloadPriorityClass.
func MakeWorkloadPriorityClass ¶ added in v0.5.0
func MakeWorkloadPriorityClass(name string) *WorkloadPriorityClassWrapper
MakeWorkloadPriorityClass creates a wrapper for a WorkloadPriorityClass.
func (*WorkloadPriorityClassWrapper) Obj ¶ added in v0.5.0
func (p *WorkloadPriorityClassWrapper) Obj() *kueue.WorkloadPriorityClass
Obj returns the inner WorkloadPriorityClass.
func (*WorkloadPriorityClassWrapper) PriorityValue ¶ added in v0.5.0
func (p *WorkloadPriorityClassWrapper) PriorityValue(v int32) *WorkloadPriorityClassWrapper
PriorityValue updates value of WorkloadPriorityClass.
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) Active ¶ added in v0.6.0
func (w *WorkloadWrapper) Active(a bool) *WorkloadWrapper
func (*WorkloadWrapper) Admission ¶ added in v0.7.0
func (w *WorkloadWrapper) Admission(admission *kueue.Admission) *WorkloadWrapper
func (*WorkloadWrapper) AdmissionCheck ¶ added in v0.5.0
func (w *WorkloadWrapper) AdmissionCheck(ac kueue.AdmissionCheckState) *WorkloadWrapper
func (*WorkloadWrapper) AdmissionChecks ¶ added in v0.5.0
func (w *WorkloadWrapper) AdmissionChecks(checks ...kueue.AdmissionCheckState) *WorkloadWrapper
func (*WorkloadWrapper) Admitted ¶ added in v0.5.0
func (w *WorkloadWrapper) Admitted(a bool) *WorkloadWrapper
func (*WorkloadWrapper) Annotations ¶ added in v0.6.0
func (w *WorkloadWrapper) Annotations(annotations map[string]string) *WorkloadWrapper
func (*WorkloadWrapper) Clone ¶ added in v0.6.0
func (w *WorkloadWrapper) Clone() *WorkloadWrapper
func (*WorkloadWrapper) Condition ¶ added in v0.3.0
func (w *WorkloadWrapper) Condition(condition metav1.Condition) *WorkloadWrapper
func (*WorkloadWrapper) Conditions ¶ added in v0.7.0
func (w *WorkloadWrapper) Conditions(conditions ...metav1.Condition) *WorkloadWrapper
func (*WorkloadWrapper) ControllerReference ¶ added in v0.6.0
func (w *WorkloadWrapper) ControllerReference(gvk schema.GroupVersionKind, name, uid string) *WorkloadWrapper
func (*WorkloadWrapper) Creation ¶
func (w *WorkloadWrapper) Creation(t time.Time) *WorkloadWrapper
func (*WorkloadWrapper) DeletionTimestamp ¶ added in v0.5.2
func (w *WorkloadWrapper) DeletionTimestamp(t time.Time) *WorkloadWrapper
DeletionTimestamp sets a deletion timestamp for the workload.
func (*WorkloadWrapper) Finalizers ¶ added in v0.5.0
func (w *WorkloadWrapper) Finalizers(fin ...string) *WorkloadWrapper
func (*WorkloadWrapper) Finished ¶ added in v0.5.3
func (w *WorkloadWrapper) Finished() *WorkloadWrapper
func (*WorkloadWrapper) Generation ¶ added in v0.7.0
func (w *WorkloadWrapper) Generation(num int64) *WorkloadWrapper
Generation sets the generation of the Workload.
func (*WorkloadWrapper) Label ¶ added in v0.6.0
func (w *WorkloadWrapper) Label(k, v string) *WorkloadWrapper
func (*WorkloadWrapper) Labels ¶ added in v0.5.0
func (w *WorkloadWrapper) Labels(l map[string]string) *WorkloadWrapper
func (*WorkloadWrapper) Limit ¶ added in v0.3.0
func (w *WorkloadWrapper) Limit(r corev1.ResourceName, q string) *WorkloadWrapper
func (*WorkloadWrapper) Name ¶ added in v0.7.0
func (w *WorkloadWrapper) Name(name 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) OwnerReference ¶ added in v0.5.2
func (w *WorkloadWrapper) OwnerReference(gvk schema.GroupVersionKind, name, uid string) *WorkloadWrapper
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) PriorityClassSource ¶ added in v0.5.0
func (w *WorkloadWrapper) PriorityClassSource(source string) *WorkloadWrapper
func (*WorkloadWrapper) Queue ¶
func (w *WorkloadWrapper) Queue(q string) *WorkloadWrapper
func (*WorkloadWrapper) QuotaReservedTime ¶ added in v0.7.0
func (w *WorkloadWrapper) QuotaReservedTime(t time.Time) *WorkloadWrapper
QuotaReservedTime - sets the LastTransitionTime of the QuotaReserved condition if found.
func (*WorkloadWrapper) ReclaimablePods ¶ added in v0.4.0
func (w *WorkloadWrapper) ReclaimablePods(rps ...kueue.ReclaimablePod) *WorkloadWrapper
func (*WorkloadWrapper) Request ¶
func (w *WorkloadWrapper) Request(r corev1.ResourceName, q string) *WorkloadWrapper
func (*WorkloadWrapper) RequeueState ¶ added in v0.6.0
func (w *WorkloadWrapper) RequeueState(count *int32, requeueAt *metav1.Time) *WorkloadWrapper
func (*WorkloadWrapper) ReserveQuota ¶ added in v0.5.0
func (w *WorkloadWrapper) ReserveQuota(a *kueue.Admission) *WorkloadWrapper
ReserveQuota sets workload admission and adds a "QuotaReserved" status condition
func (*WorkloadWrapper) ReserveQuotaAt ¶ added in v0.6.2
func (w *WorkloadWrapper) ReserveQuotaAt(a *kueue.Admission, now time.Time) *WorkloadWrapper
ReserveQuotaAt sets workload admission and adds a "QuotaReserved" status condition
func (*WorkloadWrapper) ResourceVersion ¶ added in v0.6.0
func (w *WorkloadWrapper) ResourceVersion(v string) *WorkloadWrapper
func (*WorkloadWrapper) RuntimeClass ¶ added in v0.2.0
func (w *WorkloadWrapper) RuntimeClass(name string) *WorkloadWrapper
func (*WorkloadWrapper) SetOrReplaceCondition ¶ added in v0.4.0
func (w *WorkloadWrapper) SetOrReplaceCondition(condition metav1.Condition) *WorkloadWrapper
func (*WorkloadWrapper) SimpleReserveQuota ¶ added in v0.7.0
func (w *WorkloadWrapper) SimpleReserveQuota(cq, flavor string, now time.Time) *WorkloadWrapper
SimpleReserveQuota reserves the quota for all the requested resources in one flavor. It assumes one podset with one container.
func (*WorkloadWrapper) Toleration ¶ added in v0.2.0
func (w *WorkloadWrapper) Toleration(t corev1.Toleration) *WorkloadWrapper
func (*WorkloadWrapper) UID ¶ added in v0.6.2
func (w *WorkloadWrapper) UID(uid types.UID) *WorkloadWrapper