DBInstance Custom Resource Definition

Spec schema

DBInstanceSpec defines the selected state of DBInstance.

DBInstance:
  metadata:
    name: string
  spec:
    dbcParent:
      name: string
    instanceType: string
    nodeCount: integer
    readPoolPort: integer
    resources:
      cpu: integer or string
      memory: string or integer
      disks:
      - name: string
        path: string
        size: string

Field

Type
Required or optional

 

Description
name
string
Required
Name of the DBInstance resource.
dbcParent
object
Required
The parent DBCluster that this DBInstance replicates from.
dbcParent.name
string
Required
Name of the referent DBCluster.
instanceType
string
Optional
Indicates the type of the DBInstance. Supports ReadPool type. The default value is ReadPool.
nodeCount
integer
Optional
Determines the number of DBNodes to create for this DBInstance. Supported values are between 0 and 20. The default value is 1.
readPoolPort
integer
Optional
Dedicated HAProxy frontend port for a ReadPool DBInstance.
resources
object
Optional
Specifies the compute and storage resources used for the instances (DBNodes) belonging to this DBInstance. If omitted, the instance uses the same resources as the DBCluster's Primary Instance.
resources.cpu
integer or string
Required
The amount of CPU allocated to the database process (for example, 2 or "2").
resources.memory
string or integer
Required
The amount of memory allocated to the database process (for example, "6Gi").
resources.disks
list (object)
Required
The specifications of the disks allocated to the database process.
resources.disks[].name
string
Required
Name of the disk. The allowed values are: DataDisk and ObsDisk.
resources.disks[].path
string
Optional
Path where the disk is mounted on the host file system.
resources.disks[].size
string
Optional
Disk size in bytes (for example, "15Gi").

Status schema

DBInstanceStatus defines the observed state of DBInstance.

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
endpoints:
- name: string
  value: string
observedGeneration: integer
reconciled: boolean

Field

Type
Required or optional

 

Description
conditions
list (object)
Optional
Represents the latest available observations of the DBInstance'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 was set based upon.
conditions[].reason
string
Required
Contains a programmatic identifier indicating the reason for the condition's last transition. The value is a CamelCase string. Expected values for DBInstance include:
  • AllDBNodesReady: The DBInstance has the required number of ready DBNodes.
  • MinDBNodesReady: At least the minimum number of DBNodes specified in the spec are ready.
  • DBNodesNotReady: The minimum number of DBNodes are not ready.
  • AllDBNodesStreaming: The DBInstance has the required number of DBNodes actively replicating from the primary.
  • MinDBNodesStreaming: At least the minimum number of DBNodes are replicating from the primary.
  • DBNodesNotStreaming: The minimum number of DBNodes are not replicating.
  • NetworkReady: The LoadBalancer has been created and is ready to serve the DBNodes.
  • NetworkNotReady: The LoadBalancer is not ready to serve the DBNodes.
  • DBNodesAvailable: The required number of DBNodes are successfully provisioned and accessible using the LoadBalancer.
  • InvalidSpec: Indicates that something in the Spec is invalid.
conditions[].status
string
Required
Status of the condition. The valid values are True, False, and Unknown.
conditions[].type
string
Required
The type of condition in CamelCase. Expected types include:
  • DBNodesReady: Indicates whether all DBNodes required for this DBInstance have been provisioned and are ready.
  • Streaming: Indicates whether the DBNodes are actively replicating from the primary.
  • NetworkReady: Shows whether a LoadBalancer has been created and is ready to serve the DBNodes.
  • Available: Indicates whether the required number of DBNodes are provisioned and accessible using the LoadBalancer.
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 was created at the origin.
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
Contains information about the Database Service component that reported the incident.
criticalIncidents[].resource.component
string
Required
Internal identifier of the Database Service subsystem that reported the incident.
criticalIncidents[].resource.location
object
Optional
The location of the originating resource.
criticalIncidents[].resource.location.cluster
string
Optional
Name of the cluster of the affected resource.
criticalIncidents[].resource.location.group
string
Optional
Group name of the resource.
criticalIncidents[].resource.location.kind
string
Optional
Kind of the resource.
criticalIncidents[].resource.location.name
string
Optional
Name of the affected resource.
criticalIncidents[].resource.location.namespace
string
Optional
Namespace of the affected resource.
criticalIncidents[].resource.location.version
string
Optional
Version of the resource.
criticalIncidents[].stackTrace
list (object)
Optional
Unstructured list of messages from the stack trace.
criticalIncidents[].stackTrace[].component
string
Optional
Name of the Database Service component that logged the message.
criticalIncidents[].stackTrace[].message
string
Optional
Logged message.
criticalIncidents[].transientUntil
string
Optional
Indicates that the issue should be considered transient until the specified time.
endpoints
list (object)
Optional
Endpoints contains all the endpoints through which you can access this instance.
endpoints[].name
string
Required
Name is the name of the endpoint—for example, Read-Only.
endpoints[].value
string
Required
Value contains the endpoint information to connect to and access the instance.
observedGeneration
integer
Optional
The generation observed by the controller.
reconciled
boolean
Optional
Whether the resource was reconciled by the controller.