Switchover v1.1.1 custom resource definition

Spec schema

SwitchoverSpec defines the selected state of Switchover.

dbclusterRef: string
newPrimary: string
newPrimaryInstance: string
primaryHost: string

Field

Type
Required or optional

 

Description
dbclusterRef
string
Optional
DBClusterRef is the DBCluster name to initiate a switchover. The Switchover object must be created in the same namespace as the DBCluster that it references. This field is required for Switchover.
newPrimary
string
Optional
NewPrimary is the standby instance to switch with the current primary.
newPrimaryInstance
string
Optional
NewPrimaryInstance is the standby instance to switch with the current primary. Deprecated: Please use NewPrimary field instead.
primaryHost
string
Optional
PrimaryHost is the IP always point to the primary instance.

Status schema

SwitchoverStatus defines the observed state of Switchover.

conditions:
- lastTransitionTime: string
  message: string
  observedGeneration: integer
  reason: string
  status: string
  type: string
createTime: string
critcalIncidents:
- 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
internal:
  newPrimary: string
  oldPrimary: string
  phase: string
observedGeneration: integer
reconciled: boolean
startTime: string
state: string

Field

Type
Required or optional

 

Description
conditions
list (object)
Optional
Conditions represents the latest available observations of the entity's current state.
conditions[]
object
Optional
Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, \n type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }
conditions[].lastTransactionTime
string
Required
lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
conditions[].message
string
Required
message is a human readable message indicating details about the transition. This may be an empty string.
conditions[].observedGeneration
integer
Optional
observedGeneration represents the .metadata.generation that the condition was set based upon. For example, if .metadata.generation is 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
conditions[].reason
string
Required
reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
conditions[].status
string
Required

Valid values: "True", "False", Unknown

status of the condition, one of True, False, Unknown.
conditions[].type
string
Required
type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regular expression it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
createTime
string
Optional
CreateTime is the time that the internal switchover workflow mechanism was created.
criticalIncidents
list (object)
Optional
CriticalIncidents is a flat list of all active Critical Incidents.
criticalIncidents[]
object
Optional
CriticalIncident contains all information about an ongoing critical incident.
criticalIncidents[].code
string
Required
Code is the error code of this particular error. Error codes are DBSE+numeric strings, like "DBSE1012".
criticalIncidents[].createTime
string
Required
CreateTime is the timestamp when this Incident was created at the origin.
criticalIncidents[].message
string
Optional
Message describes the incident/error that occurred.
criticalIncidents[].messageTemplateParams
object
Optional
MessageTemplateParams contains key-value pairs necessary for generating a user-friendly data-driven version of Message in the UI.
criticalIncidents[].resource
object
Required
Resource contains information about the Database Service component that reported the incident as well as about the Kubernetes resource.
criticalIncidents[].resource.component
string
Required
Component is an internal identifier of the Database Service subsystem that reported the incident.
criticalIncidents[].resource.location
object
Optional
Location
criticalIncidents[].resource.location.cluster
string
Optional
Cluster is the name of the cluster of the affected Kubernetes resource.
criticalIncidents[].resource.location.group
string
Optional
Group is the Group name of the Kubernetes resource.
criticalIncidents[].resource.location.kind
string
Optional
Kind is the Kind of the Kubernetes resource.
criticalIncidents[].resource.location.name
string
Optional
Name is the name of the affected Kubernetes resource.
criticalIncidents[].resource.location.namespace
string
Optional
Namespace is the namespace of the affected Kubernetes resource.
criticalIncidents[].resource.location.version
TYPE
Optional
Group is the Version of the Kubernetes resource.
criticalIncidents[].stackTrace
list (object)
Optional
StackTrace contains an unstructured list of messages from the stack trace.
criticalIncidents[].stackTrace[]
object
Optional
CriticalIncidentStackTraceMessage contains stack trace information available for the incident.
criticalIncidents[].stackTrace[].component
string
Optional
Component is the name of a Database Service component that logged the message.
criticalIncidents[].stackTrace[].message
string
Optional
Logged message.
criticalIncidents[].stackTrace[].message
string
Optional
TransientUntil if present indicates that the issue should be considered transient until the specified time.
endTime
string
Optional
EndTime is the time switchover reached its final state.
internal
object
Optional
Internal is used by the system controllers. Don't depend on the information in this section.
internal.newPrimary
string
Required
NewPrimary is the instance that we are attempting to switchover to.
internal.oldPrimary
string
Required
OldPrimary is the instance that was the primary at the start of the switchover.
internal.phase
string
Optional

Valid values: UpdateDbcluster, StopPrimary, PromoteStandby, ValidateNewPrimary, UpdateOldPrimaryResources, UpdateNewPrimaryResources, UpdateOldPrimaryConfigs, Complete, SyncOldPrimary, StartOldPrimary, PreSuccess, RepointStandbys, RollbackPrimary, RollbackStandbys

Phase is used to keep track of the current state of the switchover
observedGeneration
integer
Optional
Internal: The generation observed by the controller.
reconciled
boolean
Optional
Internal: Whether the resource was reconciled by the controller.
startTime
string
Optional
StartTime is the time that the switchover operation started.
state
string
Optional

Valid values: InProgress, Success, Failed_RollbackInProgress, Failed_RollbackSuccess, Failed_RollbackFailed

State is the current state of the switchover operation. The values are InProgress, Success, Failed_RollbackInProgress, Failed_RollbackSuccess, Failed_RollbackFailed InProgress means the switchover is still in progress. Success means that the switchover has completed. Failed_RollbackInProgress means that the operator was unable to promote the new primary instance, and is attempting to restart the old primary instance. Failed_RollbackSuccess means that the operator was unable to promote the new primary instance, and successfully restarted the old primary instance. Failed_RollbackFailed means that the operator was unable to promote the new primary instance, and were not able to restart the old primary instance. The DBCluster might need to be manually repaired.