upgrade to istio 1.19 (#1211)

Co-authored-by: CH3CHO <ch3cho@qq.com>
Co-authored-by: rinfx <893383980@qq.com>
This commit is contained in:
澄潭
2024-08-26 09:51:47 +08:00
committed by GitHub
parent a2c2d1d521
commit f7a419770d
401 changed files with 21171 additions and 7255 deletions

View File

@@ -17,8 +17,6 @@ package common
import (
"errors"
"fmt"
"strconv"
"strings"
"time"
"istio.io/istio/pilot/pkg/model"
@@ -78,10 +76,10 @@ var (
ErrNotFound = errors.New("item not found")
Schemas = collection.SchemasFor(
collections.IstioNetworkingV1Alpha3Virtualservices,
collections.IstioNetworkingV1Alpha3Gateways,
collections.IstioNetworkingV1Alpha3Destinationrules,
collections.IstioNetworkingV1Alpha3Envoyfilters,
collections.VirtualService,
collections.Gateway,
collections.DestinationRule,
collections.EnvoyFilter,
)
clusterPrefix string
@@ -97,8 +95,9 @@ func init() {
type Options struct {
Enable bool
ClusterId string
ClusterId cluster.ID
IngressClass string
GatewayClass string
WatchNamespace string
RawClusterId string
EnableStatus bool
@@ -173,39 +172,6 @@ type ConvertOptions struct {
HasDefaultBackend bool
}
// CreateOptions obtain options from cluster id.
// The cluster id format is k8sClusterId ingressClass watchNamespace EnableStatus, delimited by _.
func CreateOptions(clusterId cluster.ID) Options {
parts := strings.Split(clusterId.String(), "_")
// Old cluster key
if len(parts) < 3 {
out := Options{
RawClusterId: clusterId.String(),
}
if len(parts) > 0 {
out.ClusterId = parts[0]
}
return out
}
options := Options{
Enable: true,
ClusterId: parts[0],
IngressClass: parts[1],
WatchNamespace: parts[2],
RawClusterId: clusterId.String(),
// The status switch is enabled by default.
EnableStatus: true,
}
if len(parts) == 4 {
if enable, err := strconv.ParseBool(parts[3]); err == nil {
options.EnableStatus = enable
}
}
return options
}
type IngressRouteCache struct {
routes map[string]*IngressRouteBuilder
invalid []model.IngressRoute
@@ -299,7 +265,7 @@ func (i *IngressRouteCache) Extract() model.IngressRouteCollection {
}
type IngressRouteBuilder struct {
ClusterId string
ClusterId cluster.ID
RouteName string
Host string
PathType string
@@ -374,7 +340,7 @@ const (
)
type IngressDomainBuilder struct {
ClusterId string
ClusterId cluster.ID
Host string
Protocol Protocol
Event Event