helper

package
v0.0.0-...-b86876b Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

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) ([]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

func HubHash(hubServer string) string

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 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 RemoveFinalizer

func RemoveFinalizer(object runtime.Object, finalizerName string)

RemoveFinalizer removes a finalizer from the list. It mutates its input.

Types

type UpdateManifestWorkStatusFunc

type UpdateManifestWorkStatusFunc func(status *workapiv1.ManifestWorkStatus) error

Jump to

Keyboard shortcuts

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