diff --git a/.gitmodules b/.gitmodules index 5ba9f2280..7fd8341e3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,17 +1,17 @@ [submodule "istio/api"] path = istio/api url = https://github.com/higress-group/api - branch = istio-1.19 + branch = istio-1.27 shallow = true [submodule "istio/istio"] path = istio/istio url = https://github.com/higress-group/istio - branch = istio-1.19 + branch = istio-1.27 shallow = true [submodule "istio/client-go"] path = istio/client-go url = https://github.com/higress-group/client-go - branch = istio-1.19 + branch = istio-1.27 shallow = true [submodule "istio/pkg"] path = istio/pkg @@ -26,7 +26,7 @@ [submodule "envoy/go-control-plane"] path = envoy/go-control-plane url = https://github.com/higress-group/go-control-plane - branch = istio-1.19 + branch = istio-1.27 shallow = true [submodule "envoy/envoy"] path = envoy/envoy diff --git a/Makefile.core.mk b/Makefile.core.mk index 8e04011bd..203c0ec74 100644 --- a/Makefile.core.mk +++ b/Makefile.core.mk @@ -56,8 +56,31 @@ $(OUT): @mkdir -p $@ submodule: - git submodule update --init -# git submodule update --remote + @echo "Initializing submodules..." + @git submodule init || true + @git submodule update --init --recursive || true + @git submodule foreach -q ' \ + branch="$$(git config -f $${toplevel}/.gitmodules submodule.$${name}.branch)"; \ + if [ -n "$$branch" ]; then \ + echo "Updating $$name to branch $$branch"; \ + if ! git fetch origin "$$branch" 2>/dev/null; then \ + echo "Error: Branch $$branch not found in remote for $$name. Make sure the branch exists and is accessible."; \ + exit 1; \ + fi; \ + if git show-ref --verify --quiet "refs/remotes/origin/$$branch" 2>/dev/null; then \ + remote_ref="origin/$$branch"; \ + else \ + remote_ref="FETCH_HEAD"; \ + fi; \ + if git show-ref --verify --quiet "refs/heads/$$branch" 2>/dev/null; then \ + git checkout "$$branch" && git reset --hard "$$remote_ref" || { echo "Error: Failed to update $$name to $$branch"; exit 1; }; \ + else \ + git checkout -b "$$branch" "$$remote_ref" || { echo "Error: Failed to checkout branch $$branch for $$name"; exit 1; }; \ + fi; \ + git branch --set-upstream-to="origin/$$branch" "$$branch" 2>/dev/null || true; \ + echo "✓ $$name is now on branch $$branch"; \ + fi \ + ' .PHONY: prebuild prebuild: submodule @@ -201,7 +224,7 @@ install: pre-install HIGRESS_LATEST_IMAGE_TAG ?= latest ENVOY_LATEST_IMAGE_TAG ?= cdf0f16bf622102f89a0d0257834f43f502e4b99 -ISTIO_LATEST_IMAGE_TAG ?= ec099e0a24d25aff9c6530cb45dc0ff86ebb78b9 +ISTIO_LATEST_IMAGE_TAG ?= 2124b6819c805d16507d4bb0bb394160281169e7 install-dev: pre-install helm install higress helm/core -n higress-system --create-namespace --set 'controller.tag=$(TAG)' --set 'gateway.replicas=1' --set 'pilot.tag=$(ISTIO_LATEST_IMAGE_TAG)' --set 'gateway.tag=$(ENVOY_LATEST_IMAGE_TAG)' --set 'global.local=true' diff --git a/api/extensions/v1alpha1/wasmplugin.pb.go b/api/extensions/v1alpha1/wasmplugin.pb.go index 51bafb807..849163e2b 100644 --- a/api/extensions/v1alpha1/wasmplugin.pb.go +++ b/api/extensions/v1alpha1/wasmplugin.pb.go @@ -41,6 +41,56 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// Route type for matching rules. +// Extended by Higress +type RouteType int32 + +const ( + // HTTP route (default) + RouteType_HTTP RouteType = 0 + // GRPC route + RouteType_GRPC RouteType = 1 +) + +// Enum value maps for RouteType. +var ( + RouteType_name = map[int32]string{ + 0: "HTTP", + 1: "GRPC", + } + RouteType_value = map[string]int32{ + "HTTP": 0, + "GRPC": 1, + } +) + +func (x RouteType) Enum() *RouteType { + p := new(RouteType) + *p = x + return p +} + +func (x RouteType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RouteType) Descriptor() protoreflect.EnumDescriptor { + return file_extensions_v1alpha1_wasmplugin_proto_enumTypes[0].Descriptor() +} + +func (RouteType) Type() protoreflect.EnumType { + return &file_extensions_v1alpha1_wasmplugin_proto_enumTypes[0] +} + +func (x RouteType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RouteType.Descriptor instead. +func (RouteType) EnumDescriptor() ([]byte, []int) { + return file_extensions_v1alpha1_wasmplugin_proto_rawDescGZIP(), []int{0} +} + // The phase in the filter chain where the plugin will be injected. type PluginPhase int32 @@ -84,11 +134,11 @@ func (x PluginPhase) String() string { } func (PluginPhase) Descriptor() protoreflect.EnumDescriptor { - return file_extensions_v1alpha1_wasmplugin_proto_enumTypes[0].Descriptor() + return file_extensions_v1alpha1_wasmplugin_proto_enumTypes[1].Descriptor() } func (PluginPhase) Type() protoreflect.EnumType { - return &file_extensions_v1alpha1_wasmplugin_proto_enumTypes[0] + return &file_extensions_v1alpha1_wasmplugin_proto_enumTypes[1] } func (x PluginPhase) Number() protoreflect.EnumNumber { @@ -97,7 +147,7 @@ func (x PluginPhase) Number() protoreflect.EnumNumber { // Deprecated: Use PluginPhase.Descriptor instead. func (PluginPhase) EnumDescriptor() ([]byte, []int) { - return file_extensions_v1alpha1_wasmplugin_proto_rawDescGZIP(), []int{0} + return file_extensions_v1alpha1_wasmplugin_proto_rawDescGZIP(), []int{1} } // The pull behaviour to be applied when fetching an OCI image, @@ -146,11 +196,11 @@ func (x PullPolicy) String() string { } func (PullPolicy) Descriptor() protoreflect.EnumDescriptor { - return file_extensions_v1alpha1_wasmplugin_proto_enumTypes[1].Descriptor() + return file_extensions_v1alpha1_wasmplugin_proto_enumTypes[2].Descriptor() } func (PullPolicy) Type() protoreflect.EnumType { - return &file_extensions_v1alpha1_wasmplugin_proto_enumTypes[1] + return &file_extensions_v1alpha1_wasmplugin_proto_enumTypes[2] } func (x PullPolicy) Number() protoreflect.EnumNumber { @@ -159,7 +209,7 @@ func (x PullPolicy) Number() protoreflect.EnumNumber { // Deprecated: Use PullPolicy.Descriptor instead. func (PullPolicy) EnumDescriptor() ([]byte, []int) { - return file_extensions_v1alpha1_wasmplugin_proto_rawDescGZIP(), []int{1} + return file_extensions_v1alpha1_wasmplugin_proto_rawDescGZIP(), []int{2} } type EnvValueSource int32 @@ -194,11 +244,11 @@ func (x EnvValueSource) String() string { } func (EnvValueSource) Descriptor() protoreflect.EnumDescriptor { - return file_extensions_v1alpha1_wasmplugin_proto_enumTypes[2].Descriptor() + return file_extensions_v1alpha1_wasmplugin_proto_enumTypes[3].Descriptor() } func (EnvValueSource) Type() protoreflect.EnumType { - return &file_extensions_v1alpha1_wasmplugin_proto_enumTypes[2] + return &file_extensions_v1alpha1_wasmplugin_proto_enumTypes[3] } func (x EnvValueSource) Number() protoreflect.EnumNumber { @@ -207,7 +257,7 @@ func (x EnvValueSource) Number() protoreflect.EnumNumber { // Deprecated: Use EnvValueSource.Descriptor instead. func (EnvValueSource) EnumDescriptor() ([]byte, []int) { - return file_extensions_v1alpha1_wasmplugin_proto_rawDescGZIP(), []int{2} + return file_extensions_v1alpha1_wasmplugin_proto_rawDescGZIP(), []int{3} } type FailStrategy int32 @@ -246,11 +296,11 @@ func (x FailStrategy) String() string { } func (FailStrategy) Descriptor() protoreflect.EnumDescriptor { - return file_extensions_v1alpha1_wasmplugin_proto_enumTypes[3].Descriptor() + return file_extensions_v1alpha1_wasmplugin_proto_enumTypes[4].Descriptor() } func (FailStrategy) Type() protoreflect.EnumType { - return &file_extensions_v1alpha1_wasmplugin_proto_enumTypes[3] + return &file_extensions_v1alpha1_wasmplugin_proto_enumTypes[4] } func (x FailStrategy) Number() protoreflect.EnumNumber { @@ -259,7 +309,7 @@ func (x FailStrategy) Number() protoreflect.EnumNumber { // Deprecated: Use FailStrategy.Descriptor instead. func (FailStrategy) EnumDescriptor() ([]byte, []int) { - return file_extensions_v1alpha1_wasmplugin_proto_rawDescGZIP(), []int{3} + return file_extensions_v1alpha1_wasmplugin_proto_rawDescGZIP(), []int{4} } //