Skip to content

Commit

Permalink
Add Secret sorting prior to request
Browse files Browse the repository at this point in the history
Signed-off-by: Phong Tran <[email protected]>
  • Loading branch information
photra committed May 31, 2022
1 parent 98903b3 commit 215efa0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cli/command/volume/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package volume
import (
"context"
"fmt"
"sort"
"strings"

"github.com/docker/cli/cli"
Expand Down Expand Up @@ -153,6 +154,9 @@ func runCreate(dockerCli command.Cli, options createOptions) error {
},
)
}
sort.SliceStable(volOpts.ClusterVolumeSpec.Secrets, func(i, j int) bool {
return volOpts.ClusterVolumeSpec.Secrets[i].Key < volOpts.ClusterVolumeSpec.Secrets[j].Key
})

// TODO(dperny): ignore if no topology specified
topology := &volume.TopologyRequirement{}
Expand Down

0 comments on commit 215efa0

Please sign in to comment.