Fix edit service to have sorted selectors
@@ -8,6 +8,7 @@ package printer
import (
"context"
"fmt"
+ "sort"
"strings"
"github.com/pkg/errors"
@@ -335,6 +336,10 @@ func editServiceAction(ctx context.Context, service *corev1.Service, options Opt
}
}
+ sort.Slice(choices, func(i, j int) bool {
+ return choices[i].Value < choices[j].Value
+ })
+
form, err := component.CreateFormForObject(octant.ActionOverviewServiceEditor, service,
component.NewFormFieldSelect("Selectors", "selectors", choices, true))
if err != nil {
