add docs for vela def doc-gen from local file (#534)

Signed-off-by: Nicola115 <2225992901@qq.com>
This commit is contained in:
Avery 2022-03-10 11:06:19 +08:00 committed by GitHub
parent 6a29724e8b
commit f312994bb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 46 additions and 6 deletions

View File

@ -130,14 +130,14 @@ status: {}
```
You are warmly welcome to contribute this extended cloud resource ComponentDefinition to [oam-dev/catalog](https://github.com/oam-dev/catalog/tree/master/addons/).
## Apply ComponentDefinition
Write the generated ComponentDefinition into a file named `terraform-<ComponentDefinition_NAME>.yaml` and apply it to the running Kubernetes cluster.
```shell
kubectl apply -f <FILENAME>
```
```
## Verify
@ -172,9 +172,19 @@ the doc [Provision cloud resources](../../end-user/components/cloud-services/pro
You are encouraged to generate the documentation for your ComponentDefinition and submit it to [KubeVela official site](https://github.com/oam-dev/kubevela.io).
By running `vela def doc-gen` command, we can generate related docs for the ComponentDefinition either from a local file, or from the running application on kubernetes cluster.
If you choose to generate docs from running cluster, you should provide the name of the ComponentDefinition and the namespace which it is running in.
```shell
$ vela def doc-gen alibaba-eip -n vela-system
Generated docs for alibaba-eip in ./kubevela.io/docs/end-user/components/cloud-services/terraform/alibaba-eip.md
```
If you choose to generate docs from local ComponentDefinition file, you should provide the file path.
```shell
$ vela def doc-gen alibaba-eip.yaml
```
Move the file generated to [oam-dev/kubevela.io](https://github.com/oam-dev/kubevela.io) repo. Follow the [contribution guide](https://github.com/oam-dev/kubevela.io#contributing-to-kubevela-en-docs) to submit the doc.

View File

@ -141,7 +141,7 @@ status: {}
```shell
kubectl apply -f <FILENAME>
```
## 验证
你可以通过 `vela show` 命令快速验证 ComponentDefinition。
@ -173,9 +173,19 @@ $ vela show alibaba-eip
我们鼓励你为你的 ComponentDefinition 生成文档并提交给 [KubeVela官方网站]https://github.com/oam-dev/kubevela.io
通过运行 `vela def doc-gen` 命令我们可以基于已经应用在kubernetes集群上的ComponentDefinition生成相关文档也可以基于本地ComponentDefinition文件生成相关文档。
基于已经应用在kubernetes集群上的ComponentDefinition生成文档时需要提供该ComponentDefinition运行的namespace。
```shell
$ vela def doc-gen alibaba-eip -n vela-system
Generated docs for alibaba-eip in ./kubevela.io/docs/end-user/components/cloud-services/terraform/alibaba-eip.md
```
基于本地文件生成文档时,需要提供文件路径。
```shell
$ vela def doc-gen alibaba-eip.yaml
```
将生成的文件移到 [oam-dev/kubevela.io](https://github.com/oam-dev/kubevela.io) 库。参考 [贡献指南](https://github.com/oam-dev/kubevela.io#contributing-to-kubevela-en-docs) 来提交文档。

View File

@ -141,7 +141,7 @@ status: {}
```shell
kubectl apply -f <FILENAME>
```
## 验证
你可以通过 `vela show` 命令快速验证 ComponentDefinition。
@ -173,9 +173,19 @@ $ vela show alibaba-eip
我们鼓励你为你的 ComponentDefinition 生成文档并提交给 [KubeVela官方网站]https://github.com/oam-dev/kubevela.io
通过运行 `vela def doc-gen` 命令我们可以基于已经应用在kubernetes集群上的ComponentDefinition生成相关文档也可以基于本地ComponentDefinition文件生成相关文档。
基于已经应用在kubernetes集群上的ComponentDefinition生成文档时需要提供该ComponentDefinition运行的namespace。
```shell
$ vela def doc-gen alibaba-eip -n vela-system
Generated docs for alibaba-eip in ./kubevela.io/docs/end-user/components/cloud-services/terraform/alibaba-eip.md
```
基于本地文件生成文档时,需要提供文件路径。
```shell
$ vela def doc-gen alibaba-eip.yaml
```
将生成的文件移到 [oam-dev/kubevela.io](https://github.com/oam-dev/kubevela.io) 库。参考 [贡献指南](https://github.com/oam-dev/kubevela.io#contributing-to-kubevela-en-docs) 来提交文档。

View File

@ -130,14 +130,14 @@ status: {}
```
You are warmly welcome to contribute this extended cloud resource ComponentDefinition to [oam-dev/catalog](https://github.com/oam-dev/catalog/tree/master/addons/).
## Apply ComponentDefinition
Write the generated ComponentDefinition into a file named `terraform-<ComponentDefinition_NAME>.yaml` and apply it to the running Kubernetes cluster.
```shell
kubectl apply -f <FILENAME>
```
```
## Verify
@ -172,9 +172,19 @@ the doc [Provision cloud resources](../../end-user/components/cloud-services/pro
You are encouraged to generate the documentation for your ComponentDefinition and submit it to [KubeVela official site](https://github.com/oam-dev/kubevela.io).
By running `vela def doc-gen` command, we can generate related docs for the ComponentDefinition either from a local file, or from the running application on kubernetes cluster.
If you choose to generate docs from running cluster, you should provide the name of the ComponentDefinition and the namespace which it is running in.
```shell
$ vela def doc-gen alibaba-eip -n vela-system
Generated docs for alibaba-eip in ./kubevela.io/docs/end-user/components/cloud-services/terraform/alibaba-eip.md
```
If you choose to generate docs from local ComponentDefinition file, you should provide the file path.
```shell
$ vela def doc-gen alibaba-eip.yaml
```
Move the file generated to [oam-dev/kubevela.io](https://github.com/oam-dev/kubevela.io) repo. Follow the [contribution guide](https://github.com/oam-dev/kubevela.io#contributing-to-kubevela-en-docs) to submit the doc.