mirror of
https://github.com/rancher/norman.git
synced 2025-09-08 02:29:28 +00:00
Add CustomizeSchemas builder hook
This commit is contained in:
6
build.go
6
build.go
@@ -68,6 +68,12 @@ func (c *Config) Build(ctx context.Context, opts *Options) (context.Context, *Se
|
|||||||
return ctx, nil, err
|
return ctx, nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if c.CustomizeSchemas != nil {
|
||||||
|
if err := c.CustomizeSchemas(ctx, c.ClientGetter, r.AllSchemas); err != nil {
|
||||||
|
return ctx, nil, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if c.GlobalSetup != nil {
|
if c.GlobalSetup != nil {
|
||||||
ctx, err = c.GlobalSetup(ctx)
|
ctx, err = c.GlobalSetup(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
9
types.go
9
types.go
@@ -35,10 +35,11 @@ type Config struct {
|
|||||||
Threadiness int
|
Threadiness int
|
||||||
K3s K3sConfig
|
K3s K3sConfig
|
||||||
|
|
||||||
GlobalSetup func(context.Context) (context.Context, error)
|
CustomizeSchemas func(context.Context, proxy.ClientGetter, *types.Schemas) error
|
||||||
MasterSetup func(context.Context) (context.Context, error)
|
GlobalSetup func(context.Context) (context.Context, error)
|
||||||
PreStart func(context.Context) error
|
MasterSetup func(context.Context) (context.Context, error)
|
||||||
APISetup func(context.Context, *api.Server) error
|
PreStart func(context.Context) error
|
||||||
|
APISetup func(context.Context, *api.Server) error
|
||||||
|
|
||||||
PerServerControllers []ControllerRegister
|
PerServerControllers []ControllerRegister
|
||||||
MasterControllers []ControllerRegister
|
MasterControllers []ControllerRegister
|
||||||
|
Reference in New Issue
Block a user