From 6102b8329fbcf2ab7fa84f3023c7f6959dd806c4 Mon Sep 17 00:00:00 2001 From: seeflood Date: Sat, 9 Jul 2022 17:28:27 +0800 Subject: [PATCH 1/4] docs: add secret_ref.md into sidebar Signed-off-by: seeflood --- docs/_sidebar.md | 4 +++- docs/en/start/secret/secret_ref.md | 2 +- docs/zh/_sidebar.md | 18 ++++++++++-------- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/docs/_sidebar.md b/docs/_sidebar.md index 4ce510d5ab..bc30b7e7f8 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -7,7 +7,9 @@ - [Use Pub/Sub API](en/start/pubsub/start.md) - [Use Distributed Lock API](en/start/lock/start.md) - [Use Sequencer API](en/start/sequencer/start.md) - - [Use Secret API](en/start/secret/start.md) + - Use Secret API + - [Query secrets](en/start/secret/start.md) + - [Refer to secrets in component configuration](en/start/secret/secret_ref.md) - Service Invocation - [Hello World](en/start/rpc/helloworld.md) - [Dubbo JSON RPC](en/start/rpc/dubbo_json_rpc.md) diff --git a/docs/en/start/secret/secret_ref.md b/docs/en/start/secret/secret_ref.md index c1a506faae..a5a62c36b7 100644 --- a/docs/en/start/secret/secret_ref.md +++ b/docs/en/start/secret/secret_ref.md @@ -1,4 +1,4 @@ -# use Secret Ref to obtain secret +# Reference secrets in component configuration we can inject secrets to other components using secret store. diff --git a/docs/zh/_sidebar.md b/docs/zh/_sidebar.md index 95cd8cad52..bc38305d57 100644 --- a/docs/zh/_sidebar.md +++ b/docs/zh/_sidebar.md @@ -7,7 +7,9 @@ - [使用Pub/Sub API](zh/start/pubsub/start.md) - [使用分布式锁 API](zh/start/lock/start.md) - [使用Sequencer API生成分布式自增id](zh/start/sequencer/start.md) - - [使用 Secret API](zh/start/secret/start.md) + - 使用 Secret API + - [查询 secrets](zh/start/secret/start.md) + - [在组件配置中引用 secret](zh/start/secret/secret_ref.md) - 进行RPC调用 - [Hello World](zh/start/rpc/helloworld.md) - [Dubbo JSON RPC](zh/start/rpc/dubbo_json_rpc.md) @@ -21,7 +23,7 @@ - 在七层网络进行流量干预 - [方法级别限流](zh/start/stream_filter/flow_control.md) - [健康检查、查询运行时元数据](zh/start/actuator/start.md) - - 可观测性 + - 可观测性 - [Trace, Metrics](zh/start/trace/trace.md) - [Trace 接入 Skywalking](zh/start/trace/skywalking.md) - [Trace 接入 Zipkin](zh/start/trace/zipkin.md) @@ -44,12 +46,12 @@ - [gRPC API 接口文档](zh/api_reference/README.md) - [spec/proto/runtime/v1/runtime.proto](https://github.com/mosn/layotto/blob/main/docs/en/api_reference/runtime_v1.md) - [spec/proto/runtime/v1/appcallback.proto](https://github.com/mosn/layotto/blob/main/docs/en/api_reference/appcallback_v1.md) - - SDK文档 + - SDK文档 - [java sdk](https://github.com/layotto/java-sdk) - [.net sdk](https://github.com/layotto/dotnet-sdk) - [js sdk](https://github.com/layotto/js-sdk) - [go sdk](zh/sdk_reference/go/start.md) -- 运维手册 +- 运维手册 - [如何配置 Layotto](zh/configuration/) - [Layotto 配置文件介绍](zh/configuration/overview.md) - [组件配置说明](zh/component_specs/overview.md) @@ -75,7 +77,7 @@ - [Redis](zh/component_specs/sequencer/redis.md) - [Zookeeper](zh/component_specs/sequencer/zookeeper.md) - [MongoDB](zh/component_specs/sequencer/mongo.md) - - [Secret Store](zh/component_specs/secret/common.md) + - [Secret Store](zh/component_specs/secret/common.md) - [自定义组件](zh/component_specs/custom/common.md) - [如何部署、升级 Layotto](zh/operation/) - 设计文档 @@ -84,7 +86,7 @@ - [Configuration API with Apollo](zh/design/configuration/configuration-api-with-apollo.md) - [Pub/Sub API以及与dapr component的兼容性](zh/design/pubsub/pubsub-api-and-compability-with-dapr-component.md) - [RPC设计文档](zh/design/rpc/rpc设计文档.md) - - [分布式锁API设计文档](zh/design/lock/lock-api-design.md) + - [分布式锁API设计文档](zh/design/lock/lock-api-design.md) - [Sequencer API设计文档](zh/design/sequencer/design.md) - [File API设计文档](zh/design/file/file-design.md) - [FaaS 设计文档](zh/design/faas/faas-poc-design.md) @@ -93,14 +95,14 @@ - 贡献指南 - [Layotto 贡献指南](zh/development/CONTRIBUTING.md) - [新手攻略:从零开始成为 Layotto 贡献者](zh/development/start-from-zero.md) - - 想要贡献文档? + - 想要贡献文档? - [文档贡献指南](zh/development/contributing-doc.md) - [使用工具自动测试 Quickstart 文档](zh/development/test-quickstart.md) - [想要开发新的组件?](zh/development/developing-component.md) - 想要修改proto文件或API定义? - [新增API时的开发规范](zh/development/developing-api.md) - [proto文件注释规范](zh/api_reference/comment_spec_of_proto.md) - - [如何基于proto文件生成代码、接口文档](zh/api_reference/how_to_generate_api_doc.md) + - [如何基于proto文件生成代码、接口文档](zh/api_reference/how_to_generate_api_doc.md) - [Layotto 四大 Github Workflows 说明](zh/development/github-workflows.md) - [Layotto 命令行工具指南](zh/development/commands.md) - [发布手册](zh/development/release-guide.md) From 9f69cdac5ce7eb5c1e3d28547eb9d218789cd7e9 Mon Sep 17 00:00:00 2001 From: seeflood Date: Sat, 9 Jul 2022 17:47:25 +0800 Subject: [PATCH 2/4] update doc Signed-off-by: seeflood --- docs/en/start/secret/secret_ref.md | 5 +++-- docs/zh/start/secret/secret_ref.md | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/en/start/secret/secret_ref.md b/docs/en/start/secret/secret_ref.md index a5a62c36b7..c6699d71b0 100644 --- a/docs/en/start/secret/secret_ref.md +++ b/docs/en/start/secret/secret_ref.md @@ -2,7 +2,7 @@ we can inject secrets to other components using secret store. -using `secret_ref` config: +Use `secret_ref` in your config: ```json { @@ -11,7 +11,6 @@ using `secret_ref` config: "type": "redis", "metadata": { "redisHost": "127.0.0.1:6380", - "redisPassword": "" }, "secret_ref": [ { @@ -24,6 +23,8 @@ using `secret_ref` config: } ``` +An example is [config_ref_example.json](https://github.com/mosn/layotto/blob/main/configs/config_ref_example.json) + ## Quick start This example shows how to inject redis password to sequencer component using redis store diff --git a/docs/zh/start/secret/secret_ref.md b/docs/zh/start/secret/secret_ref.md index 2feea7573d..0173ff78c8 100644 --- a/docs/zh/start/secret/secret_ref.md +++ b/docs/zh/start/secret/secret_ref.md @@ -24,6 +24,8 @@ } ``` +一个示例是 [config_ref_example.json](https://github.com/mosn/layotto/blob/main/configs/config_ref_example.json) + ## 快速开始 该示例展示了如何注入redis password到sequencer组件 From 4e90e453b55243009806726c685f88112dfac05d Mon Sep 17 00:00:00 2001 From: seeflood Date: Sat, 9 Jul 2022 17:47:37 +0800 Subject: [PATCH 3/4] delete default redis password Signed-off-by: seeflood --- configs/config_ref_example.json | 1 - 1 file changed, 1 deletion(-) diff --git a/configs/config_ref_example.json b/configs/config_ref_example.json index bd9afaf057..d326eafd04 100644 --- a/configs/config_ref_example.json +++ b/configs/config_ref_example.json @@ -45,7 +45,6 @@ "type":"redis", "metadata": { "redisHost": "127.0.0.1:6380", - "redisPassword": "" }, "secret_ref": [ { From 9bf649ca1db6daa23021132b97e61df896fe6114 Mon Sep 17 00:00:00 2001 From: seeflood Date: Sat, 9 Jul 2022 18:15:19 +0800 Subject: [PATCH 4/4] fix json Signed-off-by: seeflood --- configs/config_ref_example.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/configs/config_ref_example.json b/configs/config_ref_example.json index d326eafd04..39ca8ae232 100644 --- a/configs/config_ref_example.json +++ b/configs/config_ref_example.json @@ -29,22 +29,22 @@ }, "secret_store": { "local.file": { - "type":"local.file", + "type": "local.file", "metadata": { "secretsFile": "../../configs/secret/config_secret_local_file.json" } }, "local.env": { - "type":"local.env", + "type": "local.env", "metadata": { } } }, "sequencer": { "redis": { - "type":"redis", + "type": "redis", "metadata": { - "redisHost": "127.0.0.1:6380", + "redisHost": "127.0.0.1:6380" }, "secret_ref": [ {