Documentation
¶
Index ¶
- func DeepEqual(val1, val2 interface{}) bool
- func FindOwnedObjects(ctx context.Context, cl client.Client, uid types.UID, namespace string, ...) (map[types.UID]client.Object, error)
- func GetList[T client.Object](ctx context.Context, cl client.Client, l T, options ...client.ListOption) (map[types.UID]client.Object, error)
- func ObjectMetasEqual(obj1, obj2 metav1.Object) bool
- func ObjectsEqual(obj1, obj2 runtime.Object) bool
- func SetupOwnerIndexes(mgr ctrl.Manager, ownedTypes []client.Object) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeepEqual ¶
func DeepEqual(val1, val2 interface{}) bool
DeepEqual should be used in place of reflect.DeepEqual when the type of an object is unknown and may be a proto message. see https://github.com/golang/protobuf/issues/1173 for details on why reflect.DeepEqual no longer works for proto messages
func FindOwnedObjects ¶
func FindOwnedObjects(ctx context.Context, cl client.Client, uid types.UID, namespace string, objectTypes []client.Object) (map[types.UID]client.Object, error)
FindOwnedObjects looks for objects in the given namespace that have an owner reference. Note: this method assumes that an index has been setup for the owner reference using `SetupOwnerIndexes`.
func GetList ¶
func GetList[T client.Object](ctx context.Context, cl client.Client, l T, options ...client.ListOption) (map[types.UID]client.Object, error)
GetList queries the Kubernetes API to list the requested resource, setting the list l of type T.
func ObjectMetasEqual ¶
returns true if "relevant" parts of obj1 and obj2 have equal: -labels -annotations -namespace+name or if the objects are not metav1.Objects
func ObjectsEqual ¶
returns true if "relevant" parts of obj1 and obj2 have equal: - labels, - annotations, - namespace+name, - non-metadata, non-status fields Note that Status fields are not compared. To compare status fields, use ObjectStatusesEqual
Types ¶
This section is empty.