更新时间:2025-12-24 GMT+08:00
分享

注解(Annotations)参数说明

通过在YAML中添加注解Annotation(注解),您可以使用CCI提供的一些高级功能。本文介绍在创建Pod时可供使用的Annotation。

表1 参数注解

功能及相关文档

参数

类型

描述

指定实例类型

resource.cci.io/instance-type

String

实例类型。

指定多种实例类型

resource.cci.io/instance-type-preference

String

实例类型。指定多个instance-type,使用“,”连接,系统会从中选择一个。其中resource.cci.io/instance-type-preference与resource.cci.io/instance-type不能同时填写。示例:

resource.cci.io/instance-type-preference:A,B,C

在Pod创建时,实例类型会从A、B、C三类中选择一个。

规格规整计算规则说明

resource.cci.io/pod-size-specs

String

实例规格。

resource.cci.io/size

String

系统默认填写,pod最终规格值。

resource.cci.io/resizing-large-size-instance-greater-than-32-cores

String

Pod规格超过32核是否自动规整。

增加预留系统开销

resource.cci.io/memory-reservation

string

是否开启预留系统开销,默认为"false",开启为"true"。

resource.cci.io/memory-burst-size

string

是否扩大容器的内存资源隔离上限,默认为"false",开启为"true"。

为Pod绑定已有EIP

yangtse.io/eip-id

string

绑定已有弹性公网IP的ID。

为Pod动态创建EIP

yangtse.io/pod-with-eip

string

是否为Pod创建EIP并绑定到该Pod,"false"表示关闭此功能,"true"表示开启此功能。

yangtse.io/eip-bandwidth-size

string

带宽大小,单位为Mbit/s。默认值为5。具体带宽大小以各区域配置为准,详情请参见弹性公网IP控制台的购买页面。

yangtse.io/eip-network-type

string

公网IP类型。默认值为5_bgp,如果region不支持5_bgp,同时该字段未填写时,pod会报event。具体类型以各区域配置为准,详情请参见弹性公网IP控制台的购买页面。

例如,“华东-上海一”区域支持以下类型:

  • 5_bgp:全动态BGP
  • 5_sbgp:静态BGP

yangtse.io/eip-charge-mode

string

按流量计费或按带宽计费。默认值bandwidth,可选值traffic。

  • bandwidth:按带宽计费
  • traffic:按流量计费

yangtse.io/eip-bandwidth-name

string

默认值同该EIP的名称。

  • 1-64个字符,支持数字、字母、中文、_(下划线)、-(中划线)、.(点)
  • 最小长度:1
  • 最大长度:64

yangtse.io/eip-bandwidth-id

string

共享带宽ID。

拉取自建镜像仓库的镜像

cci.io/http-registries

String

使用HTTP协议的harbor镜像地址。

cci.io/insecure-registries

String

跳过证书认证的harbor镜像地址。

配置镜像header能力

cci.io/registry-headers

String

配置registry和header信息,增加自定义的信息说明来源

使用镜像快照

cci.io/image-snapshot-auto-match

String

自动匹配镜像快照。

cci.io/image-snapshot-usage-strategy

String

自动匹配镜像快照策略。

cci.io/image-snapshot-specified-name

String

用户指定镜像快照。

cci.io/image-snapshot-create-if-not-present

String

自动创建镜像快照。

cci.io/image-snapshot-reject-if-not-available

String

指定镜像快照的时候,如果镜像快照不存在或者不可用是否拒绝创建。

cci.io/image-snapshot-detail

String

pod使用镜像快照详情,系统填写。

日志采集

logconf.k8s.io/fluent-bit-log-type

String

配置日志采集方式。

logconfigs.logging.openvessel.io

String

配置日志采集信息。

开启Pod监控指标

monitoring.cci.io/enable-pod-metrics

string

开启Pod监控指标,默认为"true",关闭为"false"。

monitoring.cci.io/metrics-port

string

指定Pod监控指标端口,默认为19100。

配置Pod信息端口

observability.cci.io/read-only-port

String

Pod信息端口。

cni.yangtse.io/network-status

String

pod网络状况,用户不可填写,由系统生成。

开启系统内核uoa能力

system.cci.io/uoa-enable

string

开启系统内核uoa能力,默认为"false",开启"true"。

配置coredump能力

system.cci.io/coredump

string

配置coredump能力。

配置内存透明大页

system.cci.io/transparent_hugepage.enabled

string

透明大页特性配置,默认开启值为"always",其它可选值有"madvise","never"。

相关文档