Documentation
¶
Index ¶
- Constants
- func NewConfigChangedHandler(ctrls libctrl.HandlerControls, cluster *v1alpha1.SpiceDBCluster, ...) handler.Handler
- func NewEnsureDeploymentHandler(ctrls libctrl.HandlerControls, ...) handler.Handler
- func NewJobCleanupHandler(ctrls libctrl.HandlerControls, ...) handler.Handler
- func NewMigrationCheckHandler(ctrls libctrl.HandlerControls, recorder record.EventRecorder, ...) handler.Handler
- func NewMigrationRunHandler(ctrls libctrl.HandlerControls, ...) handler.Handler
- func NewSecretAdoptionHandler(ctrls libctrl.HandlerControls, recorder record.EventRecorder, ...) handler.Handler
- func NewSelfPauseHandler(ctrls libctrl.HandlerControls, cluster *v1alpha1.SpiceDBCluster, ...) handler.Handler
- func NewValidateConfigHandler(ctrls libctrl.HandlerControls, uid types.UID, rawConfig json.RawMessage, ...) handler.Handler
- func NewWaitForMigrationsHandler(ctrls libctrl.HandlerControls, recorder record.EventRecorder, ...) handler.Handler
- type ConfigChangedHandler
- type DeploymentHandler
- type JobCleanupHandler
- type MigrationCheckHandler
- type MigrationRunHandler
- type SecretAdopterHandler
- type SecretApplyFunc
- type ValidateConfigHandler
- type WaitForMigrationsHandler
Constants ¶
View Source
const ( EventRunningMigrations = "RunningMigrations" HandlerDeploymentKey handler.Key = "deploymentChain" HandlerMigrationRunKey handler.Key = "runMigration" HandlerWaitForMigrationsKey handler.Key = "waitForMigrationChain" )
View Source
const EventInvalidSpiceDBConfig = "InvalidSpiceDBConfig"
View Source
const EventMigrationsComplete = "MigrationsCompleted"
View Source
const EventSecretAdoptedBySpiceDBCluster = "SecretAdoptedBySpiceDB"
View Source
const HandlerSelfPauseKey handler.Key = "nextSelfPause"
Variables ¶
This section is empty.
Functions ¶
func NewConfigChangedHandler ¶
func NewConfigChangedHandler(ctrls libctrl.HandlerControls, cluster *v1alpha1.SpiceDBCluster, patchStatus func(ctx context.Context, patch *v1alpha1.SpiceDBCluster) error, next handler.Handler) handler.Handler
func NewEnsureDeploymentHandler ¶
func NewEnsureDeploymentHandler(ctrls libctrl.HandlerControls, applyDeployment func(ctx context.Context, dep *applyappsv1.DeploymentApplyConfiguration) (*appsv1.Deployment, error), deleteDeployment func(ctx context.Context, name string) error, patchStatus func(ctx context.Context, patch *v1alpha1.SpiceDBCluster) error, next handler.ContextHandler, ) handler.Handler
func NewJobCleanupHandler ¶
func NewMigrationCheckHandler ¶
func NewMigrationCheckHandler(ctrls libctrl.HandlerControls, recorder record.EventRecorder, next handler.Handlers) handler.Handler
func NewMigrationRunHandler ¶
func NewMigrationRunHandler(ctrls libctrl.HandlerControls, patchStatus func(ctx context.Context, patch *v1alpha1.SpiceDBCluster) error, applyJob func(ctx context.Context, job *applybatchv1.JobApplyConfiguration) error, deleteJob func(ctx context.Context, name string) error, next handler.ContextHandler, ) handler.Handler
func NewSecretAdoptionHandler ¶
func NewSecretAdoptionHandler(ctrls libctrl.HandlerControls, recorder record.EventRecorder, secretName string, secretIndexer cache.Indexer, secretApplyFunc SecretApplyFunc, next handler.Handler) handler.Handler
func NewSelfPauseHandler ¶
func NewSelfPauseHandler(ctrls libctrl.HandlerControls, cluster *v1alpha1.SpiceDBCluster, patch func(ctx context.Context, patch *v1alpha1.SpiceDBCluster) error, patchStatus func(ctx context.Context, patch *v1alpha1.SpiceDBCluster) error, ) handler.Handler
func NewValidateConfigHandler ¶
func NewValidateConfigHandler(ctrls libctrl.HandlerControls, uid types.UID, rawConfig json.RawMessage, spicedbImage string, generation int64, patchStatus func(ctx context.Context, patch *v1alpha1.SpiceDBCluster) error, recorder record.EventRecorder, next handler.Handler) handler.Handler
func NewWaitForMigrationsHandler ¶
func NewWaitForMigrationsHandler(ctrls libctrl.HandlerControls, recorder record.EventRecorder, next handler.Handlers) handler.Handler
Types ¶
type ConfigChangedHandler ¶
type ConfigChangedHandler struct {
libctrl.ControlAll
// contains filtered or unexported fields
}
func (*ConfigChangedHandler) Handle ¶
func (c *ConfigChangedHandler) Handle(ctx context.Context)
type DeploymentHandler ¶
type DeploymentHandler struct {
libctrl.ControlAll
// contains filtered or unexported fields
}
func (*DeploymentHandler) Handle ¶
func (m *DeploymentHandler) Handle(ctx context.Context)
type JobCleanupHandler ¶
type JobCleanupHandler struct {
libctrl.ControlAll
// contains filtered or unexported fields
}
func (*JobCleanupHandler) Handle ¶
func (s *JobCleanupHandler) Handle(ctx context.Context)
type MigrationCheckHandler ¶
type MigrationCheckHandler struct {
libctrl.ControlRequeueErr
// contains filtered or unexported fields
}
TODO: could be generalized as some sort of "Hash Handoff" flow
func (*MigrationCheckHandler) Handle ¶
func (m *MigrationCheckHandler) Handle(ctx context.Context)
type MigrationRunHandler ¶
type MigrationRunHandler struct {
libctrl.ControlAll
// contains filtered or unexported fields
}
TODO: see if the config hashing can be generalized / unified with the object hashing
func (*MigrationRunHandler) Handle ¶
func (m *MigrationRunHandler) Handle(ctx context.Context)
type SecretAdopterHandler ¶
type SecretAdopterHandler struct {
libctrl.ControlAll
// contains filtered or unexported fields
}
TODO: generic adoption handler
func (*SecretAdopterHandler) Handle ¶
func (s *SecretAdopterHandler) Handle(ctx context.Context)
type SecretApplyFunc ¶
type SecretApplyFunc func(ctx context.Context, secret *applycorev1.SecretApplyConfiguration, opts metav1.ApplyOptions) (result *corev1.Secret, err error)
type ValidateConfigHandler ¶
type ValidateConfigHandler struct {
libctrl.ControlAll
// contains filtered or unexported fields
}
func (*ValidateConfigHandler) Handle ¶
func (c *ValidateConfigHandler) Handle(ctx context.Context)
type WaitForMigrationsHandler ¶
type WaitForMigrationsHandler struct {
libctrl.ControlRequeueAfter
// contains filtered or unexported fields
}
func (*WaitForMigrationsHandler) Handle ¶
func (m *WaitForMigrationsHandler) Handle(ctx context.Context)
Click to show internal directories.
Click to hide internal directories.