Getting Started
Concepts and Features
Backup and Restore
In Place Update
Instance Template
Trouble Shooting
References
Upgrade KubeBlocks
Packages:
OpsDefinition
OpsDefinition is the Schema for the OpsDefinitions API.
Field | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
| ||||||||||
|
| ||||||||||
Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
| ||||||||||
OpsDefinitionSpec |
| ||||||||||
OpsDefinitionStatus |
OpsRequest
OpsRequest is the Schema for the opsrequests API
Field | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| ||||||||||||||||||||
|
| ||||||||||||||||||||
Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
| ||||||||||||||||||||
OpsRequestSpec |
| ||||||||||||||||||||
OpsRequestStatus |
ActionTask
(Appears on:ProgressStatusDetail)
Field | Description |
---|---|
string | Represents the name of the task. |
string | Represents the namespace where the task is deployed. |
ActionTaskStatus | Indicates the current status of the task, including “Processing”, “Failed”, “Succeed”. |
string | (Optional) The name of the Pod that the task is associated with or operates on. |
int32 | (Optional) The count of retry attempts made for this task. |
ActionTaskStatus
(string
alias)
(Appears on:ActionTask)
ActionTaskStatus defines the status of the task.
Value | Description |
---|---|
"Failed" | |
"Processing" | |
"Succeed" |
Backup
(Appears on:SpecificOpsRequest)
Field | Description |
---|---|
string | (Optional) Specifies the name of the Backup custom resource. |
string | (Optional) Indicates the name of the BackupPolicy applied to perform this Backup. |
string | (Optional) Specifies the name of BackupMethod. The specified BackupMethod must be defined in the BackupPolicy. |
string | (Optional) Determines whether the backup contents stored in backup repository
should be deleted when the Backup custom resource is deleted.
Supported values are
|
string | (Optional) Determines the duration for which the Backup custom resources should be retained. The controller will automatically remove all Backup objects that are older than the specified RetentionPeriod.
For example, RetentionPeriod of
You can also combine the above durations. For example: 30d12h30m. If not set, the Backup objects will be kept forever. If the |
string | (Optional) If the specified BackupMethod is incremental, |
[]github.com/apecloud/kubeblocks/apis/dataprotection/v1alpha1.ParameterPair | (Optional) Specifies a list of name-value pairs representing parameters and their corresponding values.
Parameters match the schema specified in the |
BackupRefSpec
Field | Description |
---|---|
RefNamespaceName | (Optional) Refers to a reference backup that needs to be restored. |
CompletionProbe
(Appears on:OpsResourceModifierAction)
Field | Description |
---|---|
int32 | (Optional) Specifies the number of seconds to wait after the resource has been patched before initiating completion probes. The default value is 5 seconds, with a minimum value of 1. |
int32 | (Optional) Specifies the number of seconds after which the probe times out. The default value is 60 seconds, with a minimum value of 1. |
int32 | (Optional) Specifies the frequency (in seconds) at which the probe should be performed. The default value is 5 seconds, with a minimum value of 1. |
MatchExpressions | Executes expressions regularly, based on the value of PeriodSeconds, to determine if the action has been completed. |
ComponentInfo
(Appears on:OpsDefinitionSpec)
Field | Description |
---|---|
string | Specifies the name of the ComponentDefinition. The name can represent an exact name, a name prefix, or a regular expression pattern. For example:
|
string | (Optional) Specifies the account name associated with the Component.
If set, the corresponding account username and password are injected into containers’ environment variables
|
string | (Optional) Specifies the name of the Service.
If set, the service name is injected as the |
ComponentOps
(Appears on:CustomOpsComponent, HorizontalScaling, RebuildInstance, Reconfigure, SpecificOpsRequest, UpgradeComponent, VerticalScaling, VolumeExpansion)
ComponentOps specifies the Component to be operated on.
Field | Description |
---|---|
string | Specifies the name of the Component as defined in the cluster.spec |
CustomOps
(Appears on:SpecificOpsRequest)
Field | Description |
---|---|
string | Specifies the name of the OpsDefinition. |
string | Specifies the name of the ServiceAccount to be used for executing the custom operation. |
Kubernetes api utils intstr.IntOrString | (Optional) Specifies the maximum number of components to be operated on concurrently to mitigate performance impact on clusters with multiple components. It accepts an absolute number (e.g., 5) or a percentage of components to execute in parallel (e.g., “10%”). Percentages are rounded up to the nearest whole number of components. For example, if “10%” results in less than one, it rounds up to 1. When unspecified, all components are processed simultaneously by default. Note: This feature is not implemented yet. |
[]CustomOpsComponent | Specifies the components and their parameters for executing custom actions as defined in OpsDefinition. Requires at least one component. |
CustomOpsComponent
(Appears on:CustomOps)
Field | Description |
---|---|
ComponentOps | (Members of Specifies the name of the Component. |
[]Parameter | (Optional) Specifies the parameters that match the schema specified in the |
EnvVarRef
(Appears on:OpsVarSource)
Field | Description |
---|---|
string | (Optional) Specifies the container name in the target Pod. If not specified, the first container will be used by default. |
string | Defines the name of the environment variable. This name can originate from an ‘env’ entry or be a data key from an ‘envFrom’ source. |
Expose
(Appears on:SpecificOpsRequest)
Field | Description |
---|---|
string | Specifies the name of the Component. |
ExposeSwitch | Indicates whether the services will be exposed. ‘Enable’ exposes the services. while ‘Disable’ removes the exposed Service. |
[]OpsService | Specifies a list of OpsService.
When an OpsService is exposed, a corresponding ClusterService will be added to Note: If |
ExposeSwitch
(string
alias)
(Appears on:Expose)
ExposeSwitch Specifies the switch for the expose operation. This switch can be used to enable or disable the expose operation.
Value | Description |
---|---|
"Disable" | |
"Enable" |
FailurePolicyType
(string
alias)
(Appears on:OpsAction)
FailurePolicyType specifies the type of failure policy.
Value | Description |
---|---|
"Fail" | FailurePolicyFail means that an error will be reported. |
"Ignore" | FailurePolicyIgnore means that an error will be ignored but logged. |
HorizontalScaling
(Appears on:SpecificOpsRequest)
HorizontalScaling defines the parameters of a horizontal scaling operation.
Field | Description |
---|---|
ComponentOps | (Members of Specifies the name of the Component. |
int32 | Specifies the desired number of shards for the component. This parameter is mutually exclusive with other parameters. |
ScaleOut | (Optional) Specifies the replica changes for scaling out components and instance templates, and brings offline instances back online. Can be used in conjunction with the “scaleIn” operation. Note: Any configuration that deletes instances is considered invalid. |
ScaleIn | (Optional) Specifies the replica changes for scaling in components and instance templates, and takes specified instances offline. Can be used in conjunction with the “scaleOut” operation. Note: Any configuration that creates instances is considered invalid. |
Instance
(Appears on:RebuildInstance)
Field | Description |
---|---|
string | Pod name of the instance. |
string | (Optional) The instance will rebuild on the specified node. If not set, it will rebuild on a random node. |
InstanceReplicasTemplate
(Appears on:ReplicaChanger)
InstanceReplicasTemplate defines the template for instance replicas.
Field | Description |
---|---|
string | Specifies the name of the instance template. |
int32 | Specifies the replica changes for the instance template. |
InstanceResourceTemplate
(Appears on:VerticalScaling)
Field | Description |
---|---|
string | Refer to the instance template name of the component or sharding. |
Kubernetes core/v1.ResourceRequirements | (Members of Defines the computational resource size for vertical scaling. |
InstanceVolumeClaimTemplate
Field | Description |
---|---|
string | Refer to the instance template name of the component or sharding. |
[]OpsRequestVolumeClaimTemplate | volumeClaimTemplates specifies the storage size and volumeClaimTemplate name. |
JSONPatchOperation
(Appears on:OpsResourceModifierAction)
Field | Description |
---|---|
string | Specifies the type of JSON patch operation. It supports the following values: ‘add’, ‘remove’, ‘replace’. |
string | Specifies the json patch path. |
string | Specifies the value to be used in the JSON patch operation. |
LastComponentConfiguration
(Appears on:LastConfiguration)
LastComponentConfiguration can be used to track and compare the desired state of the Component over time.
Field | Description |
---|---|
int32 | (Optional) Records the |
int32 | (Optional) Records the |
Kubernetes core/v1.ResourceRequirements | (Members of Records the resources of the Component prior to any changes. |
[]OpsRequestVolumeClaimTemplate | (Optional) Records volumes’ storage size of the Component prior to any changes. |
[]github.com/apecloud/kubeblocks/apis/apps/v1.ClusterComponentService | (Optional) Records the ClusterComponentService list of the Component prior to any changes. |
[]github.com/apecloud/kubeblocks/apis/apps/v1.InstanceTemplate | (Optional) Records the InstanceTemplate list of the Component prior to any changes. |
[]string | (Optional) Records the offline instances of the Component prior to any changes. |
string | (Optional) Records the version of the Service expected to be provisioned by this Component prior to any changes. |
string | (Optional) Records the name of the ComponentDefinition prior to any changes. |
LastConfiguration
(Appears on:OpsRequestStatus)
Field | Description |
---|---|
map[string]github.com/apecloud/kubeblocks/apis/operations/v1alpha1.LastComponentConfiguration | (Optional) Records the configuration of each Component prior to any changes. |
MatchExpressions
(Appears on:CompletionProbe)
Field | Description |
---|---|
string | (Optional) Specifies a failure condition for an action using a Go template expression.
Should evaluate to either |
string | Specifies a success condition for an action using a Go template expression.
Should evaluate to either |
OpsAction
(Appears on:OpsDefinitionSpec)
OpsAction specifies a custom action defined in OpsDefinition for execution in a “Custom” OpsRequest.
OpsAction can be of three types:
workload: Creates a Job or Pod to run custom scripts, ideal for isolated or long-running tasks.
exec: Executes commands directly within an existing container using the kubectl exec interface, suitable for immediate, short-lived operations.
resourceModifier: Modifies a K8s object using JSON patches, useful for updating the spec of some resource.
Field | Description |
---|---|
string | Specifies the name of the OpsAction. |
FailurePolicyType | (Optional) Specifies the failure policy of the OpsAction. Valid values are:
|
[]string | (Optional) Specifies the parameters for the OpsAction. Their usage varies based on the action type:
|
OpsWorkloadAction | (Optional) Specifies the configuration for a ‘workload’ action. This action leads to the creation of a K8s workload, such as a Pod or Job, to execute specified tasks. |
OpsExecAction | (Optional) Specifies the configuration for a ‘exec’ action. It creates a Pod and invokes a ‘kubectl exec’ to run command inside a specified container with the target Pod. |
OpsResourceModifierAction | (Optional) Specifies the configuration for a ‘resourceModifier’ action. This action allows for modifications to existing K8s objects. Note: This feature has not been implemented yet. |
OpsDefinitionSpec
(Appears on:OpsDefinition)
OpsDefinitionSpec defines the desired state of OpsDefinition.
Field | Description |
---|---|
[]PreCondition | (Optional) Specifies the preconditions that must be met to run the actions for the operation. if set, it will check the condition before the Component runs this operation. Example:
|
[]PodInfoExtractor | (Optional) Specifies a list of PodInfoExtractor, each designed to select a specific Pod and extract selected runtime info
from its PodSpec.
The extracted information, such as environment variables, volumes and tolerations, are then injected into
Jobs or Pods that execute the OpsActions defined in |
[]ComponentInfo | (Optional) Specifies a list of ComponentDefinition for Components associated with this OpsDefinition. It also includes connection credentials (address and account) for each Component. |
ParametersSchema | (Optional) Specifies the schema for validating the data types and value ranges of parameters in OpsActions before their usage. |
[]OpsAction | Specifies a list of OpsAction where each customized action is executed sequentially. |
OpsDefinitionStatus
(Appears on:OpsDefinition)
OpsDefinitionStatus defines the observed state of OpsDefinition
Field | Description |
---|---|
int64 | (Optional) Represents the most recent generation observed of this OpsDefinition. |
Phase | (Optional) Represents the current state of the OpsDefinition. Valid values are “”, “Available”, “Unavailable”. When it equals to “Available”, the OpsDefinition is ready and can be used in a “Custom” OpsRequest. |
string | (Optional) Provides additional information about the current phase. |
OpsEnvVar
(Appears on:PodInfoExtractor)
Field | Description |
---|---|
string | Specifies the name of the environment variable to be injected into Pods executing OpsActions. It must conform to the C_IDENTIFIER format, which includes only alphanumeric characters and underscores, and cannot begin with a digit. |
OpsVarSource | Specifies the source of the environment variable’s value. |
OpsExecAction
(Appears on:OpsAction)
Field | Description |
---|---|
string | Specifies a PodInfoExtractor defined in the |
int32 | (Optional) Specifies the number of retries allowed before marking the action as failed. |
[]string | The command to be executed via ‘kubectl exec –’. |
string | (Optional) The name of the container in the target pod where the command should be executed.
This corresponds to the If not set, the first container is used. |
OpsPhase
(string
alias)
(Appears on:OpsRequestStatus)
OpsPhase defines opsRequest phase.
Value | Description |
---|---|
"Aborted" | |
"Cancelled" | |
"Cancelling" | |
"Creating" | |
"Failed" | |
"Pending" | |
"Running" | |
"Succeed" |
OpsRecorder
Field | Description |
---|---|
string | name OpsRequest name |
OpsType | opsRequest type |
bool | indicates whether the current opsRequest is in the queue |
bool | indicates that the operation is queued for execution within its own-type scope. |
OpsRequestBehaviour
Field | Description |
---|---|
[]github.com/apecloud/kubeblocks/apis/apps/v1.ClusterPhase | |
github.com/apecloud/kubeblocks/apis/apps/v1.ClusterPhase |
OpsRequestComponentStatus
(Appears on:OpsRequestStatus)
Field | Description |
---|---|
github.com/apecloud/kubeblocks/apis/apps/v1.ComponentPhase | (Optional) Records the current phase of the Component, mirroring |
Kubernetes meta/v1.Time | (Optional) Records the timestamp when the Component last transitioned to a “Failed” phase. |
PreCheckResult | (Optional) Records the result of the preConditions check of the opsRequest, which determines subsequent steps. |
[]ProgressStatusDetail | (Optional) Describes the progress details of objects or actions associated with the Component. |
string | (Optional) Provides an explanation for the Component being in its current state. |
string | (Optional) Provides a human-readable message indicating details about this operation. |
OpsRequestSpec
(Appears on:OpsRequest)
OpsRequestSpec defines the desired state of OpsRequest
Field | Description |
---|---|
string | Specifies the name of the Cluster resource that this operation is targeting. |
bool | (Optional) Indicates whether the current operation should be canceled and terminated gracefully if it’s in the “Pending”, “Creating”, or “Running” state. This field applies only to “VerticalScaling” and “HorizontalScaling” opsRequests. Note: Setting |
bool | (Optional) Instructs the system to bypass pre-checks (including cluster state checks and customized pre-conditions hooks)
and immediately execute the opsRequest, except for the opsRequest of ‘Start’ type, which will still undergo
pre-checks even if This is useful for concurrent execution of ‘VerticalScaling’ and ‘HorizontalScaling’ opsRequests.
By setting Note: Once set, the |
bool | (Optional) Indicates whether opsRequest should continue to queue when ‘force’ is set to true. |
OpsType | Specifies the type of this operation. Supported types include “Start”, “Stop”, “Restart”, “Switchover”, “VerticalScaling”, “HorizontalScaling”, “VolumeExpansion”, “Reconfiguring”, “Upgrade”, “Backup”, “Restore”, “Expose”, “RebuildInstance”, “Custom”. Note: This field is immutable once set. |
int32 | (Optional) Specifies the duration in seconds that an OpsRequest will remain in the system after successfully completing
(when |
int32 | (Optional) Specifies the duration in seconds that an OpsRequest will remain in the system after completion for any phase other than “Succeed” (e.g., “Failed”, “Cancelled”, “Aborted”) before automatic deletion. |
int32 | (Optional) Specifies the maximum time in seconds that the OpsRequest will wait for its pre-conditions to be met before it aborts the operation. If set to 0 (default), pre-conditions must be satisfied immediately for the OpsRequest to proceed. |
int32 | (Optional) Specifies the maximum duration (in seconds) that an opsRequest is allowed to run. If the opsRequest runs longer than this duration, its phase will be marked as Aborted. If this value is not set or set to 0, the timeout will be ignored and the opsRequest will run indefinitely. |
SpecificOpsRequest | (Members of Exactly one of its members must be set. |
OpsRequestStatus
(Appears on:OpsRequest)
OpsRequestStatus represents the observed state of an OpsRequest.
Field | Description |
---|---|
int64 | (Optional) Records the cluster generation after the OpsRequest action has been handled. |
OpsPhase | Represents the phase of the OpsRequest. Possible values include “Pending”, “Creating”, “Running”, “Cancelling”, “Cancelled”, “Failed”, “Succeed”. |
string | Represents the progress of the OpsRequest. |
LastConfiguration | (Optional) Records the configuration prior to any changes. |
map[string]github.com/apecloud/kubeblocks/apis/operations/v1alpha1.OpsRequestComponentStatus | (Optional) Records the status information of Components changed due to the OpsRequest. |
[]string | A collection of additional key-value pairs that provide supplementary information for the OpsRequest. |
Kubernetes meta/v1.Time | (Optional) Records the time when the OpsRequest started processing. |
Kubernetes meta/v1.Time | (Optional) Records the time when the OpsRequest was completed. |
Kubernetes meta/v1.Time | (Optional) Records the time when the OpsRequest was cancelled. |
[]Kubernetes meta/v1.Condition | (Optional) Describes the detailed status of the OpsRequest. Possible condition types include “Cancelled”, “WaitForProgressing”, “Validated”, “Succeed”, “Failed”, “Restarting”, “VerticalScaling”, “HorizontalScaling”, “VolumeExpanding”, “Reconfigure”, “Switchover”, “Stopping”, “Starting”, “VersionUpgrading”, “Exposing”, “Backup”, “InstancesRebuilding”, “CustomOperation”. |
OpsRequestVolumeClaimTemplate
(Appears on:InstanceVolumeClaimTemplate, LastComponentConfiguration, VolumeExpansion)
Field | Description |
---|---|
Kubernetes resource.Quantity | Specifies the desired storage size for the volume. |
string | Specify the name of the volumeClaimTemplate in the Component.
The specified name must match one of the volumeClaimTemplates defined
in the |
OpsResourceModifierAction
(Appears on:OpsAction)
Field | Description |
---|---|
TypedObjectRef | Specifies the K8s object that is to be updated. |
[]JSONPatchOperation | Specifies a list of patches for modifying the object. |
CompletionProbe | Specifies a method to determine if the action has been completed. Note: This feature has not been implemented yet. |
OpsService
(Appears on:Expose)
OpsService represents the parameters to dynamically create or remove a ClusterService in the cluster.spec.services
array.
Field | Description |
---|---|
string | Specifies the name of the Service. This name is used to set Note: This field cannot be updated. |
map[string]string | (Optional) Contains cloud provider related parameters if ServiceType is LoadBalancer. More info: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer. |
[]Kubernetes core/v1.ServicePort | (Optional) Specifies Port definitions that are to be exposed by a ClusterService. If not specified, the Port definitions from non-NodePort and non-LoadBalancer type ComponentService
defined in the ComponentDefinition ( More info: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports |
string | (Optional) Specifies a role to target with the service. If specified, the service will only be exposed to pods with the matching role. Note: If the component has roles, at least one of ‘roleSelector’ or ‘podSelector’ must be specified. If both are specified, a pod must match both conditions to be selected. |
map[string]string | (Optional) Routes service traffic to pods with matching label keys and values. If specified, the service will only be exposed to pods matching the selector. Note: If the component has roles, at least one of ‘roleSelector’ or ‘podSelector’ must be specified. If both are specified, a pod must match both conditions to be selected. |
Kubernetes core/v1.ServiceType | (Optional) Determines how the Service is exposed. Defaults to ‘ClusterIP’.
Valid options are
Note: although K8s Service type allows the ‘ExternalName’ type, it is not a valid option for the expose operation. For more info, see: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types. |
[]Kubernetes core/v1.IPFamily | (Optional) A list of IP families (e.g., IPv4, IPv6) assigned to this Service. Usually assigned automatically based on the cluster configuration and the Valid values:
This field may hold a maximum of two entries (dual-stack families, in either order). Common combinations of
|
Kubernetes core/v1.IPFamilyPolicy | (Optional) Specifies whether the Service should use a single IP family (SingleStack) or two IP families (DualStack). Possible values:
|
OpsType
(string
alias)
(Appears on:OpsRecorder, OpsRequestSpec)
OpsType defines operation types.
Value | Description |
---|---|
"Backup" | |
"Custom" | RebuildInstance rebuilding an instance is very useful when a node is offline or an instance is unrecoverable. |
"Expose" | StartType the start operation will start the pods which is deleted in stop operation. |
"HorizontalScaling" | |
"RebuildInstance" | |
"Reconfiguring" | |
"Restart" | |
"Restore" | |
"Start" | StopType the stop operation will delete all pods in a cluster concurrently. |
"Stop" | RestartType the restart operation is a special case of the rolling update operation. |
"Switchover" | |
"Upgrade" | |
"VerticalScaling" | |
"VolumeExpansion" |
OpsVarSource
(Appears on:OpsEnvVar)
Field | Description |
---|---|
EnvVarRef | (Optional) Specifies a reference to a specific environment variable within a container. Used to specify the source of the variable, which can be either “env” or “envFrom”. |
Kubernetes core/v1.ObjectFieldSelector | (Optional) Represents the JSONPath expression pointing to the specific data within the JSON structure of the target Pod. It is used to extract precise data locations for operations on the Pod. |
OpsWorkloadAction
(Appears on:OpsAction)
Field | Description |
---|---|
OpsWorkloadType | Defines the workload type of the action. Valid values include “Job” and “Pod”.
|
string | Specifies a PodInfoExtractor defined in the |
int32 | (Optional) Specifies the number of retries allowed before marking the action as failed. |
Kubernetes core/v1.PodSpec | Specifies the PodSpec of the ‘workload’ action. |
OpsWorkloadType
(string
alias)
(Appears on:OpsWorkloadAction)
OpsWorkloadType policy after action failure.
Value | Description |
---|---|
"Job" | |
"Pod" |
Parameter
(Appears on:CustomOpsComponent)
Field | Description |
---|---|
string | Specifies the identifier of the parameter as defined in the OpsDefinition. |
string | Holds the data associated with the parameter. If the parameter type is an array, the format should be “v1,v2,v3”. |
ParameterSource | Source for the parameter’s value. Cannot be used if value is not empty. |
ParameterPair
(Appears on:Reconfigure)
Field | Description |
---|---|
string | Represents the name of the parameter that is to be updated. |
string | (Optional) Represents the parameter values that are to be updated. If set to nil, the parameter defined by the Key field will be removed from the configuration file. |
ParameterSource
(Appears on:Parameter)
Field | Description |
---|---|
Kubernetes core/v1.ConfigMapKeySelector | (Optional) Selects a key of a ConfigMap. |
Kubernetes core/v1.SecretKeySelector | (Optional) Selects a key of a Secret. |
ParametersSchema
(Appears on:OpsDefinitionSpec)
Field | Description |
---|---|
Kubernetes api extensions v1.JSONSchemaProps | (Optional) Defines the schema for parameters using the OpenAPI v3. The supported property types include:
|
Phase
(string
alias)
(Appears on:OpsDefinitionStatus)
Phase represents the current status of the ClusterDefinition CR.
Value | Description |
---|---|
"Available" | AvailablePhase indicates that the object is in an available state. |
"Unavailable" | UnavailablePhase indicates that the object is in an unavailable state. |
PodInfoExtractor
(Appears on:OpsDefinitionSpec)
Field | Description |
---|---|
string | Specifies the name of the PodInfoExtractor. |
[]OpsEnvVar | (Optional) Specifies a list of environment variables to be extracted from a selected Pod, and injected into the containers executing each OpsAction. |
PodSelector | Used to select the target Pod from which environment variables and volumes are extracted from its PodSpec. |
[]Kubernetes core/v1.VolumeMount | (Optional) Specifies a list of volumes, along with their respective mount points, that are to be extracted from a selected Pod, and mounted onto the containers executing each OpsAction. This allows the containers to access shared or persistent data necessary for the operation. |
PodSelectionPolicy
(string
alias)
(Appears on:PodSelector)
PodSelectionPolicy pod selection strategy.
Value | Description |
---|---|
"All" | |
"Any" |
PodSelector
(Appears on:PodInfoExtractor)
PodSelector selects the target Pod from which environment variables and volumes are extracted from its PodSpec.
Field | Description |
---|---|
string | (Optional) Specifies the role of the target Pod. |
PodSelectionPolicy | Defines the policy for selecting the target pod when multiple pods match the podSelector. It can be either ‘Any’ (select any one pod that matches the podSelector) or ‘All’ (select all pods that match the podSelector). |
PointInTimeRefSpec
Field | Description |
---|---|
Kubernetes meta/v1.Time | (Optional) Refers to the specific time point for restoration, with UTC as the time zone. |
RefNamespaceName | (Optional) Refers to a reference source cluster that needs to be restored. |
PreCheckResult
(Appears on:OpsRequestComponentStatus)
Field | Description |
---|---|
bool | Indicates whether the preCheck operation passed or failed. |
string | (Optional) Provides explanations related to the preCheck result in a human-readable format. |
PreCondition
(Appears on:OpsDefinitionSpec)
Field | Description |
---|---|
Rule | Specifies the conditions that must be met for the operation to execute. |
ProgressStatus
(string
alias)
(Appears on:ProgressStatusDetail)
ProgressStatus defines the status of the opsRequest progress.
Value | Description |
---|---|
"Failed" | |
"Pending" | |
"Processing" | |
"Succeed" |
ProgressStatusDetail
(Appears on:OpsRequestComponentStatus)
Field | Description |
---|---|
string | (Optional) Specifies the group to which the current object belongs to. |
string | (Optional)
|
string | (Optional) Indicates the name of an OpsAction, as defined in |
[]ActionTask | (Optional) Lists the tasks, such as Jobs or Pods, that carry out the action. |
ProgressStatus | Represents the current processing state of the object, including “Processing”, “Pending”, “Failed”, “Succeed” |
string | (Optional) Provides a human-readable explanation of the object’s condition. |
Kubernetes meta/v1.Time | (Optional) Records the start time of object processing. |
Kubernetes meta/v1.Time | (Optional) Records the completion time of object processing. |
RebuildInstance
(Appears on:SpecificOpsRequest)
Field | Description |
---|---|
ComponentOps | (Members of Specifies the name of the Component. |
[]Instance | Specifies the instances (Pods) that need to be rebuilt, typically operating as standbys. |
bool | When it is set to true, the instance will be rebuilt in-place. If false, a new pod will be created. Once the new pod is ready to serve, the instance that require rebuilding will be taken offline. |
string | (Optional) Indicates the name of the Backup custom resource from which to recover the instance. Defaults to an empty PersistentVolume if unspecified. Note:
|
string | (Optional) When multiple source targets exist of the backup, you must specify the source target to restore. |
[]Kubernetes core/v1.EnvVar | (Optional) Defines container environment variables for the restore process. merged with the ones specified in the Backup and ActionSet resources. Merge priority: Restore env > Backup env > ActionSet env. Purpose: Some databases require different configurations when being restored as a standby
compared to being restored as a primary.
For example, when restoring MySQL as a replica, you need to set |
Reconfigure
(Appears on:SpecificOpsRequest)
Reconfigure defines the parameters for updating a Component’s configuration.
Field | Description |
---|---|
ComponentOps | (Members of Specifies the name of the Component. |
[]ParameterPair | (Optional) Specifies a list of key-value pairs representing parameters and their corresponding values within a single configuration file. This field is used to override or set the values of parameters without modifying the entire configuration file. |
RefNamespaceName
(Appears on:BackupRefSpec, PointInTimeRefSpec)
Field | Description |
---|---|
string | (Optional) Refers to the specific name of the resource. |
string | (Optional) Refers to the specific namespace of the resource. |
ReplicaChanger
(Appears on:ScaleIn, ScaleOut)
ReplicaChanger defines the parameters for changing the number of replicas.
Field | Description |
---|---|
int32 | Specifies the replica changes for the component. |
[]InstanceReplicasTemplate | (Optional) Modifies the desired replicas count for existing InstanceTemplate. if the inst |
Restore
(Appears on:SpecificOpsRequest)
Field | Description |
---|---|
string | Specifies the name of the Backup custom resource. |
string | (Optional) Specifies the namespace of the backup custom resource. If not specified, the namespace of the opsRequest will be used. |
string | Specifies the point in time to which the restore should be performed. Supported time formats:
|
[]Kubernetes core/v1.EnvVar | (Optional) Specifies a list of environment variables to be set in the container. |
string | Specifies the policy for restoring volume claims of a Component’s Pods. It determines whether the volume claims should be restored sequentially (one by one) or in parallel (all at once). Support values:
|
bool | Controls the timing of PostReady actions during the recovery process. If false (default), PostReady actions execute when the Component reaches the “Running” state. If true, PostReady actions are delayed until the entire Cluster is “Running,” ensuring the cluster’s overall stability before proceeding. This setting is useful for coordinating PostReady operations across the Cluster for optimal cluster conditions. |
[]github.com/apecloud/kubeblocks/apis/dataprotection/v1alpha1.ParameterPair | (Optional) Specifies a list of name-value pairs representing parameters and their corresponding values.
Parameters match the schema specified in the |
Rule
(Appears on:PreCondition)
Field | Description |
---|---|
string | Specifies a Go template expression that determines how the operation can be executed.
The return value must be either
|
string | Specifies the error or status message reported if the |
ScaleIn
(Appears on:HorizontalScaling)
ScaleIn defines the configuration for a scale-in operation.
Field | Description |
---|---|
ReplicaChanger | (Members of Modifies the replicas of the component and instance templates. |
[]string | (Optional) Specifies the instance names that need to be taken offline. |
ScaleOut
(Appears on:HorizontalScaling)
ScaleOut defines the configuration for a scale-out operation.
Field | Description |
---|---|
ReplicaChanger | (Members of Modifies the replicas of the component and instance templates. |
[]github.com/apecloud/kubeblocks/apis/apps/v1.InstanceTemplate | (Optional) Defines the configuration for new instances added during scaling, including resource requirements, labels, annotations, etc. New instances are created based on the provided instance templates. |
[]string | (Optional) Specifies the instances in the offline list to bring back online. |
SpecificOpsRequest
(Appears on:OpsRequestSpec)
Field | Description |
---|---|
Upgrade | (Optional) Specifies the desired new version of the Cluster. Note: This field is immutable once set. |
[]HorizontalScaling | (Optional) Lists HorizontalScaling objects, each specifying scaling requirements for a Component, including desired replica changes, configurations for new instances, modifications for existing instances, and take offline/online the specified instances. |
[]VolumeExpansion | (Optional) Lists VolumeExpansion objects, each specifying a component and its corresponding volumeClaimTemplates that requires storage expansion. |
[]ComponentOps | (Optional) Lists Components to be started. If empty, all components will be started. |
[]ComponentOps | (Optional) Lists Components to be stopped. If empty, all components will be stopped. |
[]ComponentOps | (Optional) Lists Components to be restarted. |
[]Switchover | (Optional) Lists Switchover objects, each specifying a Component to perform the switchover operation. |
[]VerticalScaling | (Optional) Lists VerticalScaling objects, each specifying a component and its desired compute resources for vertical scaling. |
[]Reconfigure | (Optional) Lists Reconfigure objects, each specifying a Component and its configuration updates. |
[]Expose | (Optional) Lists Expose objects, each specifying a Component and its services to be exposed. |
Backup | (Optional) Specifies the parameters to back up a Cluster. |
Restore | (Optional) Specifies the parameters to restore a Cluster. Note that this restore operation will roll back cluster services. |
[]RebuildInstance | (Optional) Specifies the parameters to rebuild some instances. Rebuilding an instance involves restoring its data from a backup or another database replica. The instances being rebuilt usually serve as standby in the cluster. Hence, rebuilding instances is often also referred to as “standby reconstruction”. |
CustomOps | (Optional) Specifies a custom operation defined by OpsDefinition. |
Switchover
(Appears on:SpecificOpsRequest)
Field | Description |
---|---|
string | (Optional) Specifies the name of the Component as defined in the cluster.spec. |
string | (Optional) Specifies the name of the Component object. |
string | Specifies the instance whose role will be transferred. A typical usage is to transfer the leader role in a consensus system. |
string | (Optional) If CandidateName is specified, the role will be transferred to this instance. The name must match one of the pods in the component. Refer to ComponentDefinition’s Swtichover lifecycle action for more details. |
TypedObjectRef
(Appears on:OpsResourceModifierAction)
Field | Description |
---|---|
string | Specifies the group for the resource being referenced. If not specified, the referenced Kind must belong to the core API group. For all third-party types, this is mandatory. |
string | Specifies the type of resource being referenced. |
string | Indicates the name of the resource being referenced. |
UpdatedParameters
UpdatedParameters holds details about the modifications made to configuration parameters. Example:
updatedParameters:
updatedKeys:
my.cnf: '{"mysqld":{"max_connections":"100"}}'
Field | Description |
---|---|
map[string]string | (Optional) Maps newly added configuration files to their content. |
map[string]string | (Optional) Lists the name of configuration files that have been deleted. |
map[string]string | (Optional) Maps the name of configuration files to their updated content, detailing the changes made. |
Upgrade
(Appears on:SpecificOpsRequest)
Upgrade defines the parameters for an upgrade operation.
Field | Description |
---|---|
[]UpgradeComponent | (Optional) Lists components to be upgrade based on desired ComponentDefinition and ServiceVersion. From the perspective of cluster API, the reasonable combinations should be:
|
UpgradeComponent
(Appears on:Upgrade)
Field | Description |
---|---|
ComponentOps | (Members of Specifies the name of the Component. |
string | (Optional) Specifies the name of the ComponentDefinition, only exact matches are supported. |
string | (Optional) Specifies the version of the Service expected to be provisioned by this Component. Referring to the ServiceVersion defined by the ComponentDefinition and ComponentVersion. And ServiceVersion in ClusterComponentSpec is optional, when no version is specified, use the latest available version in ComponentVersion. |
VerticalScaling
(Appears on:SpecificOpsRequest)
VerticalScaling refers to the process of adjusting compute resources (e.g., CPU, memory) allocated to a Component. It defines the parameters required for the operation.
Field | Description |
---|---|
ComponentOps | (Members of Specifies the name of the Component. |
Kubernetes core/v1.ResourceRequirements | (Members of Defines the desired compute resources of the Component’s instances. |
[]InstanceResourceTemplate | (Optional) Specifies the desired compute resources of the instance template that need to vertical scale. |
VolumeExpansion
(Appears on:SpecificOpsRequest)
VolumeExpansion encapsulates the parameters required for a volume expansion operation.
Field | Description |
---|---|
ComponentOps | (Members of Specifies the name of the Component. |
[]OpsRequestVolumeClaimTemplate | Specifies a list of OpsRequestVolumeClaimTemplate objects, defining the volumeClaimTemplates that are used to expand the storage and the desired storage size for each one. |
Generated with gen-crd-api-reference-docs