types

package
v0.3.23 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 5 Imported by: 14

Documentation

Overview

Package types contains common types used and exposed by the component-operator-runtime framework.

Index

Constants

View Source
const (
	LabelKeySuffixOwnerId              = "owner-id"
	AnnotationKeySuffixOwnerId         = "owner-id"
	AnnotationKeySuffixDigest          = "digest"
	AnnotationKeySuffixAdoptionPolicy  = "adoption-policy"
	AnnotationKeySuffixReconcilePolicy = "reconcile-policy"
	AnnotationKeySuffixUpdatePolicy    = "update-policy"
	AnnotationKeySuffixDeletePolicy    = "delete-policy"
	AnnotationKeySuffixApplyOrder      = "apply-order"
	AnnotationKeySuffixPurgeOrder      = "purge-order"
	AnnotationKeySuffixDeleteOrder     = "delete-order"
	AnnotationKeySuffixStatusHint      = "status-hint"
)
View Source
const (
	AdoptionPolicyNever     = "never"
	AdoptionPolicyIfUnowned = "if-unowned"
	AdoptionPolicyAlways    = "always"
)
View Source
const (
	ReconcilePolicyOnObjectChange            = "on-object-change"
	ReconcilePolicyOnObjectOrComponentChange = "on-object-or-component-change"
	ReconcilePolicyOnce                      = "once"
)
View Source
const (
	UpdatePolicyDefault     = "default"
	UpdatePolicyRecreate    = "recreate"
	UpdatePolicyReplace     = "replace"
	UpdatePolicySsaMerge    = "ssa-merge"
	UpdatePolicySsaOverride = "ssa-override"
)
View Source
const (
	DeletePolicyDefault = "default"
	DeletePolicyDelete  = "delete"
	DeletePolicyOrphan  = "orphan"
)
View Source
const (
	StatusHintHasObservedGeneration = "has-observed-generation"
	StatusHintHasReadyCondition     = "has-ready-condition"
	StatusHintConditions            = "conditions"
)

Variables

This section is empty.

Functions

func NameKeyToString added in v0.3.4

func NameKeyToString(key NameKey) string

Return a string representation of a NameKey.

func ObjectKeyToString

func ObjectKeyToString(key ObjectKey) string

Return a string representation of an ObjectKey.

func TypeKeyToString added in v0.3.4

func TypeKeyToString(key TypeKey) string

Return a string representation of a TypeKey.

Types

type NameKey added in v0.3.4

type NameKey interface {
	GetNamespace() string
	GetName() string
}

Represents types which a namespace and a name. All types implementing metav1.Object or even controller-runtime's client.Object obviously implement NameKey as well.

func NameKeyFromNamespaceAndName added in v0.3.4

func NameKeyFromNamespaceAndName(namespace string, name string) NameKey

Wrap a namespace and name as NameKey.

func NameKeyFromNamespacedName added in v0.3.4

func NameKeyFromNamespacedName(namespaceName apitypes.NamespacedName) NameKey

Wrap a NamespacedName as NameKey.

type ObjectKey

type ObjectKey interface {
	TypeKey
	NameKey
}

Represents types which have TypeMeta, and a namespace and a name. All types implementing controller-runtime's client.Object obviously implement ObjectKey as well.

type RetriableError added in v0.2.3

type RetriableError struct {
	// contains filtered or unexported fields
}

func NewRetriableError added in v0.2.3

func NewRetriableError(err error, retryAfter *time.Duration) RetriableError

func (RetriableError) Cause added in v0.2.3

func (e RetriableError) Cause() error

func (RetriableError) Error added in v0.2.3

func (e RetriableError) Error() string

func (RetriableError) RetryAfter added in v0.2.3

func (e RetriableError) RetryAfter() *time.Duration

func (RetriableError) Unwrap added in v0.2.3

func (e RetriableError) Unwrap() error

type SchemeBuilder added in v0.2.3

type SchemeBuilder interface {
	AddToScheme(scheme *runtime.Scheme) error
}

SchemeBuilder interface.

type TypeKey added in v0.3.4

type TypeKey interface {
	GetObjectKind() schema.ObjectKind
}

Represents types which have TypeMeta/GroupVersionKind. All types implementing runtime.Object or even controller-runtime's client.Object obviously implement TypeKey as well.

func TypeKeyFromGroupAndVersionAndKind added in v0.3.4

func TypeKeyFromGroupAndVersionAndKind(group string, version string, kind string) TypeKey

Wrap a group, version and kind as TypeKey.

func TypeKeyFromGroupVersionKind added in v0.3.4

func TypeKeyFromGroupVersionKind(gvk schema.GroupVersionKind) TypeKey

Wrap a GroupVersionKind as TypeKey.

type Unstructurable

type Unstructurable interface {
	ToUnstructured() map[string]any
}

Unstructurable represents objects which can be converted into a string-keyed map. All Kubernetes API types, as well as all JSON objects could be modelled as Unstructurable objects.

type UnstructurableMap

type UnstructurableMap map[string]any

UnstructurableMap is a string-keyed map, implementing the Unstructurable interface in the natural way.

func (UnstructurableMap) ToUnstructured

func (m UnstructurableMap) ToUnstructured() map[string]any

ToUnstructured() just returns the map itself.

Jump to

Keyboard shortcuts

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