conditions

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromObject

func FromObject(obj client.Object) ([]metav1.Condition, error)

func FromPod

func FromPod(ctx context.Context, client client.Client, nn types.NamespacedName) ([]metav1.Condition, error)

func FromResource

func FromResource(ctx context.Context, client client.Client, typeMeta metav1.TypeMeta, typePrefix string, nn types.NamespacedName) ([]metav1.Condition, error)

func New

func New[K ~string, V ~string, Status statusTT](cType K, status Status, reason V, msg ...string) metav1.Condition

func ParseFromResource

func ParseFromResource(resource any, cTypePrefix string) ([]metav1.Condition, error)

func Patch

func Patch(dest []metav1.Condition, source []metav1.Condition) ([]metav1.Condition, bool, error)

Types

type Reason

type Reason string
const (
	Found             Reason = "Found"
	NotFound          Reason = "NotFound"
	NotReady          Reason = "NotReady"
	Ready             Reason = "Ready"
	NotReconciledYet  Reason = "NotReconciledYet"
	ErrWhileReconcile Reason = "ErrWhileReconcilation"
	Unknown           Reason = "Unknown"
	Empty             Reason = ""
)

type StatusConditions

type StatusConditions struct {
	Status struct {
		Conditions []metav1.Condition `json:"conditions"`
	} `json:"status"`
}

type Type

type Type string
const (
	HelmResourceExists     Type = "HelmResourceExists"
	DeploymentExists       Type = "DeploymentExists"
	ServiceExists          Type = "ServiceExists"
	StsExists              Type = "StsExists"
	GeneratedVars          Type = "GeneratedVars"
	ReconcilerOutputExists Type = "ReconcilerOutputExists"

	ManagedSvcExists       Type = "ManagedSvcExists"
	ManagedSvcOutputExists Type = "ManagedSvcOutputExists"

	HelmResourceReady Type = "HelmResourceReady"
	DeploymentReady   Type = "DeploymentReady"
	StsReady          Type = "StsReady"
	OutputReady       Type = "OutputReady"
	ManagedSvcReady   Type = "ManagedSvcReady"
)

func (Type) String

func (t Type) String() string

Jump to

Keyboard shortcuts

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