Switchover Custom Resource Definition

Spec schema

SwitchoverSpec defines the selected state of Switchover.

dbclusterRef: string
newPrimary: string
Field
Type
Required or optional

 

Description
dbclusterRef
string
Required
The dbclusterRef is the name of the DBCluster that initiates a switchover. Create the Switchover object in the same namespace as its referenced DBCluster.
newPrimary
string
Optional
newPrimary is the standby instance that becomes the new primary.

Status schema

SwitchoverStatus defines the observed state of Switchover.

conditions:
- lastTransitionTime: string
  message: string
  observedGeneration: integer
  reason: string
  status: string
  type: string
createTime: string
criticalIncidents:
- code: string
  createTime: string
  message: string
  messageTemplateParams:
  resource:
    component: string
    location:
      cluster: string
      group: string
      kind: string
      name: string
      namespace: string
      version: string
  stackTrace:
  - component: string
    message: string
  transientUntil: string
endTime: string
observedGeneration: integer
reconciled: boolean
startTime: string
state: string

Field

Type
Required or optional

 

Description
conditions
list (object)
Optional
Shows the latest available observations of the Switchover's current state.
conditions[]
object
Optional
Condition describes one aspect of the current state of this API Resource.
conditions[].lastTransitionTime
string
Required
Indicates when the condition transitioned from one status to another. If this time is unknown, use the time the API field changed.
conditions[].message
string
Required
A human-readable string that describes details about the transition. This string can be empty.
conditions[].observedGeneration
integer
Optional
Represents the .metadata.generation that the condition uses. For example, if .metadata.generation is 12, but the .status.conditions[x].observedGeneration is 9, the condition is outdated compared to the instance's current state.
conditions[].reason
string
Required
Contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types can define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value must be a CamelCase string and cannot be empty.
conditions[].status
string
Required
Status of the condition. The valid values are True, False, and Unknown.
conditions[].type
string
Required
Type of condition in CamelCase or in foo.example.com/CamelCase.
createTime
string
Optional
Time when the internal switchover workflow creates the resource.
criticalIncidents
list (object)
Optional
List of all active critical incidents.
criticalIncidents[]
object
Optional
Describes an ongoing critical incident.
criticalIncidents[].code
string
Required
Error code of the error. Error codes are DBSE+numeric strings; for example, DBSE1012.
criticalIncidents[].createTime
string
Required
Timestamp when the incident's origin created it.
criticalIncidents[].message
string
Optional
Describes the incident or error that occurred.
criticalIncidents[].messageTemplateParams
object
Optional
Includes key-value pairs to generate a user-friendly, data-driven message in the UI.
criticalIncidents[].resource
object
Required
Describes the Database Service component that reported the incident as well as contains information about Cluster Manager.
criticalIncidents[].resource.component
string
Required
The component is an internal identifier of the Database Service subsystem that reported the incident.
criticalIncidents[].resource.location
object
Optional
The location of the resource.
criticalIncidents[].resource.location.cluster
string
Optional
Name of the cluster of the affected Cluster Manager resource.
criticalIncidents[].resource.location.group
string
Optional
Group name of the Cluster Manager resource.
criticalIncidents[].resource.location.kind
string
Optional
Type of the Cluster Manager resource.
criticalIncidents[].resource.location.name
string
Optional
Name of the affected Cluster Manager resource.
criticalIncidents[].resource.location.namespace
string
Optional
Namespace of the affected Cluster Manager resource.
criticalIncidents[].resource.location.version
TYPE
Optional
Version of the Cluster Manager resource.
criticalIncidents[].stackTrace
list (object)
Optional
Includes an unstructured list of messages from the stack trace.
criticalIncidents[].stackTrace[]
object
Optional
Describes stack trace information for the incident.
criticalIncidents[].stackTrace[].component
string
Optional
The component is the name of a Database Service component that logged the message.
criticalIncidents[].stackTrace[].message
string
Optional
The logged message.
criticalIncidents[].stackTrace[].transientUntil
string
Optional
The timestamp until which the system considers the incident to be transient.
endTime
string
Optional
Time when the switchover reached its final state.
observedGeneration
integer
Optional
The generation the controller observes.
reconciled
boolean
Optional
Whether the controller reconciled the resource.
startTime
string
Optional
The time when the switchover operation started.
state
string
Optional
Describes the switchover operation's current status. Valid values are InProgress, Success, Failed_RollbackInProgress, Failed_RollbackSuccess, and Failed_RollbackFailed. InProgress indicates the switchover is still active. Success indicates the switchover completed. Failed_RollbackInProgress indicates the operator cannot promote the new primary instance and attempts to restart the old primary instance. Failed_RollbackSuccess indicates the operator cannot promote the new primary instance and successfully restarts the old primary instance. Failed_RollbackFailed indicates the operator cannot promote the new primary instance and cannot restart the old primary instance. Manual repair of the DBCluster might be necessary.