diff --git a/configs/config_ref_example.json b/configs/config_ref_example.json index bd9afaf057..39ca8ae232 100644 --- a/configs/config_ref_example.json +++ b/configs/config_ref_example.json @@ -29,23 +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", - "redisPassword": "" + "redisHost": "127.0.0.1:6380" }, "secret_ref": [ { 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..c6699d71b0 100644 --- a/docs/en/start/secret/secret_ref.md +++ b/docs/en/start/secret/secret_ref.md @@ -1,8 +1,8 @@ -# use Secret Ref to obtain secret +# Reference secrets in component configuration 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/_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) 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组件