resourceutil

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PipelineCompletedCondition = clusterv1.ConditionType("PipelineCompleted")
	ManualReconciliationLabel  = "kratix.io/manual-reconciliation"
)

Variables

This section is empty.

Functions

func DoesNotContainFinalizer

func DoesNotContainFinalizer(resource client.Object, finalizer string) bool

func FinalizersAreDeleted

func FinalizersAreDeleted(resource client.Object, finalizers []string) bool

func FinalizersAreMissing

func FinalizersAreMissing(resource client.Object, finalizers []string) bool

func GetCondition

func GetCondition(obj *unstructured.Unstructured, conditionType clusterv1.ConditionType) *clusterv1.Condition

func GetPipelineCompletedConditionStatus

func GetPipelineCompletedConditionStatus(obj *unstructured.Unstructured) v1.ConditionStatus

func GetResourceNames

func GetResourceNames(items []unstructured.Unstructured) []string

func HasCondition

func HasCondition(obj *unstructured.Unstructured, conditionType clusterv1.ConditionType) bool

func IsPromiseMarkedAsUnavailable added in v0.1.0

func IsPromiseMarkedAsUnavailable(obj *unstructured.Unstructured) bool

func IsThereAPipelineRunning

func IsThereAPipelineRunning(logger logr.Logger, jobs []batchv1.Job) bool

func MarkPipelineAsCompleted

func MarkPipelineAsCompleted(logger logr.Logger, obj *unstructured.Unstructured)

func MarkPipelineAsRunning

func MarkPipelineAsRunning(logger logr.Logger, obj *unstructured.Unstructured)

func MarkPromiseConditionAsAvailable added in v0.1.0

func MarkPromiseConditionAsAvailable(obj *unstructured.Unstructured, logger logr.Logger)

func MarkPromiseConditionAsNotAvailable added in v0.1.0

func MarkPromiseConditionAsNotAvailable(obj *unstructured.Unstructured, logger logr.Logger)

func PipelineWithDesiredSpecExists

func PipelineWithDesiredSpecExists(logger logr.Logger, obj *unstructured.Unstructured, jobs []batchv1.Job) (*batchv1.Job, error)

func SetCondition

func SetCondition(obj *unstructured.Unstructured, condition *clusterv1.Condition)

func SetStatus

func SetStatus(rr *unstructured.Unstructured, logger logr.Logger, statuses ...string)

func SuspendablePipelines

func SuspendablePipelines(logger logr.Logger, jobs []batchv1.Job) []batchv1.Job

If a job has no active pods we can suspend it

Types

This section is empty.

Jump to

Keyboard shortcuts

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