Documentation
¶
Index ¶
- Constants
- Variables
- func DependentFactoryKey(namespace string) typed.FactoryKey
- func NewPauseHandler(patchStatus func(ctx context.Context, patch *v1alpha1.SpiceDBCluster) error, ...) handler.Handler
- func NewSecretAdoptionHandler(recorder record.EventRecorder, ...) handler.Handler
- func NewSelfPauseHandler(patch func(ctx context.Context, patch *v1alpha1.SpiceDBCluster) error, ...) handler.Handler
- func OwnedFactoryKey(namespace string) typed.FactoryKey
- type ConfigChangedHandler
- type Controller
- type DeploymentHandler
- type JobCleanupHandler
- type MigrationCheckHandler
- type MigrationRunHandler
- type ValidateConfigHandler
- type ValidateSpecHandler
- 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 EventInvalidSpiceDBSpec = "InvalidSpiceDBSpec"
View Source
const EventMigrationsComplete = "MigrationsCompleted"
View Source
const EventSecretAdoptedBySpiceDBCluster = "SecretAdoptedBySpiceDB"
View Source
const HandlerSelfPauseKey handler.Key = "nextSelfPause"
Variables ¶
View Source
var ( QueueOps = queue.NewQueueOperationsCtx() CtxOperatorConfig = typedctx.WithDefault[*config.OperatorConfig](nil) CtxCacheNamespace = typedctx.WithDefault("") CtxClusterNN = typedctx.WithDefault(types.NamespacedName{}) CtxSecretNN = typedctx.WithDefault(types.NamespacedName{}) CtxSecrets = typedctx.Boxed(map[string]*corev1.Secret{}) CtxSecretNames = typedctx.Boxed[[]string](nil) CtxSecretHash = typedctx.WithDefault("") CtxCluster = typedctx.WithDefault[*v1alpha1.SpiceDBCluster](nil) CtxConfig = typedctx.WithDefault[*config.Config](nil) CtxMigrationHash = typedctx.WithDefault("") CtxDeployments = typedctx.Boxed(make([]*appsv1.Deployment, 0)) CtxJobs = typedctx.Boxed(make([]*batchv1.Job, 0)) CtxCurrentMigrationJob = typedctx.WithDefault[*batchv1.Job](nil) CtxCurrentSpiceDeployment = typedctx.WithDefault[*appsv1.Deployment](nil) CtxSelfPauseObject = typedctx.WithDefault(new(v1alpha1.SpiceDBCluster)) )
Functions ¶
func DependentFactoryKey ¶ added in v1.0.0
func DependentFactoryKey(namespace string) typed.FactoryKey
func NewPauseHandler ¶ added in v1.1.0
func NewPauseHandler( patchStatus func(ctx context.Context, patch *v1alpha1.SpiceDBCluster) error, next handler.ContextHandler, ) handler.Handler
func NewSecretAdoptionHandler ¶ added in v1.0.0
func NewSecretAdoptionHandler(recorder record.EventRecorder, getFromCache func(ctx context.Context) (*corev1.Secret, error), missingFunc func(ctx context.Context, err error), secretIndexer *typed.Indexer[*corev1.Secret], secretApplyFunc adopt.ApplyFunc[*corev1.Secret, *applycorev1.SecretApplyConfiguration], existsFunc func(ctx context.Context, name types.NamespacedName) error, next handler.Handler) handler.Handler
func NewSelfPauseHandler ¶ added in v1.0.0
func OwnedFactoryKey ¶ added in v1.0.0
func OwnedFactoryKey(namespace string) typed.FactoryKey
Types ¶
type ConfigChangedHandler ¶ added in v1.0.0
type ConfigChangedHandler struct {
// contains filtered or unexported fields
}
func (*ConfigChangedHandler) Handle ¶ added in v1.0.0
func (c *ConfigChangedHandler) Handle(ctx context.Context)
type Controller ¶
type Controller struct {
*manager.OwnedResourceController
// contains filtered or unexported fields
}
func NewController ¶
func (*Controller) Handle ¶ added in v1.0.0
func (c *Controller) Handle(ctx context.Context)
Handle inspects the current SpiceDBCluster object and ensures the desired state is persisted on the cluster.
func (*Controller) Patch ¶ added in v1.0.0
func (c *Controller) Patch(ctx context.Context, patch *v1alpha1.SpiceDBCluster) error
func (*Controller) PatchStatus ¶ added in v1.0.0
func (c *Controller) PatchStatus(ctx context.Context, patch *v1alpha1.SpiceDBCluster) error
type DeploymentHandler ¶ added in v1.0.0
type DeploymentHandler struct {
// contains filtered or unexported fields
}
func (*DeploymentHandler) Handle ¶ added in v1.0.0
func (m *DeploymentHandler) Handle(ctx context.Context)
type JobCleanupHandler ¶ added in v1.0.0
type JobCleanupHandler struct {
// contains filtered or unexported fields
}
func (*JobCleanupHandler) Handle ¶ added in v1.0.0
func (s *JobCleanupHandler) Handle(ctx context.Context)
type MigrationCheckHandler ¶ added in v1.0.0
type MigrationCheckHandler struct {
// contains filtered or unexported fields
}
func (*MigrationCheckHandler) Handle ¶ added in v1.0.0
func (m *MigrationCheckHandler) Handle(ctx context.Context)
type MigrationRunHandler ¶ added in v1.0.0
type MigrationRunHandler struct {
// contains filtered or unexported fields
}
func (*MigrationRunHandler) Handle ¶ added in v1.0.0
func (m *MigrationRunHandler) Handle(ctx context.Context)
type ValidateConfigHandler ¶ added in v1.0.0
type ValidateConfigHandler struct {
// contains filtered or unexported fields
}
func (*ValidateConfigHandler) Handle ¶ added in v1.0.0
func (c *ValidateConfigHandler) Handle(ctx context.Context)
type ValidateSpecHandler ¶ added in v1.23.0
type ValidateSpecHandler struct {
// contains filtered or unexported fields
}
ValidateSpecHandler checks for invalid combinations of spec fields before any other processing takes place. It rejects the case where both SecretRef and Credentials are set (mutually exclusive), and rejects any CredentialRef that has Skip: false but an empty SecretName.
func (*ValidateSpecHandler) Handle ¶ added in v1.23.0
func (c *ValidateSpecHandler) Handle(ctx context.Context)
type WaitForMigrationsHandler ¶ added in v1.0.0
type WaitForMigrationsHandler struct {
// contains filtered or unexported fields
}
func (*WaitForMigrationsHandler) Handle ¶ added in v1.0.0
func (m *WaitForMigrationsHandler) Handle(ctx context.Context)
Click to show internal directories.
Click to hide internal directories.