diff --git a/build.go b/build.go index 246c801e..68a523b7 100644 --- a/build.go +++ b/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 { diff --git a/types.go b/types.go index c179fb0f..05077913 100644 --- a/types.go +++ b/types.go @@ -35,10 +35,11 @@ type Config struct { Threadiness int K3s K3sConfig - GlobalSetup func(context.Context) (context.Context, error) - MasterSetup func(context.Context) (context.Context, error) - PreStart func(context.Context) error - APISetup func(context.Context, *api.Server) error + 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 + APISetup func(context.Context, *api.Server) error PerServerControllers []ControllerRegister MasterControllers []ControllerRegister