File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
internal/provider/adc/translator Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import (
1717 "encoding/json"
1818 "encoding/pem"
1919 "fmt"
20+ "slices"
2021
2122 "github.com/api7/gopkg/pkg/log"
2223 "github.com/pkg/errors"
@@ -44,9 +45,7 @@ func (t *Translator) TranslateGateway(tctx *provider.TranslateContext, obj *gate
4445 result .SSL = append (result .SSL , ssl ... )
4546 }
4647 }
47- log .Debugw ("translate gateway result.SSL" , zap .Any ("result.SSL" , len (result .SSL )))
4848 result .SSL = mergeSSLWithSameID (result .SSL )
49- log .Debugw ("after merging SSL with same ID" , zap .Any ("result.SSL" , len (result .SSL )))
5049
5150 rk := provider.ResourceKind {
5251 Kind : obj .Kind ,
@@ -264,9 +263,12 @@ func mergeSSLWithSameID(sslList []*adctypes.SSL) []*adctypes.SSL {
264263 for sni := range sniMap {
265264 newSnis = append (newSnis , sni )
266265 }
266+
267+ slices .Sort (newSnis )
267268 // update existing ssl object
268269 existing .Snis = newSnis
269270 } else {
271+ slices .Sort (ssl .Snis )
270272 // if new ssl id, add to map
271273 sslMap [ssl .ID ] = ssl
272274 }
You can’t perform that action at this time.
0 commit comments