Documentation
¶
Index ¶
- func IsInvalidConfig(err error) bool
- func IsWrongTypeError(err error) bool
- type Config
- type RecyclePersistentVolume
- type Resource
- func (r *Resource) ApplyCreateChange(ctx context.Context, obj, deleteState interface{}) error
- func (r *Resource) ApplyDeleteChange(ctx context.Context, obj, deleteState interface{}) error
- func (r *Resource) ApplyUpdateChange(ctx context.Context, obj, updateState interface{}) error
- func (r *Resource) GetCurrentState(ctx context.Context, obj interface{}) (interface{}, error)
- func (r *Resource) GetDesiredState(ctx context.Context, obj interface{}) (interface{}, error)
- func (r *Resource) Name() string
- func (r *Resource) NewCreatePatch(ctx context.Context, obj, currentState, desiredState interface{}) (*crud.Patch, error)
- func (r *Resource) NewDeletePatch(ctx context.Context, obj, currentState, desiredState interface{}) (*crud.Patch, error)
- func (r *Resource) NewUpdatePatch(ctx context.Context, obj, currentState, desiredState interface{}) (*crud.Patch, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsInvalidConfig ¶
IsInvalidConfig asserts invalidConfigError.
func IsWrongTypeError ¶
IsWrongTypeError asserts wrongTypeError.
Types ¶
type Config ¶
type Config struct {
K8sClient kubernetes.Interface
Logger micrologger.Logger
}
Config describes resource configuration.
type RecyclePersistentVolume ¶
type RecyclePersistentVolume struct {
Name string
State apiv1.PersistentVolumePhase
RecycleState string
}
RecyclePersistentVolume reflects PersistentVolume with additional RecycleState.
type Resource ¶
type Resource struct {
// contains filtered or unexported fields
}
Resource stores resource configuration.
func (*Resource) ApplyCreateChange ¶
ApplyCreateChange is not used during persistent volume reconcile.
func (*Resource) ApplyDeleteChange ¶
ApplyDeleteChange represents delete patch logic.
func (*Resource) ApplyUpdateChange ¶
ApplyUpdateChange represents update patch logic. All actions are based on combination of volume state and custom recycle state.
- ReleasedRecycled - initial state of volume after claim is deleted; volume is recreated at this step
- AvailableCleaning - volume ready for bounding to cleanup claim
- BoundCleaning - volume claim is ready for mounting into cleanup job
- BoundTeardown - waiting for leftovers to be cleaned up
- ReleasedCleaning - volume claim was succesfully cleaned up, volume can be recreated
- AvailableRecycled - desired state of the volume
func (*Resource) GetCurrentState ¶
GetCurrentState returns current state of the recycled persistent volume.
func (*Resource) GetDesiredState ¶
GetDesiredState returns desired state of the recycled persistent volume.
func (*Resource) NewCreatePatch ¶
func (r *Resource) NewCreatePatch(ctx context.Context, obj, currentState, desiredState interface{}) (*crud.Patch, error)
NewCreatePatch is not used during persistent volume reconcile.