resources

package
v2.23.1 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

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 EncodeToString(in []byte) string

func EnsureGroupVersionKind

func EnsureGroupVersionKind(s *runtime.Scheme, obj client.Object) error

func GetAnnotation

func GetAnnotation(obj client.Object, k string) string

func GetGroupVersionKindForObject

func GetGroupVersionKindForObject(s *runtime.Scheme, obj runtime.Object) (schema.GroupVersionKind, error)

func GetLabel

func GetLabel(obj client.Object, k string) string

func HasAnnotation

func HasAnnotation(obj client.Object, k string, values ...string) bool

func HasDevFlags

func HasDevFlags(in common.WithDevFlags) bool

func HasLabel

func HasLabel(obj client.Object, k string, values ...string) 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 IngressHost(r routev1.Route) string

func KindForObject

func KindForObject(scheme *runtime.Scheme, obj runtime.Object) (string, error)

func NamespacedNameFromObject

func NamespacedNameFromObject(obj client.Object) types.NamespacedName

func RemoveAnnotation

func RemoveAnnotation(obj client.Object, k string)

func RemoveLabel

func RemoveLabel(obj client.Object, k string)

func SetAnnotation

func SetAnnotation(obj client.Object, k string, v string) string

func SetAnnotations

func SetAnnotations(obj client.Object, values map[string]string)

func SetLabel

func SetLabel(obj client.Object, k string, v string) string

func SetLabels

func SetLabels(obj client.Object, values map[string]string)

func ToUnstructured

func ToUnstructured(obj any) (*unstructured.Unstructured, error)

Types

type UnstructuredList

type UnstructuredList []unstructured.Unstructured

func (UnstructuredList) Clone

Jump to

Keyboard shortcuts

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