Documentation ¶
Index ¶
- Variables
- func TemplateRateLimiter(failureBaseDelay time.Duration, failureMaxDelay time.Duration, frequency int, ...) ratelimiter.RateLimiter
- type ManifestResources
- type RateLimiter
- type SampleReconciler
- func (r *SampleReconciler) HandleDeletingState(ctx context.Context, objectInstance *v1alpha1.Sample) error
- func (r *SampleReconciler) HandleErrorState(ctx context.Context, objectInstance *v1alpha1.Sample) error
- func (r *SampleReconciler) HandleInitialState(ctx context.Context, objectInstance *v1alpha1.Sample) error
- func (r *SampleReconciler) HandleProcessingState(ctx context.Context, objectInstance *v1alpha1.Sample) error
- func (r *SampleReconciler) HandleReadyState(ctx context.Context, objectInstance *v1alpha1.Sample) error
- func (r *SampleReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *SampleReconciler) SetupWithManager(mgr ctrl.Manager, rateLimiter RateLimiter) error
Constants ¶
This section is empty.
Variables ¶
var ( // SchemeBuilder is used to add go types to the GroupVersionKind scheme. SchemeBuilder = &scheme.Builder{GroupVersion: v1alpha1.GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func TemplateRateLimiter ¶
func TemplateRateLimiter(failureBaseDelay time.Duration, failureMaxDelay time.Duration, frequency int, burst int, ) ratelimiter.RateLimiter
TemplateRateLimiter implements a rate limiter for a client-go.workqueue. It has both an overall (token bucket) and per-item (exponential) rate limiting.
Types ¶
type ManifestResources ¶
type ManifestResources struct { Items []*unstructured.Unstructured Blobs [][]byte }
type RateLimiter ¶
type SampleReconciler ¶
type SampleReconciler struct { client.Client Scheme *runtime.Scheme *rest.Config // EventRecorder for creating k8s events record.EventRecorder FinalState v1alpha1.State FinalDeletionState v1alpha1.State }
SampleReconciler reconciles a Sample object.
func (*SampleReconciler) HandleDeletingState ¶
func (r *SampleReconciler) HandleDeletingState(ctx context.Context, objectInstance *v1alpha1.Sample) error
HandleDeletingState processed the deletion on the reconciled resource. Once the deletion if processed the relevant finalizers (if applied) are removed.
func (*SampleReconciler) HandleErrorState ¶
func (r *SampleReconciler) HandleErrorState(ctx context.Context, objectInstance *v1alpha1.Sample) error
HandleErrorState handles error recovery for the reconciled resource.
func (*SampleReconciler) HandleInitialState ¶
func (r *SampleReconciler) HandleInitialState(ctx context.Context, objectInstance *v1alpha1.Sample) error
HandleInitialState bootstraps state handling for the reconciled resource.
func (*SampleReconciler) HandleProcessingState ¶
func (r *SampleReconciler) HandleProcessingState(ctx context.Context, objectInstance *v1alpha1.Sample) error
HandleProcessingState processes the reconciled resource by processing the underlying resources. Based on the processing either a success or failure state is set on the reconciled resource.
func (*SampleReconciler) HandleReadyState ¶
func (r *SampleReconciler) HandleReadyState(ctx context.Context, objectInstance *v1alpha1.Sample) error
HandleReadyState checks for the consistency of reconciled resource, by verifying the underlying resources.
func (*SampleReconciler) Reconcile ¶
Reconcile is the entry point from the controller-runtime framework. It performs a reconciliation based on the passed ctrl.Request object.
func (*SampleReconciler) SetupWithManager ¶
func (r *SampleReconciler) SetupWithManager(mgr ctrl.Manager, rateLimiter RateLimiter) error
SetupWithManager sets up the controller with the Manager.