检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
订阅服务 subscription SubscribeService 更新订阅 subscription UpdateSubscription 退订 subscription DeleteSubscription 冻结订阅 freeze FreezeSubscription 解冻订阅
支持三种服务包打包压缩格式 Operator服务:支持遵循OpenShift包格式,以社区的operator-sdk开发,最终以zip工具打包出的zip的压缩包上传。 Helm服务:支持遵循Helm包格式,以tar工具打包出的tgz或tar.gz的压缩包上传。 OSC服务:支持通过
下划线、中划线及点结尾。{service_pack_name}-{version}.zip,例如redis-operator-1.0.0.zip。 包格式:operator类型服务包支持zip格式,helm类型服务包支持tgz格式。 包大小:不超过4MB。 样例(以Kafka为示例):
requests: {} descriptors descriptor字段用于配置UI控件,提升部署服务的用户体验,对服务参数进行控件增强,包括服务规格spec和服务状态status。该控件为可选项。 descriptors样例: # UI控件 descriptors: spec:
select_test description: "select_test" x-descriptors: - "urn:alm:descriptor:com.tectonic.ui:select:option1" - "urn:alm:descriptor:com.tectonic
私有服务上传和部署 前提条件 已购买容器镜像服务的企业版实例,且实例可以正常运行。 准备好待上传的zip或tgz格式的helm/operator-framework/osc规范压缩包以及部署时需要运行的镜像。 服务部署流程 选择对应的仓库存储源,将服务包和镜像包分别上传到OSC以及SWR仓库中,进行部署即可。
{serviceName}-{Version}.zip 服务名+版本号+zip命名 osc部署包,参考《OSC服务开发者指南》章节2.2《服务包规范》转换operator或Helm生成的服务包。 是 operator部署包 {serviceName}-{Version}.zip 服务名+版本号+zip命名 operator部署包,参考Operator
range of compatible Kubernetes versions (optional) description: A single-sentence description of this project (optional) type: The type of the chart
statusDescriptors statusDescriptor用于描述自定义资源中状态字段的属性,其配置在csd.yaml文件的status字段。statusDescriptors的结构与specDescriptors相似,包括相同的字段。 text x-descriptors: 文本形式公开实例的状态字段。
txt └── main.go 参数domain一般为公司域名,如:huawei.com。 main.go作为程序入口,初始化了Manager,由Manager来管理API和Controller。 初始化Manager时,可以指定参数,限制该Operator中所有Controller监听资源的namespace。
基于 openAPIV3Schema 的校验规则 validation: openAPIV3Schema: description: Memcached is the Schema for the Memcacheds API properties:
# 由于是第一次部署该服务,不涉及升级 # upgrade: # replaces: 0.0.1 # skips: # - 0.0.2 # skipRange: '>=4.1.0 < 4.1.2' # 该结构体用于运维操作配置,可以不进行配置 # operations:
安装方法二:避免因证书导致无法通过curl进行下载。 # 通过git clone及本地编译的方法安装kubebuilder可以避免因操作系统类型、系统架构输入错误导致 # kubebuilder二进制文件因操作系统和系统架构导致错误导致的无法使用。同时,通过git操作避免 # 在使用curl过程中需要对开发环境进行证书配置等操作
一些非面向用户的字段,因此引入了x-descriptors描述符来定义自定义的控件。 x-descriptors描述符主要用于specDescriptors和statusDescriptors定义自定义控件。 specDescriptors: password(密码输入框):支持密码类型字段输入。
operator briefDescription: example operator with an example instance and action detail: | example operator detail description. source: OpenSource
注册资产 前置条件 用户已经将对应服务包提交验证申请,并有管理员审批通过。 操作步骤 使用ISV账号登录OSC控制台,单击左侧导航栏“服务发布”。 选择需要注册资产的服务版本。 单击对应服务版本的“注册资产”按钮,弹框查看对应的服务和默认资产信息,检查无误后,单击“确认”后进行资产注册。
path: image x-descriptors: - 'urn:alm:descriptor:com.tectonic.ui:text' - displayName: Size description: The desired number
description: Number of replicas to deploy 图2 number控件 boolean控件 boolean类型字段输入。 配置示例: type: boolean title: Enable Init Containers description:
yaml文件自动生成表单 由CRD中定义的openAPIV3Schema字段规定CR中可配置的参数以及这些参数的类型、范围,应用在创建CR的时候通过YAML文件指定这些参数。 2. 使用自定义csd.yaml文件生成表单 自动生成的创建表单已经很强大,但有时可能需要修改自定义表单的呈现方式。例如,可能
yaml文件中有如下几个必填字段内容: version: 1.0.0 name: example-helm apiVersion: v1 description: A Helm chart for example. maintainers: - name: huawei email:osc@huawei