Documentation ¶
Index ¶
- Constants
- func IsDeploymentReady(resource *appsv1.Deployment) (bool, error)
- func IsEndpointsReady(resource *corev1.Endpoints) (bool, error)
- func IsJobReady(resource *batchv1.Job) (bool, error)
- func IsResourceFound(client client.Client, ctx context.Context, req ctrl.Request, ...) (bool, error)
- func IsResourceNotReadyError(err error) bool
- func IsServiceMeshControlPlaneReady(resource *unstructured.Unstructured) (bool, error)
- func IsServiceMeshMemberReady(resource *unstructured.Unstructured) (bool, error)
- func IsServiceMeshMemberRollReady(resource *unstructured.Unstructured) (bool, error)
- func ManageError(client client.Client, ctx context.Context, instance client.Object, ...) (reconcile.Result, error)
- func ManageSuccess(client client.Client, ctx context.Context, instance client.Object, ...) (reconcile.Result, error)
- func ReadCurrentState(client client.Client, ctx context.Context, instance client.Object, ...) (reconcile.Result, error)
- func RunDesiredStateActions(client client.Client, scheme *runtime.Scheme, ctx context.Context, ...) (reconcile.Result, error)
- type ActionRunner
- type ControllerAction
- type ControllerActionRunner
- func (i *ControllerActionRunner) Create(obj client.Object, skipOwnerRef bool) error
- func (i *ControllerActionRunner) Delete(obj client.Object) error
- func (i *ControllerActionRunner) Error(err error) error
- func (i *ControllerActionRunner) RunAll(desiredState DesiredResourceState) error
- func (i *ControllerActionRunner) Update(obj client.Object, skipOwnerRef bool) error
- type DesiredResourceState
- type GenericCreateAction
- type GenericDeleteAction
- type GenericErrorAction
- type GenericUpdateAction
- type ResourceNotReadyError
- type ResourceState
- type StateManager
Constants ¶
View Source
const ( RequeueDelay = 60 * time.Minute RequeueDelayError = 5 * time.Second )
View Source
const (
ConditionStatusSuccess = "True"
)
Variables ¶
This section is empty.
Functions ¶
func IsDeploymentReady ¶
func IsDeploymentReady(resource *appsv1.Deployment) (bool, error)
func IsResourceFound ¶ added in v0.1.4
func IsResourceNotReadyError ¶
func IsServiceMeshControlPlaneReady ¶
func IsServiceMeshControlPlaneReady(resource *unstructured.Unstructured) (bool, error)
func IsServiceMeshMemberReady ¶
func IsServiceMeshMemberReady(resource *unstructured.Unstructured) (bool, error)
func IsServiceMeshMemberRollReady ¶
func IsServiceMeshMemberRollReady(resource *unstructured.Unstructured) (bool, error)
func ManageError ¶ added in v0.1.4
func ManageSuccess ¶ added in v0.1.4
func ReadCurrentState ¶ added in v0.1.4
func RunDesiredStateActions ¶ added in v0.1.4
func RunDesiredStateActions(client client.Client, scheme *runtime.Scheme, ctx context.Context, instance client.Object, conditions *[]conditions.Condition, currentState ResourceState, desiredState DesiredResourceState) (reconcile.Result, error)
Types ¶
type ActionRunner ¶
type ControllerAction ¶
type ControllerAction interface {
Run(runner ActionRunner) (string, error)
}
type ControllerActionRunner ¶
type ControllerActionRunner struct {
// contains filtered or unexported fields
}
func (*ControllerActionRunner) Create ¶
func (i *ControllerActionRunner) Create(obj client.Object, skipOwnerRef bool) error
func (*ControllerActionRunner) Delete ¶
func (i *ControllerActionRunner) Delete(obj client.Object) error
func (*ControllerActionRunner) Error ¶
func (i *ControllerActionRunner) Error(err error) error
func (*ControllerActionRunner) RunAll ¶
func (i *ControllerActionRunner) RunAll(desiredState DesiredResourceState) error
type DesiredResourceState ¶
type DesiredResourceState []ControllerAction
func (*DesiredResourceState) AddAction ¶
func (d *DesiredResourceState) AddAction(action ControllerAction) DesiredResourceState
func (*DesiredResourceState) AddActions ¶
func (d *DesiredResourceState) AddActions(actions []ControllerAction) DesiredResourceState
type GenericCreateAction ¶
An action to create generic kubernetes resources (resources that don't require special treatment)
func (GenericCreateAction) Run ¶
func (i GenericCreateAction) Run(runner ActionRunner) (string, error)
type GenericDeleteAction ¶
An action to delete generic kubernetes resources (resources that don't require special treatment)
func (GenericDeleteAction) Run ¶
func (i GenericDeleteAction) Run(runner ActionRunner) (string, error)
type GenericErrorAction ¶
An action to return error
func (GenericErrorAction) Run ¶
func (i GenericErrorAction) Run(runner ActionRunner) (string, error)
type GenericUpdateAction ¶
An action to update generic kubernetes resources (resources that don't require special treatment)
func (GenericUpdateAction) Run ¶
func (i GenericUpdateAction) Run(runner ActionRunner) (string, error)
type ResourceNotReadyError ¶
func (*ResourceNotReadyError) Error ¶
func (e *ResourceNotReadyError) Error() string
type ResourceState ¶ added in v0.1.4
type StateManager ¶
func GetStateManager ¶
func GetStateManager() *StateManager
func (*StateManager) Clear ¶
func (sm *StateManager) Clear()
func (*StateManager) GetState ¶
func (sm *StateManager) GetState(key string) interface{}
func (*StateManager) SetState ¶
func (sm *StateManager) SetState(key string, value interface{})
Click to show internal directories.
Click to hide internal directories.