From 2272fd28eebfb6eef82cc451fcfd083ea4442622 Mon Sep 17 00:00:00 2001 From: Yuedong Wu <57584831+lunarwhite@users.noreply.github.com> Date: Wed, 3 Aug 2022 20:36:06 +0800 Subject: [PATCH] docs: add example and verify for alibaba-oss-webstie (#897) * docs: add example and verify for alibaba-oss-webstie Signed-off-by: lunarwhite * update zh-cn doc Signed-off-by: lunarwhite --- .../cloud-services/cloud-resources-list.md | 2 +- .../terraform/alibaba-oss-website.md | 21 ++++++++ .../cloud-services/cloud-resources-list.md | 2 +- .../terraform/alibaba-oss-website.md | 51 +++++++++++++------ 4 files changed, 59 insertions(+), 17 deletions(-) diff --git a/docs/end-user/components/cloud-services/cloud-resources-list.md b/docs/end-user/components/cloud-services/cloud-resources-list.md index cbc09184..dad85cb4 100644 --- a/docs/end-user/components/cloud-services/cloud-resources-list.md +++ b/docs/end-user/components/cloud-services/cloud-resources-list.md @@ -98,7 +98,7 @@ title: Supported Cloud Resource list | | | [nas](./terraform/alibaba-nas.md) | Terraform configuration for Alicloud NAS | false | | | | [network with nat](./terraform/alibaba-network-with-nat.md) | Build VPC and Nat gateway network environment and bind EIP, add SNAT and DNAT entries on AliCloud based on Terraform module | false | | | | [oss](./terraform/alibaba-oss.md) | Terraform configuration for Alibaba Cloud OSS | true | -| | | [oss website](./terraform/alibaba-oss-website.md) | Alibaba Cloud OSS static webstie bucket | false | +| | | [oss website](./terraform/alibaba-oss-website.md) | Alibaba Cloud OSS static webstie bucket | true | | | | [private zone](./terraform/alibaba-private-zone.md) | Terraform-based modules are used to create a Private Zone on AliCloud, while you can add records to the Zone and associate it with a VPC | false | | | | [rabbitmq](./terraform/alibaba-rabbitmq.md) | Create a RabbitMQ based on Terraform module in Ali cloud | false | | | | [ram](./terraform/alibaba-ram.md) | Create RAM User instances on AliCloud based on Terraform module | false | diff --git a/docs/end-user/components/cloud-services/terraform/alibaba-oss-website.md b/docs/end-user/components/cloud-services/terraform/alibaba-oss-website.md index 055a8e9a..cfd7cfb8 100644 --- a/docs/end-user/components/cloud-services/terraform/alibaba-oss-website.md +++ b/docs/end-user/components/cloud-services/terraform/alibaba-oss-website.md @@ -6,8 +6,29 @@ title: Alibaba Cloud OSS-WEBSITE Alibaba Cloud OSS static webstie bucket. +## Examples + +```yaml +apiVersion: core.oam.dev/v1beta1 +kind: Application +metadata: + name: alibaba-cloud-oss-webstie +spec: + components: + - name: oss-website-example + type: alibaba-oss-website + properties: + acl: public-read + bucket: oss-website-example + index_document: index.html + error_document: 404.html + writeConnectionSecretToRef: + name: oss-website-conn +``` + ## Specification +### Properties Name | Description | Type | Required | Default ------------ | ------------- | ------------- | ------------- | ------------- diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/end-user/components/cloud-services/cloud-resources-list.md b/i18n/zh/docusaurus-plugin-content-docs/current/end-user/components/cloud-services/cloud-resources-list.md index 34b50d4b..cf84b59b 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/end-user/components/cloud-services/cloud-resources-list.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/end-user/components/cloud-services/cloud-resources-list.md @@ -155,7 +155,7 @@ title: 云资源列表 | | | [nas](./terraform/alibaba-nas.md) | Terraform configuration for Alicloud NAS | false | | | | [network with nat](./terraform/alibaba-network-with-nat.md) | Build VPC and Nat gateway network environment and bind EIP, add SNAT and DNAT entries on AliCloud based on Terraform module | false | | | | [oss](./terraform/alibaba-oss.md) | Terraform configuration for Alibaba Cloud OSS | true | -| | | [oss website](./terraform/alibaba-oss-website.md) | Alibaba Cloud OSS static webstie bucket | false | +| | | [oss website](./terraform/alibaba-oss-website.md) | Alibaba Cloud OSS static webstie bucket | true | | | | [private zone](./terraform/alibaba-private-zone.md) | Terraform-based modules are used to create a Private Zone on AliCloud, while you can add records to the Zone and associate it with a VPC | false | | | | [rabbitmq](./terraform/alibaba-rabbitmq.md) | Create a RabbitMQ based on Terraform module in Ali cloud | false | | | | [ram](./terraform/alibaba-ram.md) | Create RAM User instances on AliCloud based on Terraform module | false | diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/end-user/components/cloud-services/terraform/alibaba-oss-website.md b/i18n/zh/docusaurus-plugin-content-docs/current/end-user/components/cloud-services/terraform/alibaba-oss-website.md index 6a9c9e88..d14575ed 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/end-user/components/cloud-services/terraform/alibaba-oss-website.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/end-user/components/cloud-services/terraform/alibaba-oss-website.md @@ -4,34 +4,55 @@ title: 阿里云 OSS-WEBSITE ## 描述 -Alibaba Cloud OSS static webstie bucket。 +使用阿里云 OSS 托管静态网站。 + +## 示例 + +```yaml +apiVersion: core.oam.dev/v1beta1 +kind: Application +metadata: + name: alibaba-cloud-oss-webstie +spec: + components: + - name: oss-website-example + type: alibaba-oss-website + properties: + acl: public-read + bucket: oss-website-example + index_document: index.html + error_document: 404.html + writeConnectionSecretToRef: + name: oss-website-conn +``` ## 参数说明 +### 属性 - 名称 | 描述 | 类型 | 是否必须 | 默认值 - ------------ | ------------- | ------------- | ------------- | ------------- - acl | OSS bucket ACL, supported 'private', 'public-read', 'public-read-write'。 | string | false | - bucket | OSS bucket name。 | string | false | - error_document | OSS bucket static website error document。 | string | false | - index_document | OSS bucket static website index document。 | string | false | - writeConnectionSecretToRef | The secret which the cloud resource connection will be written to。 | [writeConnectionSecretToRef](#writeConnectionSecretToRef) | false | + 名称 | 描述 | 类型 | 是否必须 | 默认值 + ------------ | ------------- | ------------- | ------------- | ------------- + acl | OSS bucket ACL, supported 'private', 'public-read', 'public-read-write'. | string | false | + bucket | OSS bucket name. | string | false | + error_document | OSS bucket static website error document. | string | false | + index_document | OSS bucket static website index document. | string | false | + writeConnectionSecretToRef | The secret which the cloud resource connection will be written to. | [writeConnectionSecretToRef](#writeConnectionSecretToRef) | false | #### writeConnectionSecretToRef - 名称 | 描述 | 类型 | 是否必须 | 默认值 - ------------ | ------------- | ------------- | ------------- | ------------- - name | The secret name which the cloud resource connection will be written to。 | string | true | - namespace | The secret namespace which the cloud resource connection will be written to。 | string | false | + 名称 | 描述 | 类型 | 是否必须 | 默认值 + ------------ | ------------- | ------------- | ------------- | ------------- + name | The secret name which the cloud resource connection will be written to. | string | true | + namespace | The secret namespace which the cloud resource connection will be written to. | string | false | ### 输出 如果设置了 `writeConnectionSecretToRef`,一个 Kubernetes Secret 将会被创建,并且,它的数据里有这些键(key): - 名称 | 描述 - ------------ | ------------- - BUCKET_NAME | + 名称 | 描述 + ------------ | ------------- + BUCKET_NAME | EXTRANET_ENDPOINT | OSS bucket external endpoint INTRANET_ENDPOINT | OSS bucket internal endpoint