Documentation ¶
Index ¶
- Constants
- Variables
- func GenerateEmptyWorkloadObject(gvk schema.GroupVersionKind, key types.NamespacedName) (object client.Object)
- func GetPodVersion(pod *corev1.Pod) string
- func GetReplicasFromCustomWorkload(reader client.Reader, object *unstructured.Unstructured) int32
- func GetWorkloadVersion(reader client.Reader, object client.Object) (string, error)
- func VerifyGroupKind(ref interface{}, expectedKind string, expectedGroups []string) (bool, error)
- type Handler
- type InjectWorkloadSpread
- type Operation
Constants ¶
View Source
const ( // MatchedWorkloadSpreadSubsetAnnotations matched pod workloadSpread MatchedWorkloadSpreadSubsetAnnotations = "apps.kruise.io/matched-workloadspread" PodDeletionCostAnnotation = "controller.kubernetes.io/pod-deletion-cost" PodDeletionCostPositive = 100 PodDeletionCostNegative = -100 // VersionIgnored means all Pods should be regard as a universal version, // i.e., ignore the Pod/Workload version. VersionIgnored = "versionIgnored" )
Variables ¶
View Source
var ( EnabledWorkloadSetForVersionedStatus sets.String GenerateNotFoundError = func(object client.Object, msg string) error { objectGroupKind := object.GetObjectKind().GroupVersionKind().GroupKind() return errors.NewNotFound(schema.GroupResource{Group: objectGroupKind.Group, Resource: objectGroupKind.Kind}, msg) } )
Functions ¶
func GenerateEmptyWorkloadObject ¶ added in v1.5.2
func GenerateEmptyWorkloadObject(gvk schema.GroupVersionKind, key types.NamespacedName) (object client.Object)
func GetPodVersion ¶ added in v1.5.2
func GetReplicasFromCustomWorkload ¶ added in v1.5.2
func GetReplicasFromCustomWorkload(reader client.Reader, object *unstructured.Unstructured) int32
func GetWorkloadVersion ¶ added in v1.5.2
Types ¶
type InjectWorkloadSpread ¶
Click to show internal directories.
Click to hide internal directories.