Documentation
¶
Index ¶
- func AddHashSuffix(obj client.Object) error
- func CloneOrEmptyMap[K comparable, V any](m map[K]V) map[K]V
- func CreateIngressRuleAndStripPrefixForBaseURL(url url.URL, includeLocalhost, matchUnderscoreVersions, traefikV2 bool) (string, string)
- func CreateRegexpForUnderscoreVersions(path string) string
- func CreateUnstructuredWithGroupVersionKind(gvr schema.GroupVersionResource, kind string) (obj *unstructured.Unstructured)
- func DeleteObjects(ctx context.Context, c client.Client, objects []client.Object) (err error)
- func EnsureSetGVK(c client.Client, src client.Object, obj schema.ObjectKind) error
- func FinalizeIfNecessary(ctx context.Context, c client.Client, obj client.Object, finalizerName string, ...) (shouldContinue bool, err error)
- func GenerateHashFromStrings(sliceToHash []string) string
- func GetObjectFullName(c client.Client, obj client.Object) string
- func IntOrStrStrPtr(s string) *intstr.IntOrString
- func KustomizeHash(obj client.Object) (hash string, err error)
- func Pointer[T any](val T) *T
- func PointerVal[T any](val *T, defaultValue T) T
- func SetImmutableLabels(c client.Client, obj client.Object, labels map[string]string) error
- func SplitHashSuffix(in string) (name, hash string)
- func StrategicMergePatch[T, P any](obj *T, patch *P) (*T, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddHashSuffix ¶
func CloneOrEmptyMap ¶
func CloneOrEmptyMap[K comparable, V any](m map[K]V) map[K]V
func CreateUnstructuredWithGroupVersionKind ¶ added in v1.2.4
func CreateUnstructuredWithGroupVersionKind(gvr schema.GroupVersionResource, kind string) (obj *unstructured.Unstructured)
func DeleteObjects ¶
func EnsureSetGVK ¶
func FinalizeIfNecessary ¶
func GenerateHashFromStrings ¶
GenerateHashFromStrings generates a hash from a list of strings. This hash can be used to identify resources and if they can be removed. E.g. the ogcapi-operator provides the volume-operator with a hash so it knows what resources to create or remove.
func IntOrStrStrPtr ¶
func IntOrStrStrPtr(s string) *intstr.IntOrString
func KustomizeHash ¶
kustomizeHash aims to calculate a hash for an object the same way kustomize does. please make sure your object has its Kind set.
func PointerVal ¶
func PointerVal[T any](val *T, defaultValue T) T
func SetImmutableLabels ¶
func SplitHashSuffix ¶
func StrategicMergePatch ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.