Feat: upgrade istio from 1.19.5 to 1.27.1 (#3066)

This commit is contained in:
EndlessSeeker
2025-11-20 14:43:30 +08:00
committed by GitHub
parent 7dfc42fd92
commit b2b4f72775
173 changed files with 25684 additions and 4741 deletions

View File

@@ -18,12 +18,12 @@ import (
"reflect"
"testing"
"istio.io/istio/pkg/config"
"istio.io/istio/pkg/config/schema/gvk"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
k8s "sigs.k8s.io/gateway-api/apis/v1beta1"
"github.com/alibaba/higress/v2/pkg/config/constants"
"istio.io/istio/pilot/pkg/features"
"istio.io/istio/pkg/config"
"istio.io/istio/pkg/config/schema/gvk"
)
func TestCreateRouteStatus(t *testing.T) {
@@ -32,7 +32,14 @@ func TestCreateRouteStatus(t *testing.T) {
parentStatus := []k8s.RouteParentStatus{
{
ParentRef: parentRef,
ControllerName: constants.ManagedGatewayController,
ControllerName: k8s.GatewayController("another-gateway-controller"),
Conditions: []metav1.Condition{
{Type: "foo", Status: "bar"},
},
},
{
ParentRef: parentRef,
ControllerName: k8s.GatewayController(features.ManagedGatewayController),
Conditions: []metav1.Condition{
{
Type: string(k8s.RouteReasonAccepted),
@@ -48,6 +55,13 @@ func TestCreateRouteStatus(t *testing.T) {
LastTransitionTime: lastTransitionTime,
Message: "All references resolved",
},
{
Type: string(RouteConditionResolvedWaypoints),
Status: metav1.ConditionTrue,
ObservedGeneration: 1,
LastTransitionTime: lastTransitionTime,
Message: "All waypoints resolved",
},
},
},
}
@@ -100,7 +114,7 @@ func TestCreateRouteStatus(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got := createRouteStatus(tt.args.gateways, tt.args.obj, tt.args.current)
got := createRouteStatus(tt.args.gateways, "default", tt.args.obj.Generation, tt.args.current)
equal := reflect.DeepEqual(got, tt.args.current)
if equal != tt.wantEqual {
t.Errorf("route status: old: %+v, new: %+v", tt.args.current, got)