common

package
v0.0.0-...-3a2f251 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const HashLabelName = "core.conure.io/hash"

Variables

This section is empty.

Functions

func ApplyStatus

func ApplyStatus(ctx context.Context, object client.Object, restClient client.Client) error

ApplyStatus updates the status of the object with the latest generation to prevent.

func ContainsCondition

func ContainsCondition(conditions []metav1.Condition, conditionType string) (int, bool)

ContainsCondition checks if a condition with the given type exists in the conditions slice. Returns the index and true if exists, -1 and false otherwise.

func GetHashForSpec

func GetHashForSpec(specStruct interface{}) string

func GetHashFromLabels

func GetHashFromLabels(labels map[string]string) string

func SetCondition

func SetCondition(conditions []metav1.Condition, conditionType string, status metav1.ConditionStatus, reason string, message string) []metav1.Condition

SetCondition sets a condition with the given type, status, reason and message in the conditions slice.

func SetHashToLabels

func SetHashToLabels(labels map[string]string, specHashActual string) map[string]string

Types

This section is empty.

Jump to

Keyboard shortcuts

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