utils

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 2, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearPodSetInfos added in v1.0.0

func ClearPodSetInfos(aw *workloadv1beta2.AppWrapper) bool

ClearPodSetInfos clears the PodSetInfos saved by SetPodSetInfos

func EnsureComponentStatusInitialized added in v0.14.0

func EnsureComponentStatusInitialized(aw *workloadv1beta2.AppWrapper) error

EnsureComponentStatusInitialized initializes aw.Status.ComponenetStatus, including performing PodSet inference for known GVKs

func ExpectedPodCount

func ExpectedPodCount(aw *workloadv1beta2.AppWrapper) (int32, error)

func GetPodSets added in v1.0.0

func GetPodSets(aw *workloadv1beta2.AppWrapper) ([]kueue.PodSet, error)

GetPodSets constructs the kueue.PodSets for an AppWrapper

func GetPodTemplateSpec

func GetPodTemplateSpec(obj *unstructured.Unstructured, path string) (*v1.PodTemplateSpec, error)

GetPodTemplateSpec extracts a Kueue-compatible PodTemplateSpec at the given path within obj

func GetRawTemplate

func GetRawTemplate(obj map[string]interface{}, path string) (map[string]interface{}, error)

return the subobject found at the given path, or nil if the path is invalid

func GetReplicas added in v0.8.0

func GetReplicas(obj *unstructured.Unstructured, path string) (int32, error)

GetReplicas parses the value at the given path within obj as an int

func InferPodSets added in v0.10.0

InferPodSets infers PodSets for known GVKs

func SanitizeLabel added in v0.10.0

func SanitizeLabel(label string) string

SanitizeLabel sanitizes a string for use as a label

func SetPodSetInfos added in v1.0.0

func SetPodSetInfos(aw *workloadv1beta2.AppWrapper, podSetsInfo []podset.PodSetInfo) error

SetPodSetInfos propagates podSetsInfo into the PodSetInfos of aw.Spec.Components

func ValidatePodSets added in v0.10.0

func ValidatePodSets(declared []workloadv1beta2.AppWrapperPodSet, inferred []workloadv1beta2.AppWrapperPodSet) error

ValidatePodSets validates the declared and inferred PodSets

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL