Documentation
¶
Index ¶
- Constants
- func NewDoguEvents() chan event.TypedGenericEvent[*doguv2.Dogu]
- func NewDoguEventsIn(channel chan event.TypedGenericEvent[*doguv2.Dogu]) chan<- event.TypedGenericEvent[*doguv2.Dogu]
- func NewDoguEventsOut(channel chan event.TypedGenericEvent[*doguv2.Dogu]) <-chan event.TypedGenericEvent[*doguv2.Dogu]
- func NewDoguRequeueHandler(doguInterface doguClientV2.DoguInterface, recorder record.EventRecorder, ...) *doguRequeueHandler
- type ClientSet
- type DoguDeleteUseCase
- type DoguInstallOrChangeUseCase
- type DoguReconciler
- type DoguRestartGarbageCollector
- type DoguRestartReconciler
- type DoguUsecase
- type GenericReconciler
- type GlobalConfigReconciler
- type K8sClient
- type RequeueHandler
- type RestartOperation
- type WebhookServer
Constants ¶
const ( RequeueEventReason = "Requeue" ReconcileStartedEventReason = "ReconcileStarted" )
const ( ReasonReconcileSuccess = "ReconcileSuccess" ReasonReconcileFail = "ReconcileFail" ReasonHasToReconcile = "HasToReconcile" )
const ( ReasonReconcileStarted = "ReconcileStarted" ReasonReconcileOK = "ReconcileSucceeded" )
Variables ¶
This section is empty.
Functions ¶
func NewDoguEvents ¶ added in v3.14.0
func NewDoguEvents() chan event.TypedGenericEvent[*doguv2.Dogu]
func NewDoguEventsIn ¶ added in v3.14.0
func NewDoguEventsIn(channel chan event.TypedGenericEvent[*doguv2.Dogu]) chan<- event.TypedGenericEvent[*doguv2.Dogu]
func NewDoguEventsOut ¶ added in v3.14.0
func NewDoguEventsOut(channel chan event.TypedGenericEvent[*doguv2.Dogu]) <-chan event.TypedGenericEvent[*doguv2.Dogu]
func NewDoguRequeueHandler ¶
func NewDoguRequeueHandler(doguInterface doguClientV2.DoguInterface, recorder record.EventRecorder, operatorConfig *config.OperatorConfig) *doguRequeueHandler
NewDoguRequeueHandler creates a new dogu requeue handler.
Types ¶
type ClientSet ¶
type ClientSet interface {
kubernetes.Interface
}
type DoguDeleteUseCase ¶ added in v3.14.0
type DoguDeleteUseCase interface {
DoguUsecase
}
type DoguInstallOrChangeUseCase ¶ added in v3.14.0
type DoguInstallOrChangeUseCase interface {
DoguUsecase
}
type DoguReconciler ¶ added in v3.14.0
type DoguReconciler struct {
// contains filtered or unexported fields
}
The DoguReconciler knows where the [*doguv2.Dogu] is at all times. It knows this because it knows where it isn't. By subtracting where it is from where it isn't, or where it isn't from where it is (whichever is greater), it obtains a difference, or deviation. The guidance subsystem uses deviations to generate corrective commands to drive the [*doguv2.Dogu] from a position where it is to a position where it isn't, and arriving at a position where it wasn't, it now is. Consequently, the position where it is, is now the position that it wasn't, and it follows that the position that it was, is now the position that it isn't. In the event that the position that it is in is not the position that it wasn't, the system has acquired a variation, the variation being the difference between where the [*doguv2.Dogu] is, and where it wasn't. If variation is considered to be a significant factor, it too may be corrected by the GEA. However, the DoguReconciler must also know where the [*doguv2.Dogu] was. The [*doguv2.Dogu] guidance computer scenario works as follows. Because a variation has modified some of the information the [*doguv2.Dogu] has obtained, it is not sure just where it is. However, it is sure where it isn't, within reason, and it knows where it was. It now subtracts where it should be from where it wasn't, or vice-versa, and by differentiating this from the algebraic sum of where it shouldn't be, and where it was, it is able to obtain the deviation and its variation, which is called error.
func NewDoguReconciler ¶
func NewDoguReconciler( k8sClient client.Client, doguChangeHandler DoguInstallOrChangeUseCase, doguDeleteHandler DoguDeleteUseCase, doguInterface doguClientV2.DoguInterface, requeueHandler RequeueHandler, externalEvents <-chan event.TypedGenericEvent[*doguv2.Dogu], recorder record.EventRecorder, manager manager.Manager, config *config.OperatorConfig, ) (*DoguReconciler, error)
NewDoguReconciler creates the component necessary for applying the desired state of the dogu.
type DoguRestartReconciler ¶
type DoguRestartReconciler struct {
// contains filtered or unexported fields
}
DoguRestartReconciler reconciles a DoguRestart object
func NewDoguRestartReconciler ¶
func NewDoguRestartReconciler( doguRestartInterface doguClientV2.DoguRestartInterface, doguInterface doguClientV2.DoguInterface, recorder record.EventRecorder, gc DoguRestartGarbageCollector, manager manager.Manager, ) (*DoguRestartReconciler, error)
func (*DoguRestartReconciler) Reconcile ¶
func (r *DoguRestartReconciler) 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.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.4/pkg/reconcile
type DoguUsecase ¶ added in v3.14.0
type GenericReconciler ¶ added in v3.14.0
type GenericReconciler interface {
reconcile.Reconciler
// contains filtered or unexported methods
}
type GlobalConfigReconciler ¶ added in v3.14.0
type GlobalConfigReconciler struct {
// contains filtered or unexported fields
}
func NewGlobalConfigReconciler ¶ added in v3.14.0
func NewGlobalConfigReconciler( doguInterface doguv2.DoguInterface, doguEvents chan<- event.TypedGenericEvent[*v2.Dogu], manager manager.Manager, ) (*GlobalConfigReconciler, error)
type RequeueHandler ¶ added in v3.14.0
type RequeueHandler interface {
// Handle takes an error and handles the requeue process for the current dogu operation.
Handle(ctx context.Context, doguResource *v2.Dogu, err error, reqTime time.Duration) (result ctrl.Result, requeueErr error)
}
requeueHandler abstracts the process to decide whether a requeue process should be done based on received errors.
type RestartOperation ¶
type RestartOperation string
func RestartOperationFromRestartStatusPhase ¶
func RestartOperationFromRestartStatusPhase(phase doguv2.RestartStatusPhase) RestartOperation