diff --git a/changelog/RoadMap 2022.md b/changelog/RoadMap 2022.md index 989a8c6..495fd1c 100644 --- a/changelog/RoadMap 2022.md +++ b/changelog/RoadMap 2022.md @@ -26,13 +26,13 @@ * 【治理】支持流量染色 * 【治理】支持WAF防护 -### Hango 1.2.0(发布中) +### Hango 1.2.0(已发布) * 【多协议】支持基于dubbo bridge的dubbo协议转换能力 -* 【易用性】安全正则复杂度校验以支持拒绝复杂正则 +* 【易用性】支持插件的部分常规输入校验 * 【治理】集成smartlimit,统一集群限流,本地限流实现 -### Hango 1.3.0(规划中) +### Hango 1.3.0(发布中) * 【高可用】支持基于多集群的两地三中心高可用部署 * 【高可用】支持基于Region、Zone、Sub-zone的区域路由优先能力 diff --git a/changelog/announcing-v1.2.0.md b/changelog/announcing-v1.2.0.md new file mode 100644 index 0000000..471fdd4 --- /dev/null +++ b/changelog/announcing-v1.2.0.md @@ -0,0 +1,13 @@ +### 描述 +本次更新是Hango正式版v1.2.0的发布。基于v1.0.0版本集成了dubbo bridge、基于SmartLimiter的自适应本地限流等功能 + +### 新功能 + +- [支持dubbo服务发现](https://github.com/hango-io/api-plane/pull/13) + +- [支持SmartLimiter的本地限流](https://github.com/hango-io/hango-gateway/pull/47) + + +### 工程增强 + +- [增加部分插件校验](https://github.com/hango-io/hango-gateway/pull/47) \ No newline at end of file diff --git a/install/helm/hango-gateway/charts/hango-gateway/templates/base/hango-gateway/hango-gateway-configmap.yaml b/install/helm/hango-gateway/charts/hango-gateway/templates/base/hango-gateway/hango-gateway-configmap.yaml index c5bc6bb..ed06b8c 100644 --- a/install/helm/hango-gateway/charts/hango-gateway/templates/base/hango-gateway/hango-gateway-configmap.yaml +++ b/install/helm/hango-gateway/charts/hango-gateway/templates/base/hango-gateway/hango-gateway-configmap.yaml @@ -270,11 +270,11 @@ data: cfg: | {"bundle":{"modules":[{"name":"plugin","kind":"plugin"},{"name":"limiter","kind":"limiter"},{"name":"meshregistry","kind":"meshregistry"}]},"enable":true,"global":{"service":"","istioNamespace":"hango-system","slimeNamespace":"hango-system","istioRev":"","configRev":"mesh-reg","configSources":[{"address":"ss://"}],"log":{"klogLevel":5,"logLevel":"info"},"misc":{"pathRedirect":"/ready->/meshregistry/ready,/pc->/meshregistry/pc,/nc->/meshregistry/nc,/zk->/meshregistry/zk,/zks->/meshregistry/zks,/xdsCache->/meshregistry/xdsCache","xdsSourceEnableIncPush":"true"}},"name":"bundle"} cfg_limiter: | - {"enable":true,"general":{"disableAdaptive":true,"disableGlobalRateLimit":true,"disableInsertGlobalRateLimit":true},"kind":"limiter","mode":"BundleItem","name":"limiter"} + {"enable":true,"general":{"disableInsertLocalRateLimit":true,"disableAdaptive":true,"disableGlobalRateLimit":true,"disableInsertGlobalRateLimit":true},"kind":"limiter","mode":"BundleItem","name":"limiter"} cfg_plugin: | {"enable":true,"kind":"plugin","mode":"BundleItem","name":"plugin"} cfg_meshregistry: | - {"name":"meshregistry","kind":"meshregistry","enable":true,"mode":"BundleItem","general":{"LEGACY":{"MeshConfigFile":"","RevCrds":"","Mcp":{},"K8SSource":{"Enabled":false},"EurekaSource":{"Enabled":{{ .Values.registry.eureka.enable }},"Address":[{{ .Values.registry.eureka.address }}],"RefreshPeriod":"{{ .Values.registry.eureka.refresh_period }}","GatewayModel":true},"NacosSource":{"Enabled":{{ .Values.registry.nacos.enable }},"Address":[{{ .Values.registry.nacos.address }}],"GatewayModel":true,"Group":"{{ .Values.registry.nacos.service_group }}"}}}} + {"name":"meshregistry","kind":"meshregistry","enable":true,"mode":"BundleItem","general":{"LEGACY":{"MeshConfigFile":"","RevCrds":"","Mcp":{},"K8SSource":{"Enabled":false},"EurekaSource":{"Enabled":{{ .Values.registry.eureka.enable }},"Address":[{{ .Values.registry.eureka.address }}],"RefreshPeriod":"{{ .Values.registry.eureka.refresh_period }}","GatewayModel":true},"NacosSource":{"Enabled":{{ .Values.registry.nacos.enable }},"Address":[{{ .Values.registry.nacos.address }}],"GatewayModel":true,"Group":"{{ .Values.registry.nacos.service_group }}"},"ZookeeperSource":{"Enabled":{{ .Values.registry.zk.enable }},"WaitTime":{{ .Values.registry.zk.refresh_period }},"GatewayModel":true,"Address":[{{ .Values.registry.zk.address }}]}}}} kind: ConfigMap metadata: name: slime-hango diff --git a/install/helm/hango-gateway/charts/hango-gateway/templates/base/hango-gateway/hango-gateway-deploy.yaml b/install/helm/hango-gateway/charts/hango-gateway/templates/base/hango-gateway/hango-gateway-deploy.yaml index 724ca47..7cdf89d 100644 --- a/install/helm/hango-gateway/charts/hango-gateway/templates/base/hango-gateway/hango-gateway-deploy.yaml +++ b/install/helm/hango-gateway/charts/hango-gateway/templates/base/hango-gateway/hango-gateway-deploy.yaml @@ -26,7 +26,7 @@ spec: - name: NCE_PORT value: "10880" - name: NCE_JAVA_OPTS - value: "-DistioNamespace={{ .Values.namespace }} -DistioName=istiod -DstartInformer=false -DresourceNamespace={{ .Values.namespace }} " + value: "-DistioNamespace={{ .Values.namespace }} -DistioName=istiod -DstartInformer=false -DresourceNamespace={{ .Values.namespace }} -DmeshRegistryName=slime-hango" image: "{{.Values.images.hango_apiplane_image}}" name: tomcat volumeMounts: diff --git a/install/helm/hango-gateway/charts/hango-gateway/templates/base/hango-gateway/hango-plugin-configmap.yaml b/install/helm/hango-gateway/charts/hango-gateway/templates/base/hango-gateway/hango-plugin-configmap.yaml index 17d05f8..a65a22b 100644 --- a/install/helm/hango-gateway/charts/hango-gateway/templates/base/hango-gateway/hango-plugin-configmap.yaml +++ b/install/helm/hango-gateway/charts/hango-gateway/templates/base/hango-gateway/hango-plugin-configmap.yaml @@ -160,26 +160,24 @@ data: "name": "local-limiting" }, "layouts": [ - { - "key": "IsSafe", - "alias": "是否线程独立", - "type": "switch", - "help": "默认使用锁机制保证安全;如果打开该字段,代表线程独立。限流规则上限为rate*proxy worker" - }, { "key": "limit_by_list", - "alias": "限流标识列表", + "alias": "限制规则列表", "type": "array", "layouts": [ { "key": "headers", - "alias": "限流headers", + "alias": "请求头匹配", "type": "array", "layouts": [ { "key": "headerKey", - "alias": "限流header", - "type": "input" + "alias": "请求头名称", + "type": "input", + "rules": [ + "Required", + "MaxLength(200)" + ] }, { "key": "match_type", @@ -195,16 +193,18 @@ data: "text": "正则表达式", "value": "safe_regex_match" } + ], + "rules": [ + "Required" ] }, { "key": "value", "type": "input", "alias": "取值", - "invisible": { - "present_match": ["this", "match_type"], - "present_match_invert": ["this", "match_type"] - } + "rules": [ + "Required" + ] } ] }, @@ -214,7 +214,7 @@ data: "type": "number", "rules": [ "Number", - "MinNumber(0)" + "MinNumber(1)" ] }, { @@ -223,7 +223,7 @@ data: "type": "number", "rules": [ "Number", - "MinNumber(0)" + "MinNumber(1)" ] }, { @@ -232,7 +232,7 @@ data: "type": "number", "rules": [ "Number", - "MinNumber(0)" + "MinNumber(1)" ] }, { @@ -241,7 +241,7 @@ data: "type": "number", "rules": [ "Number", - "MinNumber(0)" + "MinNumber(1)" ] } ] @@ -654,6 +654,9 @@ data: "alias": "请求头名称", "type": "input" }, + "rules": [ + "MaxLength(200)" + ], { "key": "match_type", "alias": "匹配方式", @@ -749,6 +752,9 @@ data: "alias": "响应头名称", "type": "input" }, + "rules": [ + "MaxLength(200)" + ], { "key": "match_type", "alias": "匹配方式", @@ -807,7 +813,7 @@ data: "Required", "Number", "MinNumber(0)", - "MaxNumber(99999999)" + "MaxNumber(86400000)" ] }, { @@ -822,7 +828,10 @@ data: "help": "支持输入具体的响应码及X..,如2..代表2XX响应码", "type": "input", "rules": [ - "Required" + "Required", + "Number", + "MinNumber(200)", + "MaxNumber(599)" ] }, { @@ -833,7 +842,7 @@ data: "Required", "Number", "MinNumber(0)", - "MaxNumber(99999999)" + "MaxNumber(86400000)" ] } ] @@ -866,13 +875,19 @@ data: "key": "queryString", "alias": "自定义查询参数", "help": "自定义查询参数参与key计算", - "type": "multi_input" + "type": "multi_input", + "rules": [ + "MaxLength(200)" + ] }, { "key": "headers", "alias": "自定义请求头", "type": "multi_input", - "help": "自定义请求头参与key计算" + "help": "自定义请求头参与key计算", + "rules": [ + "MaxLength(200)" + ] } ] } @@ -1083,7 +1098,8 @@ data: "this.operation": "delete" }, "rules": [ - "Required" + "Required", + "MaxLength(200)" ] } ] @@ -1158,12 +1174,12 @@ data: "alias": "最小请求次数", "help": "与错误百分比阈值搭配生效,仅在统计窗口内,最小请求次数与错误百分比阈值同时满足时触发熔断", "type": "input", - "placeholder": "范围 [1, 4294967295] 之间", + "placeholder": "范围 [1, 1000000] 之间", "rules": [ "Required", "Number", "MinNumber(1)", - "MaxNumber(4294967295)" + "MaxNumber(1000000)" ] } ] @@ -1194,13 +1210,13 @@ data: { "key": "consecutiveSlowRequests", "alias": "连续慢响应次数", - "help": "与响应时间阈值,范围 [1, 4294967295] 之间,与慢响应时间阈值搭配生效,当连续有", + "help": "与响应时间阈值,范围 [1, 10000] 之间,与慢响应时间阈值搭配生效,当连续有", "type": "input", "rules": [ "Required", "Number", "MinNumber(1)", - "MaxNumber(4294967295)" + "MaxNumber(10000)" ] } ] @@ -1210,12 +1226,12 @@ data: "alias": "统计窗口", "help": "统计窗口,单位s,默认10s,最大值为120s", "type": "input", - "placeholder": "单位s,范围(0.0,120.0)", + "placeholder": "单位s,范围[1, 120]", "rules": [ "Required", - "FloatNumber(5)", - "MaxFloatNumber(119.999)", - "MinFloatNumber(0.00001)" + "Number", + "MinNumber(1)", + "MaxNumber(120)" ] }, { @@ -1223,12 +1239,12 @@ data: "alias": "惩罚时间", "help": "当触发熔断时的惩罚时间,单位s,在该时间内不再请求后端服务而之间返回熔断后的定制响应", "type": "input", - "placeholder": "单位s,范围 (0.0, 10000]", + "placeholder": "单位s,范围 [1, 7200]", "rules": [ "Required", - "FloatNumber(5)", - "MaxFloatNumber(10000.0)", - "MinFloatNumber(0.00001)" + "Number", + "MinNumber(1)", + "MaxNumber(7200)" ] }, { @@ -1259,7 +1275,8 @@ data: "type": "input", "alias": "响应头名称", "rules": [ - "Required" + "Required", + "MaxLength(200)" ] }, { @@ -1267,7 +1284,8 @@ data: "type": "input", "alias": "响应头值", "rules": [ - "Required" + "Required", + "MaxLength(200)" ] } ] diff --git a/install/helm/hango-gateway/charts/hango-gateway/templates/base/hango-gateway/plugin-managers.yaml b/install/helm/hango-gateway/charts/hango-gateway/templates/base/hango-gateway/plugin-managers.yaml index 290bb1d..067d8f4 100644 --- a/install/helm/hango-gateway/charts/hango-gateway/templates/base/hango-gateway/plugin-managers.yaml +++ b/install/helm/hango-gateway/charts/hango-gateway/templates/base/hango-gateway/plugin-managers.yaml @@ -55,8 +55,11 @@ spec: name: proxy.filters.http.iprestriction port: 80 - enable: true + inline: + settings: + stat_prefix: http_local_rate_limiter listenerType: Gateway - name: proxy.filters.http.locallimit + name: envoy.filters.http.local_ratelimit port: 80 - enable: true listenerType: Gateway diff --git a/install/helm/hango-gateway/charts/hango-gateway/values.yaml b/install/helm/hango-gateway/charts/hango-gateway/values.yaml index bc36047..605c193 100644 --- a/install/helm/hango-gateway/charts/hango-gateway/values.yaml +++ b/install/helm/hango-gateway/charts/hango-gateway/values.yaml @@ -2,12 +2,12 @@ data_dir: /data cluster_dns_domain: cluster.local images: - hango_apiplane_image: docker.io/hangoio/api-plane:1.1.0 - hango_portal_image: docker.io/hangoio/hango-portal:1.1.0 + hango_apiplane_image: docker.io/hangoio/api-plane:1.2.0 + hango_portal_image: docker.io/hangoio/hango-portal:1.2.0 hango_ui_image: docker.io/hangoio/hango-ui:v1.0.3-1e003c49 - istiod_image: docker.io/hangoio/istiod:hango-1.0.0-rc1 + istiod_image: docker.io/hangoio/pilot:hango-1.2.0-rc1 slime_image: docker.io/slimeio/slime-bundle-hango:hango-ee2bff9_linux_amd64 - hango_proxy_image: hangoio/envoy-proxy:v1.1.0-46f6660-amd64 + hango_proxy_image: hangoio/envoy-proxy:v1.2.1-215c540-amd64 namespace: hango-system @@ -43,4 +43,11 @@ registry: ## 刷新eureka服务缓存的时间周期,默认15s,格式为: [正整数]s refresh_period: 15s ## 注册中心实例地址;格式:整体以英文单引号包裹,单个地址以英文双引号包裹,多个地址用英文逗号分隔 - address: '"http://127.0.0.1:8761/eureka"' \ No newline at end of file + address: '"http://127.0.0.1:8761/eureka"' + zk: + ## zookeeper注册中心功能开关(true 或 false) + enable: false + ## 刷新zookeeper服务缓存的时间周期,默认15s,格式为: [正整数]s + refresh_period: 15s + ## 注册中心实例地址;格式:整体以英文单引号包裹,单个地址以英文双引号包裹,多个地址用英文逗号分隔 + address: '"zookeeper.apigw-demo.svc.cluster.local:2181"' \ No newline at end of file