Skip to content

Commit

Permalink
Merge branch 'main' into failover
Browse files Browse the repository at this point in the history
  • Loading branch information
cr7258 authored Oct 10, 2024
2 parents 01b92d8 + ae6dab9 commit a11a38b
Show file tree
Hide file tree
Showing 63 changed files with 3,047 additions and 426 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build-and-push-wasm-plugin-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ jobs:
push_command=${push_command%\"} # 删除PUSH_COMMAND中的双引号,确保oras push正常解析
target_image="${{ env.IMAGE_REGISTRY_SERVICE }}/${{ env.IMAGE_REPOSITORY}}/${{ env.PLUGIN_NAME }}:${{ env.VERSION }}"
target_image_latest="${{ env.IMAGE_REGISTRY_SERVICE }}/${{ env.IMAGE_REPOSITORY}}/${{ env.PLUGIN_NAME }}:latest"
echo "TargetImage=${target_image}"
echo "TargetImageLatest=${target_image_latest}"
cd ${{ github.workspace }}/plugins/wasm-go/extensions/${PLUGIN_NAME}
if [ -f ./.buildrc ]; then
Expand All @@ -108,7 +110,6 @@ jobs:
tar czvf plugin.tar.gz plugin.wasm
echo ${{ secrets.REGISTRY_PASSWORD }} | oras login -u ${{ secrets.REGISTRY_USERNAME }} --password-stdin ${{ env.IMAGE_REGISTRY_SERVICE }}
oras push ${target_image} ${push_command}
oras push ${target_image_latest} ${push_command}
"
docker exec builder bash -c "$command"
4 changes: 2 additions & 2 deletions Makefile.core.mk
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ install: pre-install
cd helm/higress; helm dependency build
helm install higress helm/higress -n higress-system --create-namespace --set 'global.local=true'

ENVOY_LATEST_IMAGE_TAG ?= 7722dc383cd5d566d1b10a738f79a4cba1a18304
ISTIO_LATEST_IMAGE_TAG ?= 7722dc383cd5d566d1b10a738f79a4cba1a18304
ENVOY_LATEST_IMAGE_TAG ?= 2.0.1
ISTIO_LATEST_IMAGE_TAG ?= 2.0.1

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'
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.0.0
v2.0.1
4 changes: 4 additions & 0 deletions api/kubernetes/customresourcedefinitions.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,10 @@ spec:
type: string
port:
type: integer
protocol:
type: string
sni:
type: string
type:
type: string
zkServicesPath:
Expand Down
29 changes: 24 additions & 5 deletions api/networking/v1/mcp_bridge.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions api/networking/v1/mcp_bridge.proto
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,6 @@ message RegistryConfig {
string consulServiceTag = 15;
int64 consulRefreshInterval = 16;
string authSecretName = 17;
string protocol = 18;
string sni = 19;
}
2 changes: 1 addition & 1 deletion envoy/envoy
Submodule envoy updated 28 files
+1 −0 api/BUILD
+9 −0 api/contrib/envoy/extensions/filters/http/llm_inference/v3/BUILD
+30 −0 api/contrib/envoy/extensions/filters/http/llm_inference/v3/llm_inference.proto
+1 −0 api/versioning/BUILD
+21 −0 bazel/foreign_cc/BUILD
+12 −0 bazel/repositories.bzl
+12 −0 bazel/repository_locations.bzl
+1 −0 contrib/contrib_build_config.bzl
+5 −0 contrib/extensions_metadata.yaml
+146 −0 contrib/llm_inference/filters/http/README.md
+37 −0 contrib/llm_inference/filters/http/source/BUILD
+107 −0 contrib/llm_inference/filters/http/source/config.cc
+37 −0 contrib/llm_inference/filters/http/source/config.h
+27 −0 contrib/llm_inference/filters/http/source/inference/BUILD
+1,655 −0 contrib/llm_inference/filters/http/source/inference/inference_context.cc
+86 −0 contrib/llm_inference/filters/http/source/inference/inference_context.h
+15 −0 contrib/llm_inference/filters/http/source/inference/inference_task.cc
+51 −0 contrib/llm_inference/filters/http/source/inference/inference_task.h
+79 −0 contrib/llm_inference/filters/http/source/inference/inference_thread.cc
+79 −0 contrib/llm_inference/filters/http/source/inference/inference_thread.h
+484 −0 contrib/llm_inference/filters/http/source/inference/utils.hpp
+151 −0 contrib/llm_inference/filters/http/source/llm_inference_filter.cc
+87 −0 contrib/llm_inference/filters/http/source/llm_inference_filter.h
+26 −0 contrib/llm_inference/filters/http/test/test1.sh
+20 −0 contrib/llm_inference/filters/http/test/test_envoy.sh
+6 −0 contrib/llm_inference/filters/http/test/test_ollama.sh
+2 −1 source/common/common/logger.h
+1 −0 tools/proto_format/format_api.py
4 changes: 2 additions & 2 deletions helm/core/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
appVersion: 2.0.0
appVersion: 2.0.1
description: Helm chart for deploying higress gateways
icon: https://higress.io/img/higress_logo_small.png
home: http://higress.io/
Expand All @@ -10,4 +10,4 @@ name: higress-core
sources:
- http://github.com/alibaba/higress
type: application
version: 2.0.0
version: 2.0.1
5 changes: 5 additions & 0 deletions helm/core/crds/customresourcedefinitions.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,10 @@ spec:
type: string
port:
type: integer
protocol:
type: string
sni:
type: string
type:
type: string
zkServicesPath:
Expand All @@ -302,3 +306,4 @@ spec:
subresources:
status: {}

---
4 changes: 2 additions & 2 deletions helm/core/templates/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ template:
{{- end }}
- name: config
mountPath: /etc/istio/config
- name: istio-ca-root-cert
- name: higress-ca-root-cert
mountPath: /var/run/secrets/istio
- name: istio-data
mountPath: /var/lib/istio/data
Expand Down Expand Up @@ -262,7 +262,7 @@ template:
expirationSeconds: 43200
path: istio-token
{{- end }}
- name: istio-ca-root-cert
- name: higress-ca-root-cert
configMap:
{{- if .Values.global.enableHigressIstio }}
name: istio-ca-root-cert
Expand Down
32 changes: 1 addition & 31 deletions helm/core/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ data:
"transport_api_version": "V3",
"grpc_service": {
"envoy_grpc": {
"cluster_name": "service_skywalking"
"cluster_name": "outbound|{{ .Values.tracing.skywalking.port }}||{{ .Values.tracing.skywalking.service }}"
}
}
}
Expand All @@ -164,36 +164,6 @@ data:
{{- end }}
"static_resources": {
"clusters": [
{{- if include "skywalking.enabled" . }}
{
"name": "service_skywalking",
"type": "LOGICAL_DNS",
"connect_timeout": "5s",
"http2_protocol_options": {
},
"dns_lookup_family": "V4_ONLY",
"lb_policy": "ROUND_ROBIN",
"load_assignment": {
"cluster_name": "service_skywalking",
"endpoints": [
{
"lb_endpoints": [
{
"endpoint": {
"address": {
"socket_address": {
"address": "{{ .Values.tracing.skywalking.service }}",
"port_value": "{{ .Values.tracing.skywalking.port }}"
}
}
}
}
]
}
]
}
},
{{- end }}
{
"name": "higress-gateway-local",
"type": "STATIC",
Expand Down
8 changes: 4 additions & 4 deletions helm/higress/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
dependencies:
- name: higress-core
repository: file://../core
version: 2.0.0
version: 2.0.1
- name: higress-console
repository: https://higress.io/helm-charts/
version: 1.4.3
digest: sha256:ebfedb7faee4973b6e1e3624a9fcc20790943aef76ec60921e0010d1e62ff92a
generated: "2024-09-13T10:36:29.963179+08:00"
version: 1.4.4
digest: sha256:6e4d77c31c834a404a728ec5a8379dd5df27a7e9b998a08e6524dc6534b07c1d
generated: "2024-10-09T20:07:21.857942+08:00"
8 changes: 4 additions & 4 deletions helm/higress/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
appVersion: 2.0.0
appVersion: 2.0.1
description: Helm chart for deploying Higress gateways
icon: https://higress.io/img/higress_logo_small.png
home: http://higress.io/
Expand All @@ -12,9 +12,9 @@ sources:
dependencies:
- name: higress-core
repository: "file://../core"
version: 2.0.0
version: 2.0.1
- name: higress-console
repository: "https://higress.io/helm-charts/"
version: 1.4.3
version: 1.4.4
type: application
version: 2.0.0
version: 2.0.1
2 changes: 2 additions & 0 deletions hgctl/pkg/plugin/test/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ static_resources:
value: |
{{ .JSONExample }}
- name: envoy.filters.http.router
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
clusters:
- name: httpbin
connect_timeout: 30s
Expand Down
2 changes: 1 addition & 1 deletion istio/istio
22 changes: 20 additions & 2 deletions pkg/common/protocol.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ type Protocol string
const (
TCP Protocol = "TCP"
HTTP Protocol = "HTTP"
HTTP2 Protocol = "HTTP2"
HTTPS Protocol = "HTTPS"
GRPC Protocol = "GRPC"
GRPCS Protocol = "GRPCS"
Dubbo Protocol = "Dubbo"
Unsupported Protocol = "UnsupportedProtocol"
)
Expand All @@ -32,8 +35,14 @@ func ParseProtocol(s string) Protocol {
return TCP
case "http":
return HTTP
case "https":
return HTTPS
case "http2":
return HTTP2
case "grpc", "triple", "tri":
return GRPC
case "grpcs":
return GRPCS
case "dubbo":
return Dubbo
}
Expand All @@ -51,7 +60,7 @@ func (p Protocol) IsTCP() bool {

func (p Protocol) IsHTTP() bool {
switch p {
case HTTP, GRPC:
case HTTP, GRPC, GRPCS, HTTP2, HTTPS:
return true
default:
return false
Expand All @@ -60,7 +69,16 @@ func (p Protocol) IsHTTP() bool {

func (p Protocol) IsGRPC() bool {
switch p {
case GRPC:
case GRPC, GRPCS:
return true
default:
return false
}
}

func (i Protocol) IsHTTPS() bool {
switch i {
case HTTPS, GRPCS:
return true
default:
return false
Expand Down
4 changes: 4 additions & 0 deletions pkg/config/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ const KnativeIngressCRDName = "ingresses.networking.internal.knative.dev"
const KnativeServicesCRDName = "services.serving.knative.dev"

const ManagedGatewayController = "higress.io/gateway-controller"

const RegistryTypeLabelKey = "higress-registry-type"

const RegistryNameLabelKey = "higress-registry-name"
Loading

0 comments on commit a11a38b

Please sign in to comment.