apis

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ReconcileError = "ReconcileError"
View Source
const ReconcileErrorReason = "LastReconcileCycleFailed"
View Source
const ReconcileSuccess = "ReconcileSuccess"
View Source
const ReconcileSuccessReason = "LastReconcileCycleSucceded"

Variables

This section is empty.

Functions

func AddOrReplaceCondition

func AddOrReplaceCondition(c metav1.Condition, conditions []metav1.Condition) []metav1.Condition

AddOrReplaceCondition adds or replaces the passed condition in the passed array of conditions

func GetCondition

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

GetCondition returns the condition with the given type, if it exists. If the condition does not exists it returns false.

func GetKeyLong

func GetKeyLong(obj metav1.Object) string

GetKeyLong return a unique key for a given object in the pattern of <kind>/<apiversion>/<namespace>/<name> namespace can be null

func GetKeyShort

func GetKeyShort(obj metav1.Object) string

GetKeyShort return a unique key for a given object in the pattern of <apiversion>/<namespace>/<name> namespace can be null

func GetLastCondition

func GetLastCondition(conditions []metav1.Condition) (metav1.Condition, bool)

GetLastCondition retruns the last condition based on the condition timestamp. if no condition is present it return false.

func IsErrorCondition

func IsErrorCondition(condition metav1.Condition) bool

Types

type ConditionsAware

type ConditionsAware interface {
	GetConditions() []metav1.Condition
	SetConditions(conditions []metav1.Condition)
}

ConditionsAware represents a CRD type that has been enabled with metav1.Conditions, it can then benefit of a series of utility methods.

Jump to

Keyboard shortcuts

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