規格結構定義
ReplicationSpec 會定義 Replication 的所需狀態。
dbcluster:
name: string
downstream:
control: string
host: string
password:
name: string
namespace: string
port: integer
replicationSlotName: string
username: string
upstream:
applicationName: string
logicalReplication:
databaseName: string
pluginName: string
password:
name: string
namespace: string
replicationSlotName: string
synchronous: string
username: string
欄位 類型必要或選填 |
說明 |
---|---|
dbcluster
| |
object 選填 | DBCluster 是這個 Replication 所屬的 DBCluster。 |
dbcluster.name
| |
string 選填 | 參照對象的名稱。詳情請參閱「名稱」。 |
downstream
| |
object 選填 | Downstream 包含下游資料庫的複寫規格。 |
downstream.control
| |
string 必填 | 控制項會指定要對這個資料庫執行的複製作業。 允許的值為 setup、promote 和 rewind。 |
downstream.host
| |
string 必填 | 主機是上游資料庫的連線端點,這個資料庫可存取該端點以進行複製。 |
downstream.password
| |
object 必填 | 密碼是指儲存上游資料庫複製使用者密碼的密碼。 |
downstream.password.name
| |
string 選填 | 名稱在命名空間中不得重複,用於參照密鑰資源。 |
downstream.password.namespace
| |
string 選填 | 命名空間會定義密鑰名稱不得重複的空間。 |
downstream.port
| |
integer 選填 | 這個資料庫可存取上游資料庫的通訊埠,以進行複製。預設值為 5432。 |
downstream.replicationslotname
| |
string 必填 | ReplicationSlotName 是在上游資料庫中建立的複製運算單元名稱。這個資料庫會使用這項資訊進行複製。 |
downstream.username
| |
string 必填 | 使用者名稱是在上游資料庫中建立的複製使用者名稱。這個資料庫會使用此帳戶連線至上游,進行複製作業。 |
upstream
| |
object 選填 | 上游包含複製上游資料庫的規格。 |
upstream.applicationName
| |
string 選填 | applicationName 是同步複製連線的 ID。如果「Synchronous」設為「true」,則必須提供這個值。 |
upstream.logicalReplication
| |
object 選填 | LogicalReplication 會指定複製運算單元的邏輯複製設定。如果為空白,複製運算單元會設為實體複製運算單元。 |
upstream.logicalReplication.databaseName
| |
string 選填 | DatabaseName 是與這個時段相關聯的資料庫。只有這個資料庫的變更會透過這個 slot 串流。 |
upstream.logicalReplication.pluginName
| |
string 選填 | PluginName 是與這個時段相關聯的解碼外掛程式。詳情請參閱「邏輯解碼說明」。 |
upstream.password
| |
object 必填 | 密碼是指儲存複寫使用者密碼的密碼。 如果未提供密碼,系統會產生密碼並儲存在狀態中顯示的密碼中。 |
upstream.password.name
| |
string 選填 | 名稱在命名空間中不得重複,用於參照密鑰資源。 |
upstream.password.namespace
| |
string 選填 | 命名空間會定義密鑰名稱不得重複的空間。 |
upstream.replicationslotname
| |
string 選填 | ReplicationSlotName 是要用於複製作業的複製運算單元名稱。如未提供,系統會產生複製運算單元名稱,並顯示在狀態中。 |
upstream.synchronous
| |
string 選填 |
Synchronous 會指定是否必須為同步複製設定複製運算單元。如果為 true,applicationName 會新增至同步待命清單。預設值為 false 。注意:這可能會對效能造成負面影響。 |
upstream.username
| |
string 選填 | 使用者名稱是複製作業要使用的複製使用者名稱。 如未提供,系統會產生使用者名稱並顯示在狀態中。 |
狀態結構定義
ReplicationStatus 定義了 Replication 的觀察狀態。
conditions:
- lastTransitionTime: string
message: string
observedGeneration: integer
reason: string
status: string
type: string
criticalIncidents:
- code: string
createTime: string
message: string
messageTemplateParams: object
resource:
component: string
location:
cluster: string
group: string
kind: string
name: string
namespace: string
version: string
stackTrace:
- component: string
message: string
transientUntil: string
downstream:
physicalDownstream:
setupStrategies:
endedAt: string
message: string
retries: integer
startedAt: string
state: string
strategy: string
state: string
observedGeneration: integer
reconciled: boolean
upstream:
host: string
password:
name: string
namespace: string
port: integer
replicationSlotName: string
username: string
欄位 類型必要或選填 |
說明 |
---|---|
conditions[]
| |
object 選填 | 條件代表實體目前狀態的最新可用觀察結果。 |
conditions[].lastTransitionTime
| |
string 必填 | lastTransitionTime 是指條件上次從一種狀態轉換為另一種狀態的時間,也就是底層條件變更時。如果不知道基礎條件的變更時間,請使用 API 欄位的變更時間。 |
conditions[].message
| |
string 必填 | message 是使用者可理解的訊息,指出轉換的詳細資料。這個值可以是空字串。 |
conditions[].observedGeneration
| |
integer 選填 | observedGeneration 代表條件設定依據的 .metadata.generation。舉例來說,如果 .metadata.generation 為 12,但 .status.conditions[x].observedGeneration 為 9,則相較於執行個體的目前狀態,該條件已過時。 |
conditions[].reason
| |
string 必填 | reason 包含程式化 ID,指出條件上次轉換的原因。特定條件類型的產生者可以定義這個欄位的預期值和意義,以及這些值是否視為有保障的 API。值必須是 CamelCase 字串。 這個欄位可能不是空白。 |
conditions[].status
| |
string 必填 | 條件的狀態,可以是 True、False 或 Unknown。 |
conditions[].type
| |
string 必填 | 條件類型,格式為 CamelCase 或 foo.example.com/CamelCase。許多 .condition.type 值在資源之間保持一致,例如 Available。由於任意條件可能很有用 (請參閱 .node.status.conditions),因此解決衝突的能力非常重要。相符的規則運算式為 (dns1123SubdomainFmt/)?(qualifiedNameFmt)。 |
criticalIncidents[]
| |
object 必填 | CriticalIncidents 是所有有效重大事件的平面清單。 |
criticalIncidents[].code
| |
string 必填 |
「代碼」是這項特定錯誤的錯誤代碼。錯誤代碼是 DBSE+numeric 字串,例如 DBSE1012 。 |
criticalIncidents[].createTime
| |
string 必填 | CreateTime 是指在來源建立這個事件的時間戳記。 |
criticalIncidents[].message
| |
string 選填 | 訊息會說明發生的事件或錯誤。 |
criticalIncidents[].messageTemplateParams
| |
object 選填 | MessageTemplateParams 包含產生訊息資料導向版本的必要鍵/值組合,方便使用者在使用者介面中查看。 |
criticalIncidents[].resource
| |
object 必填 | 資源包含回報事件的資料庫服務元件相關資訊,以及 Kubernetes 資源的相關資訊。 |
criticalIncidents[].resource.component
| |
string 必填 | Component 是回報事件的資料庫服務子系統內部 ID。 |
criticalIncidents[].resource.location
| |
object 選填 | 地點。 |
criticalIncidents[].resource.location.cluster
| |
string 選填 | 受影響 Kubernetes 資源的叢集名稱。 |
criticalIncidents[].resource.location.group
| |
string 選填 | Kubernetes 資源的群組名稱。 |
criticalIncidents[].resource.location.kind
| |
string 選填 | Kubernetes 資源的種類。 |
criticalIncidents[].resource.location.name
| |
string 選填 | 受影響的 Kubernetes 資源名稱。 |
criticalIncidents[].resource.location.namespace
| |
string 選填 | 受影響 Kubernetes 資源的命名空間。 |
criticalIncidents[].resource.location.version
| |
string 選填 | Kubernetes 資源的版本。 |
criticalIncidents[].stackTrace[]
| |
object 選填 | 堆疊追蹤記錄中的非結構化訊息清單。 |
criticalIncidents[].stackTrace[].component
| |
string 選填 | 記錄訊息的資料庫服務元件名稱。 |
criticalIncidents[].stackTrace.message
| |
string 選填 | 記錄的訊息。 |
criticalIncidents[].transientUntil
| |
string 選填 | 如有 TransientUntil,表示問題必須視為暫時性問題,直到指定時間為止。 |
downstream
| |
object 選填 | 下游包含複製下游資料庫的觀察狀態。 |
downstream.physicalDownstream
| |
object 選填 | |
downstream.physicalDownstream.setupStrategies
| |
object 選填 | SetupStrategies 包含每次嘗試執行設定策略的相關資訊。這個清單會按照規格中定義策略的順序顯示策略。 |
downstream.physicalDownstream.setupStrategies.endedAt
| |
string 選填 | EndedAt 是指這項策略最近一次嘗試的結束時間。 |
downstream.physicalDownstream.setupStrategies.message
| |
string 選填 | 「Message」說明設定嘗試為何處於目前狀態。 |
downstream.physicalDownstream.setupStrategies.retries
| |
integer 選填 | 「重試」是指這項策略的重試次數。 |
downstream.physicalDownstream.setupStrategies.startedAt
| |
string 選填 | StartedAt 是指最近一次嘗試執行這項策略的時間。 |
downstream.physicalDownstream.setupStrategies.state
| |
string 必填 |
狀態是指這項設定策略目前的狀態,可接受的值如下:InProgress :策略目前正在執行。Success :策略已順利完成,系統不會再嘗試設定策略。Error :策略失敗,但系統會重試。「重試」欄位會顯示這項策略的重試次數。Fallback :策略失敗,不會重新嘗試。如果沒有,系統會改用下一個可用的策略。Unknown |
downstream.physicalDownstream.setupStrategies.strategy
| |
string 必填 | 「策略」是這個狀態所屬的策略類型名稱。 |
downstream.physicalDownstream.state
| |
object 選填 | 狀態是複製狀態,如下游資料庫伺服器的 pg_stat_wal_receiver 表格所示。 |
observedgeneration
| |
integer 選填 | 內部:控制器觀察到的世代。 |
reconciled
| |
boolean 選填 | 內部:資源是否已由控制器調解。 |
upstream
| |
object 選填 | 上游包含複製上游資料庫的觀察狀態。 |
upstream.host
| |
string 選填 | 主機是這個資料庫的連線端點,下游資料庫可存取這個端點以進行複製作業。 |
upstream.password
| |
object 選填 | Password 是指儲存這個資料庫的複寫使用者密碼的密碼。 |
upstream.password.name
| |
string 選填 | 名稱在命名空間中不得重複,用於參照密鑰資源。 |
upstream.password.namespace
| |
string 選填 | 命名空間會定義密鑰名稱不得重複的空間。 |
upstream.port
| |
integer 選填 | 這個資料庫的通訊埠,下游資料庫可存取此通訊埠以進行複製。 |
upstream.replicationslotname
| |
string 選填 | ReplicationSlotName 是在這個資料庫中建立的複製運算單元名稱。下游資料庫可使用這個複製運算單元進行複製。 |
upstream.username
| |
string 選填 | 使用者名稱是這個資料庫的複製使用者名稱。下游資料庫可以使用這個使用者連線至這個資料庫,進行複製作業。 |