Skip to content

Commit 024a198

Browse files
authored
feat(lb): allow all types (#1792)
Signed-off-by: Patrik Cyvoct <[email protected]>
1 parent a0e1ce7 commit 024a198

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

internal/namespaces/lb/v1/custom_lb.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ func lbWaitCommand() *core.Command {
6161
func lbCreateBuilder(c *core.Command) *core.Command {
6262
c.ArgSpecs.GetByName("type").EnumValues = typesList
6363
c.ArgSpecs.GetByName("type").Default = core.DefaultValueSetter("LB-S")
64+
c.ArgSpecs.GetByName("type").ValidateFunc = func(argSpec *core.ArgSpec, value interface{}) error {
65+
// Allow all lb types
66+
return nil
67+
}
6468

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

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

8593
return c
8694
}

0 commit comments

Comments
 (0)