Skip to main content
版本:v1.9

阿里云 RDS

描述

用于部署阿里云 RDS 的组件说明。

示例

apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: rds-cloud-source
spec:
components:
- name: sample-db
type: alibaba-rds
properties:
instance_name: sample-db
account_name: oamtest
password: U34rfwefwefffaked
writeConnectionSecretToRef:
name: db-conn

参数说明

名称描述类型是否必须默认值
account_nameRDS instance user account name。stringfalse
allocate_public_connectionWhether to allocate public connection for a RDS instance。boolfalse
database_nameDatabase name。stringfalse
databasesThe database list, each database is a map, the map contains the following attributes: name, character_set, description, like [{"name":"test","character_set":"utf8","description":"test database"},]. It conflicts with database_namelist(map(string))false
instance_nameRDS instance name。stringfalse
passwordRDS instance account password。stringtrue
privilegeThe privilege of one account access database。stringfalse
security_ipsList of IP addresses allowed to access all databases of an instance。list(any)false
vswitch_idThe vswitch id of the RDS instance. If set, the RDS instance will be created in VPC, or it will be created in classic network。stringfalse
writeConnectionSecretToRefThe secret which the cloud resource connection will be written to。writeConnectionSecretToReffalse

writeConnectionSecretToRef

名称描述类型是否必须默认值
nameThe secret name which the cloud resource connection will be written to。stringtrue
namespaceThe secret namespace which the cloud resource connection will be written to。stringfalse

输出

如果设置了 writeConnectionSecretToRef,一个 Kubernetes Secret 将会被创建,并且,它的数据里有这些键(key):

名称描述
DATABASE_NAMERDS Database Name
DB_HOSTRDS Instance Host
DB_IDRDS Instance ID
DB_NAMERDS Instance Name
DB_PASSWORDRDS Instance Password
DB_PORTRDS Instance Port
DB_PUBLIC_HOSTRDS Instance Public Host
DB_USERRDS Instance User
RESOURCE_IDENTIFIERThe identifier of the resource