mirror of
https://github.com/alibaba/higress.git
synced 2026-05-28 14:47:29 +08:00
refactor(v2): upgrade module to github.com/alibaba/higress/v2 (#2922)
Signed-off-by: Xijun Dai <daixijun1990@gmail.com>
This commit is contained in:
@@ -48,12 +48,12 @@ import (
|
||||
networkinglister "k8s.io/client-go/listers/networking/v1"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
|
||||
"github.com/alibaba/higress/pkg/cert"
|
||||
"github.com/alibaba/higress/pkg/ingress/kube/annotations"
|
||||
"github.com/alibaba/higress/pkg/ingress/kube/common"
|
||||
"github.com/alibaba/higress/pkg/ingress/kube/secret"
|
||||
"github.com/alibaba/higress/pkg/ingress/kube/util"
|
||||
. "github.com/alibaba/higress/pkg/ingress/log"
|
||||
"github.com/alibaba/higress/v2/pkg/cert"
|
||||
"github.com/alibaba/higress/v2/pkg/ingress/kube/annotations"
|
||||
"github.com/alibaba/higress/v2/pkg/ingress/kube/common"
|
||||
"github.com/alibaba/higress/v2/pkg/ingress/kube/secret"
|
||||
"github.com/alibaba/higress/v2/pkg/ingress/kube/util"
|
||||
. "github.com/alibaba/higress/v2/pkg/ingress/log"
|
||||
k8serrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
)
|
||||
|
||||
@@ -375,7 +375,6 @@ func (c *controller) ConvertGateway(convertOptions *common.ConvertOptions, wrapp
|
||||
}
|
||||
if c.options.GatewaySelectorKey != "" {
|
||||
wrapperGateway.Gateway.Selector = map[string]string{c.options.GatewaySelectorKey: c.options.GatewaySelectorValue}
|
||||
|
||||
}
|
||||
wrapperGateway.Gateway.Servers = append(wrapperGateway.Gateway.Servers, &networking.Server{
|
||||
Port: &networking.Port{
|
||||
@@ -504,11 +503,9 @@ func (c *controller) ConvertHTTPRoute(convertOptions *common.ConvertOptions, wra
|
||||
// When the host, pathType, path of two rule are same, we think there is a conflict event.
|
||||
definedRules := sets.New[string]()
|
||||
|
||||
var (
|
||||
// But in across ingresses case, we will restrict this limit.
|
||||
// When the {host, path, headers, method, params} of two rule in different ingress are same, we think there is a conflict event.
|
||||
tempRuleKey []string
|
||||
)
|
||||
// But in across ingresses case, we will restrict this limit.
|
||||
// When the {host, path, headers, method, params} of two rule in different ingress are same, we think there is a conflict event.
|
||||
var tempRuleKey []string
|
||||
|
||||
for _, rule := range ingressV1.Rules {
|
||||
if rule.HTTP == nil || len(rule.HTTP.Paths) == 0 {
|
||||
@@ -1030,7 +1027,8 @@ func isCanaryRoute(canary, route *common.WrapperHTTPRoute) bool {
|
||||
}
|
||||
|
||||
func (c *controller) backendToRouteDestination(backend *ingress.IngressBackend, namespace string,
|
||||
builder *common.IngressRouteBuilder, config *annotations.DestinationConfig) ([]*networking.HTTPRouteDestination, common.Event) {
|
||||
builder *common.IngressRouteBuilder, config *annotations.DestinationConfig,
|
||||
) ([]*networking.HTTPRouteDestination, common.Event) {
|
||||
if backend == nil || (backend.Service == nil && backend.Resource == nil) {
|
||||
return nil, common.InvalidBackendService
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user