mirror of
https://github.com/rancher/norman.git
synced 2025-09-07 10:10:06 +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
|
||||
}
|
||||
|
||||
if c.CustomizeSchemas != nil {
|
||||
if err := c.CustomizeSchemas(ctx, c.ClientGetter, r.AllSchemas); err != nil {
|
||||
return ctx, nil, err
|
||||
}
|
||||
}
|
||||
|
||||
if c.GlobalSetup != nil {
|
||||
ctx, err = c.GlobalSetup(ctx)
|
||||
if err != nil {
|
||||
|
1
types.go
1
types.go
@@ -35,6 +35,7 @@ type Config struct {
|
||||
Threadiness int
|
||||
K3s K3sConfig
|
||||
|
||||
CustomizeSchemas func(context.Context, proxy.ClientGetter, *types.Schemas) error
|
||||
GlobalSetup func(context.Context) (context.Context, error)
|
||||
MasterSetup func(context.Context) (context.Context, error)
|
||||
PreStart func(context.Context) error
|
||||
|
Reference in New Issue
Block a user