Documentation ¶
Index ¶
- func Decode(decoder runtime.Decoder, content []byte) ([]unstructured.Unstructured, error)
- func EncodeToString(in []byte) string
- func EnsureGroupVersionKind(s *runtime.Scheme, obj client.Object) error
- func GetAnnotation(obj client.Object, k string) string
- func GetGroupVersionKindForObject(s *runtime.Scheme, obj runtime.Object) (schema.GroupVersionKind, error)
- func GetLabel(obj client.Object, k string) string
- func GvkToUnstructured(gvk schema.GroupVersionKind) *unstructured.Unstructured
- func HasAnnotation(obj client.Object, k string, values ...string) bool
- func HasDevFlags(in common.WithDevFlags) bool
- func HasLabel(obj client.Object, k string, values ...string) bool
- func Hash(in *unstructured.Unstructured) ([]byte, error)
- func IngressHost(r routev1.Route) string
- func KindForObject(scheme *runtime.Scheme, obj runtime.Object) (string, error)
- func NamespacedNameFromObject(obj client.Object) types.NamespacedName
- func RemoveAnnotation(obj client.Object, k string)
- func RemoveLabel(obj client.Object, k string)
- func SetAnnotation(obj client.Object, k string, v string) string
- func SetAnnotations(obj client.Object, values map[string]string)
- func SetLabel(obj client.Object, k string, v string) string
- func SetLabels(obj client.Object, values map[string]string)
- func ToUnstructured(obj any) (*unstructured.Unstructured, error)
- type UnstructuredList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decode ¶
func Decode(decoder runtime.Decoder, content []byte) ([]unstructured.Unstructured, error)
func EncodeToString ¶
func EnsureGroupVersionKind ¶
func GvkToUnstructured ¶
func GvkToUnstructured(gvk schema.GroupVersionKind) *unstructured.Unstructured
func HasDevFlags ¶
func HasDevFlags(in common.WithDevFlags) bool
func Hash ¶
func Hash(in *unstructured.Unstructured) ([]byte, error)
Hash generates an SHA-256 hash of an unstructured Kubernetes object, omitting specific fields that are typically irrelevant for hash comparison such as "creationTimestamp", "deletionTimestamp", "managedFields", "ownerReferences", "uid", "resourceVersion", and "status". It returns the computed hash as a byte slice or an error if the hashing process fails.
func IngressHost ¶
func NamespacedNameFromObject ¶
func NamespacedNameFromObject(obj client.Object) types.NamespacedName
func RemoveAnnotation ¶
func RemoveLabel ¶
func ToUnstructured ¶
func ToUnstructured(obj any) (*unstructured.Unstructured, error)
Types ¶
type UnstructuredList ¶
type UnstructuredList []unstructured.Unstructured
func (UnstructuredList) Clone ¶
func (l UnstructuredList) Clone() []unstructured.Unstructured
Click to show internal directories.
Click to hide internal directories.