Spec schema
SwitchoverSpec defines the selected state of Switchover.
dbclusterRef: string
newPrimary: string
newPrimaryInstance: string
primaryHost: string
Field TypeRequired or optional |
Description |
|---|---|
dbclusterRef
| |
stringOptional |
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
| |
stringOptional | NewPrimary is the standby instance to switch with the current primary. |
newPrimaryInstance
| |
stringOptional | NewPrimaryInstance is the standby instance to switch with the current primary. Deprecated: Please use NewPrimary field instead. |
primaryHost
| |
stringOptional | 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 TypeRequired or optional |
Description |
|---|---|
conditions
| |
list (object)Optional | Conditions represents the latest available observations of the entity's current state. |
conditions[]
| |
objectOptional | 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
| |
stringRequired | 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
| |
stringRequired | message is a human readable message indicating details about the transition. This may be an empty string. |
conditions[].observedGeneration
| |
integerOptional | 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
| |
stringRequired | 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
| |
stringRequired |
Valid values: |
conditions[].type
| |
stringRequired | 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
| |
stringOptional | 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[]
| |
objectOptional | CriticalIncident contains all information about an ongoing critical incident. |
criticalIncidents[].code
| |
stringRequired | Code is the error code of this particular error. Error codes are DBSE+numeric strings, like "DBSE1012". |
criticalIncidents[].createTime
| |
stringRequired | CreateTime is the timestamp when this Incident was created at the origin. |
criticalIncidents[].message
| |
stringOptional | Message describes the incident/error that occurred. |
criticalIncidents[].messageTemplateParams
| |
objectOptional | MessageTemplateParams contains key-value pairs necessary for generating a user-friendly data-driven version of Message in the UI. |
criticalIncidents[].resource
| |
objectRequired | Resource contains information about the Database Service component that reported the incident as well as about the Kubernetes resource. |
criticalIncidents[].resource.component
| |
stringRequired | Component is an internal identifier of the Database Service subsystem that reported the incident. |
criticalIncidents[].resource.location
| |
objectOptional | Location |
criticalIncidents[].resource.location.cluster
| |
stringOptional | Cluster is the name of the cluster of the affected Kubernetes resource. |
criticalIncidents[].resource.location.group
| |
stringOptional | Group is the Group name of the Kubernetes resource. |
criticalIncidents[].resource.location.kind
| |
stringOptional | Kind is the Kind of the Kubernetes resource. |
criticalIncidents[].resource.location.name
| |
stringOptional | Name is the name of the affected Kubernetes resource. |
criticalIncidents[].resource.location.namespace
| |
stringOptional | Namespace is the namespace of the affected Kubernetes resource. |
criticalIncidents[].resource.location.version
| |
TYPEOptional | 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[]
| |
objectOptional | CriticalIncidentStackTraceMessage contains stack trace information available for the incident. |
criticalIncidents[].stackTrace[].component
| |
stringOptional | Component is the name of a Database Service component that logged the message. |
criticalIncidents[].stackTrace[].message
| |
stringOptional | Logged message. |
criticalIncidents[].stackTrace[].message
| |
stringOptional | TransientUntil if present indicates that the issue should be considered transient until the specified time. |
endTime
| |
stringOptional | EndTime is the time switchover reached its final state. |
internal
| |
objectOptional | Internal is used by the system controllers. Don't depend on the information in this section. |
internal.newPrimary
| |
stringRequired | NewPrimary is the instance that we are attempting to switchover to. |
internal.oldPrimary
| |
stringRequired | OldPrimary is the instance that was the primary at the start of the switchover. |
internal.phase
| |
stringOptional |
Valid values: |
observedGeneration
| |
integerOptional | Internal: The generation observed by the controller. |
reconciled
| |
booleanOptional | Internal: Whether the resource was reconciled by the controller. |
startTime
| |
stringOptional | StartTime is the time that the switchover operation started. |
state
| |
stringOptional |
Valid values: 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.
|