Documentation ¶
Index ¶
- func AppliedManifestworkQueueKeyFunc(hubhash string) factory.ObjectQueueKeyFunc
- func DeleteAppliedResources(resources []workapiv1.AppliedManifestResourceMeta, reason string, ...) ([]workapiv1.AppliedManifestResourceMeta, []error)
- func GuessObjectGroupVersionKind(object runtime.Object) (*schema.GroupVersionKind, error)
- func HubHash(hubServer string) string
- func IsOwnedBy(myOwner metav1.OwnerReference, existingOwners []metav1.OwnerReference) bool
- func MergeManifestConditions(conditions, newConditions []workapiv1.ManifestCondition) []workapiv1.ManifestCondition
- func MergeStatusConditions(conditions []metav1.Condition, newConditions []metav1.Condition) []metav1.Condition
- func NewAppliedManifestWorkOwner(appliedWork *workapiv1.AppliedManifestWork) *metav1.OwnerReference
- func RemoveFinalizer(object runtime.Object, finalizerName string)
- func UpdateManifestWorkStatus(ctx context.Context, client workv1client.ManifestWorkInterface, ...) (*workapiv1.ManifestWorkStatus, bool, error)
- type UpdateManifestWorkStatusFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppliedManifestworkQueueKeyFunc ¶
func AppliedManifestworkQueueKeyFunc(hubhash string) factory.ObjectQueueKeyFunc
AppliedManifestworkQueueKeyFunc return manifestwork key from appliedmanifestwork
func DeleteAppliedResources ¶
func DeleteAppliedResources( resources []workapiv1.AppliedManifestResourceMeta, reason string, dynamicClient dynamic.Interface, recorder events.Recorder, owner metav1.OwnerReference) ([]workapiv1.AppliedManifestResourceMeta, []error)
DeleteAppliedResources deletes all given applied resources and returns those pending for finalization If the uid recorded in resources is different from what we get by client, ignore the deletion.
func GuessObjectGroupVersionKind ¶
func GuessObjectGroupVersionKind(object runtime.Object) (*schema.GroupVersionKind, error)
GuessObjectGroupVersionKind returns GVK for the passed runtime object.
func HubHash ¶
HubHash returns a hash of hubserver NOTE: the length of hash string is 64, meaning the length of manifestwork name should be less than 189
func IsOwnedBy ¶ added in v0.5.0
func IsOwnedBy(myOwner metav1.OwnerReference, existingOwners []metav1.OwnerReference) bool
IsOwnedBy check if owner exists in the ownerrefs.
func MergeManifestConditions ¶
func MergeManifestConditions(conditions, newConditions []workapiv1.ManifestCondition) []workapiv1.ManifestCondition
MergeManifestConditions return a new ManifestCondition array which merges the existing manifest conditions and the new manifest conditions. Rules to match ManifestCondition between two arrays: 1. match the manifest condition with the whole ManifestResourceMeta; 2. if not matched, try to match with properties other than ordinal in ManifestResourceMeta If no existing manifest condition is matched, the new manifest condition will be used.
func MergeStatusConditions ¶
func MergeStatusConditions(conditions []metav1.Condition, newConditions []metav1.Condition) []metav1.Condition
MergeStatusConditions returns a new status condition array with merged status conditions. It is based on newConditions, and merges the corresponding existing conditions if exists.
func NewAppliedManifestWorkOwner ¶ added in v0.5.0
func NewAppliedManifestWorkOwner(appliedWork *workapiv1.AppliedManifestWork) *metav1.OwnerReference
func RemoveFinalizer ¶
RemoveFinalizer removes a finalizer from the list. It mutates its input.
func UpdateManifestWorkStatus ¶
func UpdateManifestWorkStatus( ctx context.Context, client workv1client.ManifestWorkInterface, manifestWork *workapiv1.ManifestWork, updateFuncs ...UpdateManifestWorkStatusFunc) (*workapiv1.ManifestWorkStatus, bool, error)
Types ¶
type UpdateManifestWorkStatusFunc ¶
type UpdateManifestWorkStatusFunc func(status *workapiv1.ManifestWorkStatus) error