Documentation ¶
Index ¶
- type CustomResourceDefinitionReconciler
- type PatchInjector
- type PatchReconciler
- func (er *PatchReconciler) ManageError(ctx context.Context, instance *patchv1alpha1.Patch, issue error) (reconcile.Result, error)
- func (er *PatchReconciler) ManageSuccess(ctx context.Context, instance *patchv1alpha1.Patch) (reconcile.Result, error)
- func (r *PatchReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *PatchReconciler) SetupWithManager(mgr ctrl.Manager) error
- type PatchType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomResourceDefinitionReconciler ¶
type CustomResourceDefinitionReconciler struct {
// contains filtered or unexported fields
}
CustomResourceDefinitionReconciler reconciles a CustomResourceDefinition object
func NewCustomResourceDefinitionReconciler ¶
func NewCustomResourceDefinitionReconciler(restConfig *rest.Config) *CustomResourceDefinitionReconciler
func (*CustomResourceDefinitionReconciler) GetModels ¶
func (r *CustomResourceDefinitionReconciler) GetModels() openapi.Models
func (*CustomResourceDefinitionReconciler) Reconcile ¶
func (r *CustomResourceDefinitionReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the CustomResourceDefinition object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.10.0/pkg/reconcile
func (*CustomResourceDefinitionReconciler) SetupWithManager ¶
func (r *CustomResourceDefinitionReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type PatchInjector ¶
type PatchInjector struct {
// contains filtered or unexported fields
}
func NewPatchInjector ¶
func NewPatchInjector(client client.Client, restConfig *rest.Config, customResourceDefinitionReconciler *CustomResourceDefinitionReconciler) *PatchInjector
func (*PatchInjector) InjectDecoder ¶
func (a *PatchInjector) InjectDecoder(d *admission.Decoder) error
InjectDecoder injects the decoder.
type PatchReconciler ¶
type PatchReconciler struct {
lockedresourcecontroller.EnforcingReconciler
}
PatchReconciler reconciles a Patch object
func (*PatchReconciler) ManageError ¶
func (er *PatchReconciler) ManageError(ctx context.Context, instance *patchv1alpha1.Patch, issue error) (reconcile.Result, error)
ManageError manage error sets an error status in the CR and fires an event, finally it returns the error so the operator can re-attempt
func (*PatchReconciler) ManageSuccess ¶
func (er *PatchReconciler) ManageSuccess(ctx context.Context, instance *patchv1alpha1.Patch) (reconcile.Result, error)
ManageSuccess will update the status of the CR and return a successful reconcile result
func (*PatchReconciler) Reconcile ¶
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the Patch object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.12.2/pkg/reconcile
func (*PatchReconciler) SetupWithManager ¶
func (r *PatchReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.