From 5bdcc8c81b0596eab1ac1b430dd8663cb25f8e60 Mon Sep 17 00:00:00 2001 From: MouceL Date: Thu, 23 Mar 2023 19:11:39 +0800 Subject: [PATCH] update doc to release v0.7.0 --- README.md | 6 +- README_EN.md | 2 +- ROADMAP.md | 70 ++++++++-------- doc/en/slime-boot.md | 29 +++---- doc/zh/slime-boot.md | 60 +++++--------- install/init/crds-v1.yaml | 67 ---------------- .../lazyload/slimeboot_cluster_accesslog.yaml | 41 +++++----- .../slimeboot_cluster_prometheus.yaml | 46 +++++------ .../samples/lazyload/slimeboot_logrotate.yaml | 36 ++++++--- .../slimeboot_namespace_accesslog.yaml | 39 +++++---- .../slimeboot_namespace_prometheus.yaml | 4 +- .../modules/lazyload/lazyload_tutorials.md | 55 +++++++------ .../modules/lazyload/lazyload_tutorials_zh.md | 79 +++++++++++-------- .../limiter/install/limiter-global.yaml | 7 +- .../modules/limiter/install/limiter.yaml | 9 +-- 15 files changed, 240 insertions(+), 310 deletions(-) diff --git a/README.md b/README.md index 7a1943c1..ccd6d5ca 100644 --- a/README.md +++ b/README.md @@ -40,14 +40,14 @@ Slime 核心能力包括智能流量管理、智能运维管理、智能扩展 - [配置懒加载](./staging/src/slime.io/slime/modules/lazyload):无须配置SidecarScope,自动按需加载配置和服务发现信息 ,解决了全量推送的问题。服务调用关系的来源支持Prometheus或者Accesslog - [网格(服务)仓库](./staging/src/slime.io/slime/modules/meshregistry):帮助istio快速集成各种服务注册中心 - 文件分发管理(filemanager,后续提供) - - 命令行交互(i9s) + - 命令行交互 [i9s](https://github.com/slime-io/i9s) - 巡检(patrol) - 排障工具(tracetio) - **智能插件管理**:针对服务网格缺少高效的插件管理工具的问题,提供批量插件管理能力,简化服务网格数据面插件管理的难度 - [Http插件管理](./staging/src/slime.io/slime/modules/plugin):使用新的的CRD pluginmanager/envoyplugin包装了可读性及可维护性差的envoyfilter,使得插件扩展更为便捷。 -后续我们会开源更多的功能模块。 +目前我们开源了自适应限流、配置懒加载、网格(服务)仓库、i9s、Http插件管理,后续我们会开源更多的功能模块。 ## 架构 @@ -79,7 +79,7 @@ Slime-module - [懒加载使用](./staging/src/slime.io/slime/modules/lazyload/README.md) - [插件管理使用](./staging/src/slime.io/slime/modules/plugin/README.md) - [自适应限流使用](./staging/src/slime.io/slime/modules/limiter/README.md) -- [网格(服务)仓库](./staging/src/slime.io/slime/modules/meshregistry):帮助istio快速集成各种服务注册中心。 +- [网格(服务)仓库](./staging/src/slime.io/slime/modules/meshregistry/README_CH.md) [E2E测试教程](./doc/zh/slime_e2e_test_zh.md) diff --git a/README_EN.md b/README_EN.md index 7d7b7c8d..12ccb912 100644 --- a/README_EN.md +++ b/README_EN.md @@ -39,7 +39,7 @@ Slime core capabilities include intelligent traffic management, intelligent oper - [configure lazy loading](./staging/src/slime.io/slime/modules/lazyload): no need to configure SidecarScope, automatically load configuration and service discovery information on demand, solving the problem of full volume push. The source of the service call relationship supports Prometheus or Accesslog - [mesh(service) repository](./staging/src/slime.io/slime/modules/meshregistry): helps istio to quickly integrate various service registries - File distribution management (filemanager, to be provided later) - - Command line interaction (i9s) + - Command line interaction [i9s](https://github.com/slime-io/i9s) - Patrol (patrol) - Troubleshooting tools (tracetio) diff --git a/ROADMAP.md b/ROADMAP.md index 4b385c1e..e9c0b1f2 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -39,7 +39,7 @@ -## Slime v0.5.0 (Release in progress) +## Slime v0.5.0 (Released) **Traffic Management** @@ -61,8 +61,19 @@ - Support for registering HTTP redirection interfaces +## Slime v0.6.0 (Released) -## Slime v0.6.0 (In Planning) +- Released new module meshregistry for interfacing with multiple registries +- i9s provide universal expansion interface +- Standardize issue processing, pr processing, posting, community meeting mechanism and other content +- Improve tutorials to help new users join the community + +## Slime v0.7.0 + +- Optimized many of the problems encountered in practice + + +## Slime v0.8.0 (In Planning) **Traffic Management** @@ -72,28 +83,11 @@ **Operation Management** - [Lazyload] Release of Service Mesh accurate pushing standard API -- [Lazyload] Support for multi-service registration centers **Extension Management** - [Plugin] Support for service level plugin distribution -**Engineering** - -- Compatiable with Kubernetes 1.22+ - - - -## Slime v0.7.0 (In Planning) - -**Traffic Management** - -- [SmartMeltdown] Release of Service Mesh meltdown standard API -- [SmartMeltdown] Release of New smart meltdown module - - - - # 路线图 @@ -123,7 +117,7 @@ -## Slime v0.5.0(发布中) +## Slime v0.5.0(已发布) **流量管理** @@ -145,35 +139,41 @@ - 支持注册 HTTP 重定向接口 +## Slime v0.6.0(已发布) -## Slime v0.6.0(规划中) +**扩展管理** +-【注册中心】发布新模块meshregistry,用于对接多注册中心 -**流量管理** +**运维管理** +-【i9s】提供通用扩展接口 -- 【智能降级】发布服务网格降级标准 API -- 【智能降级】发布智能降级新模块 +**工程** +- 规范issue处理、pr处理、发版、社区会议机制等内容 +- 完善教程,帮助新用户加入社区 -**运维管理** -- 【配置懒加载】发布服务网格配置精准推送标准 API -- 【配置懒加载】支持多服务注册中心 +## Slime v0.7.0(发布中) -**扩展管理** +- 优化处理了很多实践过程中遇到的问题 -- 【插件管理】支持服务级别插件下发 -**工程** +## Slime v0.8.0(规划中) -- 适配 Kubernetes 1.22+ +**流量管理** +- 【智能降级】发布服务网格降级标准 API +- 【智能降级】发布智能降级新模块 +**运维管理** -## Slime v0.7.0(规划中) +- 【配置懒加载】发布服务网格配置精准推送标准 API -**流量管理** +**扩展管理** -- 【智能熔断】发布服务网格熔断标准 API -- 【智能熔断】发布智能熔断新模块 +- 【插件管理】支持服务级别插件下发 +## Slime v0.9.0(规划中) +**运维管理** +- 前端控制台 \ No newline at end of file diff --git a/doc/en/slime-boot.md b/doc/en/slime-boot.md index 4da4dca0..ecee5471 100644 --- a/doc/en/slime-boot.md +++ b/doc/en/slime-boot.md @@ -129,8 +129,8 @@ metadata: spec: image: pullPolicy: Always - repository: docker.io/slimeio/slime-bundle-example-all - tag: v0.5.0_linux_amd64 + repository: docker.io/slimeio/slime-bundle-all + tag: xx module: - name: bundle enable: true @@ -180,7 +180,7 @@ spec: image: pullPolicy: Always repository: docker.io/slimeio/slime-lazyload - tag: v0.5.0_linux_amd64 + tag: v0.7.0 namespace: mesh-operator istioNamespace: istio-system module: @@ -230,7 +230,7 @@ spec: memory: 400Mi image: repository: docker.io/slimeio/slime-global-sidecar - tag: v0.5.0_linux_amd64 + tag: v0.7.0 probePort: 20000 ``` @@ -259,7 +259,7 @@ spec: image: pullPolicy: Always repository: docker.io/slimeio/slime-limiter - tag: v0.5.0_linux_amd64 + tag: v0.7.0 module: - name: limiter kind: limiter @@ -268,11 +268,6 @@ spec: disableGlobalRateLimit: true disableAdaptive: true disableInsertGlobalRateLimit: true - global: - log: - logLevel: info - configSources: - - address: ss:// ``` ### Sample plugin installation @@ -297,14 +292,11 @@ spec: image: pullPolicy: Always repository: docker.io/slimeio/slime-plugin - tag: v0.5.0_linux_amd64 + tag: v0.7.0 module: - name: plugin kind: plugin enable: true - global: - log: - logLevel: info ``` ### Sample bundle mode installation @@ -321,8 +313,8 @@ metadata: spec: image: pullPolicy: Always - repository: docker.io/slimeio/slime-bundle-example-all - tag: v0.5.0_linux_amd64 + repository: docker.io/slimeio/slime-bundle-all + tag: v0.7.0 module: - name: bundle enable: true @@ -362,9 +354,6 @@ spec: disableGlobalRateLimit: true disableAdaptive: true disableInsertGlobalRateLimit: true - global: - configSources: - - address: ss:// - name: plugin kind: plugin enable: true @@ -390,7 +379,7 @@ spec: memory: 1024Mi image: repository: docker.io/slimeio/slime-global-sidecar - tag: v0.5.0_linux_amd64 + tag: v0.7.0_linux_amd64 probePort: 20000 # health probe port port: 80 # global-sidecar default svc port legacyFilterName: true diff --git a/doc/zh/slime-boot.md b/doc/zh/slime-boot.md index 45c7f511..84c7016b 100644 --- a/doc/zh/slime-boot.md +++ b/doc/zh/slime-boot.md @@ -25,10 +25,10 @@ **注意**:在k8s v1.22以及之后的版本中,只支持`apiextensions.k8s.io/v1`版本的`CRD`,不再支持`apiextensions.k8s.io/v1beta1`版本`CRD`,详见[k8s官方文档](https://kubernetes.io/docs/reference/using-api/deprecation-guide/#customresourcedefinition-v122),而 k8s v1.16~v1.21 两个版本都能用 -1. 对于k8s v1.22以及之后版本,需要手动安装[v1版本](../../install/init/crds-v1.yaml),而之前版本可手动安装[v1版本](../../install/init/crds-v1.yaml)或者[v1beta1版本](../../install/init/crds.yaml) +1. 对于k8s v1.22以及之后版本,需要手动安装[v1版本-crd](../../install/init/crds-v1.yaml),而之前版本可手动安装[v1版本-crd](../../install/init/crds-v1.yaml)或者[v1beta1版本-crd](../../install/init/crds.yaml) 2. 手动安装 [deployment/slime-boot](../../install/init/deployment_slime-boot.yaml) -或者执行以下命令安装`CRD`和`deployment/slime-boot`,需要注意的是如果网络无法访问,你可以在以下目录发现相关文档 `slime/install/init/` +或者执行以下命令安装`slimeboot CRD`和`deployment/slime-boot`,需要注意的是如果网络无法访问,你可以在项目的`slime/install/init/`目录发现相关文档 - k8s version >= v1.22 ```shell @@ -55,6 +55,7 @@ kubectl apply -f "https://raw.githubusercontent.com/slime-io/slime/$tag_or_commi ``` ## 参数介绍 + 根据之前的章节,我们知道用户通过下发`SlimeBoot`的方式,安装`slime`组件,在正常使用过程中,用户使用的`SlimeBoot CR`主要包含以下几项 - image: 定义镜像相关的参数 @@ -129,8 +130,8 @@ metadata: spec: image: pullPolicy: Always - repository: docker.io/slimeio/slime-bundle-example-all - tag: v0.6.0_linux_amd64 + repository: docker.io/slimeio/slime-bundle-all + tag: v0.7.0 module: - name: bundle enable: true @@ -180,7 +181,7 @@ spec: image: pullPolicy: Always repository: docker.io/slimeio/slime-lazyload - tag: v0.6.0_linux_amd64 + tag: v0.7.0 namespace: mesh-operator istioNamespace: istio-system module: @@ -188,9 +189,9 @@ spec: kind: lazyload enable: true general: - autoPort: false + autoPort: true autoFence: true - defaultFence: false + defaultFence: true wormholePort: # replace to your application service ports, and extend the list in case of multi ports - "9080" global: @@ -212,15 +213,9 @@ spec: enable: true sidecarInject: enable: true # should be true - # mode definition: - # "pod": sidecar auto-inject on pod level, need provide labels for injection - # "namespace": sidecar auto-inject on namespace level, no need to provide labels for injection - # if globalSidecarMode is cluster, global-sidecar will be deployed in slime namespace, which does not enable auto-inject on namespace level, mode can only be "pod". - # if globalSidecarMode is namespace, depending on the namespace definition, mode can be "pod" or "namespace". mode: pod labels: # optional, used for sidecarInject.mode = pod sidecar.istio.io/inject: "true" - # istio.io/rev: canary # use control plane revisions resources: requests: cpu: 200m @@ -230,7 +225,7 @@ spec: memory: 400Mi image: repository: docker.io/slimeio/slime-global-sidecar - tag: v0.6.0_linux_amd64 + tag: v0.7.0 probePort: 20000 ``` @@ -259,7 +254,7 @@ spec: image: pullPolicy: Always repository: docker.io/slimeio/slime-limiter - tag: v0.6.0_linux_amd64 + tag: v0.7.0 module: - name: limiter kind: limiter @@ -268,11 +263,6 @@ spec: disableGlobalRateLimit: true disableAdaptive: true disableInsertGlobalRateLimit: true - global: - log: - logLevel: info - configSources: - - address: ss:// ``` ### plugin 安装样例 @@ -296,14 +286,11 @@ spec: image: pullPolicy: Always repository: docker.io/slimeio/slime-plugin - tag: v0.6.0_linux_amd64 + tag: v0.7.0 module: - name: plugin kind: plugin enable: true - global: - log: - logLevel: info ``` ### meshregistry安装样例 @@ -328,14 +315,11 @@ spec: image: pullPolicy: Always repository: docker.io/slimeio/slime-meshregistry - tag: v0.6.0_linux_amd64 + tag: v0.7.0 module: - name: meshregistry kind: meshregistry enable: true - global: - log: - logLevel: info general: LEGACY: MeshConfigFile: "" @@ -375,8 +359,8 @@ metadata: spec: image: pullPolicy: Always - repository: docker.io/slimeio/slime-bundle-example-all - tag: v0.6.0_linux_amd64 + repository: docker.io/slimeio/slime-bundle-all + tag: v0.7.0 module: - name: bundle enable: true @@ -393,16 +377,14 @@ spec: global: log: logLevel: info - configSources: - - address: ss:// - name: bundle #与上面的name一致TODO kind: lazyload enable: true mode: BundleItem general: - autoPort: false + autoPort: true autoFence: true - defaultFence: false + defaultFence: true wormholePort: # replace to your application service ports, and extend the list in case of multi ports - "9080" global: @@ -451,7 +433,7 @@ spec: memory: 400Mi image: repository: docker.io/slimeio/slime-global-sidecar - tag: v0.6.0_linux_amd64 + tag: v0.7.0 probePort: 20000 # health probe port port: 80 # global-sidecar default svc port legacyFilterName: true @@ -474,7 +456,7 @@ spec: image: pullPolicy: Always repository: docker.io/slimeio/slime-limiter - tag: v0.6.0_linux_amd64 + tag: v0.7.0 module: - name: limiter kind: limiter @@ -484,12 +466,8 @@ spec: disableAdaptive: true disableInsertGlobalRateLimit: true global: - log: - logLevel: info - configSources: - - address: ss:// misc: - enable-leader-election: "on" #多副本 + enable-leader-election: "on" ``` diff --git a/install/init/crds-v1.yaml b/install/init/crds-v1.yaml index d244c0c0..daaca21c 100644 --- a/install/init/crds-v1.yaml +++ b/install/init/crds-v1.yaml @@ -75,39 +75,6 @@ spec: items: type: object properties: - limiter: - type: object - description: 'limiter parameters' - properties: - disableGlobalRateLimit: - type: boolean - description: 'disable GlobalRateLimit' - disableAdaptive: - type: boolean - description: 'disable use promql' - enableServiceEntry: - type: boolean - description: 'use se from from framework' - disableInsertLocalRateLimit: - type: boolean - description: 'it will not generate envoy.filters.http.local_ratelimit insert before http.router when true' - disableInsertGlobalRateLimit: - type: boolean - description: 'it will not generate envoy.filters.http.ratelimit insert before http.router when true' - rlsConfigMap: - type: object - description: 'specify the rls namespaces' - x-kubernetes-preserve-unknown-fields: true - domain: - description: 'specify domain, it is useful in global ratelimiter' - type: string - rls: - description: 'specify rls server address, if disableGlobalRateLimit if false' - type: object - x-kubernetes-preserve-unknown-fields: true - plugin: - type: object - x-kubernetes-preserve-unknown-fields: true global: type: object properties: @@ -171,40 +138,6 @@ spec: type: integer burst: type: integer - fence: - type: object - properties: - wormholePort: - description: "service ports enable lazyload" - type: array - items: - type: string - autoFence: - type: boolean - description: "whether enable ServiceFence auto generating, default value is false" - namespace: - type: array - description: "the namespace list which enable lazyload" - items: - type: string - dispatches: - type: array - description: 'custom outside dispatch traffic rules' - items: - type: object - x-kubernetes-preserve-unknown-fields: true - domainAliases: - type: array - description: 'can convert to one or many domain alias rules' - items: - type: object - x-kubernetes-preserve-unknown-fields: true - defaultFence: - description: 'default behavior of create fence or not when autoFence is true, default value is false' - type: boolean - autoPort: - description: 'whether enable http service port auto management, default value is false' - type: boolean metric: type: object properties: diff --git a/staging/src/slime.io/slime/modules/lazyload/install/samples/lazyload/slimeboot_cluster_accesslog.yaml b/staging/src/slime.io/slime/modules/lazyload/install/samples/lazyload/slimeboot_cluster_accesslog.yaml index c69560f4..b6ba6579 100644 --- a/staging/src/slime.io/slime/modules/lazyload/install/samples/lazyload/slimeboot_cluster_accesslog.yaml +++ b/staging/src/slime.io/slime/modules/lazyload/install/samples/lazyload/slimeboot_cluster_accesslog.yaml @@ -8,42 +8,41 @@ spec: image: pullPolicy: Always repository: docker.io/slimeio/slime-lazyload - tag: v0.5.0_linux_amd64 - resources: - requests: - cpu: 300m - memory: 300Mi - limits: - cpu: 600m - memory: 600Mi + tag: v0.7.0 + namespace: mesh-operator + istioNamespace: istio-system module: - - name: lazyload # custom value - kind: lazyload # should be "lazyload" + - name: lazyload + kind: lazyload enable: true - general: # replace previous "fence" field + general: autoPort: true autoFence: true - defaultFence: false + defaultFence: true wormholePort: # replace to your application service ports, and extend the list in case of multi ports - "9080" global: + log: + logLevel: info misc: - globalSidecarMode: cluster # inform the mode of global-sidecar + globalSidecarMode: cluster # the mode of global-sidecar metricSourceType: accesslog # indicate the metric source + slimeNamespace: mesh-operator + resources: + requests: + cpu: 300m + memory: 300Mi + limits: + cpu: 600m + memory: 600Mi component: globalSidecar: enable: true sidecarInject: enable: true # should be true - # mode definition: - # "pod": sidecar auto-inject on pod level, need provide labels for injection - # "namespace": sidecar auto-inject on namespace level, no need to provide labels for injection - # if globalSidecarMode is cluster, global-sidecar will be deployed in slime namespace, which does not enable auto-inject on namespace level, mode can only be "pod". - # if globalSidecarMode is namespace, depending on the namespace definition, mode can be "pod" or "namespace". mode: pod labels: # optional, used for sidecarInject.mode = pod sidecar.istio.io/inject: "true" - # istio.io/rev: canary # use control plane revisions resources: requests: cpu: 200m @@ -53,5 +52,5 @@ spec: memory: 400Mi image: repository: docker.io/slimeio/slime-global-sidecar - tag: v0.5.0_linux_amd64 - probePort: 8080 + tag: v0.7.0 + probePort: 20000 diff --git a/staging/src/slime.io/slime/modules/lazyload/install/samples/lazyload/slimeboot_cluster_prometheus.yaml b/staging/src/slime.io/slime/modules/lazyload/install/samples/lazyload/slimeboot_cluster_prometheus.yaml index 6f1e5575..7bdb9e83 100644 --- a/staging/src/slime.io/slime/modules/lazyload/install/samples/lazyload/slimeboot_cluster_prometheus.yaml +++ b/staging/src/slime.io/slime/modules/lazyload/install/samples/lazyload/slimeboot_cluster_prometheus.yaml @@ -1,4 +1,5 @@ --- + apiVersion: config.netease.com/v1alpha1 kind: SlimeBoot metadata: @@ -8,29 +9,26 @@ spec: image: pullPolicy: Always repository: docker.io/slimeio/slime-lazyload - tag: v0.5.0_linux_amd64 - resources: - requests: - cpu: 300m - memory: 300Mi - limits: - cpu: 600m - memory: 600Mi + tag: v0.7.0 + namespace: mesh-operator + istioNamespace: istio-system module: - - name: lazyload # custom value - kind: lazyload # should be "lazyload" + - name: lazyload + kind: lazyload enable: true - general: # replace previous "fence" field + general: + autoPort: true + autoFence: true + defaultFence: true wormholePort: # replace to your application service ports, and extend the list in case of multi ports - - "80" - "9080" global: - autoPort: true - autoFence: true - defaultFence: false + log: + logLevel: info misc: - globalSidecarMode: cluster # inform the mode of global-sidecar + globalSidecarMode: cluster # the mode of global-sidecar metricSourceType: prometheus + slimeNamespace: mesh-operator metric: # indicate the metric source prometheus: address: http://prometheus.istio-system:9090 @@ -39,20 +37,21 @@ spec: query: | sum(istio_requests_total{source_app="$source_app",reporter="destination"})by(destination_service) type: Group + resources: + requests: + cpu: 300m + memory: 300Mi + limits: + cpu: 600m + memory: 600Mi component: globalSidecar: enable: true sidecarInject: enable: true # should be true - # mode definition: - # "pod": sidecar auto-inject on pod level, need provide labels for injection - # "namespace": sidecar auto-inject on namespace level, no need to provide labels for injection - # if globalSidecarMode is cluster, global-sidecar will be deployed in slime namespace, which does not enable auto-inject on namespace level, mode can only be "pod". - # if globalSidecarMode is namespace, depending on the namespace definition, mode can be "pod" or "namespace". mode: pod labels: # optional, used for sidecarInject.mode = pod sidecar.istio.io/inject: "true" - # istio.io/rev: canary # use control plane revisions resources: requests: cpu: 200m @@ -62,4 +61,5 @@ spec: memory: 400Mi image: repository: docker.io/slimeio/slime-global-sidecar - tag: v0.5.0_linux_amd64 + tag: v0.7.0 + probePort: 20000 diff --git a/staging/src/slime.io/slime/modules/lazyload/install/samples/lazyload/slimeboot_logrotate.yaml b/staging/src/slime.io/slime/modules/lazyload/install/samples/lazyload/slimeboot_logrotate.yaml index 51eeb8ff..f3ea83f7 100644 --- a/staging/src/slime.io/slime/modules/lazyload/install/samples/lazyload/slimeboot_logrotate.yaml +++ b/staging/src/slime.io/slime/modules/lazyload/install/samples/lazyload/slimeboot_logrotate.yaml @@ -8,19 +8,20 @@ spec: image: pullPolicy: Always repository: docker.io/slimeio/slime-lazyload - tag: v0.5.0_linux_amd64 + tag: v0.7.0 + namespace: mesh-operator + istioNamespace: istio-system module: - - name: lazyload # custom value - kind: lazyload # should be "lazyload" + - name: lazyload + kind: lazyload enable: true - general: # replace previous "fence" field - wormholePort: - - "80" + general: + autoPort: true + autoFence: true + defaultFence: true + wormholePort: # replace to your application service ports, and extend the list in case of multi ports - "9080" global: - misc: - globalSidecarMode: cluster - metricSourceType: accesslog log: logRotate: true logRotateConfig: @@ -29,13 +30,23 @@ spec: maxBackups: 10 maxAgeDay: 10 compress: true + misc: + globalSidecarMode: cluster # the mode of global-sidecar + metricSourceType: accesslog # indicate the metric source + slimeNamespace: mesh-operator + resources: + requests: + cpu: 300m + memory: 300Mi + limits: + cpu: 600m + memory: 600Mi component: globalSidecar: enable: true - type: cluster sidecarInject: enable: true # should be true - mode: pod # if type = cluster, can only be "pod"; if type = namespace, can be "pod" or "namespace" + mode: pod labels: # optional, used for sidecarInject.mode = pod sidecar.istio.io/inject: "true" resources: @@ -47,7 +58,8 @@ spec: memory: 400Mi image: repository: docker.io/slimeio/slime-global-sidecar - tag: v0.5.0_linux_amd64 + tag: v0.7.0 + probePort: 20000 volumes: - name: lazyload-storage persistentVolumeClaim: diff --git a/staging/src/slime.io/slime/modules/lazyload/install/samples/lazyload/slimeboot_namespace_accesslog.yaml b/staging/src/slime.io/slime/modules/lazyload/install/samples/lazyload/slimeboot_namespace_accesslog.yaml index ba9cc4ca..ea54d721 100644 --- a/staging/src/slime.io/slime/modules/lazyload/install/samples/lazyload/slimeboot_namespace_accesslog.yaml +++ b/staging/src/slime.io/slime/modules/lazyload/install/samples/lazyload/slimeboot_namespace_accesslog.yaml @@ -8,35 +8,43 @@ spec: image: pullPolicy: Always repository: docker.io/slimeio/slime-lazyload - tag: v0.5.0_linux_amd64 + tag: v0.7.0 + namespace: mesh-operator + istioNamespace: istio-system module: - - name: lazyload # custom value - kind: lazyload # should be "lazyload" + - name: lazyload + kind: lazyload enable: true - general: # replace previous "fence" field + general: + autoPort: true + autoFence: true + defaultFence: true wormholePort: # replace to your application service ports, and extend the list in case of multi ports - - "80" - "9080" namespace: # replace to your service's namespace which will use lazyload, and extend the list in case of multi namespaces - default global: + log: + logLevel: info misc: - globalSidecarMode: namespace # inform the mode of global-sidecar + globalSidecarMode: namespace # the mode of global-sidecar metricSourceType: accesslog # indicate the metric source + slimeNamespace: mesh-operator + resources: + requests: + cpu: 300m + memory: 300Mi + limits: + cpu: 600m + memory: 600Mi component: globalSidecar: enable: true sidecarInject: enable: true # should be true - # mode definition: - # "pod": sidecar auto-inject on pod level, need provide labels for injection - # "namespace": sidecar auto-inject on namespace level, no need to provide labels for injection - # if globalSidecarMode is cluster, global-sidecar will be deployed in slime namespace, which does not enable auto-inject on namespace level, mode can only be "pod". - # if globalSidecarMode is namespace, depending on the namespace definition, mode can be "pod" or "namespace". mode: namespace - # labels: # optional, used for sidecarInject.mode = pod - # sidecar.istio.io/inject: "true" - # istio.io/rev: canary # using control plane revisions + labels: # optional, used for sidecarInject.mode = pod + sidecar.istio.io/inject: "true" resources: requests: cpu: 200m @@ -46,4 +54,5 @@ spec: memory: 400Mi image: repository: docker.io/slimeio/slime-global-sidecar - tag: v0.5.0_linux_amd64 + tag: v0.7.0 + probePort: 20000 diff --git a/staging/src/slime.io/slime/modules/lazyload/install/samples/lazyload/slimeboot_namespace_prometheus.yaml b/staging/src/slime.io/slime/modules/lazyload/install/samples/lazyload/slimeboot_namespace_prometheus.yaml index d7edbeab..5313326e 100644 --- a/staging/src/slime.io/slime/modules/lazyload/install/samples/lazyload/slimeboot_namespace_prometheus.yaml +++ b/staging/src/slime.io/slime/modules/lazyload/install/samples/lazyload/slimeboot_namespace_prometheus.yaml @@ -8,7 +8,7 @@ spec: image: pullPolicy: Always repository: docker.io/slimeio/slime-lazyload - tag: v0.5.0_linux_amd64 + tag: v0.7.0 module: - name: lazyload # custom value kind: lazyload # should be "lazyload" @@ -53,4 +53,4 @@ spec: memory: 400Mi image: repository: docker.io/slimeio/slime-global-sidecar - tag: v0.5.0_linux_amd64 + tag: v0.7.0 diff --git a/staging/src/slime.io/slime/modules/lazyload/lazyload_tutorials.md b/staging/src/slime.io/slime/modules/lazyload/lazyload_tutorials.md index 4263de96..0282c137 100644 --- a/staging/src/slime.io/slime/modules/lazyload/lazyload_tutorials.md +++ b/staging/src/slime.io/slime/modules/lazyload/lazyload_tutorials.md @@ -100,15 +100,22 @@ This step is to prepare the CRD needed for lazy loading and the launcher for the The installation files are slightly different for different k8s versions, see [SlimeBoot Introduction and Use - Preparation](../../../../../../doc/en/slime-boot.md#Preparation) -Here we assume that k8s version is 1.16+ - -```sh +- k8s version >= v1.22 +```shell export tag_or_commit=$(curl -s https://api.github.com/repos/slime-io/slime/tags | grep 'name' | cut -d\" -f4 | head -1) kubectl create ns mesh-operator kubectl apply -f "https://raw.githubusercontent.com/slime-io/slime/$tag_or_commit/install/init/crds-v1.yaml" kubectl apply -f "https://raw.githubusercontent.com/slime-io/slime/$tag_or_commit/install/init/deployment_slime-boot.yaml" ``` +- k8s v1.16 <= version < 1.22 +```shell +export tag_or_commit=$(curl -s https://api.github.com/repos/slime-io/slime/tags | grep 'name' | cut -d\" -f4 | head -1) +kubectl create ns mesh-operator +kubectl apply -f "https://raw.githubusercontent.com/slime-io/slime/$tag_or_commit/install/init/crds.yaml" +kubectl apply -f "https://raw.githubusercontent.com/slime-io/slime/$tag_or_commit/install/init/deployment_slime-boot.yaml" +``` + verify that all components are operational ```sh @@ -124,7 +131,8 @@ slime-boot-6f778b75cd-4v675 1/1 Running 0 26s apply `SlimeBoot` ```sh -$ echo 'apiVersion: config.netease.com/v1alpha1 +$ echo ' +apiVersion: config.netease.com/v1alpha1 kind: SlimeBoot metadata: name: lazyload @@ -133,44 +141,41 @@ spec: image: pullPolicy: Always repository: docker.io/slimeio/slime-lazyload - tag: v0.5.0_linux_amd64 - resources: - requests: - cpu: 300m - memory: 300Mi - limits: - cpu: 600m - memory: 600Mi + tag: v0.7.0 + namespace: mesh-operator + istioNamespace: istio-system module: - - name: lazyload # custom value - kind: lazyload # should be "lazyload" + - name: lazyload + kind: lazyload enable: true - general: # replace previous "fence" field - autoPort: false + general: + autoPort: true autoFence: true - defaultFence: false + defaultFence: true wormholePort: # replace to your application service ports, and extend the list in case of multi ports - "9080" global: log: logLevel: info misc: - globalSidecarMode: cluster # inform the mode of global-sidecar + globalSidecarMode: cluster # the mode of global-sidecar metricSourceType: accesslog # indicate the metric source + slimeNamespace: mesh-operator + resources: + requests: + cpu: 300m + memory: 300Mi + limits: + cpu: 600m + memory: 600Mi component: globalSidecar: enable: true sidecarInject: enable: true # should be true - # mode definition: - # "pod": sidecar auto-inject on pod level, need provide labels for injection - # "namespace": sidecar auto-inject on namespace level, no need to provide labels for injection - # if globalSidecarMode is cluster, global-sidecar will be deployed in slime namespace, which does not enable auto-inject on namespace level, mode can only be "pod". - # if globalSidecarMode is namespace, depending on the namespace definition, mode can be "pod" or "namespace". mode: pod labels: # optional, used for sidecarInject.mode = pod sidecar.istio.io/inject: "true" - # istio.io/rev: canary # use control plane revisions resources: requests: cpu: 200m @@ -180,7 +185,7 @@ spec: memory: 400Mi image: repository: docker.io/slimeio/slime-global-sidecar - tag: v0.5.0_linux_amd64 + tag: v0.7.0 probePort: 20000 ' > /tmp/lazyload-slimeboot.yaml diff --git a/staging/src/slime.io/slime/modules/lazyload/lazyload_tutorials_zh.md b/staging/src/slime.io/slime/modules/lazyload/lazyload_tutorials_zh.md index ed957c46..95e56b26 100644 --- a/staging/src/slime.io/slime/modules/lazyload/lazyload_tutorials_zh.md +++ b/staging/src/slime.io/slime/modules/lazyload/lazyload_tutorials_zh.md @@ -107,17 +107,24 @@ ### 安装 slime-boot -安装懒加载前,需要先安装 `SlimeBoot CRD`, `ServiceFence CRD`和`deployment/slime-boot`。这一步是为了准备好懒加载需要的 CRD 以及懒加载模块的启动器。不同 k8s 版本的安装文件略有u区别,详见 [SlimeBoot 介绍与使用 - 准备](../../../../../../doc/zh/slime-boot.md#%E5%87%86%E5%A4%87) 。 +安装懒加载前,需要先安装 `SlimeBoot CRD`, `ServiceFence CRD`和`deployment/slime-boot`。这一步是为了准备好懒加载需要的 CRD 以及懒加载模块的启动器。不同 k8s 版本的安装文件略有区别,详见 [SlimeBoot 介绍与使用 - 准备](../../../../../../doc/zh/slime-boot.md#%E5%87%86%E5%A4%87) 。 -此处我们假设 k8s version 为1.16+ - -```sh +- k8s version >= v1.22 +```shell export tag_or_commit=$(curl -s https://api.github.com/repos/slime-io/slime/tags | grep 'name' | cut -d\" -f4 | head -1) kubectl create ns mesh-operator kubectl apply -f "https://raw.githubusercontent.com/slime-io/slime/$tag_or_commit/install/init/crds-v1.yaml" kubectl apply -f "https://raw.githubusercontent.com/slime-io/slime/$tag_or_commit/install/init/deployment_slime-boot.yaml" ``` +- k8s v1.16 <= version < 1.22 +```shell +export tag_or_commit=$(curl -s https://api.github.com/repos/slime-io/slime/tags | grep 'name' | cut -d\" -f4 | head -1) +kubectl create ns mesh-operator +kubectl apply -f "https://raw.githubusercontent.com/slime-io/slime/$tag_or_commit/install/init/crds.yaml" +kubectl apply -f "https://raw.githubusercontent.com/slime-io/slime/$tag_or_commit/install/init/deployment_slime-boot.yaml" +``` + 确认所有组件已正常运行 ```sh @@ -127,13 +134,13 @@ slime-boot-6f778b75cd-4v675 1/1 Running 0 26s ``` - ### 安装 lazyload 创建 `SlimeBoot` CR ```sh -$ echo 'apiVersion: config.netease.com/v1alpha1 +$ echo ' +apiVersion: config.netease.com/v1alpha1 kind: SlimeBoot metadata: name: lazyload @@ -142,44 +149,41 @@ spec: image: pullPolicy: Always repository: docker.io/slimeio/slime-lazyload - tag: v0.5.0_linux_amd64 - resources: - requests: - cpu: 300m - memory: 300Mi - limits: - cpu: 600m - memory: 600Mi + tag: v0.7.0 + namespace: mesh-operator + istioNamespace: istio-system module: - - name: lazyload # custom value - kind: lazyload # should be "lazyload" + - name: lazyload + kind: lazyload enable: true - general: # replace previous "fence" field - autoPort: false + general: + autoPort: true autoFence: true - defaultFence: false + defaultFence: true wormholePort: # replace to your application service ports, and extend the list in case of multi ports - "9080" global: log: logLevel: info misc: - globalSidecarMode: cluster # inform the mode of global-sidecar + globalSidecarMode: cluster # the mode of global-sidecar metricSourceType: accesslog # indicate the metric source + slimeNamespace: mesh-operator + resources: + requests: + cpu: 300m + memory: 300Mi + limits: + cpu: 600m + memory: 600Mi component: globalSidecar: enable: true sidecarInject: enable: true # should be true - # mode definition: - # "pod": sidecar auto-inject on pod level, need provide labels for injection - # "namespace": sidecar auto-inject on namespace level, no need to provide labels for injection - # if globalSidecarMode is cluster, global-sidecar will be deployed in slime namespace, which does not enable auto-inject on namespace level, mode can only be "pod". - # if globalSidecarMode is namespace, depending on the namespace definition, mode can be "pod" or "namespace". mode: pod labels: # optional, used for sidecarInject.mode = pod sidecar.istio.io/inject: "true" - # istio.io/rev: canary # use control plane revisions resources: requests: cpu: 200m @@ -189,17 +193,16 @@ spec: memory: 400Mi image: repository: docker.io/slimeio/slime-global-sidecar - tag: v0.5.0_linux_amd64 + tag: v0.7.0 probePort: 20000 ' > /tmp/lazyload-slimeboot.yaml -$ kubectl apply -f /tmp/lazyload-slimeboot.yaml +kubectl apply -f /tmp/lazyload-slimeboot.yaml ``` 一些字段说明,可参考 [lazyload安装样例](../../../../../../doc/zh/slime-boot.md#lazyload%E5%AE%89%E8%A3%85%E6%A0%B7%E4%BE%8B) - 确认所有组件已正常运行 ```sh @@ -243,13 +246,25 @@ reviews-v3-84779c7bbc-gb52x 2/2 Running 0 60s ### 开启懒加载 -修改service的label,自动创建servicefence,为productpage服务启用懒加载 +由于我们在下发的slimeboot中指定了以下配置,所以默认情况下自动开启了懒加载 -```sh -$ kubectl label service productpage -n default slime.io/serviceFenced=true +``` + autoPort: true + autoFence: true + defaultFence: true ``` +如果`defaultFence: false`, 那么需要用户手动在service上加上`slime.io/serviceFenced="true"`开启服务懒加载 +``` + autoPort: true + autoFence: true + defaultFence: false +``` + +``` +kubectl label service productpage -n default slime.io/serviceFenced=true +``` 确认生成servicefence和sidecar对象。 diff --git a/staging/src/slime.io/slime/modules/limiter/install/limiter-global.yaml b/staging/src/slime.io/slime/modules/limiter/install/limiter-global.yaml index 5f38eeb9..ee6d07cb 100644 --- a/staging/src/slime.io/slime/modules/limiter/install/limiter-global.yaml +++ b/staging/src/slime.io/slime/modules/limiter/install/limiter-global.yaml @@ -7,7 +7,7 @@ spec: image: pullPolicy: Always repository: docker.io/slimeio/slime-limiter - tag: v0.5.0_linux_amd64 + tag: v0.7.0 module: - name: limiter kind: limiter @@ -22,8 +22,3 @@ spec: rls: service: rate-limit.istio-system.svc.cluster.local port: 18081 - global: - log: - logLevel: info - configSources: - - address: ss:// \ No newline at end of file diff --git a/staging/src/slime.io/slime/modules/limiter/install/limiter.yaml b/staging/src/slime.io/slime/modules/limiter/install/limiter.yaml index a88d70ad..923cbc27 100644 --- a/staging/src/slime.io/slime/modules/limiter/install/limiter.yaml +++ b/staging/src/slime.io/slime/modules/limiter/install/limiter.yaml @@ -6,17 +6,12 @@ spec: image: pullPolicy: Always repository: docker.io/slimeio/slime-limiter - tag: v0.5.0_linux_amd64 + tag: v0.7.0 module: - name: limiter kind: limiter enable: true - limiter: + general: disableGlobalRateLimit: true disableAdaptive: true disableInsertGlobalRateLimit: true - global: - log: - logLevel: info - configSources: - - address: ss:// \ No newline at end of file