1
0
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:
Darren Shepherd
2018-11-09 10:05:15 -07:00
parent dec9be08bb
commit d98c0db62b
2 changed files with 11 additions and 4 deletions

View File

@@ -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 {

View File

@@ -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