Documentation ¶
Index ¶
- Constants
- 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(ctx context.Context, scheme *runtime.Scheme, ownerStrategy isControllerChecker, ...) ([]corev1alpha1.ControlledObjectReference, error)
- func RemoveFinalizer(ctx context.Context, c client.Client, obj client.Object, finalizer string) error
- type CommonObjectPhaseError
- type ObjectNotOwnedByPreviousRevisionError
- type PhaseObjectOwner
- type PhaseReconciler
- type PreflightError
- 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" )
Variables ¶
This section is empty.
Functions ¶
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( ctx 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.
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 NewPhaseReconciler( scheme *runtime.Scheme, writer client.Writer, dynamicCache dynamicCache, ownerStrategy ownerStrategy, preflightChecker preflightChecker, ) *PhaseReconciler
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 PreflightError ¶
func (*PreflightError) Error ¶
func (e *PreflightError) Error() string
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.