Getting Started
Concepts and Features
Backup and Restore
In Place Update
Instance Template
Trouble Shooting
References
Upgrade KubeBlocks
Packages:
ComponentParameter
ComponentParameter is the Schema for the componentparameters API
Field | Description | ||||||
---|---|---|---|---|---|---|---|
|
| ||||||
|
| ||||||
Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
| ||||||
ComponentParameterSpec |
| ||||||
ComponentParameterStatus |
ParamConfigRenderer
ParamConfigRenderer is the Schema for the paramconfigrenderers API
Field | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
|
| ||||||||
|
| ||||||||
Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
| ||||||||
ParamConfigRendererSpec |
| ||||||||
ParamConfigRendererStatus |
Parameter
Parameter is the Schema for the parameters API
Field | Description | ||||
---|---|---|---|---|---|
|
| ||||
|
| ||||
Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
| ||||
ParameterSpec |
| ||||
ParameterStatus |
ParametersDefinition
ParametersDefinition is the Schema for the parametersdefinitions API
Field | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| ||||||||||||||||||||
|
| ||||||||||||||||||||
Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
| ||||||||||||||||||||
ParametersDefinitionSpec |
| ||||||||||||||||||||
ParametersDefinitionStatus |
AutoTrigger
(Appears on:ReloadAction)
AutoTrigger automatically perform the reload when specified conditions are met.
Field | Description |
---|---|
string | (Optional) The name of the process. |
CfgFileFormat
(string
alias)
(Appears on:FileFormatConfig)
CfgFileFormat defines formatter of configuration files.
Value | Description |
---|---|
"dotenv" | |
"hcl" | |
"ini" | |
"json" | |
"properties" | |
"props-plus" | |
"redis" | |
"toml" | |
"xml" | |
"yaml" |
ComponentConfigDescription
(Appears on:ParamConfigRendererSpec)
Field | Description |
---|---|
string | Specifies the config file name in the config template. |
string | (Optional) Specifies the name of the referenced componentTemplateSpec. |
FileFormatConfig | (Optional) Specifies the format of the configuration file and any associated parameters that are specific to the chosen format.
Supported formats include Each format may have its own set of parameters that can be configured.
For instance, when using the Example:
|
[]RerenderResourceType | (Optional) Specifies whether the configuration needs to be re-rendered after v-scale or h-scale operations to reflect changes. In some scenarios, the configuration may need to be updated to reflect the changes in resource allocation or cluster topology. Examples:
|
ComponentParameterSpec
(Appears on:ComponentParameter)
ComponentParameterSpec defines the desired state of ComponentConfiguration
Field | Description |
---|---|
string | (Optional) Specifies the name of the Cluster that this configuration is associated with. |
string | Represents the name of the Component that this configuration pertains to. |
[]ConfigTemplateItemDetail | (Optional) ConfigItemDetails is an array of ConfigTemplateItemDetail objects. Each ConfigTemplateItemDetail corresponds to a configuration template, which is a ConfigMap that contains multiple configuration files. Each configuration file is stored as a key-value pair within the ConfigMap. The ConfigTemplateItemDetail includes information such as:
|
ComponentParameterStatus
(Appears on:ComponentParameter)
ComponentParameterStatus defines the observed state of ComponentConfiguration
Field | Description |
---|---|
string | (Optional) Provides a description of any abnormal status. |
ParameterPhase | (Optional) Indicates the current status of the configuration item. Possible values include “Creating”, “Init”, “Running”, “Pending”, “Merged”, “MergeFailed”, “FailedAndPause”, “Upgrading”, “Deleting”, “FailedAndRetry”, “Finished”. |
int64 | (Optional) Represents the latest generation observed for this ClusterDefinition. It corresponds to the ConfigConstraint’s generation, which is updated by the API Server. |
[]Kubernetes meta/v1.Condition | (Optional) Provides detailed status information for opsRequest. |
[]ConfigTemplateItemDetailStatus | Provides the status of each component undergoing reconfiguration. |
ComponentParameters
(map[string]*string
alias)
(Appears on:ComponentParametersSpec)
ComponentParametersSpec
(Appears on:ParameterSpec)
Field | Description |
---|---|
string | Specifies the name of the Component. |
ComponentParameters | (Optional) Specifies the user-defined configuration template or parameters. |
map[string]github.com/apecloud/kubeblocks/apis/parameters/v1alpha1.ConfigTemplateExtension | (Optional) Specifies the user-defined configuration template. When provided, the |
ComponentReconfiguringStatus
(Appears on:ParameterStatus)
Field | Description |
---|---|
string | Specifies the name of the Component. |
ParameterPhase | (Optional) Indicates the current status of the configuration item. Possible values include “Creating”, “Init”, “Running”, “Pending”, “Merged”, “MergeFailed”, “FailedAndPause”, “Upgrading”, “Deleting”, “FailedAndRetry”, “Finished”. |
[]ReconfiguringStatus | Describes the status of the component reconfiguring. |
ConfigTemplateExtension
(Appears on:ComponentParametersSpec, ConfigTemplateItemDetail, ReconfiguringStatus)
Field | Description |
---|---|
string | Specifies the name of the referenced configuration template ConfigMap object. |
string | (Optional) Specifies the namespace of the referenced configuration template ConfigMap object. An empty namespace is equivalent to the “default” namespace. |
MergedPolicy | (Optional) Defines the strategy for merging externally imported templates into component templates. |
ConfigTemplateItemDetail
(Appears on:ComponentParameterSpec)
ConfigTemplateItemDetail corresponds to settings of a configuration template (a ConfigMap).
Field | Description |
---|---|
string | Defines the unique identifier of the configuration template. It must be a string of maximum 63 characters, and can only include lowercase alphanumeric characters, hyphens, and periods. The name must start and end with an alphanumeric character. |
Payload | (Optional) External controllers can trigger a configuration rerender by modifying this field. Note: Currently, the |
github.com/apecloud/kubeblocks/apis/apps/v1.ComponentFileTemplate | (Optional) Specifies the name of the configuration template (a ConfigMap), ConfigConstraint, and other miscellaneous options. The configuration template is a ConfigMap that contains multiple configuration files. Each configuration file is stored as a key-value pair within the ConfigMap. ConfigConstraint allows defining constraints and validation rules for configuration parameters. It ensures that the configuration adheres to certain requirements and limitations. |
ConfigTemplateExtension | (Optional) Specifies the user-defined configuration template. When provided, the |
map[string]github.com/apecloud/kubeblocks/apis/parameters/v1alpha1.ParametersInFile | (Optional) Specifies the user-defined configuration parameters. When provided, the parameter values in |
ConfigTemplateItemDetailStatus
(Appears on:ComponentParameterStatus, ReconfiguringStatus)
Field | Description |
---|---|
string | Specifies the name of the configuration template. It is a required field and must be a string of maximum 63 characters. The name should only contain lowercase alphanumeric characters, hyphens, or periods. It should start and end with an alphanumeric character. |
ParameterPhase | (Optional) Indicates the current status of the configuration item. Possible values include “Creating”, “Init”, “Running”, “Pending”, “Merged”, “MergeFailed”, “FailedAndPause”, “Upgrading”, “Deleting”, “FailedAndRetry”, “Finished”. |
string | (Optional) Represents the last completed revision of the configuration item. This field is optional. |
string | (Optional) Represents the updated revision of the configuration item. This field is optional. |
string | (Optional) Provides a description of any abnormal status. This field is optional. |
ReconcileDetail | (Optional) Provides detailed information about the execution of the configuration change. This field is optional. |
DownwardAPIChangeTriggeredAction
(Appears on:ParametersDefinitionSpec)
DownwardAPIChangeTriggeredAction defines an action that triggers specific commands in response to changes in Pod labels. For example, a command might be executed when the ‘role’ label of the Pod is updated.
Field | Description |
---|---|
string | Specifies the name of the field. It must be a string of maximum length 63.
The name should match the regex pattern |
string | Specifies the mount point of the Downward API volume. |
[]Kubernetes core/v1.DownwardAPIVolumeFile | Represents a list of files under the Downward API volume. |
[]string | (Optional) Specifies the command to be triggered when changes are detected in Downward API volume files. It relies on the inotify mechanism in the config-manager sidecar to monitor file changes. |
ScriptConfig | (Optional) ScriptConfig object specifies a ConfigMap that contains script files that should be mounted inside the pod. The scripts are mounted as volumes and can be referenced and executed by the DownwardAction to perform specific tasks or configurations. |
DynamicParameterSelectedPolicy
(string
alias)
DynamicParameterSelectedPolicy determines how to select the parameters of dynamic reload actions
Value | Description |
---|---|
"all" | |
"dynamic" |
DynamicReloadType
(string
alias)
DynamicReloadType defines reload method.
Value | Description |
---|---|
"auto" | |
"http" | |
"sql" | |
"exec" | |
"tpl" | |
"signal" |
FileFormatConfig
(Appears on:ComponentConfigDescription)
FileFormatConfig specifies the format of the configuration file and any associated parameters that are specific to the chosen format.
Field | Description |
---|---|
FormatterAction | (Members of Each format may have its own set of parameters that can be configured.
For instance, when using the |
CfgFileFormat | The config file format. Valid values are
|
FormatterAction
(Appears on:FileFormatConfig)
FormatterAction configures format-specific options for different configuration file format. Note: Only one of its members should be specified at any given time.
Field | Description |
---|---|
IniConfig | (Optional) Holds options specific to the ‘ini’ file format. |
IniConfig
(Appears on:FormatterAction)
IniConfig holds options specific to the ‘ini’ file format.
Field | Description |
---|---|
string | (Optional) A string that describes the name of the ini section. |
MergedPolicy
(string
alias)
(Appears on:ConfigTemplateExtension)
MergedPolicy defines how to merge external imported templates into component templates.
Value | Description |
---|---|
"none" | |
"add" | |
"patch" | |
"replace" |
ParamConfigRendererSpec
(Appears on:ParamConfigRenderer)
ParamConfigRendererSpec defines the desired state of ParamConfigRenderer
Field | Description |
---|---|
string | Specifies the ComponentDefinition custom resource (CR) that defines the Component’s characteristics and behavior. |
string | (Optional) ServiceVersion specifies the version of the Service expected to be provisioned by this Component. The version should follow the syntax and semantics of the “Semantic Versioning” specification (http://semver.org/). If no version is specified, the latest available version will be used. |
[]string | (Optional) Specifies the ParametersDefinition custom resource (CR) that defines the Component parameter’s schema and behavior. |
[]ComponentConfigDescription | (Optional) Specifies the configuration files. |
ParamConfigRendererStatus
(Appears on:ParamConfigRenderer)
ParamConfigRendererStatus defines the observed state of ParamConfigRenderer
Field | Description |
---|---|
int64 | (Optional) The most recent generation number of the ParamsDesc object that has been observed by the controller. |
string | (Optional) Provides additional information about the current phase. |
ParametersDescPhase | (Optional) Specifies the status of the configuration template. When set to PDAvailablePhase, the ParamsDesc can be referenced by ComponentDefinition. |
ParameterDeletedMethod
(string
alias)
(Appears on:ParameterDeletedPolicy)
ParameterDeletedMethod defines how to handle parameter remove
Value | Description |
---|---|
"RestoreToDefault" | |
"Reset" |
ParameterDeletedPolicy
(Appears on:ParametersDefinitionSpec)
Field | Description |
---|---|
ParameterDeletedMethod | Specifies the method to handle the deletion of a parameter. If set to “RestoreToDefault”, the parameter will be restored to its default value, which requires engine support, such as pg. If set to “Reset”, the parameter will be re-rendered through the configuration template. |
string | (Optional) Specifies the value to use if DeletedMethod is RestoreToDefault. Example: pg SET configuration_parameter TO DEFAULT; |
ParameterPhase
(string
alias)
(Appears on:ComponentParameterStatus, ComponentReconfiguringStatus, ConfigTemplateItemDetailStatus, ParameterStatus)
ParameterPhase defines the Configuration FSM phase
Value | Description |
---|---|
"Creating" | |
"Deleting" | |
"FailedAndPause" | |
"FailedAndRetry" | |
"Finished" | |
"Init" | |
"MergeFailed" | |
"Merged" | |
"Pending" | |
"Running" | |
"Upgrading" |
ParameterSpec
(Appears on:Parameter)
ParameterSpec defines the desired state of Parameter
Field | Description |
---|---|
string | Specifies the name of the Cluster resource that this operation is targeting. |
[]ComponentParametersSpec | Lists ComponentParametersSpec objects, each specifying a Component and its parameters and template updates. |
ParameterStatus
(Appears on:Parameter)
ParameterStatus defines the observed state of Parameter
Field | Description |
---|---|
string | (Optional) Provides a description of any abnormal status. |
ParameterPhase | (Optional) Indicates the current status of the configuration item. Possible values include “Creating”, “Init”, “Running”, “Pending”, “Merged”, “MergeFailed”, “FailedAndPause”, “Upgrading”, “Deleting”, “FailedAndRetry”, “Finished”. |
int64 | (Optional) Represents the latest generation observed for this ClusterDefinition. It corresponds to the ConfigConstraint’s generation, which is updated by the API Server. |
[]ComponentReconfiguringStatus | (Optional) Records the status of a reconfiguring operation if |
ParametersDefinitionSpec
(Appears on:ParametersDefinition)
ParametersDefinitionSpec defines the desired state of ParametersDefinition
Field | Description |
---|---|
string | (Optional) Specifies the config file name in the config template. |
ParametersSchema | (Optional) Defines a list of parameters including their names, default values, descriptions, types, and constraints (permissible values or the range of valid values). |
ReloadAction | (Optional) Specifies the dynamic reload (dynamic reconfiguration) actions supported by the engine. When set, the controller executes the scripts defined in these actions to handle dynamic parameter updates. Dynamic reloading is triggered only if both of the following conditions are met:
If Example:
|
[]DownwardAPIChangeTriggeredAction | (Optional) Specifies a list of actions to execute specified commands based on Pod labels. It utilizes the K8s Downward API to mount label information as a volume into the pod. The ‘config-manager’ sidecar container watches for changes in the role label and dynamically invoke registered commands (usually execute some SQL statements) when a change is detected. It is designed for scenarios where:
|
ParameterDeletedPolicy | (Optional) Specifies the policy when parameter be removed. |
bool | (Optional) Indicates whether to consolidate dynamic reload and restart actions into a single restart.
This flag allows for more efficient handling of configuration changes by potentially eliminating an unnecessary reload step. |
bool | (Optional) Configures whether the dynamic reload specified in
|
[]string | (Optional) List static parameters. Modifications to any of these parameters require a restart of the process to take effect. |
[]string | (Optional) List dynamic parameters. Modifications to these parameters trigger a configuration reload without requiring a process restart. |
[]string | (Optional) Lists the parameters that cannot be modified once set. Attempting to change any of these parameters will be ignored. |
ParametersDefinitionStatus
(Appears on:ParametersDefinition)
ParametersDefinitionStatus defines the observed state of ParametersDefinition
Field | Description |
---|---|
int64 | (Optional) The most recent generation number of the ParamsDesc object that has been observed by the controller. |
ParametersDescPhase | (Optional) Specifies the status of the configuration template. When set to PDAvailablePhase, the ParamsDesc can be referenced by ComponentDefinition. |
[]Kubernetes meta/v1.Condition | (Optional) Represents a list of detailed status of the ParametersDescription object. This field is crucial for administrators and developers to monitor and respond to changes within the ParametersDescription. It provides a history of state transitions and a snapshot of the current state that can be used for automated logic or direct inspection. |
ParametersDescPhase
(string
alias)
(Appears on:ParamConfigRendererStatus, ParametersDefinitionStatus)
ParametersDescPhase defines the ParametersDescription CR .status.phase
Value | Description |
---|---|
"Available" | |
"Deleting" | |
"Unavailable" |
ParametersInFile
(Appears on:ConfigTemplateItemDetail, ReconfiguringStatus)
Field | Description |
---|---|
string | (Optional) Holds the configuration keys and values. This field is a workaround for issues found in kubebuilder and code-generator. Refer to https://github.com/kubernetes-sigs/kubebuilder/issues/528 and https://github.com/kubernetes/code-generator/issues/50 for more details. Represents the content of the configuration file. |
map[string]*string | (Optional) Represents the updated parameters for a single configuration file. |
ParametersSchema
(Appears on:ParametersDefinitionSpec)
ParametersSchema Defines a list of configuration items with their names, default values, descriptions, types, and constraints.
Field | Description |
---|---|
string | (Optional) Specifies the top-level key in the ‘configSchema.cue’ that organizes the validation rules for parameters. This key must exist within the CUE script defined in ‘configSchema.cue’. |
string | (Optional) Hold a string that contains a script written in CUE language that defines a list of configuration items. Each item is detailed with its name, default value, description, type (e.g. string, integer, float), and constraints (permissible values or the valid range of values). CUE (Configure, Unify, Execute) is a declarative language designed for defining and validating complex data configurations. It is particularly useful in environments like K8s where complex configurations and validation rules are common. This script functions as a validator for user-provided configurations, ensuring compliance with the established specifications and constraints. |
Kubernetes api extensions v1.JSONSchemaProps | Generated from the ‘cue’ field and transformed into a JSON format. |
Payload
(map[string]encoding/json.RawMessage
alias)
(Appears on:ConfigTemplateItemDetail)
Payload holds the payload data. This field is optional and can contain any type of data. Not included in the JSON representation of the object.
ReconcileDetail
(Appears on:ConfigTemplateItemDetailStatus)
Field | Description |
---|---|
string | (Optional) Represents the policy applied during the most recent execution. |
string | (Optional) Represents the outcome of the most recent execution. |
string | (Optional) Represents the current revision of the configuration item. |
int32 | (Optional) Represents the number of pods where configuration changes were successfully applied. |
int32 | (Optional) Represents the total number of pods that require execution of configuration changes. |
string | (Optional) Represents the error message generated when the execution of configuration changes fails. |
ReconfiguringStatus
(Appears on:ComponentReconfiguringStatus)
Field | Description |
---|---|
ConfigTemplateItemDetailStatus | (Members of |
map[string]github.com/apecloud/kubeblocks/apis/parameters/v1alpha1.ParametersInFile | (Optional) Contains the updated parameters. |
ConfigTemplateExtension | (Optional) Specifies the user-defined configuration template. When provided, the |
ReloadAction
(Appears on:ParametersDefinitionSpec)
ReloadAction defines the mechanisms available for dynamically reloading a process within K8s without requiring a restart.
Only one of the mechanisms can be specified at a time.
Field | Description |
---|---|
UnixSignalTrigger | (Optional) Used to trigger a reload by sending a specific Unix signal to the process. |
ShellTrigger | (Optional) Allows to execute a custom shell script to reload the process. |
TPLScriptTrigger | (Optional) Enables reloading process using a Go template script. |
AutoTrigger | (Optional) Automatically perform the reload when specified conditions are met. |
Kubernetes meta/v1.LabelSelector | (Optional) Used to match labels on the pod to determine whether a dynamic reload should be performed. In some scenarios, only specific pods (e.g., primary replicas) need to undergo a dynamic reload.
The If the |
ReloadPolicy
(string
alias)
ReloadPolicy defines the policy of reconfiguring.
Value | Description |
---|---|
"asyncReload" | |
"dynamicReloadBeginRestart" | |
"none" | |
"restartContainer" | |
"restart" | |
"rolling" | |
"syncReload" |
RerenderResourceType
(string
alias)
(Appears on:ComponentConfigDescription)
RerenderResourceType defines the resource requirements for a component.
Value | Description |
---|---|
"hscale" | |
"tls" | |
"vscale" | |
"shardingHScale" |
ScriptConfig
(Appears on:DownwardAPIChangeTriggeredAction, ShellTrigger, TPLScriptTrigger)
Field | Description |
---|---|
string | Specifies the reference to the ConfigMap containing the scripts. |
string | (Optional) Specifies the namespace for the ConfigMap. If not specified, it defaults to the “default” namespace. |
ShellTrigger
(Appears on:ReloadAction)
ShellTrigger allows to execute a custom shell script to reload the process.
Field | Description |
---|---|
[]string | Specifies the command to execute in order to reload the process. It should be a valid shell command. |
bool | (Optional) Determines the synchronization mode of parameter updates with “config-manager”.
|
bool | (Optional) Controls whether parameter updates are processed individually or collectively in a batch:
Defaults to ‘False’ if unspecified. |
string | (Optional) Specifies a Go template string for formatting batch input data.
It’s used when Example template:
This example generates batch input data in a key format, sorted by keys.
If not specified, the default format is key=value, sorted by keys, for each updated parameter.
|
ToolsSetup | (Optional) Specifies the tools container image used by ShellTrigger for dynamic reload. If the dynamic reload action is triggered by a ShellTrigger, this field is required. This image must contain all necessary tools for executing the ShellTrigger scripts. Usually the specified image is referenced by the init container, which is then responsible for copy the tools from the image to a bin volume. This ensures that the tools are available to the ‘config-manager’ sidecar. |
ScriptConfig | (Optional) ScriptConfig object specifies a ConfigMap that contains script files that should be mounted inside the pod. The scripts are mounted as volumes and can be referenced and executed by the dynamic reload. |
SignalType
(string
alias)
(Appears on:UnixSignalTrigger)
SignalType defines which signals are valid.
Value | Description |
---|---|
"SIGABRT" | |
"SIGALRM" | |
"SIGBUS" | |
"SIGCHLD" | |
"SIGCONT" | |
"SIGFPE" | |
"SIGHUP" | |
"SIGILL" | |
"SIGINT" | |
"SIGIO" | |
"SIGKILL" | |
"SIGPIPE" | |
"SIGPROF" | |
"SIGPWR" | |
"SIGQUIT" | |
"SIGSEGV" | |
"SIGSTKFLT" | |
"SIGSTOP" | |
"SIGSYS" | |
"SIGTERM" | |
"SIGTRAP" | |
"SIGTSTP" | |
"SIGTTIN" | |
"SIGTTOU" | |
"SIGURG" | |
"SIGUSR1" | |
"SIGUSR2" | |
"SIGVTALRM" | |
"SIGWINCH" | |
"SIGXCPU" | |
"SIGXFSZ" |
TPLScriptTrigger
(Appears on:ReloadAction)
TPLScriptTrigger Enables reloading process using a Go template script.
Field | Description |
---|---|
ScriptConfig | (Members of Specifies the ConfigMap that contains the script to be executed for reload. |
bool | (Optional) Determines whether parameter updates should be synchronized with the “config-manager”. Specifies the controller’s reload strategy:
|
ToolConfig
(Appears on:ToolsSetup)
ToolConfig specifies the settings of an init container that prepare tools for dynamic reload.
Field | Description |
---|---|
string | Specifies the name of the init container. |
bool | (Optional) Indicates whether the tool image should be used as the container image for a sidecar. This is useful for large tool images, such as those for C++ tools, which may depend on numerous libraries (e.g., *.so files). If enabled, the tool image is deployed as a sidecar container image. Examples:
generated containers:
|
string | (Optional) Specifies the tool container image. |
[]string | (Optional) Specifies the command to be executed by the init container. |
ToolsSetup
(Appears on:ShellTrigger)
ToolsSetup prepares the tools for dynamic reloads used in ShellTrigger from a specified container image.
Example:
toolsSetup:
mountPoint: /kb_tools
toolConfigs:
- name: kb-tools
command:
- cp
- /bin/ob-tools
- /kb_tools/obtools
image: docker.io/apecloud/obtools
This example copies the “/bin/ob-tools” binary from the image to “/kb_tools/obtools”.
Field | Description |
---|---|
string | Specifies the directory path in the container where the tools-related files are to be copied. This field is typically used with an emptyDir volume to ensure a temporary, empty directory is provided at pod creation. |
[]ToolConfig | (Optional) Specifies a list of settings of init containers that prepare tools for dynamic reload. |
UnixSignalTrigger
(Appears on:ReloadAction)
UnixSignalTrigger is used to trigger a reload by sending a specific Unix signal to the process.
Field | Description |
---|---|
SignalType | Specifies a valid Unix signal to be sent. For a comprehensive list of all Unix signals, see: ../../pkg/configuration/configmap/handler.go |
string | Identifies the name of the process to which the Unix signal will be sent. |
Generated with gen-crd-api-reference-docs