mirror of
https://github.com/alibaba/higress.git
synced 2026-02-06 23:21:08 +08:00
110 lines
4.1 KiB
YAML
110 lines
4.1 KiB
YAML
# File generated by hgctl. Modify as required.
|
|
|
|
admin:
|
|
address:
|
|
socket_address:
|
|
protocol: TCP
|
|
address: 0.0.0.0
|
|
port_value: 9901
|
|
static_resources:
|
|
listeners:
|
|
- name: listener_0
|
|
address:
|
|
socket_address:
|
|
protocol: TCP
|
|
address: 0.0.0.0
|
|
port_value: 10000
|
|
filter_chains:
|
|
- filters:
|
|
- name: envoy.filters.network.http_connection_manager
|
|
typed_config:
|
|
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
|
|
scheme_header_transformation:
|
|
scheme_to_overwrite: https
|
|
stat_prefix: ingress_http
|
|
# Output envoy logs to stdout
|
|
access_log:
|
|
- name: envoy.access_loggers.stdout
|
|
typed_config:
|
|
"@type": type.googleapis.com/envoy.extensions.access_loggers.stream.v3.StdoutAccessLog
|
|
# Modify as required
|
|
route_config:
|
|
name: local_route
|
|
virtual_hosts:
|
|
- name: local_service
|
|
domains: [ "*" ]
|
|
routes:
|
|
- match:
|
|
prefix: "/"
|
|
route:
|
|
cluster: moonshot
|
|
timeout: 300s
|
|
http_filters:
|
|
- name: wasmtest
|
|
typed_config:
|
|
"@type": type.googleapis.com/udpa.type.v1.TypedStruct
|
|
type_url: type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm
|
|
value:
|
|
config:
|
|
name: wasmtest
|
|
vm_config:
|
|
runtime: envoy.wasm.runtime.v8
|
|
code:
|
|
local:
|
|
filename: /etc/envoy/plugin.wasm
|
|
configuration:
|
|
"@type": "type.googleapis.com/google.protobuf.StringValue"
|
|
value: |
|
|
{
|
|
"provider": {
|
|
"type": "moonshot",
|
|
"domain": "api.moonshot.cn",
|
|
"apiTokens": [
|
|
"****",
|
|
"****"
|
|
],
|
|
"timeout": 1200000,
|
|
"modelMapping": {
|
|
"gpt-3": "moonshot-v1-8k",
|
|
"gpt-35-turbo": "moonshot-v1-32k",
|
|
"gpt-4-turbo": "moonshot-v1-128k",
|
|
"*": "moonshot-v1-8k"
|
|
},
|
|
}
|
|
}
|
|
- name: envoy.filters.http.router
|
|
clusters:
|
|
- name: httpbin
|
|
connect_timeout: 30s
|
|
type: LOGICAL_DNS
|
|
# Comment out the following line to test on v6 networks
|
|
dns_lookup_family: V4_ONLY
|
|
lb_policy: ROUND_ROBIN
|
|
load_assignment:
|
|
cluster_name: httpbin
|
|
endpoints:
|
|
- lb_endpoints:
|
|
- endpoint:
|
|
address:
|
|
socket_address:
|
|
address: httpbin
|
|
port_value: 80
|
|
- name: moonshot
|
|
connect_timeout: 30s
|
|
type: LOGICAL_DNS
|
|
dns_lookup_family: V4_ONLY
|
|
lb_policy: ROUND_ROBIN
|
|
load_assignment:
|
|
cluster_name: moonshot
|
|
endpoints:
|
|
- lb_endpoints:
|
|
- endpoint:
|
|
address:
|
|
socket_address:
|
|
address: api.moonshot.cn
|
|
port_value: 443
|
|
transport_socket:
|
|
name: envoy.transport_sockets.tls
|
|
typed_config:
|
|
"@type": type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext
|
|
"sni": "api.moonshot.cn" |