PgBouncer v1.4.0 自訂資源定義

選取說明文件版本:

規格結構定義

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
  loadBalancerSourceRanges: array
    items: string
  type: object

欄位

類型
必要或選填

 

說明
accessMode
string
選填
定義 PgBouncer 連線的 read-writeread-only 存取模式。預設值為 read-only
allowSuperUserAccess
boolean
選填
AllowSuperUserAccess 可以設為 true 或 false
dbclusterRef
string
必填
DBClusterRef 是 PgBouncer 用來集區連線的 DBCluster 名稱。 您必須在與所參照 DBCluster 相同的命名空間中建立 PgBouncer 物件。這是 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
必填
代表鍵與一組值的關係。有效運算子為 InNotInExistsDoesNotExistGtLt
podSpec.schedulingConfig.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution.preference.matchExpressions.values
string
選填
字串值陣列。如果運算子為 InNotIn,值陣列不得為空。如果運算子是 ExistsDoesNotExist,值陣列必須為空。如果運算子為 GtLt,值陣列必須只有一個元素,且會解譯為整數。這個陣列會在策略性合併修補程式期間遭到取代。
podSpec.schedulingConfig.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution.preference.matchFields
object
選填
依節點欄位列出的節點選取器需求清單。
podSpec.schedulingConfig.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution.preference.matchFields.key
string
必填
選取器套用的標籤鍵。
podSpec.schedulingConfig.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution.preference.matchFields.operator
string
必填
代表鍵與一組值的關係。有效運算子為 InNotInExistsDoesNotExistGtLt
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
必填
代表鍵與一組值的關係。有效運算子為 InNotInExistsDoesNotExistGtLt
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
必填
代表鍵與一組值的關係。有效運算子為 InNotInExistsDoesNotExistGtLt
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
必填
運算子代表鍵與一組值的關係。有效運算子為 InNotInExistsDoesNotExist
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
選填
針對字詞適用的命名空間集進行標籤查詢。這個詞彙適用於此欄位選取的命名空間,以及命名空間欄位中列出的命名空間的聯集。空值選取器和空值或空白命名空間清單表示「這個 Pod 的命名空間」。空白選取器 ({}) 會比對所有命名空間。
podSpec.schedulingConfig.podAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.namespaceSelector.matchExpressions
object
選填
matchExpressions 是標籤選取器需求的清單。這些條件會以 AND 運算子連結。
podSpec.schedulingConfig.podAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.namespaceSelector.matchExpressions.key
string
必填
鍵是選取器套用的標籤鍵。
podSpec.schedulingConfig.podAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.namespaceSelector.matchExpressions.operator
string
必填
運算子代表鍵與一組值的關係。有效運算子為 InNotInExistsDoesNotExist
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 選取的命名空間。如果命名空間清單為空或為空值,且 namespaceSelector 為空值,則表示「這個 Pod 的命名空間」。
podSpec.schedulingConfig.podAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.topologyKey
string
必填
這個 Pod 必須與指定命名空間中符合 labelSelector 的 Pod 位於同一位置 (親和性) 或不同位置 (反親和性)。共置是指在節點上執行,而節點的標籤值 (含拓撲鍵) 與任何所選 Pod 執行的節點相符。拓撲鍵不得為空。
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
必填
鍵是選取器套用的標籤鍵。
podSpec.schedulingConfig.podAffinity.requiredDuringSchedulingIgnoredDuringExecution.labelSelector.matchExpressions.operator
string
必填
運算子代表鍵與一組值的關係。有效運算子為 InNotInExistsDoesNotExist
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
選填
針對字詞適用的命名空間集進行標籤查詢。這個詞彙適用於此欄位選取的命名空間,以及命名空間欄位中列出的命名空間的聯集。空值選取器和空值或空白命名空間清單表示「這個 Pod 的命名空間」。空白選取器 ({}) 會比對所有命名空間。
podSpec.schedulingConfig.podAffinity.requiredDuringSchedulingIgnoredDuringExecution.namespaceSelector.matchExpressions
object
選填
matchExpressions 是標籤選取器需求的清單。這些條件會以 AND 運算子連結。
podSpec.schedulingConfig.podAffinity.requiredDuringSchedulingIgnoredDuringExecution.namespaceSelector.matchExpressions.key
string
必填
鍵是選取器套用的標籤鍵。
podSpec.schedulingConfig.podAffinity.requiredDuringSchedulingIgnoredDuringExecution.namespaceSelector.matchExpressions.operator
string
必填
運算子代表鍵與一組值的關係。有效運算子為 InNotInExistsDoesNotExistGtLt
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 選取的命名空間。如果命名空間清單為空或為空值,且 namespaceSelector 為空值,則表示「這個 Pod 的命名空間」。
podSpec.schedulingConfig.podAffinity.requiredDuringSchedulingIgnoredDuringExecution.topologyKey
string
必填
這個 Pod 必須與指定命名空間中符合 labelSelector 的 Pod 位於同一位置 (親和性) 或不同位置 (反親和性)。共置是指在節點上執行,而節點的標籤值 (含拓撲鍵) 與任何所選 Pod 執行的節點相符。拓撲鍵不得為空。
podSpec.schedulingConfig.podAntiAffinity
object
選填
PodAntiAffinity 會說明執行個體的 Pod 反相依性排程規則。
podSpec.schedulingConfig.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution
object
選填
排程器會優先將 Pod 排程至符合這個欄位指定反親和性運算式的節點,但排程器可能會選擇違反一或多個運算式的節點。權重總和最大的節點是首選節點。換句話說,對於符合所有排程需求 (資源要求、requiredDuringScheduling 反親和性運算式等) 的每個節點,請逐一疊代這個欄位的元素,並將「權重」加到總和中 (如果節點有符合對應 podAffinityTerm 的 Pod)。總和最高的節點為首選。
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
必填
鍵是選取器套用的標籤鍵。
podSpec.schedulingConfig.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.labelSelector.matchExpressions.operator
string
必填
運算子代表鍵與一組值的關係。有效運算子為 InNotInExistsDoesNotExist
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
選填
針對字詞適用的命名空間集進行標籤查詢。這個詞彙適用於此欄位選取的命名空間,以及命名空間欄位中列出的命名空間的聯集。空值選取器和空值或空白命名空間清單表示「這個 Pod 的命名空間」。空白選取器 ({}) 會比對所有命名空間。
podSpec.schedulingConfig.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.namespaceSelector.matchExpressions
object
選填
matchExpressions 是標籤選取器需求的清單。這些條件會以 AND 運算子連結。
podSpec.schedulingConfig.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.namespaceSelector.matchExpressions.key
string
必填
鍵是選取器套用的標籤鍵。
podSpec.schedulingConfig.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.namespaceSelector.matchExpressions.operator
string
必填
運算子代表鍵與一組值的關係。有效運算子為 InNotInExistsDoesNotExist
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 選取的命名空間。如果命名空間清單為空或為空值,且 namespaceSelector 為空值,則表示「這個 Pod 的命名空間」。
podSpec.schedulingConfig.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.topologyKey
string
必填
這個 Pod 必須與指定命名空間中符合 labelSelector 的 Pod 位於同一位置 (親和性) 或不同位置 (反親和性)。共置是指在節點上執行,而節點的標籤值 (含拓撲鍵) 與任何所選 Pod 執行的節點相符。拓撲鍵不得為空。
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
必填
鍵是選取器套用的標籤鍵。
podSpec.schedulingConfig.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution.labelSelector.matchExpressions.operator
string
必填
運算子代表鍵與一組值的關係。有效運算子為 InNotInExistsDoesNotExist
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
選填
針對字詞適用的命名空間集進行標籤查詢。這個詞彙適用於此欄位選取的命名空間,以及命名空間欄位中列出的命名空間的聯集。空值選取器和空值或空白命名空間清單表示「這個 Pod 的命名空間」。空白選取器 ({}) 會比對所有命名空間。
podSpec.schedulingConfig.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution.namespaceSelector.matchExpressions
object
選填
matchExpressions 是標籤選取器需求的清單。這些條件會以 AND 運算子連結。
podSpec.schedulingConfig.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution.namespaceSelector.matchExpressions.key
string
必填
鍵是選取器套用的標籤鍵。
podSpec.schedulingConfig.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution.namespaceSelector.matchExpressions.operator
string
必填
運算子代表鍵與一組值的關係。有效運算子為 InNotInExistsDoesNotExist
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 選取的命名空間。如果命名空間清單為空或為空值,且 namespaceSelector 為空值,則表示「這個 Pod 的命名空間」。
podSpec.schedulingConfig.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution.topologyKey
string
必填
這個 Pod 必須與指定命名空間中符合 labelSelector 的 Pod 位於同一位置 (親和性) 或不同位置 (反親和性)。共置是指在節點上執行,而節點的標籤值 (含拓撲鍵) 與任何所選 Pod 執行的節點相符。拓撲鍵不得為空。
podSpec.schedulingConfig.tolerations
object
選填
容許度可讓您管理是否允許在套用特定汙染的 Kubernetes 節點上排定執行個體。
podSpec.schedulingConfig.tolerations.effect
string
選填
效果表示要比對的汙染效果。如果為空白,則表示符合所有汙染效果。如有指定,允許的值為 NoSchedule、PreferNoSchedule 和 NoExecute。
podSpec.schedulingConfig.tolerations.key
string
選填
Key 是容許事項適用的污點鍵。如果為空白,則表示比對所有汙染鍵。如果金鑰為空白,運算子必須為 Exists。這個組合表示要比對所有值和所有鍵。
podSpec.schedulingConfig.tolerations.operator
string
選填
運算子代表鍵與值之間的關係。有效運算子為 ExistsEqual。預設值為 EqualExists 等於值的萬用字元,因此 Pod 可以容忍特定類別的所有汙染。
podSpec.schedulingConfig.tolerations.tolerationSeconds
integer
選填
TolerationSeconds 代表容許條件容許汙染的時間長度 (必須是 NoExecute 效果,否則系統會忽略這個欄位)。根據預設,這個欄位不會設定,這表示永遠容許 taint (不會移除)。系統會將零和負值視為 0 (立即移除)。
podSpec.schedulingConfig.tolerations.value
string
選填
值是容許值比對的汙染值。如果運算子為「存在」,值必須為空白;否則必須是一般字串。
replicaCount
integer
選填
ReplicaCount 會定義要部署的 PgBouncer 副本數量。
serverTLS
object
選填
ServerTLSSpec 會定義憑證密鑰,供 PgBouncer 用於加密通訊,以便連線至資料庫叢集進行驗證查詢。
serverTLS.certSecret
object
選填
CertSecret 會參照相同命名空間中的憑證密鑰。密碼必須包含 ca.crt (CA 憑證)、tls.key (私密金鑰) 和 tls.crt (葉憑證) 項目。這個密鑰中的值會用於填入 pgbouncer.ini 中的 server_tls_ca_file、server_tls_cert_file 和 server_tls_key_file。CA 憑證必須與簽署資料庫叢集葉子憑證的 CA 相符。葉子憑證必須包含 CommonName「alloydbpgbouncer」。
serverTLS.certSecret.name
string
選填
「參照對象的名稱。詳情請參閱「 使用物件#名稱」。
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
選填
LoadBalancer 可以是內部或外部。請參閱「內部負載平衡器」。
serviceOptions.loadBalancerSourceRanges
array
選填
允許用戶端使用的來源 IP 位址 CIDR 範圍。這個參數僅適用於 LoadBalancer
serviceOptions.loadBalancerSourceRanges.items
string
選填
每個來源 IP 位址的 CIDR 範圍。
serviceOptions.type
string
必填
存取 PgBouncer Pod 的 Kubernetes 服務類型。其值可以是 LoadBalancerClusterIP

狀態結構定義

PgBouncerStatus 會定義觀察到的 PgBouncer 狀態。

ipAddress: string
phase: string

欄位

類型
必要或選填

 

說明
ipAddress
string
必填
ipAddress 是可連線存取資料庫的 PgBouncer 端點。
phase
string
必填
階段會說明 PgBouncer Deployment 的狀態。這裡會顯示 WaitingForDeploymentReady、Acquiring IP、Ready 等值。