diff --git "a/content/zh-cn/docs/\344\275\277\347\224\250\346\214\207\345\215\227/k8s\345\222\214\347\275\221\346\240\274\344\273\243\347\220\206/Envoy\347\275\221\346\240\274\346\216\245\345\205\245.md" "b/content/zh-cn/docs/\344\275\277\347\224\250\346\214\207\345\215\227/k8s\345\222\214\347\275\221\346\240\274\344\273\243\347\220\206/Envoy\347\275\221\346\240\274\346\216\245\345\205\245.md" index 7c1c53c7..192498ef 100644 --- "a/content/zh-cn/docs/\344\275\277\347\224\250\346\214\207\345\215\227/k8s\345\222\214\347\275\221\346\240\274\344\273\243\347\220\206/Envoy\347\275\221\346\240\274\346\216\245\345\205\245.md" +++ "b/content/zh-cn/docs/\344\275\277\347\224\250\346\214\207\345\215\227/k8s\345\222\214\347\275\221\346\240\274\344\273\243\347\220\206/Envoy\347\275\221\346\240\274\346\216\245\345\205\245.md" @@ -59,7 +59,8 @@ bookinfo Active 3d2h enabled ### 启用 Envoy 按需加载机制 {{< note >}} -需北极星服务端版本 >= 1.18.0 +- polaris-server 需要 >= 1.18.0-beta 版本 +- polaris-controller 需要 >= 1.7.0-beta 版本 {{}} 在 POD 中添加以下 annonations **sidecar.polarismesh.cn/openOnDemand: true** 即可启用 Envoy 的按需加载 @@ -131,9 +132,9 @@ demo 项目中,productpage 会访问 reviews 服务,reviews 服务共有三 路由规则的标签填写格式要求: -- 对于Path:标签KEY需要填写$path -- 对于Header:标签KEY需要带上前缀$header,如$header.end-user -- 对于Query:标签KEY需要带上前缀$query,如$query.end-user +- 对于Path:标签KEY需要填写 **$path** +- 对于Header:标签KEY需要带上前缀 **$header**,如 **$header.end-user** +- 对于Query:标签KEY需要带上前缀 **$query**,如 **$query.end-user** 3. 验证路由是否生效 @@ -144,16 +145,11 @@ demo 项目中,productpage 会访问 reviews 服务,reviews 服务共有三 {{< note >}} - polaris-server 需要 >= 1.17.3 版本 - polaris-controller 需要 >= 1.6.0 版本 -- +- 在envoy接入的场景中,受XDS协议的限制,当前限流标签仅支持以下两个。 + - 请求头(HEADER) + - 请求参数(QUERY) {{< /note >}} -北极星网格支持目前仅支持单机限流,同时直接细粒度的配额的设置。 - -在envoy接入的场景中,受XDS协议的限制,当前限流标签仅支持以下两个。 - -- 请求头(HEADER) -- 请求参数(QUERY) - ![](../images/envoy/分布式限流.png) 1. 使用场景: demo项目中,为details服务设置流量限制,对于jason用户的请求,设置访问的频率为5/m,其余请求不做限制。 diff --git "a/content/zh-cn/docs/\344\275\277\347\224\250\346\214\207\345\215\227/k8s\345\222\214\347\275\221\346\240\274\344\273\243\347\220\206/k8s-\351\205\215\347\275\256\345\220\214\346\255\245.md" "b/content/zh-cn/docs/\344\275\277\347\224\250\346\214\207\345\215\227/k8s\345\222\214\347\275\221\346\240\274\344\273\243\347\220\206/k8s-\351\205\215\347\275\256\345\220\214\346\255\245.md" index 4fafe1bf..91b68efd 100644 --- "a/content/zh-cn/docs/\344\275\277\347\224\250\346\214\207\345\215\227/k8s\345\222\214\347\275\221\346\240\274\344\273\243\347\220\206/k8s-\351\205\215\347\275\256\345\220\214\346\255\245.md" +++ "b/content/zh-cn/docs/\344\275\277\347\224\250\346\214\207\345\215\227/k8s\345\222\214\347\275\221\346\240\274\344\273\243\347\220\206/k8s-\351\205\215\347\275\256\345\220\214\346\255\245.md" @@ -4,9 +4,7 @@ linkTitle: "K8s 配置同步(Beta)" weight: 3 --- -{{< notice tip >}} -- 该文章仅适用于北极星服务端版本 >= 1.18.0 -{{< /notice >}} +{{< notice tip >}} 该文章仅适用于北极星服务端版本 >= 1.18.0 {{< /notice >}} 支持两种 K8s ConfigMap 同步模式: diff --git "a/content/zh-cn/docs/\345\217\202\350\200\203\346\226\207\346\241\243/\347\211\210\346\234\254\344\277\241\346\201\257/images/release-v1.18/config_beta_publish_op_2.png" "b/content/zh-cn/docs/\345\217\202\350\200\203\346\226\207\346\241\243/\347\211\210\346\234\254\344\277\241\346\201\257/images/release-v1.18/config_beta_publish_op_2.png" new file mode 100644 index 00000000..249838ad Binary files /dev/null and "b/content/zh-cn/docs/\345\217\202\350\200\203\346\226\207\346\241\243/\347\211\210\346\234\254\344\277\241\346\201\257/images/release-v1.18/config_beta_publish_op_2.png" differ diff --git "a/content/zh-cn/docs/\345\217\202\350\200\203\346\226\207\346\241\243/\347\211\210\346\234\254\344\277\241\346\201\257/images/release-v1.18/envoy_rls.png" "b/content/zh-cn/docs/\345\217\202\350\200\203\346\226\207\346\241\243/\347\211\210\346\234\254\344\277\241\346\201\257/images/release-v1.18/envoy_rls.png" new file mode 100644 index 00000000..86e82508 Binary files /dev/null and "b/content/zh-cn/docs/\345\217\202\350\200\203\346\226\207\346\241\243/\347\211\210\346\234\254\344\277\241\346\201\257/images/release-v1.18/envoy_rls.png" differ diff --git "a/content/zh-cn/docs/\345\217\202\350\200\203\346\226\207\346\241\243/\347\211\210\346\234\254\344\277\241\346\201\257/release_1_18.0.md" "b/content/zh-cn/docs/\345\217\202\350\200\203\346\226\207\346\241\243/\347\211\210\346\234\254\344\277\241\346\201\257/release_1_18.0.md" index ec53e5a2..d60f8137 100644 --- "a/content/zh-cn/docs/\345\217\202\350\200\203\346\226\207\346\241\243/\347\211\210\346\234\254\344\277\241\346\201\257/release_1_18.0.md" +++ "b/content/zh-cn/docs/\345\217\202\350\200\203\346\226\207\346\241\243/\347\211\210\346\234\254\344\277\241\346\201\257/release_1_18.0.md" @@ -15,6 +15,26 @@ weight: 1 在 1.18.0-beta 版本中,社区正式将 **apiserver-nacos** 插件纳入官方默认插件,并完善了 **nacos1.x**/**nacos2.x** 的客户端功能特性兼容。用户无需替换自己的 **nacos-client** 依赖,只需更换接入地址即可接入北极星的注册发现以及配置管理。 +- nacos1.x + - 注册发现 + - [x] 实例注册 + - [x] 服务发现 + - [x] 心跳上报 + - [x] 基于 UDP 的服务端主动推送 + - 配置管理 + - [x] 配置发布 + - [x] 配置查询 + - [x] 配置监听 +- nacos2.x + - [x] 实例注册 + - [x] 服务发现 + - [x] 基于 gRPC 长连接的实例信息维护 + - [x] 基于 gRPC 的服务端主动推送 + - 配置管理 + - [x] 配置发布 + - [x] 配置查询 + - [x] 配置监听 + ```yaml apiservers: - name: service-nacos @@ -32,30 +52,55 @@ apiservers: #### 支持 Mesh Sidecar 场景下的 Cluster/Endpoint 按需加载 -Sidecar Mesh 场景下,每个 Sidecar 进程都会收到 XDS Server 推送下来的全量服务数据。假设一个 Workload-1 他仅仅调用了 Service-1/Service-2 两个服务,但是大部份的 XDS Server 都会将全量的 Service 推送给 Workload-1 的 Sidecar。这样子带来的后果就是每个 Sidecar 的内存、资源消耗会随着服务量级的增长而增长。 +Sidecar Mesh 场景下,每个 Sidecar 进程都会收到 xDS Server 推送下来的全量服务数据。假设一个 Workload-1 他仅仅调用了 Service-1/Service-2 两个服务,但是大部份的 xDS Server 都会将全量的 Service 推送给 Workload-1 的 Sidecar。这样子带来的后果就是每个 Sidecar 的内存、资源消耗会随着服务量级的增长而增长。 ![](../images/release-v1.18/envoy-sideacr-xds-memory.png) -为了解决上述问题。社区在 1.18.0-beta 版本中实现了 Envoy XDS 中的 [OCDS 能力](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/on_demand_updates_filter)。默认只推送全量的 VHDS 到 Sidecar 中,Cluster/Endpoint 资源根据实际请求进行按需加载。 +为了解决上述问题。社区在 1.18.0-beta 版本中实现了 Envoy xDS 中的 [OCDS 能力](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/on_demand_updates_filter)。默认只推送全量的 VHDS 到 Sidecar 中,Cluster/Endpoint 资源根据实际请求进行按需加载。 + +同时我们也优化了服务端关于 xDS 规则生成的内存占用,不再使用 envoy go-control-plane 中的 SnapshotCache 实现,而是选择了 LinearCache,根据每类 xDS 资源的生成特点进行存放在不同的 LinearCache 中,尽可能将公共的 xDS 资源只生成一份,其余的需要按照 mtls、odcds 场景的规则则各自存在对应的 LinearCache 中。 - 需要搭配 [polaris-controller v1.7.0-beta](https://github.com/polarismesh/polaris-controller/releases/tag/v1.7.0-beta) 版本一起使用 +- 由于当前 Envoy 的按需加载能力,当 On-Demand VHDS 和 On-Demand Cluster 同时启用时存在 BUG,因此目前仅实现了 On-Demand Cluster 的能力,待和 Envoy 社区推进解决该 BUG 后用户可享受真正的 Envoy 按需加载能力,[社区 issue](https://github.com/envoyproxy/envoy/issues/24726) #### 支持 Mesh Sidecar 场景下的分布式限流 在 1.18.0-beta 版本中,我们针对 Mesh Sidecar 的场景,支持将 Polaris 的分布式限流通过由 Polaris-Sidecar 组件实现的 RLS 提供给 Envoy 的限流 Filter,使得用户在 Mesh 场景下可以享受 Polaris 的分布式限流能力 +![](../images/release-v1.18/envoy_rls.png) + - 需要搭配 [polaris-controller v1.7.0-beta](https://github.com/polarismesh/polaris-controller/releases/tag/v1.7.0-beta) 版本一起使用 #### 配置中心支持灰度发布 为了让用户有更好的配置中心使用体验,社区在 v1.18.0-beta 版本中支持配置灰度能力,当前灰度能力支持用户自定义客户端标签进行灰度控制下发;针对存量老版本客户端仅支持根据客户端IP进行灰度控制台下发。 +![](../images/release-v1.18/config_beta_publish_op_2.png) + +> polaris-go 配置客户端标签 + +```yaml +global: + serverConnector: + addresses: + - 127.0.0.1:8091 + client: + labels: + ${label_key}: ${label_value} +``` + +> polaris-java + +开发中... + +> + ## 版本变化 ### 特性 -- [[PR #1175]](https://github.com/polarismesh/polaris/pull/1175) feat(xds): add OutlierDetection and HealthCheck - [[PR #1174]](https://github.com/polarismesh/polaris/pull/1174) feat:support push envoy rls filter xds +- [[PR #1175]](https://github.com/polarismesh/polaris/pull/1175) feat(xds): add OutlierDetection and HealthCheck - [[PR #1215]](https://github.com/polarismesh/polaris/pull/1215) 服务端支持流量无损停机 - [[PR #1237]](https://github.com/polarismesh/polaris/pull/1237) feat: allow empty db password - [[PR #1253]](https://github.com/polarismesh/polaris/pull/1253) feat:envoy ratelimit action suppoer all spec label & add hds feature @@ -86,9 +131,9 @@ Sidecar Mesh 场景下,每个 Sidecar 进程都会收到 XDS Server 推送下 - [[PR #1192]](https://github.com/polarismesh/polaris/pull/1192) 修复batchConfig批量注销实例配置问题 - [[PR #1196]](https://github.com/polarismesh/polaris/pull/1196) 修复心跳上报写redis异常时未将异常结果返回问题 - [[PR #1197]](https://github.com/polarismesh/polaris/pull/1208) 修复熔断/探测规则更新绑定服务信息后缓存遗留脏数据 +- [[PR #1201]](https://github.com/polarismesh/polaris/pull/1216) 修复 arm64 环境无法使用 docker image - [[PR #1212]](https://github.com/polarismesh/polaris/pull/1212) 修复清理软删除实例时没有同步清理 instance_metadata 以及 health_check 表的数据 - [[PR #1213]](https://github.com/polarismesh/polaris/pull/1214) 修复xDS 生成 cacheKey 时缺失 gatewayService -- [[PR #1201]](https://github.com/polarismesh/polaris/pull/1216) 修复 arm64 环境无法使用 docker image - [[PR #1233]](https://github.com/polarismesh/polaris/pull/1233) fix: Dockerfile 8761 port duplicate - [[PR #1240]](https://github.com/polarismesh/polaris/pull/1240) fix typo: firtstUpdate -> firstUpdate - [[PR #1273]](https://github.com/polarismesh/polaris/pull/1273) 解决配置中心标签 value 和 key 相同的问题