diff --git a/api/pkg/plugins/plugins.go b/api/pkg/plugins/plugins.go index 74666c28..4e8df0d9 100644 --- a/api/pkg/plugins/plugins.go +++ b/api/pkg/plugins/plugins.go @@ -202,8 +202,8 @@ func ComparePluginOrder(a, b string) bool { } func ComparePluginOrderInt(a, b string) int { - pa := plugins[a] - pb := plugins[b] + pa := pluginTypes[a] + pb := pluginTypes[b] if pa == nil || pb == nil { // The caller should guarantee the a, b are valid plugin name, so this case only happens // in test. diff --git a/controller/internal/translation/testdata/translation/virtualservice_subpolicies.out.yml b/controller/internal/translation/testdata/translation/virtualservice_subpolicies.out.yml index eacdaaa1..f16fb490 100644 --- a/controller/internal/translation/testdata/translation/virtualservice_subpolicies.out.yml +++ b/controller/internal/translation/testdata/translation/virtualservice_subpolicies.out.yml @@ -27,15 +27,15 @@ '@type': type.googleapis.com/xds.type.v3.TypedStruct value: plugins: + - config: + average: 1 + name: limitReq - config: pet: goldfish name: animal - config: hostName: John name: demo - - config: - average: 1 - name: limitReq - applyTo: HTTP_ROUTE match: routeConfiguration: @@ -56,12 +56,6 @@ value: namespace: default plugins: - - config: - pet: fish - name: animal - - config: - hostName: John - name: demo - config: keys: - name: Authorization @@ -69,4 +63,10 @@ - config: average: 1 name: limitReq + - config: + pet: fish + name: animal + - config: + hostName: John + name: demo status: {}