规范架构
PgBouncerSpec 用于定义 PgBouncer 的所选状态。
accessMode: string
allowSuperUserAccess: boolean
dbclusterRef: string
parameters: object
podSpec:
image: string
resources:
cpu: integer or string
memory: integer or string
schedulingconfig:
nodeaffinity:
preferredDuringSchedulingIgnoredDuringExecution:
preference:
matchExpressions:
- key: string
operator: string
values: string
matchFields:
- key: string
operator: string
values: string
weight: integer
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
matchExpressions:
- key: string
operator: string
values: string
matchFields:
- key: string
operator: string
values: string
podAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: string
operator: string
values: string
matchLabels: object
namespaceSelector:
matchExpressions:
- key: string
operator: string
values: string
matchLabels: object
namespaces: string
topologyKey: string
weight: integer
requiredDuringSchedulingIgnoredDuringExecution:
labelSelector:
matchExpressions:
- key: string
operator: string
values: string
matchLabels: object
namespaceSelector:
matchExpressions:
- key: string
operator: string
values: string
matchLabels: object
namespaces: string
topologyKey: string
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
podAffinityTerm:
labelSelector:
matchExpressions:
- key: string
operator: string
type: string
matchLabels: object
namespaceSelector:
matchExpressions:
- key: string
operator: string
values: string
matchLabels: object
namespaces: string
topologyKey: string
weight: integer
requiredDuringSchedulingIgnoredDuringExecution:
labelSelector:
matchExpressions:
- key: string
operator: string
values: string
matchLabels: object
namespaceSelector:
matchExpressions:
- key: string
operator: string
type: string
matchLabels: object
namespaces: string
topologyKey: string
tolerations:
- effect: string
key: string
operator: string
tolerationSeconds: integer
value: string
replicaCount: integer
serverTLS:
certSecret:
name: string
serviceOptions:
annotations: object
gcp:
loadBalancerIP: string
loadBalancerType: string
type: object
字段 类型必填或可选 |
说明 |
---|---|
accessMode
| |
string 可选 |
为 PgBouncer 连接定义 read-write 或 read-only 访问模式。默认值为 read-only 。
|
allowSuperUserAccess
| |
boolean 可选 | AllowSuperUserAccess 可以设置为 true 或 false |
dbclusterRef
| |
string 必填 |
DBClusterRef 是 PgBouncer 为其建立连接池的 DBCluster 名称。
您必须在 PgBouncer 对象所引用的 DBCluster 所在的命名空间中创建该对象。此字段对于 PgBouncer 连接池是必需的。
|
parameters
| |
object 可选 | 参数将包含可设置的各种 PgBouncer 配置的键值对。如需了解可用的各种选项,请参阅 https://www.pgbouncer.org/config.html。 创建 PgBouncer 服务 提供了一些使用此规范的示例。 |
podspec
| |
object 必填 | PodSpec 包含 PgBouncer Pod 的规范。该文件包含为 PgBouncer pod 提供服务的映像、计算和存储资源,以及调度选项。 |
podSpec.image
| |
string 必填 | Image 是工件注册库中自定义 pgbouncer 映像的统一资源标识符。 |
podSpec.resources
| |
object 必填 | “资源”表示内存和 CPU 的当前配置。 |
podSpec.resources.cpu
| |
integer or string 必填 | 分配给 pgbouncer 容器的 CPU 量。 |
podSpec.resources.memory
| |
integer or string 必填 | 分配给 PgBouncer 容器的内存量。 |
podSpec.schedulingConfig
| |
object 可选 | 使用 SchedulingConfig 字段指定实例在 Kubernetes 节点上的调度方式。更改调度配置中的任何字段都可能会导致 Kubernetes 将 Pod 重新调度到其他节点,具体取决于新配置。 |
podSpec.schedulingConfig.nodeAffinity
| |
object 可选 | NodeAffinity 用于描述实例的节点亲和性调度规则。 |
podSpec.schedulingConfig.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution
| |
object 可选 | 您可以使用此字段为调度 pod 指定亲和性偏好设置。调度器会尝试将 pod 放置在与您的偏好设置相符的节点上。不过,这并不总是可行的。调度程序会根据每个节点与您的偏好设置的匹配程度为每个节点计算一个“权重”,并选择权重最高的节点。 |
podSpec.schedulingConfig.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution.preference
| |
object 必填 | 节点选择器字词,与相应的权重相关联。 |
podSpec.schedulingConfig.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution.preference.matchExpressions
| |
object 可选 | 按节点标签列出的节点选择器要求。 |
podSpec.schedulingConfig.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution.preference.matchExpressions.key
| |
string 必填 | 选择器应用到的标签键。 |
podSpec.schedulingConfig.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution.preference.matchExpressions.operator
| |
string 必填 |
表示键与一组值的关系。有效运算符包括 In 、NotIn 、Exists 、DoesNotExist 、Gt 和 Lt 。 |
podSpec.schedulingConfig.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution.preference.matchExpressions.values
| |
string 可选 |
字符串值的数组。如果运算符为 In 或 NotIn ,则值数组不得为空。如果运算符为 Exists 或 DoesNotExist ,则值数组必须为空。如果运算符为 Gt 或 Lt ,则值数组必须包含一个元素,该元素会被解读为整数。此数组会在策略合并补丁期间替换。 |
podSpec.schedulingConfig.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution.preference.matchFields
| |
object 可选 | 按节点字段列出的节点选择器要求。 |
podSpec.schedulingConfig.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution.preference.matchFields.key
| |
string 必填 | 选择器应用到的标签键。 |
podSpec.schedulingConfig.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution.preference.matchFields.operator
| |
string 必填 |
表示键与一组值的关系。有效运算符包括 In 、NotIn 、Exists 、DoesNotExist 、Gt 和 Lt 。 |
podSpec.schedulingConfig.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution.preference.matchFields.values
| |
string 可选 | 字符串值的数组。如果运算符为“In”或“NotIn”,则值数组不得为空。如果运算符为 Exists 或 DoesNotExist,则值数组必须为空。如果运算符为 Gt 或 Lt,则值数组必须包含一个元素,该元素被解读为整数。此数组会在战略合并补丁期间替换。 |
podSpec.schedulingConfig.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution.weight
| |
integer 必填 | 与匹配相应 nodeSelectorTerm 相关联的权重介于 1 到 100(包括这两个数值)之间。 |
podSpec.schedulingConfig.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution
| |
object 可选 | 如果未满足此字段的亲和性要求,调度器不会将 Pod 调度到节点上。如果 Pod 执行期间某个时间点未满足此字段指定的相似性要求(例如由于更新),系统可能会或可能不会最终尝试将 Pod 从其节点中驱逐。 |
podSpec.schedulingConfig.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms
| |
object 必填 | 节点选择器字词列表。这些字词通过 OR 运算组合。 |
podSpec.schedulingConfig.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms.matchExpressions
| |
object 可选 | 按节点标签列出的节点选择器要求。 |
podSpec.schedulingConfig.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms.matchExpressions.key
| |
string 必填 | 选择器应用到的标签键。 |
podSpec.schedulingConfig.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms.matchExpressions.operator
| |
string 必填 |
表示键与一组值的关系。有效运算符包括 In 、NotIn 、Exists 、DoesNotExist 、Gt 和 Lt 。 |
podSpec.schedulingConfig.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms.matchExpressions.values
| |
string 可选 | 字符串值的数组。如果运算符为“In”或“NotIn”,则值数组不得为空。如果运算符为 Exists 或 DoesNotExist,则值数组必须为空。如果运算符为 Gt 或 Lt,则值数组必须包含一个元素,该元素被解读为整数。此数组会在策略合并补丁期间替换。 |
podSpec.schedulingConfig.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms.matchFields
| |
object 可选 | 按节点字段列出的节点选择器要求。 |
podSpec.schedulingConfig.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms.matchFields.key
| |
string 必填 | 选择器应用到的标签键。 |
podSpec.schedulingConfig.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms.matchFields.operator
| |
string 必填 |
表示键与一组值的关系。有效运算符包括 In 、NotIn 、Exists 、DoesNotExist 、Gt 和 Lt 。 |
podSpec.schedulingConfig.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms.matchFields.values
| |
string 可选 | 字符串值的数组。如果运算符为“In”或“NotIn”,则值数组不得为空。如果运算符为 Exists 或 DoesNotExist,则值数组必须为空。如果运算符为 Gt 或 Lt,则值数组必须包含一个元素,该元素被解读为整数。此数组会在策略合并补丁期间替换。 |
podSpec.schedulingConfig.podAffinity
| |
object 可选 | PodAffinity 描述了实例的 pod 亲和性调度规则。 |
podSpec.schedulingConfig.podAffinity.preferredDuringSchedulingIgnoredDuringExecution
| |
object 可选 | 在调度 Pod 时,调度程序会优先选择符合此字段中指定的亲和性表达式的节点。调度程序可能仍会选择不完全符合条件的节点。总权重最高的节点是首选节点。此权重是通过将满足所有调度要求(例如资源请求或 requiredDuringScheduling 亲和性表达式)的每个节点的值相加而计算得出的。对于每个匹配的 podAffinityTerm,节点的权重都会增加,并且总权重最高的节点会被选为首选。 |
podSpec.schedulingConfig.podAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm
| |
object 必填 | 与相应权重关联的 pod 亲和性字词。 |
podSpec.schedulingConfig.podAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.labelSelector
| |
object 可选 | 对一组资源(在本例中为 Pod)的标签查询。 |
podSpec.schedulingConfig.podAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.labelSelector.matchExpressions
| |
object 可选 | 列表中的所有 matchExpression 都必须为 true,才能进行匹配。 |
podSpec.schedulingConfig.podAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.labelSelector.matchExpressions.key
| |
string 必填 | 选择器应用到的标签键。 |
podSpec.schedulingConfig.podAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.labelSelector.matchExpressions.operator
| |
string 必填 |
运算符表示键与一组值的关系。有效运算符包括 In 、NotIn 、Exists 和 DoesNotExist 。 |
podSpec.schedulingConfig.podAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.labelSelector.matchExpressions.values
| |
string 可选 | values 是字符串值的数组。如果运算符为“In”或“NotIn”,则值数组不得为空。如果运算符为 Exists 或 DoesNotExist,则值数组必须为空。此数组会在策略合并补丁期间替换。 |
podSpec.schedulingConfig.podAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.labelSelector.matchLabels
| |
object 可选 | matchLabels 是 {key,value} 对的映射。matchLabels 映射中的单个 {key,value} 相当于 matchExpressions 的元素,其键字段为“key”,运算符为“In”,值数组仅包含“value”。这些要求之间是 AND 关系。 |
podSpec.schedulingConfig.podAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.namespaceSelector
| |
object 可选 | 针对术语应用到的一组命名空间的标签查询。该术语适用于此字段选择的命名空间与命名空间字段中列出的命名空间的并集。null 选择器和 null 或空命名空间列表表示“此 Pod 的命名空间”。空选择器 ({}) 会匹配所有命名空间。 |
podSpec.schedulingConfig.podAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.namespaceSelector.matchExpressions
| |
object 可选 | matchExpressions 是标签选择器要求的列表。这些要求之间是 AND 关系。 |
podSpec.schedulingConfig.podAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.namespaceSelector.matchExpressions.key
| |
string 必填 | key 是选择器应用到的标签键。 |
podSpec.schedulingConfig.podAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.namespaceSelector.matchExpressions.operator
| |
string 必填 |
运算符表示键与一组值的关系。有效运算符包括 In 、NotIn 、Exists 和 DoesNotExist 。 |
podSpec.schedulingConfig.podAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.namespaceSelector.matchExpressions.values
| |
string 可选 | values 是字符串值的数组。如果运算符为“In”或“NotIn”,则值数组不得为空。如果运算符为 Exists 或 DoesNotExist,则值数组必须为空。此数组会在策略合并补丁期间替换。 |
podSpec.schedulingConfig.podAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.namespaceSelector.matchLabels
| |
object 可选 | matchLabels 是 {key,value} 对的映射。matchLabels 映射中的单个 {key,value} 相当于 matchExpressions 的元素,其键字段为“key”,运算符为“In”,值数组仅包含“value”。这些要求之间是 AND 关系。 |
podSpec.schedulingConfig.podAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.namespaces
| |
string 可选 | namespaces 用于指定该术语适用的命名空间名称的静态列表。该术语适用于此字段中列出的命名空间与由 namespaceSelector 选择的命名空间的并集。null 或空命名空间列表和 null namespaceSelector 表示“此 Pod 的命名空间”。 |
podSpec.schedulingConfig.podAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.topologyKey
| |
string 必填 | 此 Pod 必须与指定命名空间中与 labelSelector 匹配的 Pod 共存(亲和性)或不共存(反亲和性)。同处部署是指在键为 topologyKey 的标签的值与所选任何 Pod 正在运行的任何节点的值匹配的节点上运行。不允许使用空的 topologyKey。 |
podSpec.schedulingConfig.podAffinity.preferredDuringSchedulingIgnoredDuringExecution.weight
| |
integer 必填 | 与匹配相应 podAffinityTerm 相关联的权重,介于 1 到 100 之间。 |
podSpec.schedulingConfig.podAffinity.requiredDuringSchedulingIgnoredDuringExecution
| |
object 可选 | 如果在调度时不满足此字段指定的亲和性要求,系统将不会将 pod 调度到该节点。如果在 Pod 执行期间的某个时间点未满足此字段指定的相似性要求(例如,由于 Pod 标签更新),系统可能会或可能不会最终尝试将 Pod 从其节点中驱逐。如果有多个元素,则系统会对应地将每个 podAffinityTerm 对应的节点列表进行交集,这意味着必须满足所有术语。 |
podSpec.schedulingConfig.podAffinity.requiredDuringSchedulingIgnoredDuringExecution.labelSelector
| |
object 可选 | 对一组资源(在本例中为 Pod)的标签查询。 |
podSpec.schedulingConfig.podAffinity.requiredDuringSchedulingIgnoredDuringExecution.labelSelector
| |
object 可选 | 对一组资源(在本例中为 Pod)的标签查询。 |
podSpec.schedulingConfig.podAffinity.requiredDuringSchedulingIgnoredDuringExecution.labelSelector.matchExpressions
| |
object 可选 | 列表中的所有 matchExpression 都必须为 true,才能进行匹配。 |
podSpec.schedulingConfig.podAffinity.requiredDuringSchedulingIgnoredDuringExecution.labelSelector.matchExpressions.key
| |
string 必填 | key 是选择器应用到的标签键。 |
podSpec.schedulingConfig.podAffinity.requiredDuringSchedulingIgnoredDuringExecution.labelSelector.matchExpressions.operator
| |
string 必填 |
运算符表示键与一组值的关系。有效运算符包括 In 、NotIn 、Exists 和 DoesNotExist 。 |
podSpec.schedulingConfig.podAffinity.requiredDuringSchedulingIgnoredDuringExecution.labelSelector.matchExpressions.values
| |
string 可选 | values 是字符串值的数组。如果运算符为“In”或“NotIn”,则值数组不得为空。如果运算符为 Exists 或 DoesNotExist,则值数组必须为空。此数组会在策略合并补丁期间替换。 |
podSpec.schedulingConfig.podAffinity.requiredDuringSchedulingIgnoredDuringExecution.labelSelector.matchLabels
| |
object 可选 | matchLabels 是 {key,value} 对的映射。matchLabels 映射中的单个 {key,value} 相当于 matchExpressions 的元素,其键字段为“key”,运算符为“In”,值数组仅包含“value”。这些要求之间是 AND 关系。 |
podSpec.schedulingConfig.podAffinity.requiredDuringSchedulingIgnoredDuringExecution.namespaceSelector
| |
object 可选 | 针对术语应用到的一组命名空间的标签查询。该术语适用于此字段选择的命名空间与命名空间字段中列出的命名空间的并集。null 选择器和 null 或空命名空间列表表示“此 Pod 的命名空间”。空选择器 ({}) 会匹配所有命名空间。 |
podSpec.schedulingConfig.podAffinity.requiredDuringSchedulingIgnoredDuringExecution.namespaceSelector.matchExpressions
| |
object 可选 | matchExpressions 是标签选择器要求的列表。这些要求之间是 AND 关系。 |
podSpec.schedulingConfig.podAffinity.requiredDuringSchedulingIgnoredDuringExecution.namespaceSelector.matchExpressions.key
| |
string 必填 | key 是选择器应用到的标签键。 |
podSpec.schedulingConfig.podAffinity.requiredDuringSchedulingIgnoredDuringExecution.namespaceSelector.matchExpressions.operator
| |
string 必填 |
运算符表示键与一组值的关系。有效运算符包括 In 、NotIn 、Exists 、DoesNotExist 、Gt 和 Lt 。 |
podSpec.schedulingConfig.podAffinity.requiredDuringSchedulingIgnoredDuringExecution.namespaceSelector.matchExpressions.values
| |
string 可选 | values 是字符串值的数组。如果运算符为“In”或“NotIn”,则值数组不得为空。如果运算符为 Exists 或 DoesNotExist,则值数组必须为空。此数组会在策略合并补丁期间替换。 |
podSpec.schedulingConfig.podAffinity.requiredDuringSchedulingIgnoredDuringExecution.namespaceSelector.matchLabels
| |
object 可选 | matchLabels 是 {key,value} 对的映射。matchLabels 映射中的单个 {key,value} 相当于 matchExpressions 的元素,其键字段为“key”,运算符为“In”,值数组仅包含“value”。这些要求之间是 AND 关系。 |
podSpec.schedulingConfig.podAffinity.requiredDuringSchedulingIgnoredDuringExecution.namespaceSelector.matchLabels
| |
object 可选 | matchLabels 是 {key,value} 对的映射。matchLabels 映射中的单个 {key,value} 相当于 matchExpressions 的元素,其键字段为“key”,运算符为“In”,值数组仅包含“value”。这些要求之间是 AND 关系。 |
podSpec.schedulingConfig.podAffinity.requiredDuringSchedulingIgnoredDuringExecution.namespaces
| |
string 可选 | namespaces 用于指定该术语适用的命名空间名称的静态列表。该术语适用于此字段中列出的命名空间与由 namespaceSelector 选择的命名空间的并集。null 或空命名空间列表和 null namespaceSelector 表示“此 Pod 的命名空间”。 |
podSpec.schedulingConfig.podAffinity.requiredDuringSchedulingIgnoredDuringExecution.topologyKey
| |
string 必填 | 此 Pod 必须与指定命名空间中与 labelSelector 匹配的 Pod 共存(亲和性)或不共存(反亲和性)。同处部署是指在键为 topologyKey 的标签的值与所选任何 Pod 正在运行的任何节点的值匹配的节点上运行。不允许使用空的 topologyKey。 |
podSpec.schedulingConfig.podAntiAffinity
| |
object 可选 | PodAntiAffinity 用于描述实例的 Pod 反亲和性调度规则。 |
podSpec.schedulingConfig.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution
| |
object 可选 | 调度程序更倾向于将 Pod 调度到满足此字段指定的反亲和性表达式的节点,但也可能会选择违反一个或多个表达式的节点。权重总和最大的节点是首选节点,换句话说,对于满足所有调度要求(资源请求、requiredDuringScheduling 反亲和性表达式等)的每个节点,如果该节点包含与相应 podAffinityTerm 匹配的 Pod,则通过迭代此字段的元素并将“weight”添加到总和中来计算总和。总和最高的节点是首选。 |
podSpec.schedulingConfig.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm
| |
object 必填 | 与相应权重关联的 pod 亲和性字词。 |
podSpec.schedulingConfig.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.labelSelector
| |
object 可选 | 对一组资源(在本例中为 Pod)的标签查询。 |
podSpec.schedulingConfig.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.labelSelector.matchExpressions
| |
object 可选 | matchExpressions 是标签选择器要求的列表。这些要求之间是 AND 关系。 |
podSpec.schedulingConfig.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.labelSelector.matchExpressions.key
| |
string 必填 | key 是选择器应用到的标签键。 |
podSpec.schedulingConfig.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.labelSelector.matchExpressions.operator
| |
string 必填 |
运算符表示键与一组值的关系。有效运算符包括 In 、NotIn 、Exists 和 DoesNotExist 。 |
podSpec.schedulingConfig.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.labelSelector.matchExpressions.values
| |
string 可选 | values 是字符串值的数组。如果运算符为“In”或“NotIn”,则值数组不得为空。如果运算符为 Exists 或 DoesNotExist,则值数组必须为空。此数组会在策略合并补丁期间替换。 |
podSpec.schedulingConfig.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.labelSelector.matchLabels
| |
object 可选 | matchLabels 是 {key,value} 对的映射。matchLabels 映射中的单个 {key,value} 相当于 matchExpressions 的元素,其键字段为“key”,运算符为“In”,值数组仅包含“value”。这些要求之间是 AND 关系。 |
podSpec.schedulingConfig.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.namespaceSelector
| |
object 可选 | 针对术语应用到的一组命名空间的标签查询。该术语适用于此字段选择的命名空间与命名空间字段中列出的命名空间的并集。null 选择器和 null 或空命名空间列表表示“此 Pod 的命名空间”。空选择器 ({}) 会匹配所有命名空间。 |
podSpec.schedulingConfig.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.namespaceSelector.matchExpressions
| |
object 可选 | matchExpressions 是标签选择器要求的列表。这些要求之间是 AND 关系。 |
podSpec.schedulingConfig.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.namespaceSelector.matchExpressions.key
| |
string 必填 | key 是选择器应用到的标签键。 |
podSpec.schedulingConfig.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.namespaceSelector.matchExpressions.operator
| |
string 必填 |
运算符表示键与一组值的关系。有效运算符包括 In 、NotIn 、Exists 和 DoesNotExist 。 |
podSpec.schedulingConfig.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.namespaceSelector.matchExpressions.values
| |
string 可选 | values 是字符串值的数组。如果运算符为“In”或“NotIn”,则值数组不得为空。如果运算符为 Exists 或 DoesNotExist,则值数组必须为空。此数组会在策略合并补丁期间替换。 |
podSpec.schedulingConfig.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.namespaceSelector.matchLabels
| |
object 可选 |
键值对的映射。每个键值对都充当一项要求。调度程序会将 Pod 与具有 matchLabels 中指定的所有标签的节点进行匹配。 |
podSpec.schedulingConfig.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.namespaces
| |
string 可选 | namespaces 用于指定该术语适用的命名空间名称的静态列表。该术语适用于此字段中列出的命名空间与由 namespaceSelector 选择的命名空间的并集。null 或空命名空间列表和 null namespaceSelector 表示“此 Pod 的命名空间”。 |
podSpec.schedulingConfig.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.topologyKey
| |
string 必填 | 此 Pod 必须与指定命名空间中与 labelSelector 匹配的 Pod 共存(亲和性)或不共存(反亲和性)。同处部署是指在键为 topologyKey 的标签的值与所选任何 Pod 正在运行的任何节点的值匹配的节点上运行。不允许使用空的 topologyKey。 |
podSpec.schedulingConfig.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution.weight
| |
integer 必填 | 与匹配相应 podAffinityTerm 相关联的权重,介于 1 到 100 之间。 |
podSpec.schedulingConfig.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution
| |
object 可选 | 如果在调度时未满足此字段指定的反亲和性要求,系统将不会将 pod 调度到该节点。如果在 Pod 执行期间的某个时间点不再满足此字段指定的反相似性要求(例如,由于 Pod 标签更新),系统可能会或可能不会最终尝试将 Pod 从其节点中驱逐。如果有多个元素,则系统会对每个 podAffinityTerm 对应的节点列表进行交集,这意味着必须满足所有术语。 |
podSpec.schedulingConfig.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution.labelSelector
| |
object 可选 | 对一组资源(在本例中为 Pod)的标签查询。 |
podSpec.schedulingConfig.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution.labelSelector.matchExpressions
| |
object 可选 | matchExpressions 是标签选择器要求的列表。这些要求之间是 AND 关系。 |
podSpec.schedulingConfig.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution.labelSelector.matchExpressions.key
| |
string 必填 | key 是选择器应用到的标签键。 |
podSpec.schedulingConfig.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution.labelSelector.matchExpressions.operator
| |
string 必填 |
运算符表示键与一组值的关系。有效运算符包括 In 、NotIn 、Exists 和 DoesNotExist 。 |
podSpec.schedulingConfig.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution.labelSelector.matchExpressions.values
| |
string 可选 | values 是字符串值的数组。如果运算符为“In”或“NotIn”,则值数组不得为空。如果运算符为 Exists 或 DoesNotExist,则值数组必须为空。此数组会在策略合并补丁期间替换。 |
podSpec.schedulingConfig.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution.labelSelector.matchLabels
| |
object 可选 | matchLabels 是 {key,value} 对的映射。matchLabels 映射中的单个 {key,value} 相当于 matchExpressions 的元素,其键字段为“key”,运算符为“In”,值数组仅包含“value”。这些要求之间是 AND 关系。 |
podSpec.schedulingConfig.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution.namespaceSelector
| |
object 可选 | 针对术语应用到的一组命名空间的标签查询。该术语适用于此字段选择的命名空间与命名空间字段中列出的命名空间的并集。null 选择器和 null 或空命名空间列表表示“此 Pod 的命名空间”。空选择器 ({}) 会匹配所有命名空间。 |
podSpec.schedulingConfig.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution.namespaceSelector.matchExpressions
| |
object 可选 | matchExpressions 是标签选择器要求的列表。这些要求之间是 AND 关系。 |
podSpec.schedulingConfig.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution.namespaceSelector.matchExpressions.key
| |
string 必填 | key 是选择器应用到的标签键。 |
podSpec.schedulingConfig.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution.namespaceSelector.matchExpressions.operator
| |
string 必填 |
运算符表示键与一组值的关系。有效运算符包括 In 、NotIn 、Exists 和 DoesNotExist 。 |
podSpec.schedulingConfig.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution.namespaceSelector.matchExpressions.values
| |
string 可选 | values 是字符串值的数组。如果运算符为“In”或“NotIn”,则值数组不得为空。如果运算符为 Exists 或 DoesNotExist,则值数组必须为空。此数组会在策略合并补丁期间替换。 |
podSpec.schedulingConfig.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution.namespaceSelector.matchLabels
| |
object 可选 | matchLabels 是 {key,value} 对的映射。matchLabels 映射中的单个 {key,value} 相当于 matchExpressions 的元素,其键字段为“key”,运算符为“In”,值数组仅包含“value”。这些要求之间是 AND 关系。 |
podSpec.schedulingConfig.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution.namespaces
| |
string 可选 | namespaces 用于指定该术语适用的命名空间名称的静态列表。该术语适用于此字段中列出的命名空间与由 namespaceSelector 选择的命名空间的并集。null 或空命名空间列表和 null namespaceSelector 表示“此 Pod 的命名空间”。 |
podSpec.schedulingConfig.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution.topologyKey
| |
string 必填 | 此 Pod 必须与指定命名空间中与 labelSelector 匹配的 Pod 共存(亲和性)或不共存(反亲和性)。同处部署是指在键为 topologyKey 的标签的值与所选任何 Pod 正在运行的任何节点的值匹配的节点上运行。不允许使用空的 topologyKey。 |
podSpec.schedulingConfig.tolerations
| |
object 可选 | 通过容忍度,您可以管理是否允许在已应用特定污染的 Kubernetes 节点上调度实例。 |
podSpec.schedulingConfig.tolerations.effect
| |
string 可选 | effect 表示要匹配的污点效果。空表示匹配所有污点影响。指定此值时,允许的值为 NoSchedule、PreferNoSchedule 和 NoExecute。 |
podSpec.schedulingConfig.tolerations.key
| |
string 可选 | Key 是容忍度适用的污点键。空表示匹配所有污染键。如果键为空,则运算符必须为 Exists。此组合表示匹配所有值和所有键。 |
podSpec.schedulingConfig.tolerations.operator
| |
string 可选 |
运算符表示键与值的关系。有效运算符包括 Exists 和 Equal 。默认值为 Equal 。Exists 相当于值的通配符,因此 Pod 可以容忍特定类别的所有污染。 |
podSpec.schedulingConfig.tolerations.tolerationSeconds
| |
integer 可选 | TolerationSeconds 表示容忍设置(必须为 NoExecute 效果,否则系统会忽略此字段)容忍污染的时间段。默认情况下,此字段未设置,这意味着永久容忍污点(不驱逐)。系统会将零值和负值视为 0(立即驱逐)。 |
podSpec.schedulingConfig.tolerations.value
| |
string 可选 | 值是容忍度匹配的污点值。如果运算符为“Exists”,则值必须为空;否则,它必须是常规字符串。 |
replicaCount
| |
integer 可选 | ReplicaCount 用于定义要部署的 PgBouncer 副本数量。 |
serverTLS
| |
object 可选 | ServerTLSSpec 用于定义用于加密通信的证书密钥,PgBouncer 会使用该密钥连接到数据库集群以进行身份验证查询。 |
serverTLS.certSecret
| |
object 可选 | CertSecret 引用同一命名空间中的证书 Secret。Secret 必须包含条目 ca.crt(CA 证书)、tls.key(私钥)和 tls.crt(叶证书)。此 Secret 中的值用于填充 pgbouncer.ini 中的 server_tls_ca_file、server_tls_cert_file 和 server_tls_key_file。CA 证书必须与签署数据库集群叶证书的 CA 一致。叶证书必须包含 CommonName“alloydbpgbouncer”。 |
serverTLS.certSecret.name
| |
string 可选 | 'Name of the referent. 更多信息: 使用对象#名称。 |
serviceOptions
| |
object 必填 | ServiceOptions 定义了用于访问 PgBouncer pod 的连接选项。 |
serviceOptions.annotations
| |
object 可选 | 客户提供的注解将添加到类型为 loadbalancer 的服务对象中。 |
serviceOptions.gcp
| |
object 可选 | GCP 包含 Kubernetes LoadBalancer 的 Google Cloud 专用属性。 |
serviceOptions.gcp.loadBalancerIP
| |
integer or string 可选 | LoadBalancerIP 是静态 IP 地址,请参阅预留静态外部 IP 地址。 |
serviceOptions.gcp.loadBalancerType
| |
string 可选 | 负载平衡器可以是内部的,也可以是外部的。请参阅内部负载平衡器。 |
serviceOptions.type
| |
string 必填 |
用于访问 PgBouncer pod 的 Kubernetes 服务类型。它可以具有以下值:LoadBalancer 或 ClusterIP 。 |
状态架构
PgBouncerStatus 定义观察到的 PgBouncer 状态。
ipAddress: string
phase: string
字段 类型必填或可选 |
说明 |
---|---|
ipAddress
| |
string 必填 | ipAddress 是可连接以访问数据库的 PgBouncer 端点。 |
phase
| |
string 必填 | phase 用于描述 PgBouncer 部署的状态。此处会显示 WaitingForDeploymentReady、Acquiring IP、Ready 等值。 |