Skip to content

Commit

Permalink
feat(lb): allow all types (#1792)
Browse files Browse the repository at this point in the history
Signed-off-by: Patrik Cyvoct <[email protected]>
  • Loading branch information
Sh4d1 authored Mar 3, 2021
1 parent a0e1ce7 commit 024a198
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions internal/namespaces/lb/v1/custom_lb.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ func lbWaitCommand() *core.Command {
func lbCreateBuilder(c *core.Command) *core.Command {
c.ArgSpecs.GetByName("type").EnumValues = typesList
c.ArgSpecs.GetByName("type").Default = core.DefaultValueSetter("LB-S")
c.ArgSpecs.GetByName("type").ValidateFunc = func(argSpec *core.ArgSpec, value interface{}) error {
// Allow all lb types
return nil
}

c.WaitFunc = func(ctx context.Context, argsI, respI interface{}) (interface{}, error) {
api := lb.NewAPI(core.ExtractClient(ctx))
Expand All @@ -81,6 +85,10 @@ var typesList = []string{

func lbMigrateBuilder(c *core.Command) *core.Command {
c.ArgSpecs.GetByName("type").EnumValues = typesList
c.ArgSpecs.GetByName("type").ValidateFunc = func(argSpec *core.ArgSpec, value interface{}) error {
// Allow all lb types
return nil
}

return c
}
Expand Down

0 comments on commit 024a198

Please sign in to comment.