Documentation ¶
Index ¶
- Constants
- func AddDynamicCacheLabel(ctx context.Context, w client.Writer, obj *unstructured.Unstructured) (*unstructured.Unstructured, error)
- func DeleteMappedConditions(_ context.Context, conditions *[]metav1.Condition)
- func EnsureCachedFinalizer(ctx context.Context, c client.Client, obj client.Object) error
- func EnsureFinalizer(ctx context.Context, c client.Client, obj client.Object, finalizer string) error
- func FreeCacheAndRemoveFinalizer(ctx context.Context, c client.Client, obj client.Object, cache cacheFreer) error
- func GetControllerOf(_ context.Context, scheme *runtime.Scheme, ownerStrategy isControllerChecker, ...) ([]corev1alpha1.ControlledObjectReference, error)
- func IsMappedCondition(cond metav1.Condition) bool
- func MapConditions(_ context.Context, srcGeneration int64, srcConditions []metav1.Condition, ...)
- func RemoveFinalizer(ctx context.Context, c client.Client, obj client.Object, finalizer string) error
- type CommonObjectPhaseError
- type ObjectNotOwnedByPreviousRevisionError
- type PhaseObjectOwner
- type PhaseReconciler
- type PreviousObjectSet
- type PreviousObjectSetFactory
- type PreviousOwner
- type PreviousRevisionLookup
- type ProbingResult
- type RevisionCollisionError
Constants ¶
View Source
const ( // This label is set on all dynamic objects to limit caches. DynamicCacheLabel = "package-operator.run/cache" // Common finalizer to free allocated caches when objects are deleted. CachedFinalizer = "package-operator.run/cached" // Causes PKO to skip ownership checks, used during self-bootstrap. ForceAdoptionEnvironmentVariable = "PKO_FORCE_ADOPTION" )
Variables ¶
This section is empty.
Functions ¶
func AddDynamicCacheLabel ¶ added in v1.5.0
func AddDynamicCacheLabel(ctx context.Context, w client.Writer, obj *unstructured.Unstructured) (*unstructured.Unstructured, error)
AddDynamicCacheLabel ensures that the given object is labeled for recognition by the dynamic cache.
func DeleteMappedConditions ¶ added in v1.3.0
func EnsureCachedFinalizer ¶
func EnsureFinalizer ¶
func EnsureFinalizer( ctx context.Context, c client.Client, obj client.Object, finalizer string, ) error
Ensures the given finalizer is set and persisted on the given object.
func FreeCacheAndRemoveFinalizer ¶
func FreeCacheAndRemoveFinalizer( ctx context.Context, c client.Client, obj client.Object, cache cacheFreer, ) error
Frees caches and removes the associated finalizer.
func GetControllerOf ¶
func GetControllerOf( _ context.Context, scheme *runtime.Scheme, ownerStrategy isControllerChecker, owner client.Object, actualObjects []client.Object, ) ([]corev1alpha1.ControlledObjectReference, error)
Returns a list of ControlledObjectReferences controlled by this instance.
func IsMappedCondition ¶ added in v1.3.0
func MapConditions ¶ added in v1.3.0
Types ¶
type CommonObjectPhaseError ¶
type CommonObjectPhaseError struct {
OwnerKey, ObjectKey client.ObjectKey
OwnerGVK, ObjectGVK schema.GroupVersionKind
}
type ObjectNotOwnedByPreviousRevisionError ¶
type ObjectNotOwnedByPreviousRevisionError struct {
CommonObjectPhaseError
}
This error is returned when a Phase contains objects that are not owned by a previous revision. Previous revisions of an Phase have to be declared in .spec.previousRevisions.
func (ObjectNotOwnedByPreviousRevisionError) Error ¶
func (e ObjectNotOwnedByPreviousRevisionError) Error() string
type PhaseObjectOwner ¶
type PhaseReconciler ¶
type PhaseReconciler struct {
// contains filtered or unexported fields
}
PhaseReconciler reconciles objects within a ObjectSet phase.
func NewPhaseReconciler ¶
func (*PhaseReconciler) ReconcilePhase ¶
func (r *PhaseReconciler) ReconcilePhase( ctx context.Context, owner PhaseObjectOwner, phase corev1alpha1.ObjectSetTemplatePhase, probe probing.Prober, previous []PreviousObjectSet, ) (actualObjects []client.Object, res ProbingResult, err error)
func (*PhaseReconciler) TeardownPhase ¶
func (r *PhaseReconciler) TeardownPhase( ctx context.Context, owner PhaseObjectOwner, phase corev1alpha1.ObjectSetTemplatePhase, ) (cleanupDone bool, err error)
type PreviousObjectSet ¶
type PreviousObjectSet interface { ClientObject() client.Object GetRemotePhases() []corev1alpha1.RemotePhaseReference }
type PreviousObjectSetFactory ¶
type PreviousObjectSetFactory func(*runtime.Scheme) PreviousObjectSet
type PreviousOwner ¶
type PreviousOwner interface { ClientObject() client.Object GetPrevious() []corev1alpha1.PreviousRevisionReference }
type PreviousRevisionLookup ¶
type PreviousRevisionLookup struct {
// contains filtered or unexported fields
}
func NewPreviousRevisionLookup ¶
func NewPreviousRevisionLookup( scheme *runtime.Scheme, newPreviousObjectSet PreviousObjectSetFactory, client client.Reader, ) *PreviousRevisionLookup
func (*PreviousRevisionLookup) Lookup ¶
func (l *PreviousRevisionLookup) Lookup( ctx context.Context, owner PreviousOwner, ) ([]PreviousObjectSet, error)
type ProbingResult ¶
func (*ProbingResult) IsZero ¶
func (e *ProbingResult) IsZero() bool
func (*ProbingResult) String ¶
func (e *ProbingResult) String() string
func (*ProbingResult) StringWithoutPhase ¶
func (e *ProbingResult) StringWithoutPhase() string
type RevisionCollisionError ¶
type RevisionCollisionError struct {
CommonObjectPhaseError
}
This error is returned when a Phase tries to adopt an object where the revision number is not increasing.
func (RevisionCollisionError) Error ¶
func (e RevisionCollisionError) Error() string
Directories ¶
Path | Synopsis |
---|---|
hypershift/v1beta1
The package v1beta1 contains some API Schema definitions for the v1beta1 version of some Hypershift API group.
|
The package v1beta1 contains some API Schema definitions for the v1beta1 version of some Hypershift API group. |
Click to show internal directories.
Click to hide internal directories.