Documentation ¶
Index ¶
- Variables
- func BadPodSetsInfoLenError(want, got int) error
- func BadPodSetsUpdateError(update string, err error) error
- func IsPermanent(e error) bool
- func Merge(meta *metav1.ObjectMeta, spec *corev1.PodSpec, info PodSetInfo) error
- func RestorePodSpec(meta *metav1.ObjectMeta, spec *corev1.PodSpec, info PodSetInfo) bool
- type PodSetInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidPodsetInfo = errors.New("invalid podset infos") ErrInvalidPodSetUpdate = errors.New("invalid admission check PodSetUpdate") )
Functions ¶
func BadPodSetsInfoLenError ¶
func BadPodSetsUpdateError ¶
func IsPermanent ¶
func Merge ¶
func Merge(meta *metav1.ObjectMeta, spec *corev1.PodSpec, info PodSetInfo) error
Merge updates or appends the replica metadata & spec fields based on PodSetInfo. It returns error if there is a conflict.
func RestorePodSpec ¶
func RestorePodSpec(meta *metav1.ObjectMeta, spec *corev1.PodSpec, info PodSetInfo) bool
RestorePodSpec sets replica metadata and spec fields based on PodSetInfo. It returns true if there is any change.
Types ¶
type PodSetInfo ¶
type PodSetInfo struct { Name string Count int32 Annotations map[string]string Labels map[string]string NodeSelector map[string]string Tolerations []corev1.Toleration SchedulingGates []corev1.PodSchedulingGate }
func FromAssignment ¶
func FromAssignment(ctx context.Context, client client.Client, assignment *kueue.PodSetAssignment, defaultCount int32) (PodSetInfo, error)
FromAssignment returns a PodSetInfo based on the provided assignment and an error if unable to get any of the referenced flavors.
func FromPodSet ¶
func FromPodSet(ps *kueue.PodSet) PodSetInfo
FromPodSet returns a PodSetInfo based on the provided PodSet
func FromUpdate ¶
func FromUpdate(update *kueue.PodSetUpdate) PodSetInfo
FromUpdate returns a PodSetInfo based on the provided PodSetUpdate
func (*PodSetInfo) AddOrUpdateLabel ¶ added in v0.6.0
func (podSetInfo *PodSetInfo) AddOrUpdateLabel(k, v string)
AddOrUpdateLabel adds or updates the label identified by k with value v allocating a new Labels nap if nil
func (*PodSetInfo) Merge ¶
func (podSetInfo *PodSetInfo) Merge(o PodSetInfo) error
Click to show internal directories.
Click to hide internal directories.