Skip to content

Commit

Permalink
fix scheme
Browse files Browse the repository at this point in the history
Signed-off-by: zirain <[email protected]>
  • Loading branch information
zirain committed May 7, 2024
1 parent 2146692 commit bcd1bf0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion internal/cmd/egctl/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func runStatus(ctx context.Context, cli client.Client, resourceType, namespace s
resourcesList = &httproute

case "grpcroute":
grpcroute := gwv1a2.GRPCRouteList{}
grpcroute := gwv1.GRPCRouteList{}
if err := cli.List(ctx, &grpcroute, client.InNamespace(namespace)); err != nil {
return err
}
Expand Down
12 changes: 2 additions & 10 deletions internal/envoygateway/scheme.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ package envoygateway
import (
"k8s.io/apimachinery/pkg/runtime"
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
gwapiv1 "sigs.k8s.io/gateway-api/apis/v1"
gwapiv1a2 "sigs.k8s.io/gateway-api/apis/v1alpha2"
gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1"
gwapischeme "sigs.k8s.io/gateway-api/pkg/client/clientset/versioned/scheme"
mcsapi "sigs.k8s.io/mcs-api/pkg/apis/v1alpha1"

egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1"
Expand All @@ -33,13 +31,7 @@ func init() {
panic(err)
}
// Add Gateway API types.
if err := gwapiv1.AddToScheme(scheme); err != nil {
panic(err)
}
if err := gwapiv1b1.AddToScheme(scheme); err != nil {
panic(err)
}
if err := gwapiv1a2.AddToScheme(scheme); err != nil {
if err := gwapischeme.AddToScheme(scheme); err != nil {
panic(err)
}
// Add mcs api types.
Expand Down

0 comments on commit bcd1bf0

Please sign in to comment.