云原生服务中心 OSC
云原生服务中心 OSC
链接复制成功!
基础控件
OSC console依据crd.yaml文件可以自动生成Operator的创建表单。crd.yaml文件中的properties(openAPIV3Schema.properties.spec.properties)对象会自动映射到对应的UI组件。
目前提供的基础类型控件分别有string、number、boolean、object、array类型。
- string控件:满足一般的文本输入。
- number控件:满足一般的数字输入。
- boolean控件:开关控件,支持设置布尔值。
- object控件:支持结构体格式输入,具有多层嵌套能力。
- array类型:支持数组结构的输入,可以动态增删。
string控件
一般场景的文本输入,支持校验规则的配置。
配置示例:
type: string title: Extra RabbitMQ Configuration description: Extra configuration to be appended to...
图1 string控件

number控件
一般场景的数字输入,支持设置数值的大小范围。
配置示例:
type: number title: Number of replicas description: Number of replicas to deploy
图2 number控件

boolean控件
boolean类型字段输入。
配置示例:
type: boolean title: Enable Init Containers description: Use an init container to set required...
图3 boolean控件

object控件
结构体格式输入,支持子控件的嵌套。
配置示例:
type: object title: Presistence configuration properties: enablePersistence: type: boolean title: Enable Persistence description: Enable persistence using Persistent Volume Claims persistentVolumeSize: type: string title: Persistent Volume Size description:
图4 object控件

父主题: 表单控件