diff --git a/.github/utils/utils.sh b/.github/utils/utils.sh index 6bc5d46e2a5..41ac977a6ca 100644 --- a/.github/utils/utils.sh +++ b/.github/utils/utils.sh @@ -511,6 +511,12 @@ get_trigger_mode() { pkg/cli/cmd/*) add_trigger_mode "[cli][test]" ;; + apis/*) + add_trigger_mode "[apis][test]" + ;; + pkg/lorry/ctl/*) + add_trigger_mode "[lorry][test]" + ;; *) add_trigger_mode "[test]" ;; diff --git a/.github/workflows/cicd-push.yml b/.github/workflows/cicd-push.yml index 855d0aed49b..350c729cd18 100644 --- a/.github/workflows/cicd-push.yml +++ b/.github/workflows/cicd-push.yml @@ -236,3 +236,41 @@ jobs: WORKFLOW_ID: "deploy.yml" APECD_REF: "v0.1.43" secrets: inherit + + apis-doc: + needs: [ trigger-mode ] + runs-on: ubuntu-latest + if: ${{ contains(needs.trigger-mode.outputs.trigger-mode, '[apis]') || contains(needs.trigger-mode.outputs.trigger-mode, '[lorry]') }} + steps: + - uses: actions/checkout@v4 + - name: install lib + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends \ + libbtrfs-dev \ + libdevmapper-dev + + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: "${{ env.GO_VERSION }}" + + - name: Check apis doc + id: check-apis-doc + run: | + make doc + FILE_CHANGES=`git diff --name-only ${{ github.sha }}` + if [[ ! -z "$FILE_CHANGES" ]]; then + echo $FILE_CHANGES + git config --local user.name "$GITHUB_ACTOR" + git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com" + git commit -a -m "chore: auto update apis doc changes" + fi + echo file_changes=$FILE_CHANGES >> $GITHUB_OUTPUT + + - name: Push apis doc changes + uses: ad-m/github-push-action@master + if: ${{ steps.check-apis-doc.outputs.file_changes }} + with: + github_token: ${{ env.GITHUB_TOKEN }} + branch: ${{ github.ref }} diff --git a/Makefile b/Makefile index b438cca39b7..73424246ca9 100644 --- a/Makefile +++ b/Makefile @@ -263,6 +263,8 @@ lorryctl-doc: generate test-go-generate ## generate CLI command reference manual api-doc: ## generate API reference manual. @./hack/docgen/api/generate.sh +.PHONY: doc +doc: lorryctl-doc api-doc ## generate all documents. ##@ Operator Controller Manager diff --git a/apis/apps/v1alpha1/cluster_types.go b/apis/apps/v1alpha1/cluster_types.go index 65143b08d91..6defd69fe81 100644 --- a/apis/apps/v1alpha1/cluster_types.go +++ b/apis/apps/v1alpha1/cluster_types.go @@ -289,7 +289,7 @@ type ClusterStatus struct { // ShardingSpec defines the sharding spec. type ShardingSpec struct { // name defines sharding name, this name is also part of Service DNS name, so this name will comply with IANA Service Naming rule. - // The name is also used to generate the name of the underlying components with the naming pattern -. + // The name is also used to generate the name of the underlying components with the naming pattern `$(ShardingSpec.Name)-$(ShardID)`. // At the same time, the name of component template defined in ShardingSpec.Template.Name will be ignored. // +kubebuilder:validation:Required // +kubebuilder:validation:MaxLength=15 diff --git a/apis/apps/v1alpha1/doc.go b/apis/apps/v1alpha1/doc.go index 6010c997b80..c48dc169c76 100644 --- a/apis/apps/v1alpha1/doc.go +++ b/apis/apps/v1alpha1/doc.go @@ -17,7 +17,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -//go:generate go run ../../../hack/docgen/api/main.go -api-dir . -config ../../../hack/docgen/api/gen-api-doc-config.json -template-dir ../../../hack/docgen/api/template -out-file ../../../docs/user_docs/api-reference/cluster.md +//go:generate go run ../../../hack/docgen/api/main.go -api-dir . -config ../../../hack/docgen/api/gen-api-doc-config.json -template-dir ../../../hack/docgen/api/template -out-file ../../../docs/developer_docs/api-reference/cluster.md // +k8s:deepcopy-gen=package,register // +k8s:openapi-gen=true diff --git a/apis/apps/v1alpha1/opsdefinition_types.go b/apis/apps/v1alpha1/opsdefinition_types.go index b902d588ae2..208f7ed7e59 100644 --- a/apis/apps/v1alpha1/opsdefinition_types.go +++ b/apis/apps/v1alpha1/opsdefinition_types.go @@ -64,12 +64,12 @@ type ComponentDefinitionRef struct { Name string `json:"name"` // the account name of the component. - // will inject the account username and password to KB_ACCOUNT_USERNAME and KB_ACCOUNT_PASSWORD in env of the job. + // will inject the account username and password to `KB_ACCOUNT_USERNAME` and `KB_ACCOUNT_PASSWORD` in env of the job. // +optional AccountName string `json:"accountName,omitempty"` // reference the services[*].name. - // will map the service name and ports to KB_COMP_SVC_NAME and KB_COMP_SVC_PORT_ in env of the job. + // will map the service name and ports to `KB_COMP_SVC_NAME` and `KB_COMP_SVC_PORT_$(portName)` in env of the job. // portName will replace the characters '-' to '_' and convert to uppercase. // +optional ServiceName string `json:"serviceName,omitempty"` @@ -215,7 +215,7 @@ type OpsDefinition struct { Status OpsDefinitionStatus `json:"status,omitempty"` } -//+kubebuilder:object:root=true +// +kubebuilder:object:root=true // OpsDefinitionList contains a list of OpsDefinition type OpsDefinitionList struct { diff --git a/apis/apps/v1alpha1/type.go b/apis/apps/v1alpha1/type.go index 7ff3ad1e92a..fbac732d573 100644 --- a/apis/apps/v1alpha1/type.go +++ b/apis/apps/v1alpha1/type.go @@ -622,8 +622,8 @@ type ComponentService struct { // GeneratePodOrdinalService indicates whether to create a corresponding Service for each Pod of the selected Component. // If sets to true, a set of Service will be automatically generated for each Pod. And Service.RoleSelector will be ignored. - // They can be referred to by adding the PodOrdinal to the defined ServiceName with named pattern -. - // And the Service.Name will also be generated with named pattern -. + // They can be referred to by adding the PodOrdinal to the defined ServiceName with named pattern `$(Service.ServiceName)-$(PodOrdinal)`. + // And the Service.Name will also be generated with named pattern `$(Service.Name)-$(PodOrdinal)`. // The PodOrdinal is zero-based, and the number of generated Services is equal to the number of replicas of the Component. // For example, a Service might be defined as follows: // - name: my-service @@ -651,8 +651,8 @@ type Service struct { // ServiceName defines the name of the underlying service object. // If not specified, the default service name with different patterns will be used: - // - : for cluster-level services - // - -: for component-level services + // - CLUSTER_NAME: for cluster-level services + // - CLUSTER_NAME-COMPONENT_NAME: for component-level services // Only one default service name is allowed. // Cannot be updated. // +optional @@ -797,7 +797,7 @@ type ServiceVarSelector struct { // GeneratePodOrdinalServiceVar indicates whether to create a corresponding ServiceVars reference variable for each Pod. // If set to true, a set of ServiceVars that can be referenced will be automatically generated for each Pod Ordinal. - // They can be referred to by adding the PodOrdinal to the defined name template with named pattern $_. + // They can be referred to by adding the PodOrdinal to the defined name template with named pattern `$(Vars[x].Name)_$(PodOrdinal)`. // For example, a ServiceVarRef might be defined as follows: // - name: MY_SERVICE_PORT // valueFrom: diff --git a/apis/dataprotection/v1alpha1/doc.go b/apis/dataprotection/v1alpha1/doc.go index 4d1c53f3cd1..f84c24f9df5 100644 --- a/apis/dataprotection/v1alpha1/doc.go +++ b/apis/dataprotection/v1alpha1/doc.go @@ -17,7 +17,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -//go:generate go run ../../../hack/docgen/api/main.go -api-dir . -config ../../../hack/docgen/api/gen-api-doc-config.json -template-dir ../../../hack/docgen/api/template -out-file ../../../docs/user_docs/api-reference/backup.md +//go:generate go run ../../../hack/docgen/api/main.go -api-dir . -config ../../../hack/docgen/api/gen-api-doc-config.json -template-dir ../../../hack/docgen/api/template -out-file ../../../docs/developer_docs/api-reference/backup.md // +k8s:deepcopy-gen=package,register // +k8s:openapi-gen=true diff --git a/apis/dataprotection/v1alpha1/restore_types.go b/apis/dataprotection/v1alpha1/restore_types.go index 86dd3c97ef1..7bfb50df138 100644 --- a/apis/dataprotection/v1alpha1/restore_types.go +++ b/apis/dataprotection/v1alpha1/restore_types.go @@ -227,7 +227,7 @@ type RestoreVolumeClaimsTemplate struct { Templates []RestoreVolumeClaim `json:"templates"` // the replicas of persistent volume claim which need to be created and restored. - // the format of created claim name is "-". + // the format of created claim name is `$(template-name)-$(index)`. // +kubebuilder:validation:Minimum=1 // +kubebuilder:validation:Required Replicas int32 `json:"replicas"` @@ -337,7 +337,7 @@ type RestoreStatusAction struct { // +kubebuilder:validation:Required ObjectKey string `json:"objectKey"` - // message is a human readable message indicating details about the object condition. + // message is a human-readable message indicating details about the object condition. // +optional Message string `json:"message,omitempty"` diff --git a/apis/extensions/v1alpha1/addon_types.go b/apis/extensions/v1alpha1/addon_types.go index 1e3ee6b2da2..57aa408a300 100644 --- a/apis/extensions/v1alpha1/addon_types.go +++ b/apis/extensions/v1alpha1/addon_types.go @@ -32,16 +32,22 @@ import ( // AddonSpec defines the desired state of an add-on. // +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'Helm' ? has(self.helm) : !has(self.helm)",message="spec.helm is required when spec.type is Helm, and forbidden otherwise" type AddonSpec struct { - // Addon description. + // Add-on description. // +optional Description string `json:"description,omitempty"` // Add-on type. The valid value is helm. // +unionDiscriminator // +kubebuilder:validation:Required - Type AddonType `json:"type"` - Version string `json:"version,omitempty"` - Provider string `json:"provider,omitempty"` + Type AddonType `json:"type"` + + // Add-on version. + // +optional + Version string `json:"version,omitempty"` + + // Add-on provider. + // +optional + Provider string `json:"provider,omitempty"` // Helm installation spec. It's processed only when type=helm. // +optional @@ -307,7 +313,7 @@ type DataObjectKeySelector struct { type AddonDefaultInstallSpecItem struct { AddonInstallSpec `json:",inline"` - // Addon installs parameters selectors by default. If multiple selectors are provided, + // Add-on installs parameters selectors by default. If multiple selectors are provided, // all selectors must evaluate to true. // +optional Selectors []SelectorRequirement `json:"selectors,omitempty"` diff --git a/apis/extensions/v1alpha1/doc.go b/apis/extensions/v1alpha1/doc.go index 80f9bafa860..e6d1d419434 100644 --- a/apis/extensions/v1alpha1/doc.go +++ b/apis/extensions/v1alpha1/doc.go @@ -17,7 +17,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ -//go:generate go run ../../../hack/docgen/api/main.go -api-dir . -config ../../../hack/docgen/api/gen-api-doc-config.json -template-dir ../../../hack/docgen/api/template -out-file ../../../docs/user_docs/api-reference/add-on.md +//go:generate go run ../../../hack/docgen/api/main.go -api-dir . -config ../../../hack/docgen/api/gen-api-doc-config.json -template-dir ../../../hack/docgen/api/template -out-file ../../../docs/developer_docs/api-reference/add-on.md // +k8s:deepcopy-gen=package,register // +k8s:openapi-gen=true diff --git a/config/crd/bases/apps.kubeblocks.io_clusters.yaml b/config/crd/bases/apps.kubeblocks.io_clusters.yaml index 6ee0db57963..ae09ba34d02 100644 --- a/config/crd/bases/apps.kubeblocks.io_clusters.yaml +++ b/config/crd/bases/apps.kubeblocks.io_clusters.yaml @@ -1020,10 +1020,10 @@ spec: serviceName: description: 'ServiceName defines the name of the underlying service object. If not specified, the default service name - with different patterns will be used: - : for - cluster-level services - -: - for component-level services Only one default service name - is allowed. Cannot be updated.' + with different patterns will be used: - CLUSTER_NAME: for + cluster-level services - CLUSTER_NAME-COMPONENT_NAME: for + component-level services Only one default service name is + allowed. Cannot be updated.' type: string shardingSelector: description: ShardingSelector extends the ServiceSpec.Selector @@ -1396,7 +1396,7 @@ spec: description: name defines sharding name, this name is also part of Service DNS name, so this name will comply with IANA Service Naming rule. The name is also used to generate the name of - the underlying components with the naming pattern -. + the underlying components with the naming pattern `$(ShardingSpec.Name)-$(ShardID)`. At the same time, the name of component template defined in ShardingSpec.Template.Name will be ignored. maxLength: 15 diff --git a/config/crd/bases/apps.kubeblocks.io_componentdefinitions.yaml b/config/crd/bases/apps.kubeblocks.io_componentdefinitions.yaml index aee17cee67d..a50c219c40b 100644 --- a/config/crd/bases/apps.kubeblocks.io_componentdefinitions.yaml +++ b/config/crd/bases/apps.kubeblocks.io_componentdefinitions.yaml @@ -11506,9 +11506,9 @@ spec: Component. If sets to true, a set of Service will be automatically generated for each Pod. And Service.RoleSelector will be ignored. They can be referred to by adding the PodOrdinal to the defined - ServiceName with named pattern -. + ServiceName with named pattern `$(Service.ServiceName)-$(PodOrdinal)`. And the Service.Name will also be generated with named pattern - -. The PodOrdinal is zero-based, + `$(Service.Name)-$(PodOrdinal)`. The PodOrdinal is zero-based, and the number of generated Services is equal to the number of replicas of the Component. For example, a Service might be defined as follows: - name: my-service serviceName: my-service @@ -11533,10 +11533,10 @@ spec: serviceName: description: 'ServiceName defines the name of the underlying service object. If not specified, the default service name - with different patterns will be used: - : for - cluster-level services - -: - for component-level services Only one default service name - is allowed. Cannot be updated.' + with different patterns will be used: - CLUSTER_NAME: for + cluster-level services - CLUSTER_NAME-COMPONENT_NAME: for + component-level services Only one default service name is + allowed. Cannot be updated.' type: string spec: description: Spec defines the behavior of a service. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status @@ -12122,7 +12122,7 @@ spec: that can be referenced will be automatically generated for each Pod Ordinal. They can be referred to by adding the PodOrdinal to the defined name template with named - pattern $_. For example, + pattern `$(Vars[x].Name)_$(PodOrdinal)`. For example, a ServiceVarRef might be defined as follows: - name: MY_SERVICE_PORT valueFrom: serviceVarRef: compDef: my-component-definition name: my-service optional: diff --git a/config/crd/bases/apps.kubeblocks.io_opsdefinitions.yaml b/config/crd/bases/apps.kubeblocks.io_opsdefinitions.yaml index 49de1eb25c6..382123cb712 100644 --- a/config/crd/bases/apps.kubeblocks.io_opsdefinitions.yaml +++ b/config/crd/bases/apps.kubeblocks.io_opsdefinitions.yaml @@ -57,8 +57,8 @@ spec: properties: accountName: description: the account name of the component. will inject - the account username and password to KB_ACCOUNT_USERNAME and - KB_ACCOUNT_PASSWORD in env of the job. + the account username and password to `KB_ACCOUNT_USERNAME` + and `KB_ACCOUNT_PASSWORD` in env of the job. type: string name: description: refer to componentDefinition name. @@ -66,7 +66,7 @@ spec: type: string serviceName: description: reference the services[*].name. will map the service - name and ports to KB_COMP_SVC_NAME and KB_COMP_SVC_PORT_ + name and ports to `KB_COMP_SVC_NAME` and `KB_COMP_SVC_PORT_$(portName)` in env of the job. portName will replace the characters '-' to '_' and convert to uppercase. type: string diff --git a/config/crd/bases/dataprotection.kubeblocks.io_restores.yaml b/config/crd/bases/dataprotection.kubeblocks.io_restores.yaml index 74ca70341cd..828664a13b5 100644 --- a/config/crd/bases/dataprotection.kubeblocks.io_restores.yaml +++ b/config/crd/bases/dataprotection.kubeblocks.io_restores.yaml @@ -1724,7 +1724,7 @@ spec: replicas: description: the replicas of persistent volume claim which need to be created and restored. the format of created claim - name is "-". + name is `$(template-name)-$(index)`. format: int32 minimum: 1 type: integer @@ -2360,7 +2360,7 @@ spec: format: date-time type: string message: - description: message is a human readable message indicating + description: message is a human-readable message indicating details about the object condition. type: string name: @@ -2401,7 +2401,7 @@ spec: format: date-time type: string message: - description: message is a human readable message indicating + description: message is a human-readable message indicating details about the object condition. type: string name: diff --git a/config/crd/bases/extensions.kubeblocks.io_addons.yaml b/config/crd/bases/extensions.kubeblocks.io_addons.yaml index 59f3928b115..8b711421a11 100644 --- a/config/crd/bases/extensions.kubeblocks.io_addons.yaml +++ b/config/crd/bases/extensions.kubeblocks.io_addons.yaml @@ -22,6 +22,14 @@ spec: jsonPath: .spec.type name: TYPE type: string + - description: addon version + jsonPath: .spec.version + name: VERSION + type: string + - description: addon provider + jsonPath: .spec.provider + name: PROVIDER + type: string - description: status phase jsonPath: .status.phase name: STATUS @@ -164,7 +172,7 @@ spec: type: object type: object selectors: - description: Addon installs parameters selectors by default. + description: Add-on installs parameters selectors by default. If multiple selectors are provided, all selectors must evaluate to true. items: @@ -216,7 +224,7 @@ spec: minItems: 1 type: array description: - description: Addon description. + description: Add-on description. type: string helm: description: Helm installation spec. It's processed only when type=helm. @@ -602,11 +610,17 @@ spec: required: - autoInstall type: object + provider: + description: Add-on provider. + type: string type: description: Add-on type. The valid value is helm. enum: - Helm type: string + version: + description: Add-on version. + type: string required: - defaultInstallValues - type diff --git a/deploy/helm/crds/apps.kubeblocks.io_clusters.yaml b/deploy/helm/crds/apps.kubeblocks.io_clusters.yaml index 6ee0db57963..ae09ba34d02 100644 --- a/deploy/helm/crds/apps.kubeblocks.io_clusters.yaml +++ b/deploy/helm/crds/apps.kubeblocks.io_clusters.yaml @@ -1020,10 +1020,10 @@ spec: serviceName: description: 'ServiceName defines the name of the underlying service object. If not specified, the default service name - with different patterns will be used: - : for - cluster-level services - -: - for component-level services Only one default service name - is allowed. Cannot be updated.' + with different patterns will be used: - CLUSTER_NAME: for + cluster-level services - CLUSTER_NAME-COMPONENT_NAME: for + component-level services Only one default service name is + allowed. Cannot be updated.' type: string shardingSelector: description: ShardingSelector extends the ServiceSpec.Selector @@ -1396,7 +1396,7 @@ spec: description: name defines sharding name, this name is also part of Service DNS name, so this name will comply with IANA Service Naming rule. The name is also used to generate the name of - the underlying components with the naming pattern -. + the underlying components with the naming pattern `$(ShardingSpec.Name)-$(ShardID)`. At the same time, the name of component template defined in ShardingSpec.Template.Name will be ignored. maxLength: 15 diff --git a/deploy/helm/crds/apps.kubeblocks.io_componentdefinitions.yaml b/deploy/helm/crds/apps.kubeblocks.io_componentdefinitions.yaml index aee17cee67d..a50c219c40b 100644 --- a/deploy/helm/crds/apps.kubeblocks.io_componentdefinitions.yaml +++ b/deploy/helm/crds/apps.kubeblocks.io_componentdefinitions.yaml @@ -11506,9 +11506,9 @@ spec: Component. If sets to true, a set of Service will be automatically generated for each Pod. And Service.RoleSelector will be ignored. They can be referred to by adding the PodOrdinal to the defined - ServiceName with named pattern -. + ServiceName with named pattern `$(Service.ServiceName)-$(PodOrdinal)`. And the Service.Name will also be generated with named pattern - -. The PodOrdinal is zero-based, + `$(Service.Name)-$(PodOrdinal)`. The PodOrdinal is zero-based, and the number of generated Services is equal to the number of replicas of the Component. For example, a Service might be defined as follows: - name: my-service serviceName: my-service @@ -11533,10 +11533,10 @@ spec: serviceName: description: 'ServiceName defines the name of the underlying service object. If not specified, the default service name - with different patterns will be used: - : for - cluster-level services - -: - for component-level services Only one default service name - is allowed. Cannot be updated.' + with different patterns will be used: - CLUSTER_NAME: for + cluster-level services - CLUSTER_NAME-COMPONENT_NAME: for + component-level services Only one default service name is + allowed. Cannot be updated.' type: string spec: description: Spec defines the behavior of a service. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status @@ -12122,7 +12122,7 @@ spec: that can be referenced will be automatically generated for each Pod Ordinal. They can be referred to by adding the PodOrdinal to the defined name template with named - pattern $_. For example, + pattern `$(Vars[x].Name)_$(PodOrdinal)`. For example, a ServiceVarRef might be defined as follows: - name: MY_SERVICE_PORT valueFrom: serviceVarRef: compDef: my-component-definition name: my-service optional: diff --git a/deploy/helm/crds/apps.kubeblocks.io_opsdefinitions.yaml b/deploy/helm/crds/apps.kubeblocks.io_opsdefinitions.yaml index 49de1eb25c6..382123cb712 100644 --- a/deploy/helm/crds/apps.kubeblocks.io_opsdefinitions.yaml +++ b/deploy/helm/crds/apps.kubeblocks.io_opsdefinitions.yaml @@ -57,8 +57,8 @@ spec: properties: accountName: description: the account name of the component. will inject - the account username and password to KB_ACCOUNT_USERNAME and - KB_ACCOUNT_PASSWORD in env of the job. + the account username and password to `KB_ACCOUNT_USERNAME` + and `KB_ACCOUNT_PASSWORD` in env of the job. type: string name: description: refer to componentDefinition name. @@ -66,7 +66,7 @@ spec: type: string serviceName: description: reference the services[*].name. will map the service - name and ports to KB_COMP_SVC_NAME and KB_COMP_SVC_PORT_ + name and ports to `KB_COMP_SVC_NAME` and `KB_COMP_SVC_PORT_$(portName)` in env of the job. portName will replace the characters '-' to '_' and convert to uppercase. type: string diff --git a/deploy/helm/crds/dataprotection.kubeblocks.io_restores.yaml b/deploy/helm/crds/dataprotection.kubeblocks.io_restores.yaml index 74ca70341cd..828664a13b5 100644 --- a/deploy/helm/crds/dataprotection.kubeblocks.io_restores.yaml +++ b/deploy/helm/crds/dataprotection.kubeblocks.io_restores.yaml @@ -1724,7 +1724,7 @@ spec: replicas: description: the replicas of persistent volume claim which need to be created and restored. the format of created claim - name is "-". + name is `$(template-name)-$(index)`. format: int32 minimum: 1 type: integer @@ -2360,7 +2360,7 @@ spec: format: date-time type: string message: - description: message is a human readable message indicating + description: message is a human-readable message indicating details about the object condition. type: string name: @@ -2401,7 +2401,7 @@ spec: format: date-time type: string message: - description: message is a human readable message indicating + description: message is a human-readable message indicating details about the object condition. type: string name: diff --git a/deploy/helm/crds/extensions.kubeblocks.io_addons.yaml b/deploy/helm/crds/extensions.kubeblocks.io_addons.yaml index 59f3928b115..8b711421a11 100644 --- a/deploy/helm/crds/extensions.kubeblocks.io_addons.yaml +++ b/deploy/helm/crds/extensions.kubeblocks.io_addons.yaml @@ -22,6 +22,14 @@ spec: jsonPath: .spec.type name: TYPE type: string + - description: addon version + jsonPath: .spec.version + name: VERSION + type: string + - description: addon provider + jsonPath: .spec.provider + name: PROVIDER + type: string - description: status phase jsonPath: .status.phase name: STATUS @@ -164,7 +172,7 @@ spec: type: object type: object selectors: - description: Addon installs parameters selectors by default. + description: Add-on installs parameters selectors by default. If multiple selectors are provided, all selectors must evaluate to true. items: @@ -216,7 +224,7 @@ spec: minItems: 1 type: array description: - description: Addon description. + description: Add-on description. type: string helm: description: Helm installation spec. It's processed only when type=helm. @@ -602,11 +610,17 @@ spec: required: - autoInstall type: object + provider: + description: Add-on provider. + type: string type: description: Add-on type. The valid value is helm. enum: - Helm type: string + version: + description: Add-on version. + type: string required: - defaultInstallValues - type diff --git a/docs/developer_docs/api-reference/add-on.md b/docs/developer_docs/api-reference/add-on.md index 10b800f4680..ec184f2cb1c 100644 --- a/docs/developer_docs/api-reference/add-on.md +++ b/docs/developer_docs/api-reference/add-on.md @@ -83,7 +83,7 @@ string (Optional) -

Addon description.


+

Add-on description.


@@ -101,6 +101,30 @@ AddonType +version
+ +string + + + +(Optional) +

Add-on version.


+ + + + +provider
+ +string + + + +(Optional) +

Add-on provider.


+ + + + helm
@@ -226,7 +250,7 @@ AddonInstallSpec (Optional) -

Addon installs parameters selectors by default. If multiple selectors are provided,
all selectors must evaluate to true.


+

Add-on installs parameters selectors by default. If multiple selectors are provided,
all selectors must evaluate to true.


@@ -455,6 +479,8 @@ ResourceRequirements

"KubeGitVersion"

+

"KubeProvider"

+

"KubeVersion"

@@ -484,7 +510,7 @@ string (Optional) -

Addon description.


+

Add-on description.


@@ -502,6 +528,30 @@ AddonType +version
+ +string + + + +(Optional) +

Add-on version.


+ + + + +provider
+ +string + + + +(Optional) +

Add-on provider.


+ + + + helm
@@ -1384,7 +1434,7 @@ AddonSelectorKey -

The selector key. Valid values are KubeVersion, KubeGitVersion.
“KubeVersion” the semver expression of Kubernetes versions, i.e., v1.24.
“KubeGitVersion” may contain distro. info., i.e., v1.24.4+eks.


+

The selector key. Valid values are KubeVersion, KubeGitVersion and KubeProvider.
“KubeVersion” the semver expression of Kubernetes versions, i.e., v1.24.
“KubeGitVersion” may contain distro. info., i.e., v1.24.4+eks.
“KubeProvider” the Kubernetes provider, i.e., aws, gcp, azure, huaweiCloud, tencentCloud etc.


diff --git a/docs/developer_docs/api-reference/backup.md b/docs/developer_docs/api-reference/backup.md index 668117fce43..ec013e0d8d7 100644 --- a/docs/developer_docs/api-reference/backup.md +++ b/docs/developer_docs/api-reference/backup.md @@ -17,20 +17,22 @@ sidebar_label: Backup Resource Types:
-

Backup +

ActionSet

-

Backup is the Schema for the backups API (defined by User).


+

ActionSet is the Schema for the actionsets API


@@ -53,7 +55,7 @@ stringkind
string - + @@ -84,38 +86,71 @@ BackupSpec
BackupActionSet
@@ -73,8 +75,8 @@ Refer to the Kubernetes API documentation for the fields of the spec
- -BackupSpec + +ActionSetSpec
+ + + + + + + +
-backupPolicyName
+backupType
-string + +BackupType +
-

Which backupPolicy is applied to perform this backup


+

backupType specifies the backup type, supported values: Full, Continuous.
Full means full backup.
Incremental means back up data that have changed since the last backup (full or incremental).
Differential means back up data that have changed since the last full backup.
Continuous will back up the transaction log continuously, the PITR (Point in Time Recovery).
can be performed based on the continuous backup and full backup.


-backupType
+env
- -BackupType + +[]Kubernetes core/v1.EnvVar
-

Backup Type. datafile or logfile or snapshot. If not set, datafile is the default type.


+(Optional) +

List of environment variables to set in the container.


-parentBackupName
+envFrom
-string + +[]Kubernetes core/v1.EnvFromSource + + +
+(Optional) +

List of sources to populate environment variables in the container.
The keys defined within a source must be a C_IDENTIFIER. All invalid keys
will be reported as an event when the container is starting. When a key exists in multiple
sources, the value associated with the last source will take precedence.
Values defined by an Env with a duplicate key will take precedence.
Cannot be updated.


+
+backup
+ + +BackupActionSpec + + +
+(Optional) +

backup specifies the backup action.


+
+restore
+ + +RestoreActionSpec +
(Optional) -

if backupType is incremental, parentBackupName is required.


+

restore specifies the restore action.


@@ -125,8 +160,8 @@ string status
- -BackupStatus + +ActionSetStatus @@ -135,10 +170,10 @@ BackupStatus -

BackupPolicy +

Backup

-

BackupPolicy is the Schema for the backuppolicies API (defined by User)


+

Backup is the Schema for the backups API.


@@ -161,7 +196,7 @@ stringkind
string - + @@ -192,72 +227,63 @@ BackupPolicySpec
BackupPolicyBackup
@@ -181,8 +216,8 @@ Refer to the Kubernetes API documentation for the fields of the spec
- -BackupPolicySpec + +BackupSpec
-retention
+backupPolicyName
- -RetentionSpec - +string
-(Optional) -

retention describe how long the Backup should be retained. if not set, will be retained forever.


+

Which backupPolicy is applied to perform this backup.


-schedule
+backupMethod
- -Schedule - +string
-(Optional) -

schedule policy for backup.


+

backupMethod specifies the backup method name that is defined in backupPolicy.


-snapshot
+deletionPolicy
- -SnapshotPolicy + +BackupDeletionPolicy
-(Optional) -

the policy for snapshot backup.


+

deletionPolicy determines whether the backup contents stored in backup repository
should be deleted when the backup custom resource is deleted.
Supported values are “Retain” and “Delete”.
“Retain” means that the backup can not be deleted and remains in ‘Deleting’ phase.
“Delete” means that the backup content and its physical snapshot on backup repository are deleted.
TODO: for the retain policy, we should support in the future for only deleting
the backup custom objects but retaining the backup contents in backup repository.
The current implementation only prevent accidental deletion of backup data.


-datafile
+retentionPeriod
- -CommonBackupPolicy + +RetentionPeriod
(Optional) -

the policy for datafile backup.


+

retentionPeriod determines a duration up to which the backup should be kept.
Controller will remove all backups that are older than the RetentionPeriod.
For example, RetentionPeriod of 30d will keep only the backups of last 30 days.
Sample duration format:
- years: 2y
- months: 6mo
- days: 30d
- hours: 12h
- minutes: 30m
You can also combine the above durations. For example: 30d12h30m.
If not set, the backup will be kept forever.


-logfile
+parentBackupName
- -CommonBackupPolicy - +string
(Optional) -

the policy for logfile backup.


+

parentBackupName determines the parent backup name for incremental or
differential backup.


@@ -267,8 +293,8 @@ CommonBackupPolicy status
- -BackupPolicyStatus + +BackupStatus @@ -277,10 +303,10 @@ BackupPolicyStatus -

BackupRepo +

BackupPolicy

-

BackupRepo is the Schema for the backuprepos API


+

BackupPolicy is the Schema for the backuppolicies API.


@@ -303,7 +329,7 @@ stringkind
string - + @@ -334,66 +360,76 @@ BackupRepoSpec
BackupRepoBackupPolicy
@@ -323,8 +349,8 @@ Refer to the Kubernetes API documentation for the fields of the spec
- -BackupRepoSpec + +BackupPolicySpec
+ + + +
-storageProviderRef
+backupRepoName
string
-

The storage provider used by this backup repo.


+(Optional) +

backupRepoName is the name of BackupRepo and the backup data will be
stored in this repository. If not set, will be stored in the default
backup repository.


-volumeCapacity
+pathPrefix
- -Kubernetes resource.Quantity - +string
(Optional) -

The requested capacity for the PVC created by this backup repo.


+

pathPrefix is the directory inside the backup repository to store the backup content.
It is a relative to the path of the backup repository.


-pvReclaimPolicy
+backoffLimit
- -Kubernetes core/v1.PersistentVolumeReclaimPolicy - +int32
-

The reclaim policy for the PV created by this backup repo.


+(Optional) +

Specifies the number of retries before marking the backup failed.


-config
+target
-map[string]string + +BackupTarget +
-(Optional) -

Non-secret configurations for the storage provider.


+

target specifies the target information to back up.


-credential
+backupMethods
- -Kubernetes core/v1.SecretReference + +[]BackupMethod
+

backupMethods defines the backup methods.


+
+useKopia
+ +bool + +
(Optional) -

A secret that contains the credentials needed by the storage provider.


+

useKopia specifies whether backup data should be stored in a Kopia repository.
Data within the Kopia repository is both compressed and encrypted. Furthermore,
data deduplication is implemented across various backups of the same cluster.
This approach significantly reduces the actual storage usage, particularly for
clusters with a low update frequency.
NOTE: This feature should NOT be enabled when using KubeBlocks Community Edition,
otherwise the backup will not be processed.


@@ -403,8 +439,8 @@ Kubernetes core/v1.SecretReference status
- -BackupRepoStatus + +BackupPolicyStatus @@ -413,10 +449,10 @@ BackupRepoStatus -

BackupTool +

BackupRepo

-

BackupTool is the Schema for the backuptools API (defined by provider)


+

BackupRepo is the Schema for the backuprepos API


@@ -439,7 +475,7 @@ stringkind
string - + @@ -470,130 +506,188 @@ BackupToolSpec
BackupToolBackupRepo
@@ -459,8 +495,8 @@ Refer to the Kubernetes API documentation for the fields of the spec
- -BackupToolSpec + +BackupRepoSpec
+ +
-image
+storageProviderRef
string
-

Backup tool Container image name.


+

The storage provider used by this backup repo.


-deployKind
+accessMethod
- -DeployKind + +AccessMethod
-

which kind for run a backup tool, supported values: job, statefulSet.


+(Optional) +

Specifies the access method of the backup repo.


-type
+volumeCapacity
-string + +Kubernetes resource.Quantity +
-

the type of backup tool, file or pitr


+(Optional) +

The requested capacity for the PVC created by this backup repo.


-resources
+pvReclaimPolicy
- -Kubernetes core/v1.ResourceRequirements + +Kubernetes core/v1.PersistentVolumeReclaimPolicy
-(Optional) -

Compute Resources required by this container.
Cannot be updated.


+

The reclaim policy for the PV created by this backup repo.


-env
+config
- -[]Kubernetes core/v1.EnvVar - +map[string]string
(Optional) -

List of environment variables to set in the container.


+

Non-secret configurations for the storage provider.


-envFrom
+credential
- -[]Kubernetes core/v1.EnvFromSource + +Kubernetes core/v1.SecretReference
(Optional) -

List of sources to populate environment variables in the container.
The keys defined within a source must be a C_IDENTIFIER. All invalid keys
will be reported as an event when the container is starting. When a key exists in multiple
sources, the value associated with the last source will take precedence.
Values defined by an Env with a duplicate key will take precedence.
Cannot be updated.


+

A secret that contains the credentials needed by the storage provider.


+
-backupCommands
+status
-[]string + +BackupRepoStatus + -

Array of command that apps can do database backup.
from invoke args
the order of commands follows the order of array.


+ + +

BackupSchedule +

+
+

BackupSchedule is the Schema for the backupschedules API.


+
+ + + + + + + + + + + + + + + + @@ -613,10 +707,10 @@ BackupToolStatus
FieldDescription
+apiVersion
+string
+dataprotection.kubeblocks.io/v1alpha1 +
+kind
+string +
BackupSchedule
-incrementalBackupCommands
+metadata
-[]string + +Kubernetes meta/v1.ObjectMeta +
-(Optional) -

Array of command that apps can do database incremental backup.
like xtrabackup, that can performs an incremental backup file.


+Refer to the Kubernetes API documentation for the fields of the +metadata field.
-physical
+spec
- -PhysicalConfig + +BackupScheduleSpec
+
+
+ + + + + + + +
+backupPolicyName
+ +string + +
+

Which backupPolicy is applied to perform this backup.


+
+startingDeadlineMinutes
+ +int64 + +
(Optional) -

backup tool can support physical restore, in this case, restore must be RESTART database.


+

startingDeadlineMinutes defines the deadline in minutes for starting the
backup workload if it misses scheduled time for any reason.


-logical
+schedules
- -LogicalConfig + +[]SchedulePolicy
-(Optional) -

backup tool can support logical restore, in this case, restore NOT RESTART database.


+

schedules defines the list of backup schedules.


@@ -603,8 +697,8 @@ LogicalConfig
status
- -BackupToolStatus + +BackupScheduleStatus
-

RestoreJob +

Restore

-

RestoreJob is the Schema for the restorejobs API (defined by User)


+

Restore is the Schema for the restores API


@@ -639,7 +733,7 @@ stringkind
string - + @@ -670,132 +764,147 @@ RestoreJobSpec
RestoreJobRestore
@@ -659,8 +753,8 @@ Refer to the Kubernetes API documentation for the fields of the spec
- -RestoreJobSpec + +RestoreSpec
-
-backupJobName
+backup
-string + +BackupRef +
-

Specified one backupJob to restore.


+

backup to be restored. The restore behavior based on the backup type:
1. Full: will be restored the full backup directly.
2. Incremental: will be restored sequentially from the most recent full backup of this incremental backup.
3. Differential: will be restored sequentially from the parent backup of the differential backup.
4. Continuous: will find the most recent full backup at this time point and the continuous backups after it to restore.


-target
+restoreTime
- -TargetCluster - +string
-

the target database workload to restore


+(Optional) +

restoreTime is the point in time for restoring.


-targetVolumes
+resources
- -[]Kubernetes core/v1.Volume + +RestoreKubeResources
-

array of restore volumes .


+(Optional) +

restore the specified resources of kubernetes.


-targetVolumeMounts
+prepareDataConfig
- -[]Kubernetes core/v1.VolumeMount + +PrepareDataConfig
-

array of restore volume mounts .


+(Optional) +

configuration for the action of “prepareData” phase, including the persistent volume claims
that need to be restored and scheduling strategy of temporary recovery pod.


-onFailAttempted
+serviceAccountName
-int32 +string
(Optional) -

count of backup stop retries on fail.


+

service account name which needs for recovery pod.


+ + +readyConfig
+ + +ReadyConfig + + + + +(Optional) +

configuration for the action of “postReady” phase.


-status
+env
- -RestoreJobStatus + +[]Kubernetes core/v1.EnvVar +(Optional) +

list of environment variables to set in the container for restore and will be
merged with the env of Backup and ActionSet.
The priority of merging is as follows: Restore env > Backup env > ActionSet env.


- - -

BackupLogStatus -

-

-(Appears on:ManifestsStatus) -

-
-
- - - - + + - - + +
FieldDescription +containerResources
+ + +Kubernetes core/v1.ResourceRequirements + + +
+(Optional) +

specified the required resources of restore job’s container.


+
-startTime
+backoffLimit
- -Kubernetes meta/v1.Time - +int32
(Optional) -

startTime records the start time of data logging.


+

Specifies the number of retries before marking the restore failed.


+
-stopTime
+status
- -Kubernetes meta/v1.Time + +RestoreStatus -(Optional) -

stopTime records the stop time of data logging.


-

BackupMethod +

AccessMethod (string alias)

+

+(Appears on:BackupRepoSpec) +

-

BackupMethod the backup method


+

AccessMethod is an enum type that defines the access method of the backup repo.


@@ -804,19 +913,39 @@ Kubernetes meta/v1.Time - - - - + + + +
Description

"backupTool"

"snapshot"

"Mount"

AccessMethodMount means that the storage is mounted locally,
so that remote files can be accessed just like a local file.


"Tool"

AccessMethodTool means to access the storage with a command-line tool,
which helps to transfer files between the storage and local.


-

BackupPhase +

ActionErrorMode (string alias)

-(Appears on:BackupStatus) +(Appears on:ExecActionSpec, JobActionSpec) +

+
+

ActionErrorMode defines how should treat an error from an action.
TODO: now, only support Fail mode, will support Continue mode in the future.


+
+ + + + + + + + + + + + +
ValueDescription

"Continue"

ActionErrorModeContinue means that an error from an action is acceptable.


"Fail"

ActionErrorModeFail means that an error from an action is problematic.


+

ActionPhase +(string alias)

+

+(Appears on:ActionStatus)

-

BackupPhase The current phase. Valid values are New, InProgress, Completed, Failed.


@@ -826,26 +955,22 @@ Kubernetes meta/v1.Time - - - + - - - + - + - +

"Completed"

"Deleting"

ActionPhaseCompleted means the action has run successfully without errors.


"Failed"

"InProgress"

ActionPhaseFailed means the action ran but encountered an error that


"New"

ActionPhaseNew means the action has been created but not yet processed by
the BackupController.


"Running"

ActionPhaseRunning means the action is currently executing.


-

BackupPolicyHook +

ActionSetSpec

-(Appears on:SnapshotPolicy) +(Appears on:ActionSet)

-

BackupPolicyHook defines for the database execute commands before and after backup.


+

ActionSetSpec defines the desired state of ActionSet


@@ -857,82 +982,82 @@ Kubernetes meta/v1.Time - -
-preCommands
+backupType
-[]string + +BackupType +
-(Optional) -

pre backup to perform commands


+

backupType specifies the backup type, supported values: Full, Continuous.
Full means full backup.
Incremental means back up data that have changed since the last backup (full or incremental).
Differential means back up data that have changed since the last full backup.
Continuous will back up the transaction log continuously, the PITR (Point in Time Recovery).
can be performed based on the continuous backup and full backup.


-postCommands
+env
-[]string + +[]Kubernetes core/v1.EnvVar +
(Optional) -

post backup to perform commands


+

List of environment variables to set in the container.


-image
+envFrom
-string + +[]Kubernetes core/v1.EnvFromSource +
(Optional) -

exec command with image


+

List of sources to populate environment variables in the container.
The keys defined within a source must be a C_IDENTIFIER. All invalid keys
will be reported as an event when the container is starting. When a key exists in multiple
sources, the value associated with the last source will take precedence.
Values defined by an Env with a duplicate key will take precedence.
Cannot be updated.


-containerName
+backup
-string + +BackupActionSpec +
(Optional) -

which container can exec command


+

backup specifies the backup action.


-

BackupPolicyPhase -(string alias)

-

-(Appears on:BackupPolicyStatus) -

-
-

BackupPolicyPhase defines phases for BackupPolicy CR.


-
- - - - + + - - - - - - +
ValueDescription +restore
+ + +RestoreActionSpec + + +
+(Optional) +

restore specifies the restore action.


+

"Available"

"Failed"

-

BackupPolicySecret +

ActionSetStatus

-(Appears on:TargetCluster) +(Appears on:ActionSet)

-

BackupPolicySecret defines for the target database secret that backup tool can connect.


+

ActionSetStatus defines the observed state of ActionSet


@@ -944,46 +1069,51 @@ string
-name
+phase
-string + +Phase +
-

the secret name


+(Optional) +

phase - in list of [Available,Unavailable]


-usernameKey
+message
string
-

usernameKey the map key of the user in the connection credential secret


+(Optional) +

A human-readable message indicating details about why the ActionSet is in this phase.


-passwordKey
+observedGeneration
-string +int64
-

passwordKey the map key of the password in the connection credential secret


+(Optional) +

generation number


-

BackupPolicySpec +

ActionSpec

-(Appears on:BackupPolicy) +(Appears on:BackupActionSpec, RestoreActionSpec)

-

BackupPolicySpec defines the desired state of BackupPolicy


+

ActionSpec defines an action that should be executed. Only one of the fields may be set.


@@ -995,167 +1125,202 @@ string + + +
-retention
+exec
- -RetentionSpec + +ExecActionSpec
(Optional) -

retention describe how long the Backup should be retained. if not set, will be retained forever.


+

exec specifies the action should be executed by the pod exec API in a container.


-schedule
+job
- -Schedule + +JobActionSpec
(Optional) -

schedule policy for backup.


+

job specifies the action should be executed by a Kubernetes Job.


+
+

ActionStatus +

+

+(Appears on:BackupStatus) +

+
+
+ + + + + + + + + + + - -
FieldDescription
+name
+ +string + +
+

name is the name of the action.


-snapshot
+phase
- -SnapshotPolicy + +ActionPhase
(Optional) -

the policy for snapshot backup.


+

phase is the current state of the action.


-datafile
+startTimestamp
- -CommonBackupPolicy + +Kubernetes meta/v1.Time
(Optional) -

the policy for datafile backup.


+

startTimestamp records the time an action was started.


-logfile
+completionTimestamp
- -CommonBackupPolicy + +Kubernetes meta/v1.Time
(Optional) -

the policy for logfile backup.


+

completionTimestamp records the time an action was completed.


-

BackupPolicyStatus -

-

-(Appears on:BackupPolicy) -

-
-

BackupPolicyStatus defines the observed state of BackupPolicy


-
- - - - + + - - + + + +
FieldDescription +failureReason
+ +string + +
+(Optional) +

failureReason is an error that caused the backup to fail.


+
-observedGeneration
+actionType
-int64 + +ActionType +
(Optional) -

observedGeneration is the most recent generation observed for this
BackupPolicy. It corresponds to the Cluster’s generation, which is
updated on mutation by the API Server.


+

actionType is the type of the action.


-phase
+availableReplicas
+ +int32 + +
+(Optional) +

availableReplicas available replicas for statefulSet action.


+
+objectRef
- -BackupPolicyPhase + +Kubernetes core/v1.ObjectReference
(Optional) -

backup policy phase valid value: Available, Failed.


+

objectRef is the object reference for the action.


-failureReason
+totalSize
string
(Optional) -

the reason if backup policy check failed.


+

totalSize is the total size of backed up data size.
A string with capacity units in the format of “1Gi”, “1Mi”, “1Ki”.


-lastScheduleTime
+timeRange
- -Kubernetes meta/v1.Time + +BackupTimeRange
(Optional) -

information when was the last time the job was successfully scheduled.


+

timeRange records the time range of backed up data, for PITR, this is the
time range of recoverable data.


-lastSuccessfulTime
+volumeSnapshots
- -Kubernetes meta/v1.Time + +[]VolumeSnapshotStatus
(Optional) -

information when was the last time the job successfully completed.


+

volumeSnapshots records the volume snapshot status for the action.


-

BackupRepoPhase +

ActionType (string alias)

-(Appears on:BackupRepoStatus) +(Appears on:ActionStatus)

-

BackupRepoPhase defines phases for BackupRepo CR.


@@ -1164,23 +1329,20 @@ Kubernetes meta/v1.Time - - - + - + - +
Description

"Deleting"

"Failed"

"Job"

"PreChecking"

""

"Ready"

"StatefulSet"

-

BackupRepoSpec +

BackupActionSpec

-(Appears on:BackupRepo) +(Appears on:ActionSetSpec)

-

BackupRepoSpec defines the desired state of BackupRepo


@@ -1192,77 +1354,68 @@ Kubernetes meta/v1.Time - - - -
-storageProviderRef
+backupData
-string + +BackupDataActionSpec +
-

The storage provider used by this backup repo.


+

backupData specifies the backup data action.


-volumeCapacity
+preBackup
- -Kubernetes resource.Quantity + +[]ActionSpec
(Optional) -

The requested capacity for the PVC created by this backup repo.


+

preBackup specifies a hook that should be executed before the backup.


-pvReclaimPolicy
+postBackup
- -Kubernetes core/v1.PersistentVolumeReclaimPolicy + +[]ActionSpec
-

The reclaim policy for the PV created by this backup repo.


-
-config
- -map[string]string - -
(Optional) -

Non-secret configurations for the storage provider.


+

postBackup specifies a hook that should be executed after the backup.


-credential
+preDelete
- -Kubernetes core/v1.SecretReference + +BaseJobActionSpec
(Optional) -

A secret that contains the credentials needed by the storage provider.


+

preDelete defines that custom deletion action which can be executed before executing the built-in deletion action.
note that preDelete action job will ignore the env/envFrom.


-

BackupRepoStatus +

BackupDataActionSpec

-(Appears on:BackupRepo) +(Appears on:BackupActionSpec)

-

BackupRepoStatus defines the observed state of BackupRepo


+

BackupDataActionSpec defines how to back up data.


@@ -1274,100 +1427,1485 @@ Kubernetes core/v1.SecretReference + + + +
-phase
+JobActionSpec
- -BackupRepoPhase + +JobActionSpec
-(Optional) -

Backup repo reconciliation phases. Valid values are PreChecking, Failed, Ready, Deleting.


+

+(Members of JobActionSpec are embedded into this type.) +

-conditions
+syncProgress
- + +SyncProgress + + +
+(Optional) +

syncProgress specifies whether to sync the backup progress and its interval seconds.


+
+

BackupDeletionPolicy +(string alias)

+

+(Appears on:BackupSpec) +

+
+

BackupDeletionPolicy describes a policy for end-of-life maintenance of backup content.


+
+ + + + + + + + + + + + +
ValueDescription

"Delete"

"Retain"

+

BackupMethod +

+

+(Appears on:BackupPolicySpec, BackupStatus) +

+
+

BackupMethod defines the backup method.


+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+

the name of backup method.


+
+snapshotVolumes
+ +bool + +
+(Optional) +

snapshotVolumes specifies whether to take snapshots of persistent volumes.
if true, the BackupScript is not required, the controller will use the CSI
volume snapshotter to create the snapshot.


+
+actionSetName
+ +string + +
+(Optional) +

actionSetName refers to the ActionSet object that defines the backup actions.
For volume snapshot backup, the actionSet is not required, the controller
will use the CSI volume snapshotter to create the snapshot.


+
+targetVolumes
+ + +TargetVolumeInfo + + +
+(Optional) +

targetVolumes specifies which volumes from the target should be mounted in
the backup workload.


+
+env
+ + +[]Kubernetes core/v1.EnvVar + + +
+(Optional) +

env specifies the environment variables for the backup workload.


+
+runtimeSettings
+ + +RuntimeSettings + + +
+(Optional) +

runtimeSettings specifies runtime settings for the backup workload container.


+
+target
+ + +BackupTarget + + +
+(Optional) +

target specifies the target information to back up, it will override the global target policy.


+
+

BackupPhase +(string alias)

+

+(Appears on:BackupStatus) +

+
+

BackupPhase is a string representation of the lifecycle phase of a Backup.


+
+ + + + + + + + + + + + + + + + + + +
ValueDescription

"Completed"

BackupPhaseCompleted means the backup has run successfully without errors.


"Deleting"

BackupPhaseDeleting means the backup and all its associated data are being deleted.


"Failed"

BackupPhaseFailed means the backup ran but encountered an error that
prevented it from completing successfully.


"New"

BackupPhaseNew means the backup has been created but not yet processed by
the BackupController.


"Running"

BackupPhaseRunning means the backup is currently executing.


+

BackupPolicyPhase +(string alias)

+
+

BackupPolicyPhase defines phases for BackupPolicy.


+
+ + + + + + + + + + + + +
ValueDescription

"Available"

"Failed"

+

BackupPolicySpec +

+

+(Appears on:BackupPolicy) +

+
+

BackupPolicySpec defines the desired state of BackupPolicy


+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+backupRepoName
+ +string + +
+(Optional) +

backupRepoName is the name of BackupRepo and the backup data will be
stored in this repository. If not set, will be stored in the default
backup repository.


+
+pathPrefix
+ +string + +
+(Optional) +

pathPrefix is the directory inside the backup repository to store the backup content.
It is a relative to the path of the backup repository.


+
+backoffLimit
+ +int32 + +
+(Optional) +

Specifies the number of retries before marking the backup failed.


+
+target
+ + +BackupTarget + + +
+

target specifies the target information to back up.


+
+backupMethods
+ + +[]BackupMethod + + +
+

backupMethods defines the backup methods.


+
+useKopia
+ +bool + +
+(Optional) +

useKopia specifies whether backup data should be stored in a Kopia repository.
Data within the Kopia repository is both compressed and encrypted. Furthermore,
data deduplication is implemented across various backups of the same cluster.
This approach significantly reduces the actual storage usage, particularly for
clusters with a low update frequency.
NOTE: This feature should NOT be enabled when using KubeBlocks Community Edition,
otherwise the backup will not be processed.


+
+

BackupPolicyStatus +

+

+(Appears on:BackupPolicy) +

+
+

BackupPolicyStatus defines the observed state of BackupPolicy


+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+phase
+ + +Phase + + +
+(Optional) +

phase - in list of [Available,Unavailable]


+
+message
+ +string + +
+(Optional) +

A human-readable message indicating details about why the BackupPolicy is
in this phase.


+
+observedGeneration
+ +int64 + +
+(Optional) +

observedGeneration is the most recent generation observed for this
BackupPolicy. It refers to the BackupPolicy’s generation, which is
updated on mutation by the API Server.


+
+

BackupRef +

+

+(Appears on:RestoreSpec) +

+
+

BackupRef describes the backup name and namespace.


+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+

backup name


+
+namespace
+ +string + +
+

backup namespace


+
+

BackupRepoPhase +(string alias)

+

+(Appears on:BackupRepoStatus) +

+
+

BackupRepoPhase defines phases for BackupRepo CR.


+
+ + + + + + + + + + + + + + + + +
ValueDescription

"Deleting"

"Failed"

"PreChecking"

"Ready"

+

BackupRepoSpec +

+

+(Appears on:BackupRepo) +

+
+

BackupRepoSpec defines the desired state of BackupRepo


+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+storageProviderRef
+ +string + +
+

The storage provider used by this backup repo.


+
+accessMethod
+ + +AccessMethod + + +
+(Optional) +

Specifies the access method of the backup repo.


+
+volumeCapacity
+ + +Kubernetes resource.Quantity + + +
+(Optional) +

The requested capacity for the PVC created by this backup repo.


+
+pvReclaimPolicy
+ + +Kubernetes core/v1.PersistentVolumeReclaimPolicy + + +
+

The reclaim policy for the PV created by this backup repo.


+
+config
+ +map[string]string + +
+(Optional) +

Non-secret configurations for the storage provider.


+
+credential
+ + +Kubernetes core/v1.SecretReference + + +
+(Optional) +

A secret that contains the credentials needed by the storage provider.


+
+

BackupRepoStatus +

+

+(Appears on:BackupRepo) +

+
+

BackupRepoStatus defines the observed state of BackupRepo


+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+phase
+ + +BackupRepoPhase + + +
+(Optional) +

Backup repo reconciliation phases. Valid values are PreChecking, Failed, Ready, Deleting.


+
+conditions
+ + []Kubernetes meta/v1.Condition
(Optional) -

conditions describes the current state of the repo.


+

conditions describes the current state of the repo.


+
+observedGeneration
+ +int64 + +
+(Optional) +

observedGeneration is the latest generation observed by the controller.


+
+generatedCSIDriverSecret
+ + +Kubernetes core/v1.SecretReference + + +
+(Optional) +

generatedCSIDriverSecret references the generated secret used by the CSI driver.


+
+generatedStorageClassName
+ +string + +
+(Optional) +

generatedStorageClassName indicates the generated storage class name.


+
+backupPVCName
+ +string + +
+(Optional) +

backupPVCName is the name of the PVC used to store backup data.


+
+toolConfigSecretName
+ +string + +
+(Optional) +

toolConfigSecretName is the name of the secret containing the configuration for the access tool.


+
+isDefault
+ +bool + +
+(Optional) +

isDefault indicates whether this backup repo is the default one.


+
+

BackupSchedulePhase +(string alias)

+

+(Appears on:BackupScheduleStatus) +

+
+

BackupSchedulePhase defines the phase of BackupSchedule


+
+ + + + + + + + + + + + +
ValueDescription

"Available"

BackupSchedulePhaseAvailable means the backup schedule is available.


"Failed"

BackupSchedulePhaseFailed means the backup schedule is failed.


+

BackupScheduleSpec +

+

+(Appears on:BackupSchedule) +

+
+

BackupScheduleSpec defines the desired state of BackupSchedule.


+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+backupPolicyName
+ +string + +
+

Which backupPolicy is applied to perform this backup.


+
+startingDeadlineMinutes
+ +int64 + +
+(Optional) +

startingDeadlineMinutes defines the deadline in minutes for starting the
backup workload if it misses scheduled time for any reason.


+
+schedules
+ + +[]SchedulePolicy + + +
+

schedules defines the list of backup schedules.


+
+

BackupScheduleStatus +

+

+(Appears on:BackupSchedule) +

+
+

BackupScheduleStatus defines the observed state of BackupSchedule.


+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+phase
+ + +BackupSchedulePhase + + +
+(Optional) +

phase describes the phase of the BackupSchedule.


+
+observedGeneration
+ +int64 + +
+(Optional) +

observedGeneration is the most recent generation observed for this
BackupSchedule. It refers to the BackupSchedule’s generation, which is
updated on mutation by the API Server.


+
+failureReason
+ +string + +
+(Optional) +

failureReason is an error that caused the backup to fail.


+
+schedules
+ + +map[string]..ScheduleStatus + + +
+(Optional) +

schedules describes the status of each schedule.


+
+

BackupSpec +

+

+(Appears on:Backup) +

+
+

BackupSpec defines the desired state of Backup.


+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+backupPolicyName
+ +string + +
+

Which backupPolicy is applied to perform this backup.


+
+backupMethod
+ +string + +
+

backupMethod specifies the backup method name that is defined in backupPolicy.


+
+deletionPolicy
+ + +BackupDeletionPolicy + + +
+

deletionPolicy determines whether the backup contents stored in backup repository
should be deleted when the backup custom resource is deleted.
Supported values are “Retain” and “Delete”.
“Retain” means that the backup can not be deleted and remains in ‘Deleting’ phase.
“Delete” means that the backup content and its physical snapshot on backup repository are deleted.
TODO: for the retain policy, we should support in the future for only deleting
the backup custom objects but retaining the backup contents in backup repository.
The current implementation only prevent accidental deletion of backup data.


+
+retentionPeriod
+ + +RetentionPeriod + + +
+(Optional) +

retentionPeriod determines a duration up to which the backup should be kept.
Controller will remove all backups that are older than the RetentionPeriod.
For example, RetentionPeriod of 30d will keep only the backups of last 30 days.
Sample duration format:
- years: 2y
- months: 6mo
- days: 30d
- hours: 12h
- minutes: 30m
You can also combine the above durations. For example: 30d12h30m.
If not set, the backup will be kept forever.


+
+parentBackupName
+ +string + +
+(Optional) +

parentBackupName determines the parent backup name for incremental or
differential backup.


+
+

BackupStatus +

+

+(Appears on:Backup) +

+
+

BackupStatus defines the observed state of Backup.


+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+formatVersion
+ +string + +
+(Optional) +

formatVersion is the backup format version, including major, minor and patch version.


+
+phase
+ + +BackupPhase + + +
+(Optional) +

phase is the current state of the Backup.


+
+expiration
+ + +Kubernetes meta/v1.Time + + +
+(Optional) +

expiration is when this backup is eligible for garbage collection.
‘null’ means the Backup will NOT be cleaned except delete manual.


+
+startTimestamp
+ + +Kubernetes meta/v1.Time + + +
+(Optional) +

startTimestamp records the time a backup was started.
The server’s time is used for StartTimestamp.


+
+completionTimestamp
+ + +Kubernetes meta/v1.Time + + +
+(Optional) +

completionTimestamp records the time a backup was completed.
Completion time is recorded even on failed backups.
The server’s time is used for CompletionTimestamp.


+
+duration
+ + +Kubernetes meta/v1.Duration + + +
+(Optional) +

The duration time of backup execution.
When converted to a string, the format is “1h2m0.5s”.


+
+totalSize
+ +string + +
+(Optional) +

totalSize is the total size of backed up data size.
A string with capacity units in the format of “1Gi”, “1Mi”, “1Ki”.
If no capacity unit is specified, it is assumed to be in bytes.


+
+failureReason
+ +string + +
+(Optional) +

failureReason is an error that caused the backup to fail.


+
+backupRepoName
+ +string + +
+(Optional) +

backupRepoName is the name of the backup repository.


+
+path
+ +string + +
+(Optional) +

path is the directory inside the backup repository where the backup data is stored.
It is an absolute path in the backup repository.


+
+kopiaRepoPath
+ +string + +
+(Optional) +

kopiaRepoPath records the path of the Kopia repository.


+
+persistentVolumeClaimName
+ +string + +
+(Optional) +

persistentVolumeClaimName is the name of the persistent volume claim that
is used to store the backup data.


+
+timeRange
+ + +BackupTimeRange + + +
+(Optional) +

timeRange records the time range of backed up data, for PITR, this is the
time range of recoverable data.


+
+target
+ + +BackupTarget + + +
+(Optional) +

target records the target information for this backup.


+
+backupMethod
+ + +BackupMethod + + +
+(Optional) +

backupMethod records the backup method information for this backup.
Refer to BackupMethod for more details.


+
+actions
+ + +[]ActionStatus + + +
+(Optional) +

actions records the actions information for this backup.


+
+volumeSnapshots
+ + +[]VolumeSnapshotStatus + + +
+(Optional) +

volumeSnapshots records the volume snapshot status for the action.


+
+extras
+ +[]string + +
+

extra records the extra info for the backup.


+
+

BackupTarget +

+

+(Appears on:BackupMethod, BackupPolicySpec, BackupStatus) +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+podSelector
+ + +PodSelector + + +
+

podSelector is used to find the target pod. The volumes of the target pod
will be backed up.


+
+connectionCredential
+ + +ConnectionCredential + + +
+(Optional) +

connectionCredential specifies the connection credential to connect to the
target database cluster.


+
+resources
+ + +KubeResources + + +
+(Optional) +

resources specifies the kubernetes resources to back up.


+
+serviceAccountName
+ +string + +
+

serviceAccountName specifies the service account to run the backup workload.


+
+

BackupTimeRange +

+

+(Appears on:ActionStatus, BackupStatus) +

+
+

BackupTimeRange records the time range of backed up data, for PITR, this is the
time range of recoverable data.


+
+ + + + + + + + + + + + + + + + + + + + +
FieldDescription
+timeZone
+ +string + +
+(Optional) +

time zone, only support zone offset, value range: “-12:59 ~ +13:00”


+
+start
+ + +Kubernetes meta/v1.Time + + +
+(Optional) +

start records the start time of backup(Coordinated Universal Time, UTC).


+
+end
+ + +Kubernetes meta/v1.Time + + +
+(Optional) +

end records the end time of backup(Coordinated Universal Time, UTC).


+

BackupType +(string alias)

+

+(Appears on:ActionSetSpec) +

+
+

BackupType the backup type.


+
+ + + + + + + + + + + + + + + + +
ValueDescription

"Continuous"

"Differential"

"Full"

"Incremental"

+

BaseJobActionSpec +

+

+(Appears on:BackupActionSpec, JobActionSpec) +

+
+

BaseJobActionSpec is an action that creates a Kubernetes Job to execute a command.


+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+image
+ +string + +
+

image specifies the image of backup container.


+
+command
+ +[]string + +
+

command specifies the commands to back up the volume data.


+
+

ConnectionCredential +

+

+(Appears on:BackupTarget, ReadyConfig) +

+
+

ConnectionCredential specifies the connection credential to connect to the
target database cluster.


+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+secretName
+ +string + +
+

secretName refers to the Secret object that contains the connection credential.


+
+usernameKey
+ +string + +
+

usernameKey specifies the map key of the user in the connection credential secret.


+
+passwordKey
+ +string + +
+

passwordKey specifies the map key of the password in the connection credential secret.
This password will be saved in the backup annotation for full backup.
You can use the environment variable DP_ENCRYPTION_KEY to specify encryption key.


+
+hostKey
+ +string + +
+

hostKey specifies the map key of the host in the connection credential secret.


+
+portKey
+ +string + +
+

portKey specifies the map key of the port in the connection credential secret.


+
+

ExecAction +

+

+(Appears on:ReadyConfig) +

+
+
+ + + + + + + + + +
FieldDescription
-observedGeneration
+target
-int64 + +ExecActionTarget +
(Optional) -

observedGeneration is the latest generation observed by the controller.


+

execActionTarget defines the pods that need to be executed for the exec action.
will execute on all pods that meet the conditions.


+

ExecActionSpec +

+

+(Appears on:ActionSpec) +

+
+

ExecActionSpec is an action that uses the pod exec API to execute a command in a container
in a pod.


+
+ + + + + + + +
FieldDescription
-generatedCSIDriverSecret
+container
- -Kubernetes core/v1.SecretReference - +string
(Optional) -

generatedCSIDriverSecret references the generated secret used by the CSI driver.


+

container is the container in the pod where the command should be executed.
If not specified, the pod’s first container is used.


-generatedStorageClassName
+command
-string +[]string
-(Optional) -

generatedStorageClassName indicates the generated storage class name.


+

Command is the command and arguments to execute.


-backupPVCName
+onError
-string + +ActionErrorMode +
(Optional) -

backupPVCName is the name of the PVC used to store backup data.


+

OnError specifies how should behave if it encounters an error executing this action.


-isDefault
+timeout
-bool + +Kubernetes meta/v1.Duration +
(Optional) -

isDefault indicates whether this backup repo is the default one.


+

Timeout defines the maximum amount of time should wait for the hook to complete before
considering the execution a failure.


-

BackupSnapshotStatus +

ExecActionTarget

-(Appears on:ManifestsStatus) +(Appears on:ExecAction)

@@ -1381,37 +2919,25 @@ bool -volumeSnapshotName
- -string - - - -(Optional) -

volumeSnapshotName records the volumeSnapshot name.


- - - - -volumeSnapshotContentName
+podSelector
-string + +Kubernetes meta/v1.LabelSelector + -(Optional) -

volumeSnapshotContentName specifies the name of a pre-existing VolumeSnapshotContent
object representing an existing volume snapshot.
This field should be set if the snapshot already exists and only needs a representation in Kubernetes.
This field is immutable.


+

kubectl exec in all selected pods.


-

BackupSpec +

IncludeResource

-(Appears on:Backup) +(Appears on:RestoreKubeResources)

-

BackupSpec defines the desired state of Backup.


@@ -1423,49 +2949,67 @@ string + +
-backupPolicyName
+groupResource
string
-

Which backupPolicy is applied to perform this backup


-backupType
+labelSelector
- -BackupType + +Kubernetes meta/v1.LabelSelector
-

Backup Type. datafile or logfile or snapshot. If not set, datafile is the default type.


+(Optional) +

select the specified resource for recovery by label.


+

JobAction +

+

+(Appears on:ReadyConfig) +

+
+
+ + + + + + + +
FieldDescription
-parentBackupName
+target
-string + +JobActionTarget +
-(Optional) -

if backupType is incremental, parentBackupName is required.


+

jobActionTarget defines the pod that need to be executed for the job action.
will select a pod that meets the conditions to execute.


-

BackupStatus +

JobActionSpec

-(Appears on:Backup) +(Appears on:ActionSpec, BackupDataActionSpec, RestoreActionSpec)

-

BackupStatus defines the observed state of Backup.


+

JobActionSpec is an action that creates a Kubernetes Job to execute a command.


@@ -1477,188 +3021,324 @@ string + +
-phase
+BaseJobActionSpec
- -BackupPhase + +BaseJobActionSpec
-(Optional) +

+(Members of BaseJobActionSpec are embedded into this type.) +

-parentBackupName
+runOnTargetPodNode
-string +bool
(Optional) -

Records parentBackupName if backupType is incremental.


+

runOnTargetPodNode specifies whether to run the job workload on the
target pod node. If backup container should mount the target pod’s
volumes, this field should be set to true. otherwise the target pod’s
volumes will be ignored.


-expiration
+onError
- -Kubernetes meta/v1.Time + +ActionErrorMode
(Optional) -

The date and time when the Backup is eligible for garbage collection.
‘null’ means the Backup is NOT be cleaned except delete manual.


+

OnError specifies how should behave if it encounters an error executing
this action.


+

JobActionTarget +

+

+(Appears on:JobAction) +

+
+
+ + + + + + + + + +
FieldDescription
-startTimestamp
+podSelector
- -Kubernetes meta/v1.Time + +Kubernetes meta/v1.LabelSelector
-(Optional) -

Date/time when the backup started being processed.


+

select one of the pods which selected by labels to build the job spec, such as mount required volumes and inject built-in env of the selected pod.


-completionTimestamp
+volumeMounts
- -Kubernetes meta/v1.Time + +[]Kubernetes core/v1.VolumeMount
(Optional) -

Date/time when the backup finished being processed.


+

volumeMounts defines which volumes of the selected pod need to be mounted on the restoring pod.


+

KubeResources +

+

+(Appears on:BackupTarget) +

+
+

KubeResources defines the kubernetes resources to back up.


+
+ + + + + + + + + + +
FieldDescription
-duration
+selector
- -Kubernetes meta/v1.Duration + +Kubernetes meta/v1.LabelSelector
-(Optional) -

The duration time of backup execution.
When converted to a string, the form is “1h2m0.5s”.


+

selector is a metav1.LabelSelector to filter the target kubernetes resources
that need to be backed up.
If not set, will do not back up any kubernetes resources.


-totalSize
+included
-string +[]string
(Optional) -

Backup total size.
A string with capacity units in the form of “1Gi”, “1Mi”, “1Ki”.


+

included is a slice of namespaced-scoped resource type names to include in
the kubernetes resources.
The default value is “*”, which means all resource types will be included.


-failureReason
+excluded
-string +[]string
(Optional) -

The reason for a backup failure.


+

excluded is a slice of namespaced-scoped resource type names to exclude in
the kubernetes resources.
The default value is empty.


+
+

Phase +(string alias)

+

+(Appears on:ActionSetStatus, BackupPolicyStatus) +

+
+

Phase defines the BackupPolicy and ActionSet CR .status.phase


+
+ + + + + + + + + + + + +
ValueDescription

"Available"

"Unavailable"

+

PodSelectionStrategy +(string alias)

+

+(Appears on:PodSelector) +

+
+

PodSelectionStrategy specifies the strategy to select when multiple pods are
selected for backup target


+
+ + + + + + + + + + + + +
ValueDescription

"All"

PodSelectionStrategyAll selects all pods that match the labelsSelector.
TODO: support PodSelectionStrategyAll


"Any"

PodSelectionStrategyAny selects any one pod that match the labelsSelector.


+

PodSelector +

+

+(Appears on:BackupTarget) +

+
+
+ + + + + + + + + + + + +
FieldDescription
+LabelSelector
+ + +Kubernetes meta/v1.LabelSelector + + +
+

+(Members of LabelSelector are embedded into this type.) +

+

labelsSelector is the label selector to filter the target pods.


-persistentVolumeClaimName
+strategy
-string + +PodSelectionStrategy +
-(Optional) -

remoteVolume saves the backup data.


+

strategy specifies the strategy to select the target pod when multiple pods
are selected.
Valid values are:
- Any: select any one pod that match the labelsSelector.
- All: select all pods that match the labelsSelector.


+

PrepareDataConfig +

+

+(Appears on:RestoreSpec) +

+
+
+ + + + + + + +
FieldDescription
-logFilePersistentVolumeClaimName
+dataSourceRef
-string + +VolumeConfig +
(Optional) -

logFilePersistentVolumeClaimName saves the logfile backup data.


+

dataSourceRef describes the configuration when using persistentVolumeClaim.spec.dataSourceRef method for restoring.
it describes the source volume of the backup targetVolumes and how to mount path in the restoring container.


-backupToolName
+volumeClaims
-string + +[]RestoreVolumeClaim +
(Optional) -

backupToolName references the backup tool name.


+

volumeClaims defines the persistent Volume claims that need to be restored and mount them together into the restore job.
these persistent Volume claims will be created if not exist.


-sourceCluster
+volumeClaimsTemplate
-string + +RestoreVolumeClaimsTemplate +
-

sourceCluster records the source cluster information for this backup.


+(Optional) +

volumeClaimsTemplate defines a template to build persistent Volume claims that need to be restored.
these claims will be created in an orderly manner based on the number of replicas or reused if already exist.


-availableReplicas
+volumeClaimRestorePolicy
-int32 + +VolumeClaimRestorePolicy +
-(Optional) -

availableReplicas available replicas for statefulSet which created by backup.


+

VolumeClaimRestorePolicy defines restore policy for persistent volume claim.
Supported policies are as follows:
1. Parallel: parallel recovery of persistent volume claim.
2. Serial: restore the persistent volume claim in sequence, and wait until the previous persistent volume claim is restored before restoring a new one.


-manifests
+schedulingSpec
- -ManifestsStatus + +SchedulingSpec
(Optional) -

manifests determines the backup metadata info.


+

scheduling spec for restoring pod.


-

BackupStatusUpdate +

ReadinessProbe

-(Appears on:BasePolicy) +(Appears on:ReadyConfig)

@@ -1672,92 +3352,59 @@ ManifestsStatus -path
- -string - - - -(Optional) -

specify the json path of backup object for patch.
example: manifests.backupLog – means patch the backup json path of status.manifests.backupLog.


- - - - -containerName
+initialDelaySeconds
-string +int (Optional) -

which container name that kubectl can execute.


+

number of seconds after the container has started before probe is initiated.


-script
+timeoutSeconds
-string +int (Optional) -

the shell Script commands to collect backup status metadata.
The script must exist in the container of ContainerName and the output format must be set to JSON.
Note that outputting to stderr may cause the result format to not be in JSON.


+

number of seconds after which the probe times out.
defaults to 30 second, minimum value is 1.


-useTargetPodServiceAccount
+periodSeconds
-bool +int (Optional) -

useTargetPodServiceAccount defines whether this job requires the service account of the backup target pod.
if true, will use the service account of the backup target pod. otherwise, will use the system service account.


+

how often (in seconds) to perform the probe.
defaults to 5 second, minimum value is 1.


-updateStage
+exec
- -BackupStatusUpdateStage + +ReadinessProbeExecAction -

when to update the backup status, pre: before backup, post: after backup


+

exec specifies the action to take.


-

BackupStatusUpdateStage -(string alias)

-

-(Appears on:BackupStatusUpdate) -

-
-

BackupStatusUpdateStage defines the stage of backup status update.


-
- - - - - - - - - - - - -
ValueDescription

"post"

"pre"

-

BackupToolManifestsStatus +

ReadinessProbeExecAction

-(Appears on:ManifestsStatus) +(Appears on:ReadinessProbe)

@@ -1771,85 +3418,108 @@ BackupStatusUpdateStage -filePath
+image
string -(Optional) -

filePath records the file path of backup.


+

refer to container image.


-logFilePath
+command
-string +[]string -(Optional) -

logFilePath records the log file path of backup.


+

refer to container command.


+ + +

ReadyConfig +

+

+(Appears on:RestoreSpec) +

+
+
+ + + + + + + +
FieldDescription
-volumeName
+jobAction
-string + +JobAction +
(Optional) -

volumeName records volume name of backup data pvc.


+

configuration for job action.


-uploadTotalSize
+execAction
-string + +ExecAction +
(Optional) -

Backup upload total size.
A string with capacity units in the form of “1Gi”, “1Mi”, “1Ki”.


+

configuration for exec action.


-checksum
+connectionCredential
-string + +ConnectionCredential +
(Optional) -

checksum of backup file, generated by md5 or sha1 or sha256.


+

credential template used for creating a connection credential


-checkpoint
+readinessProbe
-string + +ReadinessProbe +
(Optional) -

backup checkpoint, for incremental backup.


+

periodic probe of the service readiness.
controller will perform postReadyHooks of BackupScript.spec.restore after the service readiness when readinessProbe is configured.


-

BackupToolRestoreCommand +

RestoreActionSpec

-(Appears on:LogicalConfig, PhysicalConfig) +(Appears on:ActionSetSpec)

-

BackupToolRestoreCommand defines the restore commands of BackupTool


+

RestoreActionSpec defines how to restore data.


@@ -1861,37 +3531,63 @@ string
-restoreCommands
+prepareData
-[]string + +JobActionSpec +
(Optional) -

Array of command that apps can perform database restore.
like xtrabackup, that can performs restore mysql from files.


+

prepareData specifies the action to prepare data.


-incrementalRestoreCommands
+postReady
-[]string + +[]ActionSpec +
(Optional) -

Array of incremental restore commands.


+

postReady specifies the action to execute after the data is ready.


-

BackupToolSpec +

RestoreActionStatus +(string alias)

+

+(Appears on:RestoreStatusAction) +

+
+

RestoreActionStatus the status of restore action.


+
+ + + + + + + + + + + + + + +
ValueDescription

"Completed"

"Failed"

"Processing"

+

RestoreKubeResources

-(Appears on:BackupTool) +(Appears on:RestoreSpec)

-

BackupToolSpec defines the desired state of BackupTool


@@ -1903,149 +3599,184 @@ string + +
-image
+included
-string + +[]IncludeResource +
-

Backup tool Container image name.


+

will restore the specified resources


+

RestorePhase +(string alias)

+

+(Appears on:RestoreStatus) +

+
+

RestorePhase The current phase. Valid values are Running, Completed, Failed, AsDataSource.


+
+ + + + + + + + + + + + + + + + +
ValueDescription

"AsDataSource"

"Completed"

"Failed"

"Running"

+

RestoreSpec +

+

+(Appears on:Restore) +

+
+

RestoreSpec defines the desired state of Restore


+
+ + + + + + + +
FieldDescription
-deployKind
+backup
- -DeployKind + +BackupRef
-

which kind for run a backup tool, supported values: job, statefulSet.


+

backup to be restored. The restore behavior based on the backup type:
1. Full: will be restored the full backup directly.
2. Incremental: will be restored sequentially from the most recent full backup of this incremental backup.
3. Differential: will be restored sequentially from the parent backup of the differential backup.
4. Continuous: will find the most recent full backup at this time point and the continuous backups after it to restore.


-type
+restoreTime
string
-

the type of backup tool, file or pitr


+(Optional) +

restoreTime is the point in time for restoring.


resources
- -Kubernetes core/v1.ResourceRequirements + +RestoreKubeResources
(Optional) -

Compute Resources required by this container.
Cannot be updated.


+

restore the specified resources of kubernetes.


-env
+prepareDataConfig
- -[]Kubernetes core/v1.EnvVar + +PrepareDataConfig
(Optional) -

List of environment variables to set in the container.


+

configuration for the action of “prepareData” phase, including the persistent volume claims
that need to be restored and scheduling strategy of temporary recovery pod.


-envFrom
+serviceAccountName
- -[]Kubernetes core/v1.EnvFromSource - +string
(Optional) -

List of sources to populate environment variables in the container.
The keys defined within a source must be a C_IDENTIFIER. All invalid keys
will be reported as an event when the container is starting. When a key exists in multiple
sources, the value associated with the last source will take precedence.
Values defined by an Env with a duplicate key will take precedence.
Cannot be updated.


+

service account name which needs for recovery pod.


-backupCommands
+readyConfig
-[]string + +ReadyConfig +
-

Array of command that apps can do database backup.
from invoke args
the order of commands follows the order of array.


+(Optional) +

configuration for the action of “postReady” phase.


-incrementalBackupCommands
+env
-[]string + +[]Kubernetes core/v1.EnvVar +
(Optional) -

Array of command that apps can do database incremental backup.
like xtrabackup, that can performs an incremental backup file.


+

list of environment variables to set in the container for restore and will be
merged with the env of Backup and ActionSet.
The priority of merging is as follows: Restore env > Backup env > ActionSet env.


-physical
+containerResources
- -PhysicalConfig + +Kubernetes core/v1.ResourceRequirements
(Optional) -

backup tool can support physical restore, in this case, restore must be RESTART database.


+

specified the required resources of restore job’s container.


-logical
+backoffLimit
- -LogicalConfig - +int32
(Optional) -

backup tool can support logical restore, in this case, restore NOT RESTART database.


+

Specifies the number of retries before marking the restore failed.


-

BackupToolStatus -

-

-(Appears on:BackupTool) -

-
-

BackupToolStatus defines the observed state of BackupTool


-
-

BackupType +

RestoreStage (string alias)

-

-(Appears on:BackupSpec) -

-

BackupType the backup type, marked backup set is datafile or logfile or snapshot.


@@ -2054,25 +3785,19 @@ LogicalConfig - - - + - +
Description

"datafile"

"logfile"

"postReady"

"snapshot"

"prepareData"

-

BaseBackupType -(string alias)

-
-

BaseBackupType the base backup type.


-
-

BasePolicy +

RestoreStatus

-(Appears on:CommonBackupPolicy, SnapshotPolicy) +(Appears on:Restore)

+

RestoreStatus defines the observed state of Restore


@@ -2084,172 +3809,93 @@ LogicalConfig - - - - - -
-target
+phase
- -TargetCluster + +RestorePhase
-

target database cluster for backup.


-
-backupsHistoryLimit
- -int32 - -
(Optional) -

the number of automatic backups to retain. Value must be non-negative integer.
0 means NO limit on the number of backups.


-onFailAttempted
+startTimestamp
-int32 + +Kubernetes meta/v1.Time +
(Optional) -

count of backup stop retries on fail.


+

Date/time when the restore started being processed.


-backupStatusUpdates
+completionTimestamp
- -[]BackupStatusUpdate + +Kubernetes meta/v1.Time
(Optional) -

define how to update metadata for backup status.


+

Date/time when the restore finished being processed.


-

CommonBackupPolicy -

-

-(Appears on:BackupPolicySpec) -

-
-
- - - - - - - - - - - -
FieldDescription
-BasePolicy
+duration
- -BasePolicy + +Kubernetes meta/v1.Duration
-

-(Members of BasePolicy are embedded into this type.) -

+(Optional) +

The duration time of restore execution.
When converted to a string, the form is “1h2m0.5s”.


-persistentVolumeClaim
+actions
- -PersistentVolumeClaim + +RestoreStatusActions
(Optional) -

refer to PersistentVolumeClaim and the backup data will be stored in the corresponding persistent volume.


+

recorded all restore actions performed.


-backupRepoName
+conditions
-string + +[]Kubernetes meta/v1.Condition +
(Optional) -

refer to BackupRepo and the backup data will be stored in the corresponding repo.


-
-backupToolName
- -string - -
-

which backup tool to perform database backup, only support one tool.


+

describe current state of restore API Resource, like warning.


-

CreatePVCPolicy -(string alias)

-

-(Appears on:PersistentVolumeClaim) -

-
-

CreatePVCPolicy the policy how to create the PersistentVolumeClaim for backup.


-
- - - - - - - - - - - - -
ValueDescription

"IfNotPresent"

"Never"

-

DeployKind -(string alias)

-

-(Appears on:BackupToolSpec) -

-
-

DeployKind which kind for run a backup tool.


-
- - - - - - - - - - - - -
ValueDescription

"job"

"statefulSet"

-

LogicalConfig +

RestoreStatusAction

-(Appears on:BackupToolSpec) +(Appears on:RestoreStatusActions)

@@ -2263,122 +3909,96 @@ string -BackupToolRestoreCommand
+name
- -BackupToolRestoreCommand - +string -

-(Members of BackupToolRestoreCommand are embedded into this type.) -

+

name describes the name of the recovery action based on the current backup.


-podScope
+backupName
- -PodRestoreScope - +string -(Optional) -

podScope defines the pod scope for restore from backup, supported values:
- ‘All’ will exec the restore command on all pods.
- ‘ReadWrite’ will pick a ReadWrite pod to exec the restore command.


+

which backup’s restore action belongs to.


- - -

ManifestsStatus -

-

-(Appears on:BackupStatus) -

-
-
- - - - - - - -
FieldDescription
-backupLog
+objectKey
- -BackupLogStatus - +string
-(Optional) -

backupLog records startTime and stopTime of data logging.


+

the execution object of the restore action.


-target
+message
string
(Optional) -

target records the target cluster metadata string, which is in JSON format.


+

message is a human-readable message indicating details about the object condition.


-backupSnapshot
+status
- -BackupSnapshotStatus + +RestoreActionStatus
-(Optional) -

snapshot records the volume snapshot metadata.


+

the status of this action.


-backupTool
+startTime
- -BackupToolManifestsStatus + +Kubernetes meta/v1.Time
(Optional) -

backupTool records information about backup files generated by the backup tool.


+

startTime is the start time for the restore job.


-userContext
+endTime
-map[string]string + +Kubernetes meta/v1.Time +
(Optional) -

userContext stores some loosely structured and extensible information.


+

endTime is the completion time for the restore job.


-

PersistentVolumeClaim +

RestoreStatusActions

-(Appears on:CommonBackupPolicy) +(Appears on:RestoreStatus)

@@ -2392,76 +4012,99 @@ map[string]string -name
+prepareData
-string + +[]RestoreStatusAction + (Optional) -

the name of PersistentVolumeClaim to store backup data.


+

record the actions for prepareData phase.


-storageClassName
+postReady
-string + +[]RestoreStatusAction + (Optional) -

storageClassName is the name of the StorageClass required by the claim.


+

record the actions for postReady phase.


+ + +

RestoreVolumeClaim +

+

+(Appears on:PrepareDataConfig, RestoreVolumeClaimsTemplate) +

+
+
+ + + + + + + +
FieldDescription
-initCapacity
+metadata
- -Kubernetes resource.Quantity + +Kubernetes meta/v1.ObjectMeta
-(Optional) -

initCapacity represents the init storage size of the PersistentVolumeClaim which should be created if not exist.
and the default value is 100Gi if it is empty.


+

Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata


+Refer to the Kubernetes API documentation for the fields of the +metadata field.
-createPolicy
+volumeClaimSpec
- -CreatePVCPolicy + +Kubernetes core/v1.PersistentVolumeClaimSpec
-(Optional) -

createPolicy defines the policy for creating the PersistentVolumeClaim, enum values:
- Never: do nothing if the PersistentVolumeClaim not exists.
- IfNotPresent: create the PersistentVolumeClaim if not present and the accessModes only contains ‘ReadWriteMany’.


+

volumeClaimSpec defines the desired characteristics of a persistent volume claim.


-persistentVolumeConfigMap
+VolumeConfig
- -PersistentVolumeConfigMap + +VolumeConfig
-(Optional) -

persistentVolumeConfigMap references the configmap which contains a persistentVolume template.
key must be “persistentVolume” and value is the “PersistentVolume” struct.
support the following built-in Objects:
- $(GENERATE_NAME): generate a specific format “PVC NAME-PVC NAMESPACE”.
if the PersistentVolumeClaim not exists and CreatePolicy is “IfNotPresent”, the controller
will create it by this template. this is a mutually exclusive setting with “storageClassName”.


+

+(Members of VolumeConfig are embedded into this type.) +

+

describing the source volume of the backup targetVolumes and how to mount path in the restoring container.


-

PersistentVolumeConfigMap +

RestoreVolumeClaimsTemplate

-(Appears on:PersistentVolumeClaim) +(Appears on:PrepareDataConfig)

@@ -2475,32 +4118,53 @@ PersistentVolumeConfigMap -name
+templates
-string + +[]RestoreVolumeClaim + -

the name of the persistentVolume ConfigMap.


+

templates is a list of volume claims.


-namespace
+replicas
-string +int32 + + + +

the replicas of persistent volume claim which need to be created and restored.
the format of created claim name is $(template-name)-$(index).


+ + + + +startingIndex
+ +int32 -

the namespace of the persistentVolume ConfigMap.


+

the starting index for the created persistent volume claim by according to template.
minimum is 0.


-

PhysicalConfig +

RetentionPeriod +(string alias)

+

+(Appears on:BackupSpec, SchedulePolicy) +

+
+

RetentionPeriod represents a duration in the format “1y2mo3w4d5h6m”, where
y=year, mo=month, w=week, d=day, h=hour, m=minute.


+
+

RuntimeSettings

-(Appears on:BackupToolSpec) +(Appears on:BackupMethod)

@@ -2514,48 +4178,27 @@ string -BackupToolRestoreCommand
+resources
- -BackupToolRestoreCommand + +Kubernetes core/v1.ResourceRequirements -

-(Members of BackupToolRestoreCommand are embedded into this type.) -

- - - - -relyOnLogfile
- -bool - - - (Optional) -

relyOnLogfile defines whether the current recovery relies on log files


+

resources specifies the resource required by container.
More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/


-

PodRestoreScope -(string alias)

-

-(Appears on:LogicalConfig) -

-
-

PodRestoreScope defines the scope pod for restore from backup.


-
-

RestoreJobPhase +

SchedulePhase (string alias)

-(Appears on:RestoreJobStatus) +(Appears on:ScheduleStatus)

-

RestoreJobPhase The current phase. Valid values are New, InProgressPhy, InProgressLogic, Completed, Failed.


+

SchedulePhase defines the phase of schedule


@@ -2564,25 +4207,18 @@ bool - - - - - + - - - +
Description

"Completed"

"Failed"

"InProgressLogic"

"Failed"

"InProgressPhy"

"New"

"Running"

-

RestoreJobSpec +

SchedulePolicy

-(Appears on:RestoreJob) +(Appears on:BackupScheduleSpec)

-

RestoreJobSpec defines the desired state of RestoreJob


@@ -2594,75 +4230,61 @@ bool - - - -
-backupJobName
+enabled
-string +bool
-

Specified one backupJob to restore.


+(Optional) +

enabled specifies whether the backup schedule is enabled or not.


-target
+backupMethod
- -TargetCluster - +string
-

the target database workload to restore


+

backupMethod specifies the backup method name that is defined in backupPolicy.


-targetVolumes
+cronExpression
- -[]Kubernetes core/v1.Volume - +string
-

array of restore volumes .


+

the cron expression for schedule, the timezone is in UTC.
see https://en.wikipedia.org/wiki/Cron.


-targetVolumeMounts
+retentionPeriod
- -[]Kubernetes core/v1.VolumeMount + +RetentionPeriod
-

array of restore volume mounts .


-
-onFailAttempted
- -int32 - -
(Optional) -

count of backup stop retries on fail.


+

retentionPeriod determines a duration up to which the backup should be kept.
controller will remove all backups that are older than the RetentionPeriod.
For example, RetentionPeriod of 30d will keep only the backups of last 30 days.
Sample duration format:
- years: 2y
- months: 6mo
- days: 30d
- hours: 12h
- minutes: 30m
You can also combine the above durations. For example: 30d12h30m


-

RestoreJobStatus +

ScheduleStatus

-(Appears on:RestoreJob) +(Appears on:BackupScheduleStatus)

-

RestoreJobStatus defines the observed state of RestoreJob


+

ScheduleStatus defines the status of each schedule.


@@ -2676,32 +4298,31 @@ int32 - - - -
phase
- -RestoreJobPhase + +SchedulePhase
(Optional) +

phase describes the phase of the schedule.


-expiration
+failureReason
- -Kubernetes meta/v1.Time - +string
(Optional) -

The date and time when the Backup is eligible for garbage collection.
‘null’ means the Backup is NOT be cleaned except delete manual.


+

failureReason is an error that caused the backup to fail.


-startTimestamp
+lastScheduleTime
Kubernetes meta/v1.Time @@ -2710,12 +4331,12 @@ Kubernetes meta/v1.Time
(Optional) -

Date/time when the backup started being processed.


+

lastScheduleTime records the last time the backup was scheduled.


-completionTimestamp
+lastSuccessfulTime
Kubernetes meta/v1.Time @@ -2724,27 +4345,15 @@ Kubernetes meta/v1.Time
(Optional) -

Date/time when the backup finished being processed.


-
-failureReason
- -string - -
-(Optional) -

Job failed reason.


+

lastSuccessfulTime records the last time the backup was successfully completed.


-

RetentionSpec +

SchedulingSpec

-(Appears on:BackupPolicySpec) +(Appears on:PrepareDataConfig)

@@ -2758,93 +4367,88 @@ string -ttl
+tolerations
-string + +[]Kubernetes core/v1.Toleration + (Optional) -

ttl is a time string ending with the ’d’|’D’|‘h’|‘H’ character to describe how long
the Backup should be retained. if not set, will be retained forever.


+

the restoring pod’s tolerations.


- - -

Schedule -

-

-(Appears on:BackupPolicySpec) -

-
-
- - - - + + - -
FieldDescription +nodeSelector
+ +map[string]string + +
+(Optional) +

nodeSelector is a selector which must be true for the pod to fit on a node.
Selector which must match a node’s labels for the pod to be scheduled on that node.
More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/


+
-startingDeadlineMinutes
+nodeName
-int64 +string
(Optional) -

startingDeadlineMinutes defines the deadline in minutes for starting the backup job
if it misses scheduled time for any reason.


+

nodeName is a request to schedule this pod onto a specific node. If it is non-empty,
the scheduler simply schedules this pod onto that node, assuming that it fits resource
requirements.


-snapshot
+affinity
- -SchedulePolicy + +Kubernetes core/v1.Affinity
(Optional) -

schedule policy for snapshot backup.


+

affinity is a group of affinity scheduling rules.
refer to https://kubernetes.io/docs/concepts/configuration/assign-pod-node/


-datafile
+topologySpreadConstraints
- -SchedulePolicy + +[]Kubernetes core/v1.TopologySpreadConstraint
(Optional) -

schedule policy for datafile backup.


+

topologySpreadConstraints describes how a group of pods ought to spread across topology
domains. Scheduler will schedule pods in a way which abides by the constraints.
refer to https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/


-logfile
+schedulerName
- -SchedulePolicy - +string
(Optional) -

schedule policy for logfile backup.


+

If specified, the pod will be dispatched by specified scheduler.
If not specified, the pod will be dispatched by default scheduler.


-

SchedulePolicy +

SyncProgress

-(Appears on:Schedule) +(Appears on:BackupDataActionSpec)

@@ -2858,34 +4462,37 @@ SchedulePolicy -cronExpression
+enabled
-string +bool -

the cron expression for schedule, the timezone is in UTC. see https://en.wikipedia.org/wiki/Cron.


+(Optional) +

enabled specifies whether to sync the backup progress. If enabled,
a sidecar container will be created to sync the backup progress to the
Backup CR status.


-enable
+intervalSeconds
-bool +int32 -

enable or disable the schedule.


+(Optional) +

intervalSeconds specifies the interval seconds to sync the backup progress.


-

SnapshotPolicy +

TargetVolumeInfo

-(Appears on:BackupPolicySpec) +(Appears on:BackupMethod)

+

TargetVolumeInfo specifies the volumes and their mounts of the targeted application
that should be mounted in backup workload.


@@ -2897,42 +4504,100 @@ bool + + + + + + +
-BasePolicy
+volumes
+ +[]string + +
+(Optional) +

Volumes indicates the list of volumes of targeted application that should
be mounted on the backup job.


+
+volumeMounts
- -BasePolicy + +[]Kubernetes core/v1.VolumeMount
+(Optional) +

volumeMounts specifies the mount for the volumes specified in Volumes section.


+
+

VolumeClaimRestorePolicy +(string alias)

+

+(Appears on:PrepareDataConfig) +

+
+

VolumeClaimRestorePolicy defines restore policy for persistent volume claim.
Supported policies are as follows:
1. Parallel: parallel recovery of persistent volume claim.
2. Serial: restore the persistent volume claim in sequence, and wait until the
previous persistent volume claim is restored before restoring a new one.


+
+ + + + + + + + + + + + +
ValueDescription

"Parallel"

"Serial"

+

VolumeConfig +

-(Members of BasePolicy are embedded into this type.) +(Appears on:PrepareDataConfig, RestoreVolumeClaim)

+
+
+ + + + + + + + + + +
FieldDescription
+volumeSource
+ +string + +
+(Optional) +

volumeSource describes the volume will be restored from the specified volume of the backup targetVolumes.
required if the backup uses volume snapshot.


-hooks
+mountPath
- -BackupPolicyHook - +string
(Optional) -

execute hook commands for backup.


+

mountPath path within the restoring container at which the volume should be mounted.


-

TargetCluster +

VolumeSnapshotStatus

-(Appears on:BasePolicy, RestoreJobSpec) +(Appears on:ActionStatus, BackupStatus)

-

TargetCluster TODO (dsj): target cluster need redefined from Cluster API


@@ -2944,29 +4609,48 @@ BackupPolicyHook + + + + + + + + diff --git a/docs/developer_docs/api-reference/cluster.md b/docs/developer_docs/api-reference/cluster.md index 816f349ea54..7e99265f1be 100644 --- a/docs/developer_docs/api-reference/cluster.md +++ b/docs/developer_docs/api-reference/cluster.md @@ -25,13 +25,23 @@ Resource Types:
  • ClusterVersion
  • +Component +
  • ComponentClassDefinition
  • +ComponentDefinition +
  • ComponentResourceConstraint
  • ConfigConstraint
  • +Configuration +
  • +OpsDefinition +
  • OpsRequest +
  • +ServiceDescriptor
  • BackupPolicyTemplate

    @@ -204,7 +214,8 @@ string @@ -234,43 +245,44 @@ TerminationPolicyType @@ -303,6 +315,34 @@ Affinity + + + + + + + +
    -labelsSelector
    +name
    - -Kubernetes meta/v1.LabelSelector - +string
    -

    labelsSelector is used to find matching pods.
    Pods that match this label selector are counted to determine the number of pods
    in their corresponding topology domain.


    +

    name is the name of the volume snapshot.


    -secret
    +contentName
    - -BackupPolicySecret - +string + +
    +

    contentName is the name of the volume snapshot content.


    +
    +volumeName
    + +string + +
    +(Optional) +

    volumeName is the name of the volume.


    +
    +size
    + +string
    (Optional) -

    secret is used to connect to the target database cluster.
    If not set, secret will be inherited from backup policy template.
    if still not set, the controller will check if any system account for dataprotection has been created.


    +

    size is the size of the volume snapshot.


    -

    Cluster referencing ClusterDefinition name. This is an immutable attribute.


    +(Optional) +

    Cluster referencing ClusterDefinition name. This is an immutable attribute.
    If ClusterDefRef is not specified, ComponentDef must be specified for each Component in ComponentSpecs.


    -componentSpecs
    +shardingSpecs
    - -[]ClusterComponentSpec + +[]ShardingSpec
    -

    List of componentSpecs you want to replace in ClusterDefinition and ClusterVersion. It will replace the field in ClusterDefinition’s and ClusterVersion’s component if type is matching.


    +(Optional) +

    List of ShardingSpec which is used to define components with a sharding topology structure that make up a cluster.
    ShardingSpecs and ComponentSpecs cannot both be empty at the same time.


    -tenancy
    +componentSpecs
    - -TenancyType + +[]ClusterComponentSpec
    (Optional) -

    tenancy describes how pods are distributed across node.
    SharedNode means multiple pods may share the same node.
    DedicatedNode means each pod runs on their own dedicated node.


    +

    List of componentSpec which is used to define the components that make up a cluster.
    ComponentSpecs and ShardingSpecs cannot both be empty at the same time.


    -availabilityPolicy
    +services
    - -AvailabilityPolicyType + +[]ClusterService
    (Optional) -

    availabilityPolicy describes the availability policy, including zone, node, and none.


    +

    services defines the services to access a cluster.


    +tenancy
    + + +TenancyType + + +
    +(Optional) +

    tenancy describes how pods are distributed across node.
    SharedNode means multiple pods may share the same node.
    DedicatedNode means each pod runs on their own dedicated node.


    +
    +availabilityPolicy
    + + +AvailabilityPolicyType + + +
    +(Optional) +

    availabilityPolicy describes the availability policy, including zone, node, and none.


    +
    replicas
    int32 @@ -489,7 +529,7 @@ map[string]string
    (Optional) -

    Connection credential template used for creating a connection credential
    secret for cluster.apps.kubeblocks.io object.



    Built-in objects are:
    - $(RANDOM_PASSWD) - random 8 characters.
    - $(UUID) - generate a random UUID v4 string.
    - $(UUID_B64) - generate a random UUID v4 BASE64 encoded string.
    - $(UUID_STR_B64) - generate a random UUID v4 string then BASE64 encoded.
    - $(UUID_HEX) - generate a random UUID v4 HEX representation.
    - $(HEADLESS_SVC_FQDN) - headless service FQDN placeholder, value pattern - $(CLUSTER_NAME)-$(1ST_COMP_NAME)-headless.$(NAMESPACE).svc,
    where 1ST_COMP_NAME is the 1st component that provide ClusterDefinition.spec.componentDefs[].service attribute;
    - $(SVC_FQDN) - service FQDN placeholder, value pattern - $(CLUSTER_NAME)-$(1ST_COMP_NAME).$(NAMESPACE).svc,
    where 1ST_COMP_NAME is the 1st component that provide ClusterDefinition.spec.componentDefs[].service attribute;
    - $(SVC_PORT_{PORT-NAME}) - a ServicePort’s port value with specified port name, i.e, a servicePort JSON struct:
    {"name": "mysql", "targetPort": "mysqlContainerPort", "port": 3306}, and “$(SVC_PORT_mysql)” in the
    connection credential value is 3306.


    +

    Connection credential template used for creating a connection credential
    secret for cluster.apps.kubeblocks.io object.



    Built-in objects are:
    - $(RANDOM_PASSWD) - random 8 characters.
    - $(STRONG_RANDOM_PASSWD) - random 16 characters, with mixed cases, digits and symbols.
    - $(UUID) - generate a random UUID v4 string.
    - $(UUID_B64) - generate a random UUID v4 BASE64 encoded string.
    - $(UUID_STR_B64) - generate a random UUID v4 string then BASE64 encoded.
    - $(UUID_HEX) - generate a random UUID v4 HEX representation.
    - $(HEADLESS_SVC_FQDN) - headless service FQDN placeholder, value pattern - $(CLUSTER_NAME)-$(1ST_COMP_NAME)-headless.$(NAMESPACE).svc,
    where 1ST_COMP_NAME is the 1st component that provide ClusterDefinition.spec.componentDefs[].service attribute;
    - $(SVC_FQDN) - service FQDN placeholder, value pattern - $(CLUSTER_NAME)-$(1ST_COMP_NAME).$(NAMESPACE).svc,
    where 1ST_COMP_NAME is the 1st component that provide ClusterDefinition.spec.componentDefs[].service attribute;
    - $(SVC_PORT_{PORT-NAME}) - a ServicePort’s port value with specified port name, i.e, a servicePort JSON struct:
    {"name": "mysql", "targetPort": "mysqlContainerPort", "port": 3306}, and “$(SVC_PORT_mysql)” in the
    connection credential value is 3306.


    @@ -605,10 +645,10 @@ ClusterVersionStatus -

    ComponentClassDefinition +

    Component

    -

    ComponentClassDefinition is the Schema for the componentclassdefinitions API


    +

    Component is the Schema for the components API


    @@ -631,7 +671,7 @@ stringkind
    string - + @@ -662,319 +702,292 @@ ComponentClassDefinitionSpec
    ComponentClassDefinitionComponent
    @@ -651,8 +691,8 @@ Refer to the Kubernetes API documentation for the fields of the spec
    - -ComponentClassDefinitionSpec + +ComponentSpec
    - -
    -groups
    +compDef
    - -[]ComponentClassGroup - +string
    -(Optional) -

    group defines a list of class series that conform to the same constraint.


    -
    +

    compDef is the name of the referenced componentDefinition.


    -status
    +classDefRef
    - -ComponentClassDefinitionStatus + +ClassDefRef +(Optional) +

    classDefRef references the class defined in ComponentClassDefinition.


    - - -

    ComponentResourceConstraint -

    -
    -

    ComponentResourceConstraint is the Schema for the componentresourceconstraints API


    -
    - - - - - - - - - - - - - - - - - - - -
    FieldDescription
    -apiVersion
    -string
    -apps.kubeblocks.io/v1alpha1 -
    -kind
    -string -
    ComponentResourceConstraint
    -metadata
    +serviceRefs
    - -Kubernetes meta/v1.ObjectMeta + +[]ServiceRef
    -Refer to the Kubernetes API documentation for the fields of the -metadata field. +(Optional) +

    serviceRefs define service references for the current component. Based on the referenced services, they can be categorized into two types:
    Service provided by external sources: These services are provided by external sources and are not managed by KubeBlocks. They can be Kubernetes-based or non-Kubernetes services. For external services, you need to provide an additional ServiceDescriptor object to establish the service binding.
    Service provided by other KubeBlocks clusters: These services are provided by other KubeBlocks clusters. You can bind to these services by specifying the name of the hosting cluster.
    Each type of service reference requires specific configurations and bindings to establish the connection and interaction with the respective services.
    It should be noted that the ServiceRef has cluster-level semantic consistency, meaning that within the same Cluster, service references with the same ServiceRef.Name are considered to be the same service. It is only allowed to bind to the same Cluster or ServiceDescriptor.


    -spec
    - - -ComponentResourceConstraintSpec - - -
    -
    -
    - - - - -
    -rules
    +resources
    - -[]ResourceConstraintRule + +Kubernetes core/v1.ResourceRequirements
    -

    Component resource constraint rules.


    +(Optional) +

    Resources requests and limits of workload.


    -selector
    +volumeClaimTemplates
    - -[]ClusterResourceConstraintSelector + +[]ClusterComponentVolumeClaimTemplate
    (Optional) -

    selector is used to bind the resource constraint to cluster definitions.


    -
    -
    -

    ConfigConstraint -

    -
    -

    ConfigConstraint is the Schema for the configconstraint API


    -
    - - - - - - - - - - - - - - - + + +
    FieldDescription
    -apiVersion
    -string
    -apps.kubeblocks.io/v1alpha1 -
    -kind
    -string +

    VolumeClaimTemplates information for statefulset.spec.volumeClaimTemplates.


    ConfigConstraint
    -metadata
    +replicas
    - -Kubernetes meta/v1.ObjectMeta - +int32
    -Refer to the Kubernetes API documentation for the fields of the -metadata field. +

    Replicas specifies the desired number of replicas for the component’s workload.


    -spec
    +configs
    - -ConfigConstraintSpec + +[]ComponentConfigSpec
    -
    -
    - +(Optional) + + - - -
    -reloadOptions
    +monitor
    - -ReloadOptions - +bool
    (Optional) -

    reloadOptions indicates whether the process supports reload.
    if set, the controller will determine the behavior of the engine instance based on the configuration templates,
    restart or reload depending on whether any parameters in the StaticParameters have been modified.


    +

    monitor is a switch to enable monitoring and is set as false by default.
    KubeBlocks provides an extension mechanism to support component level monitoring,
    which will scrape metrics auto or manually from servers in component and export
    metrics to Time Series Database.


    -toolsImageSpec
    +enabledLogs
    - -ToolsImageSpec - +[]string
    (Optional) -

    toolConfig used to config init container.


    +

    enabledLogs indicates which log file takes effect in the database cluster,
    element is the log type which is defined in ComponentDefinition logConfig.name.


    -downwardAPIOptions
    +serviceAccountName
    - -[]DownwardAPIOption - +string
    (Optional) -

    downwardAPIOptions is used to watch pod fields.


    +

    serviceAccountName is the name of the ServiceAccount that running component depends on.


    -scriptConfigs
    +affinity
    - -[]ScriptConfig + +Affinity
    (Optional) -

    scriptConfigs, list of ScriptConfig, witch these scripts can be used by volume trigger,downward trigger, or tool image


    +

    Affinity specifies the scheduling constraints for the component’s workload.
    If specified, it will override the cluster-wide affinity.


    -cfgSchemaTopLevelName
    +tolerations
    -string + +[]Kubernetes core/v1.Toleration +
    (Optional) -

    cfgSchemaTopLevelName is cue type name, which generates openapi schema.


    +

    Tolerations specify the tolerations for the component’s workload.
    If specified, they will override the cluster-wide toleration settings.


    -configurationSchema
    +tlsConfig
    - -CustomParametersValidation + +TLSConfig
    (Optional) -

    configurationSchema imposes restrictions on database parameter’s rule.


    -staticParameters
    +rsmTransformPolicy
    -[]string +github.com/apecloud/kubeblocks/apis/workloads/v1alpha1.RsmTransformPolicy
    (Optional) -

    staticParameters, list of StaticParameter, modifications of them trigger a process restart.


    +

    RsmTransformPolicy defines the policy generate sts using rsm.
    ToSts: rsm transform to statefulSet
    ToPod: rsm transform to pods


    -dynamicParameters
    +nodes
    -[]string +[]k8s.io/apimachinery/pkg/types.NodeName
    (Optional) -

    dynamicParameters, list of DynamicParameter, modifications of them trigger a config dynamic reload without process restart.


    +

    Nodes defines the list of nodes that pods can schedule
    If the RsmTransformPolicy is specified as OneToMul,the list of nodes will be used. If the list of nodes is empty,
    no specific node will be assigned. However, if the list of node is filled, all pods will be evenly scheduled
    across the nodes in the list.


    -immutableParameters
    +instances
    []string
    (Optional) -

    immutableParameters describes parameters that prohibit user from modification.


    +

    Instances defines the list of instance to be deleted priorly


    -selector
    - - -Kubernetes meta/v1.LabelSelector - - -
    -

    selector is used to match the label on the pod,
    for example, a pod of the primary is match on the patroni cluster.


    +
    -formatterConfig
    +status
    - -FormatterConfig + +ComponentStatus
    -

    formatterConfig describes the format of the configuration file, the controller
    1. parses configuration file
    2. analyzes the modified parameters
    3. applies corresponding policies.


    +
    +

    ComponentClassDefinition +

    +
    +

    ComponentClassDefinition is the Schema for the componentclassdefinitions API


    +
    + + + + + + + + + + + + + + + + + + + + + + + @@ -994,10 +1007,10 @@ ConfigConstraintStatus
    FieldDescription
    +apiVersion
    +string
    +apps.kubeblocks.io/v1alpha1 +
    +kind
    +string +
    ComponentClassDefinition
    +metadata
    + + +Kubernetes meta/v1.ObjectMeta + + +
    +Refer to the Kubernetes API documentation for the fields of the +metadata field. +
    +spec
    + + +ComponentClassDefinitionSpec + + +
    +
    +
    + + + +
    +groups
    + + +[]ComponentClassGroup + + +
    +(Optional) +

    group defines a list of class series that conform to the same constraint.


    @@ -984,8 +997,8 @@ FormatterConfig
    status
    - -ConfigConstraintStatus + +ComponentClassDefinitionStatus
    -

    OpsRequest +

    ComponentDefinition

    -

    OpsRequest is the Schema for the opsrequests API


    +

    ComponentDefinition is the Schema for the componentdefinitions API


    @@ -1020,7 +1033,7 @@ stringkind
    string - + @@ -1051,369 +1064,320 @@ OpsRequestSpec
    OpsRequestComponentDefinition
    @@ -1040,8 +1053,8 @@ Refer to the Kubernetes API documentation for the fields of the spec
    - -OpsRequestSpec + +ComponentDefinitionSpec
    - -
    -clusterRef
    +provider
    string
    -

    clusterRef references clusterDefinition.


    +(Optional) +

    Provider is the name of the component provider.


    -cancel
    +description
    -bool +string
    (Optional) -

    cancel defines the action to cancel the Pending/Creating/Running opsRequest, supported types: [VerticalScaling, HorizontalScaling].
    once cancel is set to true, this opsRequest will be canceled and modifying this property again will not take effect.


    +

    Description is a brief description of the component.


    -type
    +serviceKind
    - -OpsType - +string
    -

    type defines the operation type.


    +(Optional) +

    ServiceKind defines what kind of well-known service that the component provides (e.g., MySQL, Redis, ETCD, case insensitive).
    Cannot be updated.


    -ttlSecondsAfterSucceed
    +serviceVersion
    -int32 +string
    (Optional) -

    ttlSecondsAfterSucceed OpsRequest will be deleted after TTLSecondsAfterSucceed second when OpsRequest.status.phase is Succeed.


    +

    ServiceVersion defines the version of the well-known service that the component provides.
    Cannot be updated.


    -upgrade
    +runtime
    - -Upgrade + +Kubernetes core/v1.PodSpec
    -(Optional) -

    upgrade specifies the cluster version by specifying clusterVersionRef.


    +

    Runtime defines primarily runtime information for the component, including:
    - Init containers
    - Containers
    - Image
    - Commands
    - Args
    - Envs
    - Mounts
    - Ports
    - Security context
    - Probes
    - Lifecycle
    - Volumes
    CPU and memory resource limits, as well as scheduling settings (affinity, toleration, priority), should not be configured within this structure.
    Cannot be updated.


    -horizontalScaling
    +vars
    - -[]HorizontalScaling + +[]EnvVar
    (Optional) -

    horizontalScaling defines what component need to horizontal scale the specified replicas.


    +

    Vars represents user-defined variables.
    These variables can be utilized as environment variables for Pods and Actions, or to render the templates of config and script.
    When used as environment variables, these variables are placed in front of the environment variables declared in the Pod.
    Cannot be updated.


    -volumeExpansion
    +volumes
    - -[]VolumeExpansion + +[]ComponentVolume
    (Optional) -

    volumeExpansion defines what component and volumeClaimTemplate need to expand the specified storage.


    +

    Volumes defines the persistent volumes needed by the component.
    The users are responsible for providing these volumes when creating a component instance.
    Cannot be updated.


    -restart
    +services
    - -[]ComponentOps + +[]ComponentService
    (Optional) -

    restart the specified components.


    +

    Services defines endpoints that can be used to access the component service to manage the component.
    In addition, a reserved headless service will be created by default, with the name pattern {clusterName}-{componentName}-headless.
    Cannot be updated.


    -switchover
    +configs
    - -[]Switchover + +[]ComponentConfigSpec
    (Optional) -

    switchover the specified components.


    +

    The configs field provided by provider, and
    finally this configTemplateRefs will be rendered into the user’s own configuration file according to the user’s cluster.
    Cannot be updated.
    TODO: support referencing configs from other components or clusters.


    -verticalScaling
    +logConfigs
    - -[]VerticalScaling + +[]LogConfig
    (Optional) -

    verticalScaling defines what component need to vertical scale the specified compute resources.


    +

    LogConfigs is detail log file config which provided by provider.
    Cannot be updated.


    -reconfigure
    +monitor
    - -Reconfigure + +MonitorConfig
    (Optional) -

    reconfigure defines the variables that need to input when updating configuration.


    +

    Monitor is monitoring config which provided by provider.
    Cannot be updated.


    -expose
    +scripts
    - -[]Expose + +[]ComponentTemplateSpec
    (Optional) -

    expose defines services the component needs to expose.


    +

    The scripts field provided by provider, and
    finally this configTemplateRefs will be rendered into the user’s own configuration file according to the user’s cluster.
    Cannot be updated.


    -restoreFrom
    +policyRules
    - -RestoreFromSpec + +[]Kubernetes rbac/v1.PolicyRule
    (Optional) -

    cluster RestoreFrom backup or point in time


    +

    PolicyRules defines the namespaced policy rules required by the component.
    If any rule application fails (e.g., due to lack of permissions), the provisioning of the component instance will also fail.
    Cannot be updated.


    -ttlSecondsBeforeAbort
    +labels
    -int32 +map[string]string
    (Optional) -

    ttlSecondsBeforeAbort OpsRequest will wait at most TTLSecondsBeforeAbort seconds for start-conditions to be met.
    If not specified, the default value is 0, which means that the start-conditions must be met immediately.


    +

    Labels defines static labels that will be patched to all k8s resources created for the component.
    If a label key conflicts with any other system labels or user-specified labels, it will be silently ignored.
    Cannot be updated.


    -scriptSpec
    +replicasLimit
    - -ScriptSpec + +ReplicasLimit
    (Optional) -

    scriptSpec defines the script to be executed.


    -
    +

    ReplicasLimit defines the limit of valid replicas supported.
    Cannot be updated.


    -status
    +systemAccounts
    - -OpsRequestStatus + +[]SystemAccount +(Optional) +

    SystemAccounts defines the pre-defined system accounts required to manage the component.
    TODO(component): accounts KB required
    Cannot be updated.


    - - -

    AccessMode -(string alias)

    -

    -(Appears on:ConsensusMember, ConsensusMemberStatus) -

    -
    -

    AccessMode defines SVC access mode enums.


    -
    - - - - - - - - - - - - - - -
    ValueDescription

    "None"

    "ReadWrite"

    "Readonly"

    -

    AccountName -(string alias)

    -

    -(Appears on:SystemAccountConfig) -

    -
    -

    AccountName defines system account names.


    -
    - - - - - - - - - - - - - - - - - - -
    ValueDescription

    "kbadmin"

    "kbdataprotection"

    "kbmonitoring"

    "kbprobe"

    "kbreplicator"

    -

    Affinity -

    -

    -(Appears on:ClusterComponentSpec, ClusterSpec) -

    -
    -
    - - - - + + - - + + + + -
    FieldDescription +updateStrategy
    + + +UpdateStrategy + + +
    +(Optional) +

    UpdateStrategy defines the strategy for updating the component instance.
    Cannot be updated.


    +
    -podAntiAffinity
    +roles
    - -PodAntiAffinity + +[]ReplicaRole
    (Optional) -

    podAntiAffinity describes the anti-affinity level of pods within a component.
    Preferred means try spread pods by TopologyKeys.
    Required means must spread pods by TopologyKeys.


    +

    Roles defines all the roles that the component can assume.
    Cannot be updated.


    -topologyKeys
    +roleArbitrator
    -[]string + +RoleArbitrator +
    (Optional) -

    topologyKey is the key of node labels.
    Nodes that have a label with this key and identical values are considered to be in the same topology.
    It’s used as the topology domain for pod anti-affinity and pod spread constraint.
    Some well-known label keys, such as “kubernetes.io/hostname” and “topology.kubernetes.io/zone”
    are often used as TopologyKey, as well as any other custom label key.


    +

    RoleArbitrator defines the strategy for electing the component’s active role.
    Cannot be updated.


    -nodeLabels
    +lifecycleActions
    -map[string]string + +ComponentLifecycleActions +
    (Optional) -

    nodeLabels describes that pods must be scheduled to the nodes with the specified node labels.


    +

    LifecycleActions defines the operational actions that needed to interoperate with the component
    service and processes for lifecycle management.
    Cannot be updated.


    -tenancy
    +serviceRefDeclarations
    - -TenancyType + +[]ServiceRefDeclaration
    (Optional) -

    tenancy describes how pods are distributed across node.
    SharedNode means multiple pods may share the same node.
    DedicatedNode means each pod runs on their own dedicated node.


    +

    ServiceRefDeclarations is used to declare the service reference of the current component.
    Cannot be updated.


    +
    +minReadySeconds
    + +int32 + +
    +(Optional) +

    Minimum number of seconds for which a newly created pod should be ready
    without any of its container crashing for it to be considered available.
    Defaults to 0 (pod will be considered available as soon as it is ready)


    -

    AvailabilityPolicyType -(string alias)

    -

    -(Appears on:ClusterSpec) -

    -
    -

    AvailabilityPolicyType for cluster affinity policy.


    -
    - - + + - - + + - - - - - - - - +
    ValueDescription +status
    + + +ComponentDefinitionStatus + + +
    +

    "node"

    "none"

    "zone"

    -

    BackupPolicy +

    ComponentResourceConstraint

    -

    -(Appears on:BackupPolicyTemplateSpec) -

    +

    ComponentResourceConstraint is the Schema for the componentresourceconstraints API


    @@ -1425,94 +1389,96 @@ TenancyType + + + + - +
    +
    +
    -componentDefRef
    - -string - +apiVersion
    +string
    +apps.kubeblocks.io/v1alpha1
    -

    componentDefRef references componentDef defined in ClusterDefinition spec. Need to
    comply with IANA Service Naming rule.


    +kind
    +string
    ComponentResourceConstraint
    -retention
    +metadata
    - -RetentionSpec + +Kubernetes meta/v1.ObjectMeta
    -(Optional) -

    retention describe how long the Backup should be retained. if not set, will be retained forever.


    +Refer to the Kubernetes API documentation for the fields of the +metadata field.
    -schedule
    +spec
    - -Schedule + +ComponentResourceConstraintSpec
    -(Optional) -

    schedule policy for backup.


    -
    + +
    -snapshot
    +rules
    - -SnapshotPolicy + +[]ResourceConstraintRule
    -(Optional) -

    the policy for snapshot backup.


    +

    Component resource constraint rules.


    -datafile
    +selector
    - -CommonBackupPolicy + +[]ClusterResourceConstraintSelector
    (Optional) -

    the policy for datafile backup.


    +

    selector is used to bind the resource constraint to cluster definitions based on ClusterDefinition API.


    -logfile
    +componentSelector
    - -CommonBackupPolicy + +[]ComponentResourceConstraintSelector
    (Optional) -

    the policy for logfile backup.


    +

    componentSelector is used to bind the resource constraint to components based on ComponentDefinition API.


    +
    -

    BackupPolicyHook +

    ConfigConstraint

    -

    -(Appears on:SnapshotPolicy) -

    -

    BackupPolicyHook defines for the database execute commands before and after backup.


    +

    ConfigConstraint is the Schema for the configconstraint API


    @@ -1524,242 +1490,5689 @@ CommonBackupPolicy + + + + + + + + + + + +
    -preCommands
    - -[]string - +apiVersion
    +string
    +apps.kubeblocks.io/v1alpha1
    -(Optional) -

    pre backup to perform commands


    +kind
    +string
    ConfigConstraint
    -postCommands
    +metadata
    -[]string + +Kubernetes meta/v1.ObjectMeta +
    -(Optional) -

    post backup to perform commands


    +Refer to the Kubernetes API documentation for the fields of the +metadata field.
    -image
    +spec
    -string + +ConfigConstraintSpec + + +
    +
    +
    + + + - -
    +reloadOptions
    + + +ReloadOptions +
    (Optional) -

    exec command with image


    +

    reloadOptions indicates whether the process supports reload.
    if set, the controller will determine the behavior of the engine instance based on the configuration templates,
    restart or reload depending on whether any parameters in the StaticParameters have been modified.


    -containerName
    +toolsImageSpec
    -string + +ToolsImageSpec +
    (Optional) -

    which container can exec command


    +

    toolConfig used to config init container.


    -

    BackupPolicyTemplateSpec -

    -

    -(Appears on:BackupPolicyTemplate) -

    -
    -

    BackupPolicyTemplateSpec defines the desired state of BackupPolicyTemplate


    -
    - - - - - - - - - -
    FieldDescription
    -clusterDefinitionRef
    +downwardAPIOptions
    -string + +[]DownwardAPIOption +
    -

    clusterDefinitionRef references ClusterDefinition name, this is an immutable attribute.


    +(Optional) +

    downwardAPIOptions is used to watch pod fields.


    -backupPolicies
    +scriptConfigs
    - -[]BackupPolicy + +[]ScriptConfig
    -

    backupPolicies is a list of backup policy template for the specified componentDefinition.


    +(Optional) +

    scriptConfigs, list of ScriptConfig, witch these scripts can be used by volume trigger,downward trigger, or tool image


    -identifier
    +cfgSchemaTopLevelName
    string
    (Optional) -

    Identifier is a unique identifier for this BackupPolicyTemplate.
    this identifier will be the suffix of the automatically generated backupPolicy name.
    and must be added when multiple BackupPolicyTemplates exist,
    otherwise the generated backupPolicy override will occur.


    +

    cfgSchemaTopLevelName is cue type name, which generates openapi schema.


    -

    BackupPolicyTemplateStatus -

    -

    -(Appears on:BackupPolicyTemplate) -

    -
    -

    BackupPolicyTemplateStatus defines the observed state of BackupPolicyTemplate


    -
    -

    BackupRefSpec -

    -

    -(Appears on:RestoreFromSpec) -

    -
    -
    - - - - - - - - - -
    FieldDescription
    -ref
    +configurationSchema
    - -RefNamespaceName + +CustomParametersValidation
    (Optional) -

    specify a reference backup to restore


    +

    configurationSchema imposes restrictions on database parameter’s rule.


    -

    BackupStatusUpdate -

    -

    -(Appears on:BasePolicy) -

    -
    -
    - - - - - - - - + +
    FieldDescription
    -path
    +staticParameters
    -string +[]string
    (Optional) -

    specify the json path of backup object for patch.
    example: manifests.backupLog – means patch the backup json path of status.manifests.backupLog.


    +

    staticParameters, list of StaticParameter, modifications of them trigger a process restart.


    -containerName
    +dynamicParameters
    -string +[]string
    (Optional) -

    which container name that kubectl can execute.


    +

    dynamicParameters, list of DynamicParameter, modifications of them trigger a config dynamic reload without process restart.


    -script
    +immutableParameters
    -string +[]string
    (Optional) -

    the shell Script commands to collect backup status metadata.
    The script must exist in the container of ContainerName and the output format must be set to JSON.
    Note that outputting to stderr may cause the result format to not be in JSON.


    +

    immutableParameters describes parameters that prohibit user from modification.


    -useTargetPodServiceAccount
    +selector
    -bool + +Kubernetes meta/v1.LabelSelector +
    -(Optional) -

    useTargetPodServiceAccount defines whether this job requires the service account of the backup target pod.
    if true, will use the service account of the backup target pod. otherwise, will use the system service account.


    +

    selector is used to match the label on the pod,
    for example, a pod of the primary is match on the patroni cluster.


    -updateStage
    +formatterConfig
    - -BackupStatusUpdateStage + +FormatterConfig
    -

    when to update the backup status, pre: before backup, post: after backup


    +

    formatterConfig describes the format of the configuration file, the controller
    1. parses configuration file
    2. analyzes the modified parameters
    3. applies corresponding policies.


    +
    +
    +status
    + + +ConfigConstraintStatus + + +
    +
    +

    Configuration +

    +
    +

    Configuration is the Schema for the configurations API


    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +apiVersion
    +string
    +apps.kubeblocks.io/v1alpha1 +
    +kind
    +string +
    Configuration
    +metadata
    + + +Kubernetes meta/v1.ObjectMeta + + +
    +Refer to the Kubernetes API documentation for the fields of the +metadata field. +
    +spec
    + + +ConfigurationSpec + + +
    +
    +
    + + + + + + + + + + + + + +
    +clusterRef
    + +string + +
    +

    clusterRef references Cluster name.


    +
    +componentName
    + +string + +
    +

    componentName is cluster component name.


    +
    +configItemDetails
    + + +[]ConfigurationItemDetail + + +
    +(Optional) +

    customConfigurationItems describes user-defined config template.


    +
    +
    +status
    + + +ConfigurationStatus + + +
    +
    +

    OpsDefinition +

    +
    +

    OpsDefinition is the Schema for the opsdefinitions API


    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +apiVersion
    +string
    +apps.kubeblocks.io/v1alpha1 +
    +kind
    +string +
    OpsDefinition
    +metadata
    + + +Kubernetes meta/v1.ObjectMeta + + +
    +Refer to the Kubernetes API documentation for the fields of the +metadata field. +
    +spec
    + + +OpsDefinitionSpec + + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + +
    +componentDefinitionRefs
    + + +[]ComponentDefinitionRef + + +
    +

    componentDefinitionRefs indicates which types of componentDefinitions are supported by the operation,
    and can refer some vars of the componentDefinition.
    if it is set, the component that does not meet the conditions will be intercepted.


    +
    +varsRef
    + + +VarsRef + + +
    +(Optional) +

    varsRef defines the envs that need to be referenced from the target component pod, and will inject to job’s containers.


    +
    +parametersSchema
    + + +ParametersSchema + + +
    +(Optional) +

    parametersSchema describes the schema used for validation, pruning, and defaulting.


    +
    +jobSpec
    + + +Kubernetes batch/v1.JobSpec + + +
    +

    jobSpec describes the job spec for the operation.


    +
    +preConditions
    + + +[]PreCondition + + +
    +(Optional) +

    preCondition if it meets the requirements to run the job for the operation.


    +
    +
    +status
    + + +OpsDefinitionStatus + + +
    +
    +

    OpsRequest +

    +
    +

    OpsRequest is the Schema for the opsrequests API


    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +apiVersion
    +string
    +apps.kubeblocks.io/v1alpha1 +
    +kind
    +string +
    OpsRequest
    +metadata
    + + +Kubernetes meta/v1.ObjectMeta + + +
    +Refer to the Kubernetes API documentation for the fields of the +metadata field. +
    +spec
    + + +OpsRequestSpec + + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +clusterRef
    + +string + +
    +

    clusterRef references cluster object.


    +
    +cancel
    + +bool + +
    +(Optional) +

    cancel defines the action to cancel the Pending/Creating/Running opsRequest, supported types: [VerticalScaling, HorizontalScaling].
    once cancel is set to true, this opsRequest will be canceled and modifying this property again will not take effect.


    +
    +type
    + + +OpsType + + +
    +

    type defines the operation type.


    +
    +ttlSecondsAfterSucceed
    + +int32 + +
    +(Optional) +

    ttlSecondsAfterSucceed OpsRequest will be deleted after TTLSecondsAfterSucceed second when OpsRequest.status.phase is Succeed.


    +
    +upgrade
    + + +Upgrade + + +
    +(Optional) +

    upgrade specifies the cluster version by specifying clusterVersionRef.


    +
    +horizontalScaling
    + + +[]HorizontalScaling + + +
    +(Optional) +

    horizontalScaling defines what component need to horizontal scale the specified replicas.


    +
    +volumeExpansion
    + + +[]VolumeExpansion + + +
    +(Optional) +

    volumeExpansion defines what component and volumeClaimTemplate need to expand the specified storage.


    +
    +restart
    + + +[]ComponentOps + + +
    +(Optional) +

    restart the specified components.


    +
    +switchover
    + + +[]Switchover + + +
    +(Optional) +

    switchover the specified components.


    +
    +verticalScaling
    + + +[]VerticalScaling + + +
    +(Optional) +

    verticalScaling defines what component need to vertical scale the specified compute resources.


    +
    +reconfigure
    + + +Reconfigure + + +
    +(Optional) +

    reconfigure defines the variables that need to input when updating configuration.


    +
    +reconfigures
    + + +[]Reconfigure + + +
    +(Optional) +

    reconfigure defines the variables that need to input when updating configuration.


    +
    +expose
    + + +[]Expose + + +
    +(Optional) +

    expose defines services the component needs to expose.


    +
    +restoreFrom
    + + +RestoreFromSpec + + +
    +(Optional) +

    cluster RestoreFrom backup or point in time


    +
    +ttlSecondsBeforeAbort
    + +int32 + +
    +(Optional) +

    ttlSecondsBeforeAbort OpsRequest will wait at most TTLSecondsBeforeAbort seconds for start-conditions to be met.
    If not specified, the default value is 0, which means that the start-conditions must be met immediately.


    +
    +scriptSpec
    + + +ScriptSpec + + +
    +(Optional) +

    scriptSpec defines the script to be executed.


    +
    +backupSpec
    + + +BackupSpec + + +
    +(Optional) +

    backupSpec defines how to backup the cluster.


    +
    +restoreSpec
    + + +RestoreSpec + + +
    +(Optional) +

    restoreSpec defines how to restore the cluster.
    note that this restore operation will roll back cluster services.


    +
    +customSpec
    + + +CustomOpsSpec + + +
    +
    +
    +status
    + + +OpsRequestStatus + + +
    +
    +

    ServiceDescriptor +

    +
    +

    ServiceDescriptor is the Schema for the servicedescriptors API


    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +apiVersion
    +string
    +apps.kubeblocks.io/v1alpha1 +
    +kind
    +string +
    ServiceDescriptor
    +metadata
    + + +Kubernetes meta/v1.ObjectMeta + + +
    +Refer to the Kubernetes API documentation for the fields of the +metadata field. +
    +spec
    + + +ServiceDescriptorSpec + + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + +
    +serviceKind
    + +string + +
    +

    service kind, indicating the type or nature of the service. It should be well-known application cluster type, e.g. {mysql, redis, mongodb}.
    The serviceKind is case-insensitive and supports abbreviations for some well-known databases.
    For example, both ‘zk’ and ‘zookeeper’ will be considered as a ZooKeeper cluster, and ‘pg’, ‘postgres’, ‘postgresql’ will all be considered as a PostgreSQL cluster.


    +
    +serviceVersion
    + +string + +
    +

    The version of the service reference.


    +
    +endpoint
    + + +CredentialVar + + +
    +(Optional) +

    endpoint is the endpoint of the service connection credential.


    +
    +auth
    + + +ConnectionCredentialAuth + + +
    +(Optional) +

    auth is the auth of the service connection credential.


    +
    +port
    + + +CredentialVar + + +
    +(Optional) +

    port is the port of the service connection credential.


    +
    +
    +status
    + + +ServiceDescriptorStatus + + +
    +
    +

    AccessMode +(string alias)

    +

    +(Appears on:ConsensusMember) +

    +
    +

    AccessMode defines SVC access mode enums.


    +
    + + + + + + + + + + + + + + +
    ValueDescription

    "None"

    "ReadWrite"

    "Readonly"

    +

    AccountName +(string alias)

    +

    +(Appears on:SystemAccountConfig) +

    +
    +

    AccountName defines system account names.


    +
    + + + + + + + + + + + + + + + + + + +
    ValueDescription

    "kbadmin"

    "kbdataprotection"

    "kbmonitoring"

    "kbprobe"

    "kbreplicator"

    +

    Action +

    +

    +(Appears on:ComponentSwitchover, LifecycleActionHandler) +

    +
    +

    Action defines an operational action that can be performed by a component instance.
    There are some pre-defined environment variables that can be used when writing action commands, check @BuiltInVars for reference.



    An action is considered successful if it returns 0 (or HTTP 200 for HTTP(s) actions). Any other return value or
    HTTP status code is considered as a failure, and the action may be retried based on the configured retry policy.



    If an action exceeds the specified timeout duration, it will be terminated, and the action is considered failed.
    If an action produces any data as output, it should be written to stdout (or included in the HTTP response payload for HTTP(s) actions).
    If an action encounters any errors, error messages should be written to stderr (or included in the HTTP response payload with a non-200 HTTP status code).


    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +image
    + +string + +
    +(Optional) +

    Image defines the container image to run the action.
    Cannot be updated.


    +
    +exec
    + + +ExecAction + + +
    +(Optional) +

    Exec specifies the action to take.
    Cannot be updated.


    +
    +http
    + + +HTTPAction + + +
    +(Optional) +

    HTTP specifies the http request to perform.
    Cannot be updated.


    +
    +env
    + + +[]Kubernetes core/v1.EnvVar + + +
    +(Optional) +

    List of environment variables to set in the container.
    Cannot be updated.


    +
    +targetPodSelector
    + + +TargetPodSelector + + +
    +(Optional) +

    TargetPodSelector defines the way that how to select the target Pod where the action will be performed,
    if there may not have a target replica by default.
    Cannot be updated.


    +
    +matchingKey
    + +string + +
    +(Optional) +

    MatchingKey uses to select the target pod(s) actually.
    If the selector is AnyReplica or AllReplicas, the matchingKey will be ignored.
    If the selector is RoleSelector, any replica which has the same role with matchingKey will be chosen.
    Cannot be updated.


    +
    +container
    + +string + +
    +(Optional) +

    Container defines the name of the container within the target Pod where the action will be executed.
    If specified, it must be one of container declared in @Runtime.
    If not specified, the first container declared in @Runtime will be used.
    Cannot be updated.


    +
    +timeoutSeconds:omitempty
    + +int32 + +
    +(Optional) +

    TimeoutSeconds defines the timeout duration for the action in seconds.
    Cannot be updated.


    +
    +retryPolicy
    + + +RetryPolicy + + +
    +(Optional) +

    RetryPolicy defines the strategy for retrying the action in case of failure.
    Cannot be updated.


    +
    +preCondition
    + + +PreConditionType + + +
    +(Optional) +

    PreCondition defines the condition when the action will be executed.
    - Immediately: The Action is executed immediately after the Component object is created,
    without guaranteeing the availability of the Component and its underlying resources. only after the action is successfully executed will the Component’s state turn to ready.
    - RuntimeReady: The Action is executed after the Component object is created and once all underlying Runtimes are ready.
    only after the action is successfully executed will the Component’s state turn to ready.
    - ComponentReady: The Action is executed after the Component object is created and once the Component is ready.
    the execution process does not impact the state of the Component and the Cluster.
    - ClusterReady: The Action is executed after the Cluster object is created and once the Cluster is ready.
    the execution process does not impact the state of the Component and the Cluster.
    Cannot be updated.


    +
    +

    Affinity +

    +

    +(Appears on:ClusterComponentSpec, ClusterSpec, ComponentSpec) +

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +podAntiAffinity
    + + +PodAntiAffinity + + +
    +(Optional) +

    podAntiAffinity describes the anti-affinity level of pods within a component.
    Preferred means try spread pods by TopologyKeys.
    Required means must spread pods by TopologyKeys.


    +
    +topologyKeys
    + +[]string + +
    +(Optional) +

    topologyKey is the key of node labels.
    Nodes that have a label with this key and identical values are considered to be in the same topology.
    It’s used as the topology domain for pod anti-affinity and pod spread constraint.
    Some well-known label keys, such as “kubernetes.io/hostname” and “topology.kubernetes.io/zone”
    are often used as TopologyKey, as well as any other custom label key.


    +
    +nodeLabels
    + +map[string]string + +
    +(Optional) +

    nodeLabels describes that pods must be scheduled to the nodes with the specified node labels.


    +
    +tenancy
    + + +TenancyType + + +
    +(Optional) +

    tenancy describes how pods are distributed across node.
    SharedNode means multiple pods may share the same node.
    DedicatedNode means each pod runs on their own dedicated node.


    +
    +

    AutoTrigger +

    +

    +(Appears on:ReloadOptions) +

    +
    +
    + + + + + + + + + + + + + +
    FieldDescription
    +processName
    + +string + +
    +(Optional) +

    processName is process name


    +
    +

    AvailabilityPolicyType +(string alias)

    +

    +(Appears on:ClusterSpec) +

    +
    +

    AvailabilityPolicyType for cluster affinity policy.


    +
    + + + + + + + + + + + + + + +
    ValueDescription

    "node"

    "none"

    "zone"

    +

    BackupMethod +

    +

    +(Appears on:BackupPolicy) +

    +
    +
    + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +BackupMethod
    + +github.com/apecloud/kubeblocks/apis/dataprotection/v1alpha1.BackupMethod + +
    +

    +(Members of BackupMethod are embedded into this type.) +

    +
    +target
    + + +TargetInstance + + +
    +(Optional) +

    target instance for backup.


    +
    +envMapping
    + + +[]EnvMappingVar + + +
    +(Optional) +

    envMapping defines the variables of cluster mapped to env values’ keys.


    +
    +

    BackupPolicy +

    +

    +(Appears on:BackupPolicyTemplateSpec) +

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +componentDefRef
    + +string + +
    +(Optional) +

    componentDefRef references componentDef defined in ClusterDefinition spec. Need to
    comply with IANA Service Naming rule.


    +
    +componentDefs
    + +[]string + +
    +(Optional) +

    componentDef references componentDefinition. Need to
    comply with IANA Service Naming rule.


    +
    +target
    + + +TargetInstance + + +
    +(Optional) +

    target instance for backup.


    +
    +schedules
    + + +[]SchedulePolicy + + +
    +(Optional) +

    schedule policy for backup.


    +
    +backupMethods
    + + +[]BackupMethod + + +
    +

    backupMethods defines the backup methods.


    +
    +backoffLimit
    + +int32 + +
    +(Optional) +

    Specifies the number of retries before marking the backup failed.


    +
    +

    BackupPolicyTemplateSpec +

    +

    +(Appears on:BackupPolicyTemplate) +

    +
    +

    BackupPolicyTemplateSpec defines the desired state of BackupPolicyTemplate


    +
    + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +clusterDefinitionRef
    + +string + +
    +

    clusterDefinitionRef references ClusterDefinition name, this is an immutable attribute.


    +
    +backupPolicies
    + + +[]BackupPolicy + + +
    +

    backupPolicies is a list of backup policy template for the specified componentDefinition.


    +
    +identifier
    + +string + +
    +(Optional) +

    Identifier is a unique identifier for this BackupPolicyTemplate.
    this identifier will be the suffix of the automatically generated backupPolicy name.
    and must be added when multiple BackupPolicyTemplates exist,
    otherwise the generated backupPolicy override will occur.


    +
    +

    BackupPolicyTemplateStatus +

    +

    +(Appears on:BackupPolicyTemplate) +

    +
    +

    BackupPolicyTemplateStatus defines the observed state of BackupPolicyTemplate


    +
    +

    BackupRefSpec +

    +

    +(Appears on:RestoreFromSpec) +

    +
    +
    + + + + + + + + + + + + + +
    FieldDescription
    +ref
    + + +RefNamespaceName + + +
    +(Optional) +

    specify a reference backup to restore


    +
    +

    BackupSpec +

    +

    +(Appears on:OpsRequestSpec) +

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +backupName
    + +string + +
    +(Optional) +

    backupName is the name of the backup.


    +
    +backupPolicyName
    + +string + +
    +(Optional) +

    Which backupPolicy is applied to perform this backup


    +
    +backupMethod
    + +string + +
    +(Optional) +

    Backup method name that is defined in backupPolicy.


    +
    +deletionPolicy
    + +string + +
    +(Optional) +

    deletionPolicy determines whether the backup contents stored in backup repository
    should be deleted when the backup custom resource is deleted.
    Supported values are “Retain” and “Delete”.
    “Retain” means that the backup content and its physical snapshot on backup repository are kept.
    “Delete” means that the backup content and its physical snapshot on backup repository are deleted.


    +
    +retentionPeriod
    + +string + +
    +(Optional) +

    retentionPeriod determines a duration up to which the backup should be kept.
    Controller will remove all backups that are older than the RetentionPeriod.
    For example, RetentionPeriod of 30d will keep only the backups of last 30 days.
    Sample duration format:
    - years: 2y
    - months: 6mo
    - days: 30d
    - hours: 12h
    - minutes: 30m
    You can also combine the above durations. For example: 30d12h30m.
    If not set, the backup will be kept forever.


    +
    +parentBackupName
    + +string + +
    +(Optional) +

    if backupType is incremental, parentBackupName is required.


    +
    +

    BackupStatusUpdateStage +(string alias)

    +
    +

    BackupStatusUpdateStage defines the stage of backup status update.


    +
    +

    BaseBackupType +(string alias)

    +
    +

    BaseBackupType the base backup type, keep synchronized with the BaseBackupType of the data protection API.


    +
    +

    BuiltinActionHandlerType +(string alias)

    +

    +(Appears on:LifecycleActionHandler) +

    +
    +

    BuiltinActionHandlerType defines build-in action handlers provided by Lorry.


    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ValueDescription

    "apecloud-postgresql"

    "custom"

    "etcd"

    "mongodb"

    "mysql"

    "oceanbase"

    "official-postgresql"

    "polardbx"

    "postgresql"

    "redis"

    "unknown"

    "wesql"

    +

    CPUConstraint +

    +

    +(Appears on:ResourceConstraintRule) +

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +max
    + + +Kubernetes resource.Quantity + + +
    +(Optional) +

    The maximum count of vcpu cores, [Min, Max] defines a range for valid vcpu cores, and the value in this range
    must be multiple times of Step. It’s useful to define a large number of valid values without defining them one by
    one. Please see the documentation for Step for some examples.
    If Slots is specified, Max, Min, and Step are ignored


    +
    +min
    + + +Kubernetes resource.Quantity + + +
    +(Optional) +

    The minimum count of vcpu cores, [Min, Max] defines a range for valid vcpu cores, and the value in this range
    must be multiple times of Step. It’s useful to define a large number of valid values without defining them one by
    one. Please see the documentation for Step for some examples.
    If Slots is specified, Max, Min, and Step are ignored


    +
    +step
    + + +Kubernetes resource.Quantity + + +
    +(Optional) +

    The minimum granularity of vcpu cores, [Min, Max] defines a range for valid vcpu cores and the value in this range must be
    multiple times of Step.
    For example:
    1. Min is 2, Max is 8, Step is 2, and the valid vcpu core is {2, 4, 6, 8}.
    2. Min is 0.5, Max is 2, Step is 0.5, and the valid vcpu core is {0.5, 1, 1.5, 2}.


    +
    +slots
    + + +[]Kubernetes resource.Quantity + + +
    +(Optional) +

    The valid vcpu cores, it’s useful if you want to define valid vcpu cores explicitly.
    If Slots is specified, Max, Min, and Step are ignored


    +
    +

    CfgFileFormat +(string alias)

    +

    +(Appears on:FormatterConfig) +

    +
    +

    CfgFileFormat defines formatter of configuration files.


    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ValueDescription

    "dotenv"

    "hcl"

    "ini"

    "json"

    "properties"

    "props-plus"

    "redis"

    "toml"

    "xml"

    "yaml"

    +

    CfgReloadType +(string alias)

    +
    +

    CfgReloadType defines reload method.


    +
    + + + + + + + + + + + + + + + + + + + + +
    ValueDescription

    "auto"

    "http"

    "sql"

    "exec"

    "tpl"

    "signal"

    +

    ClassDefRef +

    +

    +(Appears on:ClusterComponentSpec, ComponentSpec, LastComponentConfiguration, VerticalScaling) +

    +
    +
    + + + + + + + + + + + + + + + + + +
    FieldDescription
    +name
    + +string + +
    +(Optional) +

    Name refers to the name of the ComponentClassDefinition.


    +
    +class
    + +string + +
    +

    Class refers to the name of the class that is defined in the ComponentClassDefinition.


    +
    +

    ClusterBackup +

    +

    +(Appears on:ClusterSpec) +

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +enabled
    + +bool + +
    +(Optional) +

    enabled defines whether to enable automated backup.


    +
    +retentionPeriod
    + +github.com/apecloud/kubeblocks/apis/dataprotection/v1alpha1.RetentionPeriod + +
    +(Optional) +

    retentionPeriod determines a duration up to which the backup should be kept.
    controller will remove all backups that are older than the RetentionPeriod.
    For example, RetentionPeriod of 30d will keep only the backups of last 30 days.
    Sample duration format:
    - years: 2y
    - months: 6mo
    - days: 30d
    - hours: 12h
    - minutes: 30m
    You can also combine the above durations. For example: 30d12h30m


    +
    +method
    + +string + +
    +(Optional) +

    backup method name to use, that is defined in backupPolicy.


    +
    +cronExpression
    + +string + +
    +(Optional) +

    the cron expression for schedule, the timezone is in UTC. see https://en.wikipedia.org/wiki/Cron.


    +
    +startingDeadlineMinutes
    + +int64 + +
    +(Optional) +

    startingDeadlineMinutes defines the deadline in minutes for starting the backup job
    if it misses scheduled time for any reason.


    +
    +repoName
    + +string + +
    +(Optional) +

    repoName is the name of the backupRepo, if not set, will use the default backupRepo.


    +
    +pitrEnabled
    + +bool + +
    +(Optional) +

    pitrEnabled defines whether to enable point-in-time recovery.


    +
    +

    ClusterComponentDefinition +

    +

    +(Appears on:ClusterDefinitionSpec) +

    +
    +

    ClusterComponentDefinition provides a workload component specification template,
    with attributes that strongly work with stateful workloads and day-2 operations
    behaviors.


    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +name
    + +string + +
    +

    A component definition name, this name could be used as default name of Cluster.spec.componentSpecs.name,
    and so this name is need to conform with same validation rules as Cluster.spec.componentSpecs.name, that
    is currently comply with IANA Service Naming rule. This name will apply to “apps.kubeblocks.io/component-name”
    object label value.


    +
    +description
    + +string + +
    +(Optional) +

    The description of component definition.


    +
    +workloadType
    + + +WorkloadType + + +
    +

    workloadType defines type of the workload.
    Stateless is a stateless workload type used to describe stateless applications.
    Stateful is a stateful workload type used to describe common stateful applications.
    Consensus is a stateful workload type used to describe applications based on consensus protocols, common consensus protocols such as raft and paxos.
    Replication is a stateful workload type used to describe applications based on the primary-secondary data replication protocol.


    +
    +characterType
    + +string + +
    +(Optional) +

    characterType defines well-known database component name, such as mongos(mongodb), proxy(redis), mariadb(mysql)
    KubeBlocks will generate proper monitor configs for well-known characterType when builtIn is true.



    CharacterType will also be used in role probe to decide which probe engine to use.
    current available candidates are: mysql, postgres, mongodb, redis, etcd, kafka.


    +
    +configSpecs
    + + +[]ComponentConfigSpec + + +
    +(Optional) +

    The configSpec field provided by provider, and
    finally this configTemplateRefs will be rendered into the user’s own configuration file according to the user’s cluster.


    +
    +scriptSpecs
    + + +[]ComponentTemplateSpec + + +
    +(Optional) +

    The scriptSpec field provided by provider, and
    finally this configTemplateRefs will be rendered into the user’s own configuration file according to the user’s cluster.


    +
    +probes
    + + +ClusterDefinitionProbes + + +
    +(Optional) +

    probes setting for healthy checks.


    +
    +monitor
    + + +MonitorConfig + + +
    +(Optional) +

    monitor is monitoring config which provided by provider.


    +
    +logConfigs
    + + +[]LogConfig + + +
    +(Optional) +

    logConfigs is detail log file config which provided by provider.


    +
    +podSpec
    + + +Kubernetes core/v1.PodSpec + + +
    +(Optional) +

    podSpec define pod spec template of the cluster component.


    +
    +service
    + + +ServiceSpec + + +
    +(Optional) +

    service defines the behavior of a service spec.
    provide read-write service when WorkloadType is Consensus.


    +
    +statelessSpec
    + + +StatelessSetSpec + + +
    +(Optional) +

    statelessSpec defines stateless related spec if workloadType is Stateless.


    +
    +statefulSpec
    + + +StatefulSetSpec + + +
    +(Optional) +

    statefulSpec defines stateful related spec if workloadType is Stateful.


    +
    +consensusSpec
    + + +ConsensusSetSpec + + +
    +(Optional) +

    consensusSpec defines consensus related spec if workloadType is Consensus, required if workloadType is Consensus.


    +
    +replicationSpec
    + + +ReplicationSetSpec + + +
    +(Optional) +

    replicationSpec defines replication related spec if workloadType is Replication.


    +
    +rsmSpec
    + + +RSMSpec + + +
    +(Optional) +

    RSMSpec defines workload related spec of this component.
    start from KB 0.7.0, RSM(ReplicatedStateMachineSpec) will be the underlying CR which powers all kinds of workload in KB.
    RSM is an enhanced stateful workload extension dedicated for heavy-state workloads like databases.


    +
    +horizontalScalePolicy
    + + +HorizontalScalePolicy + + +
    +(Optional) +

    horizontalScalePolicy controls the behavior of horizontal scale.


    +
    +systemAccounts
    + + +SystemAccountSpec + + +
    +(Optional) +

    Statement to create system account.


    +
    +volumeTypes
    + + +[]VolumeTypeSpec + + +
    +(Optional) +

    volumeTypes is used to describe the purpose of the volumes
    mapping the name of the VolumeMounts in the PodSpec.Container field,
    such as data volume, log volume, etc.
    When backing up the volume, the volume can be correctly backed up
    according to the volumeType.



    For example:
    name: data, type: data means that the volume named data is used to store data.
    name: binlog, type: log means that the volume named binlog is used to store log.



    NOTE:
    When volumeTypes is not defined, the backup function will not be supported,
    even if a persistent volume has been specified.


    +
    +customLabelSpecs
    + + +[]CustomLabelSpec + + +
    +(Optional) +

    customLabelSpecs is used for custom label tags which you want to add to the component resources.


    +
    +switchoverSpec
    + + +SwitchoverSpec + + +
    +(Optional) +

    switchoverSpec defines command to do switchover.
    in particular, when workloadType=Replication, the command defined in switchoverSpec will only be executed under the condition of cluster.componentSpecs[x].SwitchPolicy.type=Noop.


    +
    +postStartSpec
    + + +PostStartAction + + +
    +(Optional) +

    postStartSpec defines the command to be executed when the component is ready, and the command will only be executed once after the component becomes ready.


    +
    +volumeProtectionSpec
    + + +VolumeProtectionSpec + + +
    +(Optional) +
    +componentDefRef
    + + +[]ComponentDefRef + + +
    +(Optional) +

    componentDefRef is used to inject values from other components into the current component.
    values will be saved and updated in a configmap and mounted to the current component.


    +
    +serviceRefDeclarations
    + + +[]ServiceRefDeclaration + + +
    +(Optional) +

    serviceRefDeclarations is used to declare the service reference of the current component.


    +
    +

    ClusterComponentPhase +(string alias)

    +

    +(Appears on:ClusterComponentStatus, ComponentStatus, OpsRequestComponentStatus) +

    +
    +

    ClusterComponentPhase defines the Cluster CR .status.components.phase


    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    ValueDescription

    "Abnormal"

    "Creating"

    "Deleting"

    "Failed"

    "Running"

    "Stopped"

    "Stopping"

    "Updating"

    +

    ClusterComponentService +

    +

    +(Appears on:ClusterComponentSpec, LastComponentConfiguration) +

    +
    +
    + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +name
    + +string + +
    +

    Service name


    +
    +serviceType
    + + +Kubernetes core/v1.ServiceType + + +
    +(Optional) +

    serviceType determines how the Service is exposed. Valid
    options are ClusterIP, NodePort, and LoadBalancer.
    “ClusterIP” allocates a cluster-internal IP address for load-balancing
    to endpoints. Endpoints are determined by the selector or if that is not
    specified, they are determined by manual construction of an Endpoints object or
    EndpointSlice objects. If clusterIP is “None”, no virtual IP is
    allocated and the endpoints are published as a set of endpoints rather
    than a virtual IP.
    “NodePort” builds on ClusterIP and allocates a port on every node which
    routes to the same endpoints as the clusterIP.
    “LoadBalancer” builds on NodePort and creates an external load-balancer
    (if supported in the current cloud) which routes to the same endpoints
    as the clusterIP.
    More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types.


    +
    +annotations
    + +map[string]string + +
    +(Optional) +

    If ServiceType is LoadBalancer, cloud provider related parameters can be put here
    More info: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer.


    +
    +

    ClusterComponentSpec +

    +

    +(Appears on:ClusterSpec, ShardingSpec) +

    +
    +

    ClusterComponentSpec defines the cluster component spec.
    //(TODO) +kubebuilder:validation:XValidation:rule=“!has(oldSelf.componentDefRef) || has(self.componentDefRef)”, message=“componentDefRef is required once set”
    //(TODO) +kubebuilder:validation:XValidation:rule=“!has(oldSelf.componentDef) || has(self.componentDef)”, message=“componentDef is required once set”


    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +name
    + +string + +
    +(Optional) +

    name defines cluster’s component name, this name is also part of Service DNS name, so this name will comply with IANA Service Naming rule.
    When ClusterComponentSpec is referenced as a template, name is optional. Otherwise, it is required.
    //(TODO) +kubebuilder:validation:XValidation:rule=“self == oldSelf”,message=“name is immutable”


    +
    +componentDefRef
    + +string + +
    +(Optional) +

    componentDefRef references componentDef defined in ClusterDefinition spec. Need to comply with IANA Service Naming rule.
    //(TODO) +kubebuilder:validation:XValidation:rule=“self == oldSelf”,message=“componentDefRef is immutable”


    +
    +componentDef
    + +string + +
    +(Optional) +

    componentDef references the name of the ComponentDefinition.
    If both componentDefRef and componentDef are provided, the componentDef will take precedence over componentDefRef.
    //(TODO) +kubebuilder:validation:XValidation:rule=“self == oldSelf”,message=“componentDef is immutable”


    +
    +classDefRef
    + + +ClassDefRef + + +
    +(Optional) +

    classDefRef references the class defined in ComponentClassDefinition.


    +
    +serviceRefs
    + + +[]ServiceRef + + +
    +(Optional) +

    serviceRefs define service references for the current component. Based on the referenced services, they can be categorized into two types:
    Service provided by external sources: These services are provided by external sources and are not managed by KubeBlocks. They can be Kubernetes-based or non-Kubernetes services. For external services, you need to provide an additional ServiceDescriptor object to establish the service binding.
    Service provided by other KubeBlocks clusters: These services are provided by other KubeBlocks clusters. You can bind to these services by specifying the name of the hosting cluster.
    Each type of service reference requires specific configurations and bindings to establish the connection and interaction with the respective services.
    It should be noted that the ServiceRef has cluster-level semantic consistency, meaning that within the same Cluster, service references with the same ServiceRef.Name are considered to be the same service. It is only allowed to bind to the same Cluster or ServiceDescriptor.


    +
    +monitor
    + +bool + +
    +(Optional) +

    monitor is a switch to enable monitoring and is set as false by default.
    KubeBlocks provides an extension mechanism to support component level monitoring,
    which will scrape metrics auto or manually from servers in component and export
    metrics to Time Series Database.


    +
    +enabledLogs
    + +[]string + +
    +(Optional) +

    enabledLogs indicates which log file takes effect in the database cluster.
    element is the log type which is defined in cluster definition logConfig.name,
    and will set relative variables about this log type in database kernel.


    +
    +replicas
    + +int32 + +
    +

    Component replicas.


    +
    +affinity
    + + +Affinity + + +
    +(Optional) +

    affinity describes affinities specified by users.


    +
    +tolerations
    + + +[]Kubernetes core/v1.Toleration + + +
    +(Optional) +

    Component tolerations will override ClusterSpec.Tolerations if specified.


    +
    +resources
    + + +Kubernetes core/v1.ResourceRequirements + + +
    +(Optional) +

    Resources requests and limits of workload.


    +
    +volumeClaimTemplates
    + + +[]ClusterComponentVolumeClaimTemplate + + +
    +(Optional) +

    volumeClaimTemplates information for statefulset.spec.volumeClaimTemplates.


    +
    +services
    + + +[]ClusterComponentService + + +
    +(Optional) +

    Services expose endpoints that can be accessed by clients.


    +
    +switchPolicy
    + + +ClusterSwitchPolicy + + +
    +(Optional) +

    switchPolicy defines the strategy for switchover and failover when workloadType is Replication.


    +
    +tls
    + +bool + +
    +(Optional) +

    Enables or disables TLS certs.


    +
    +issuer
    + + +Issuer + + +
    +(Optional) +

    issuer defines provider context for TLS certs.
    required when TLS enabled


    +
    +serviceAccountName
    + +string + +
    +(Optional) +

    serviceAccountName is the name of the ServiceAccount that running component depends on.


    +
    +updateStrategy
    + + +UpdateStrategy + + +
    +(Optional) +

    updateStrategy defines the update strategy for the component.
    Not supported.


    +
    +userResourceRefs
    + + +UserResourceRefs + + +
    +(Optional) +

    userResourceRefs defines the user-defined volumes.


    +
    +rsmTransformPolicy
    + +github.com/apecloud/kubeblocks/apis/workloads/v1alpha1.RsmTransformPolicy + +
    +(Optional) +

    RsmTransformPolicy defines the policy generate sts using rsm.
    ToSts: rsm transforms to statefulSet
    ToPod: rsm transforms to pods


    +
    +nodes
    + +[]k8s.io/apimachinery/pkg/types.NodeName + +
    +(Optional) +

    Nodes defines the list of nodes that pods can schedule
    If the RsmTransformPolicy is specified as ToPod,the list of nodes will be used. If the list of nodes is empty,
    no specific node will be assigned. However, if the list of node is filled, all pods will be evenly scheduled
    across the nodes in the list.


    +
    +instances
    + +[]string + +
    +(Optional) +

    Instances defines the list of instance to be deleted priorly
    If the RsmTransformPolicy is specified as ToPod,the list of instances will be used.


    +
    +

    ClusterComponentStatus +

    +

    +(Appears on:ClusterStatus) +

    +
    +

    ClusterComponentStatus records components status.


    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +phase
    + + +ClusterComponentPhase + + +
    +

    phase describes the phase of the component and the detail information of the phases are as following:
    Creating: Creating is a special Updating with previous phase empty(means “”) or Creating.
    Running: component replicas > 0 and all pod specs are latest with a Running state.
    Updating: component replicas > 0 and has no failed pods. the component is being updated.
    Abnormal: component replicas > 0 but having some failed pods. the component basically works but in a fragile state.
    Failed: component replicas > 0 but having some failed pods. the component doesn’t work anymore.
    Stopping: component replicas = 0 and has terminating pods.
    Stopped: component replicas = 0 and all pods have been deleted.
    Deleting: the component is being deleted.


    +
    +message
    + + +ComponentMessageMap + + +
    +(Optional) +

    message records the component details message in current phase.
    Keys are podName or deployName or statefulSetName. The format is ObjectKind/Name.


    +
    +podsReady
    + +bool + +
    +(Optional) +

    podsReady checks if all pods of the component are ready.


    +
    +podsReadyTime
    + + +Kubernetes meta/v1.Time + + +
    +(Optional) +

    podsReadyTime what time point of all component pods are ready,
    this time is the ready time of the last component pod.


    +
    +membersStatus
    + +[]github.com/apecloud/kubeblocks/apis/workloads/v1alpha1.MemberStatus + +
    +(Optional) +

    members’ status.


    +
    +

    ClusterComponentVersion +

    +

    +(Appears on:ClusterVersionSpec) +

    +
    +

    ClusterComponentVersion is an application version component spec.


    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +componentDefRef
    + +string + +
    +

    componentDefRef reference one of the cluster component definition names in ClusterDefinition API (spec.componentDefs.name).


    +
    +configSpecs
    + + +[]ComponentConfigSpec + + +
    +(Optional) +

    configSpecs defines a configuration extension mechanism to handle configuration differences between versions,
    the configTemplateRefs field, together with configTemplateRefs in the ClusterDefinition,
    determines the final configuration file.


    +
    +systemAccountSpec
    + + +SystemAccountShortSpec + + +
    +(Optional) +

    systemAccountSpec define image for the component to connect database or engines.
    It overrides image and env attributes defined in ClusterDefinition.spec.componentDefs.systemAccountSpec.cmdExecutorConfig.
    To clean default envs settings, set SystemAccountSpec.CmdExecutorConfig.Env to empty list.


    +
    +versionsContext
    + + +VersionsContext + + +
    +

    versionContext defines containers images’ context for component versions,
    this value replaces ClusterDefinition.spec.componentDefs.podSpec.[initContainers | containers]


    +
    +switchoverSpec
    + + +SwitchoverShortSpec + + +
    +(Optional) +

    switchoverSpec defines images for the component to do switchover.
    It overrides image and env attributes defined in ClusterDefinition.spec.componentDefs.SwitchoverSpec.CommandExecutorEnvItem.


    +
    +

    ClusterComponentVolumeClaimTemplate +

    +

    +(Appears on:ClusterComponentSpec, ComponentSpec) +

    +
    +
    + + + + + + + + + + + + + + + + + +
    FieldDescription
    +name
    + +string + +
    +

    Reference ClusterDefinition.spec.componentDefs.containers.volumeMounts.name.


    +
    +spec
    + + +PersistentVolumeClaimSpec + + +
    +(Optional) +

    spec defines the desired characteristics of a volume requested by a pod author.


    +
    +
    + + + + + + + + + + + + + + + + + +
    +accessModes
    + + +[]Kubernetes core/v1.PersistentVolumeAccessMode + + +
    +(Optional) +

    accessModes contains the desired access modes the volume should have.
    More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1.


    +
    +resources
    + + +Kubernetes core/v1.ResourceRequirements + + +
    +(Optional) +

    resources represents the minimum resources the volume should have.
    If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements
    that are lower than previous value but must still be higher than capacity recorded in the
    status field of the claim.
    More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources.


    +
    +storageClassName
    + +string + +
    +(Optional) +

    storageClassName is the name of the StorageClass required by the claim.
    More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1.


    +
    +volumeMode
    + + +Kubernetes core/v1.PersistentVolumeMode + + +
    +(Optional) +

    volumeMode defines what type of volume is required by the claim.


    +
    +
    +

    ClusterDefinitionProbe +

    +

    +(Appears on:ClusterDefinitionProbes) +

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +periodSeconds
    + +int32 + +
    +

    How often (in seconds) to perform the probe.


    +
    +timeoutSeconds
    + +int32 + +
    +

    Number of seconds after which the probe times out. Defaults to 1 second.


    +
    +failureThreshold
    + +int32 + +
    +

    Minimum consecutive failures for the probe to be considered failed after having succeeded.


    +
    +commands
    + + +ClusterDefinitionProbeCMDs + + +
    +(Optional) +

    commands used to execute for probe.


    +
    +

    ClusterDefinitionProbeCMDs +

    +

    +(Appears on:ClusterDefinitionProbe) +

    +
    +
    + + + + + + + + + + + + + + + + + +
    FieldDescription
    +writes
    + +[]string + +
    +(Optional) +

    Write check executed on probe sidecar, used to check workload’s allow write access.


    +
    +queries
    + +[]string + +
    +(Optional) +

    Read check executed on probe sidecar, used to check workload’s readonly access.


    +
    +

    ClusterDefinitionProbes +

    +

    +(Appears on:ClusterComponentDefinition) +

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +runningProbe
    + + +ClusterDefinitionProbe + + +
    +(Optional) +

    Probe for DB running check.


    +
    +statusProbe
    + + +ClusterDefinitionProbe + + +
    +(Optional) +

    Probe for DB status check.


    +
    +roleProbe
    + + +ClusterDefinitionProbe + + +
    +(Optional) +

    Probe for DB role changed check.


    +
    +roleProbeTimeoutAfterPodsReady
    + +int32 + +
    +(Optional) +

    roleProbeTimeoutAfterPodsReady(in seconds), when all pods of the component are ready,
    it will detect whether the application is available in the pod.
    if pods exceed the InitializationTimeoutSeconds time without a role label,
    this component will enter the Failed/Abnormal phase.
    Note that this configuration will only take effect if the component supports RoleProbe
    and will not affect the life cycle of the pod. default values are 60 seconds.


    +
    +

    ClusterDefinitionSpec +

    +

    +(Appears on:ClusterDefinition) +

    +
    +

    ClusterDefinitionSpec defines the desired state of ClusterDefinition


    +
    + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +type
    + +string + +
    +(Optional) +

    Cluster definition type defines well known application cluster type, e.g. mysql/redis/mongodb


    +
    +componentDefs
    + + +[]ClusterComponentDefinition + + +
    +

    componentDefs provides cluster components definitions.


    +
    +connectionCredential
    + +map[string]string + +
    +(Optional) +

    Connection credential template used for creating a connection credential
    secret for cluster.apps.kubeblocks.io object.



    Built-in objects are:
    - $(RANDOM_PASSWD) - random 8 characters.
    - $(STRONG_RANDOM_PASSWD) - random 16 characters, with mixed cases, digits and symbols.
    - $(UUID) - generate a random UUID v4 string.
    - $(UUID_B64) - generate a random UUID v4 BASE64 encoded string.
    - $(UUID_STR_B64) - generate a random UUID v4 string then BASE64 encoded.
    - $(UUID_HEX) - generate a random UUID v4 HEX representation.
    - $(HEADLESS_SVC_FQDN) - headless service FQDN placeholder, value pattern - $(CLUSTER_NAME)-$(1ST_COMP_NAME)-headless.$(NAMESPACE).svc,
    where 1ST_COMP_NAME is the 1st component that provide ClusterDefinition.spec.componentDefs[].service attribute;
    - $(SVC_FQDN) - service FQDN placeholder, value pattern - $(CLUSTER_NAME)-$(1ST_COMP_NAME).$(NAMESPACE).svc,
    where 1ST_COMP_NAME is the 1st component that provide ClusterDefinition.spec.componentDefs[].service attribute;
    - $(SVC_PORT_{PORT-NAME}) - a ServicePort’s port value with specified port name, i.e, a servicePort JSON struct:
    {"name": "mysql", "targetPort": "mysqlContainerPort", "port": 3306}, and “$(SVC_PORT_mysql)” in the
    connection credential value is 3306.


    +
    +

    ClusterDefinitionStatus +

    +

    +(Appears on:ClusterDefinition) +

    +
    +

    ClusterDefinitionStatus defines the observed state of ClusterDefinition


    +
    + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +phase
    + + +Phase + + +
    +

    ClusterDefinition phase, valid values are empty, Available, ‘Unavailable`.
    Available is ClusterDefinition become available, and can be referenced for co-related objects.


    +
    +message
    + +string + +
    +(Optional) +

    Extra message in current phase


    +
    +observedGeneration
    + +int64 + +
    +(Optional) +

    observedGeneration is the most recent generation observed for this
    ClusterDefinition. It corresponds to the ClusterDefinition’s generation, which is
    updated on mutation by the API Server.


    +
    +

    ClusterMonitor +

    +

    +(Appears on:ClusterSpec) +

    +
    +
    + + + + + + + + + + + + + +
    FieldDescription
    +monitoringInterval
    + + +Kubernetes api utils intstr.IntOrString + + +
    +(Optional) +

    monitoringInterval specifies interval of monitoring, no monitor if set to 0


    +
    +

    ClusterNetwork +

    +

    +(Appears on:ClusterSpec) +

    +
    +
    + + + + + + + + + + + + + + + + + +
    FieldDescription
    +hostNetworkAccessible
    + +bool + +
    +(Optional) +

    hostNetworkAccessible specifies whether host network is accessible. It defaults to false


    +
    +publiclyAccessible
    + +bool + +
    +(Optional) +

    publiclyAccessible specifies whether it is publicly accessible. It defaults to false


    +
    +

    ClusterObjectReference +

    +

    +(Appears on:CredentialVarSelector, ServiceRefVarSelector, ServiceVarSelector) +

    +
    +

    ClusterObjectReference contains information to let you locate the referenced object inside the same cluster.


    +
    + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +compDef
    + +string + +
    +(Optional) +

    CompDef specifies the definition used by the component that the referent object resident in.


    +
    +name
    + +string + +
    +(Optional) +

    Name of the referent object.


    +
    +optional
    + +bool + +
    +(Optional) +

    Specify whether the object must be defined.


    +
    +

    ClusterPhase +(string alias)

    +

    +(Appears on:ClusterStatus, OpsRequestBehaviour) +

    +
    +

    ClusterPhase defines the Cluster CR .status.phase


    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    ValueDescription

    "Abnormal"

    "Creating"

    "Deleting"

    "Failed"

    "Running"

    "Stopped"

    "Stopping"

    "Updating"

    +

    ClusterResourceConstraintSelector +

    +

    +(Appears on:ComponentResourceConstraintSpec) +

    +
    +
    + + + + + + + + + + + + + + + + + +
    FieldDescription
    +clusterDefRef
    + +string + +
    +

    clusterDefRef is the name of the cluster definition.


    +
    +components
    + + +[]ComponentResourceConstraintSelector + + +
    +

    selector is used to bind the resource constraint to components.


    +
    +

    ClusterResources +

    +

    +(Appears on:ClusterSpec) +

    +
    +
    + + + + + + + + + + + + + + + + + +
    FieldDescription
    +cpu
    + + +Kubernetes resource.Quantity + + +
    +(Optional) +

    cpu resource needed, more info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/


    +
    +memory
    + + +Kubernetes resource.Quantity + + +
    +(Optional) +

    memory resource needed, more info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/


    +
    +

    ClusterService +

    +

    +(Appears on:ClusterSpec) +

    +
    +

    ClusterService defines the service of a cluster.


    +
    + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +Service
    + + +Service + + +
    +

    +(Members of Service are embedded into this type.) +

    +
    +shardingSelector
    + +string + +
    +(Optional) +

    ShardingSelector extends the ServiceSpec.Selector by allowing you to specify a sharding name
    defined in Cluster.Spec.ShardingSpecs[x].Name as selectors for the service.
    ShardingSelector and ComponentSelector cannot be set at the same time.


    +
    +componentSelector
    + +string + +
    +(Optional) +

    ComponentSelector extends the ServiceSpec.Selector by allowing you to specify a component as selectors for the service.
    ComponentSelector and ShardingSelector cannot be set at the same time.


    +
    +

    ClusterSpec +

    +

    +(Appears on:Cluster) +

    +
    +

    ClusterSpec defines the desired state of Cluster.


    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +clusterDefinitionRef
    + +string + +
    +(Optional) +

    Cluster referencing ClusterDefinition name. This is an immutable attribute.
    If ClusterDefRef is not specified, ComponentDef must be specified for each Component in ComponentSpecs.


    +
    +clusterVersionRef
    + +string + +
    +(Optional) +

    Cluster referencing ClusterVersion name.


    +
    +terminationPolicy
    + + +TerminationPolicyType + + +
    +

    Cluster termination policy. Valid values are DoNotTerminate, Halt, Delete, WipeOut.
    DoNotTerminate will block delete operation.
    Halt will delete workload resources such as statefulset, deployment workloads but keep PVCs.
    Delete is based on Halt and deletes PVCs.
    WipeOut is based on Delete and wipe out all volume snapshots and snapshot data from backup storage location.


    +
    +shardingSpecs
    + + +[]ShardingSpec + + +
    +(Optional) +

    List of ShardingSpec which is used to define components with a sharding topology structure that make up a cluster.
    ShardingSpecs and ComponentSpecs cannot both be empty at the same time.


    +
    +componentSpecs
    + + +[]ClusterComponentSpec + + +
    +(Optional) +

    List of componentSpec which is used to define the components that make up a cluster.
    ComponentSpecs and ShardingSpecs cannot both be empty at the same time.


    +
    +services
    + + +[]ClusterService + + +
    +(Optional) +

    services defines the services to access a cluster.


    +
    +affinity
    + + +Affinity + + +
    +(Optional) +

    affinity is a group of affinity scheduling rules.


    +
    +tolerations
    + + +[]Kubernetes core/v1.Toleration + + +
    +(Optional) +

    tolerations are attached to tolerate any taint that matches the triple key,value,effect using the matching operator operator.


    +
    +tenancy
    + + +TenancyType + + +
    +(Optional) +

    tenancy describes how pods are distributed across node.
    SharedNode means multiple pods may share the same node.
    DedicatedNode means each pod runs on their own dedicated node.


    +
    +availabilityPolicy
    + + +AvailabilityPolicyType + + +
    +(Optional) +

    availabilityPolicy describes the availability policy, including zone, node, and none.


    +
    +replicas
    + +int32 + +
    +(Optional) +

    replicas specifies the replicas of the first componentSpec, if the replicas of the first componentSpec is specified, this value will be ignored.


    +
    +resources
    + + +ClusterResources + + +
    +(Optional) +

    resources specifies the resources of the first componentSpec, if the resources of the first componentSpec is specified, this value will be ignored.


    +
    +storage
    + + +ClusterStorage + + +
    +(Optional) +

    storage specifies the storage of the first componentSpec, if the storage of the first componentSpec is specified, this value will be ignored.


    +
    +monitor
    + + +ClusterMonitor + + +
    +(Optional) +

    monitor specifies the configuration of monitor


    +
    +network
    + + +ClusterNetwork + + +
    +(Optional) +

    network specifies the configuration of network


    +
    +backup
    + + +ClusterBackup + + +
    +(Optional) +

    cluster backup configuration.


    +
    +

    ClusterStatus +

    +

    +(Appears on:Cluster) +

    +
    +

    ClusterStatus defines the observed state of Cluster.


    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +observedGeneration
    + +int64 + +
    +(Optional) +

    observedGeneration is the most recent generation observed for this
    Cluster. It corresponds to the Cluster’s generation, which is
    updated on mutation by the API Server.


    +
    +phase
    + + +ClusterPhase + + +
    +(Optional) +

    phase describes the phase of the Cluster, the detail information of the phases are as following:
    Creating: all components are in Creating phase.
    Running: all components are in Running phase, means the cluster is working well.
    Updating: all components are in Creating, Running or Updating phase,
    and at least one component is in Creating or Updating phase, means the cluster is doing an update.
    Stopping: at least one component is in Stopping phase, means the cluster is in a stop progress.
    Stopped: all components are in ‘Stoppedphase, means the cluster has stopped and didn't provide any function anymore.
    Failed: all components are in
    Failedphase, means the cluster is unavailable.
    Abnormal: some components are in
    FailedorAbnormal` phase, means the cluster in a fragile state. troubleshoot need to be done.
    Deleting: the cluster is being deleted.


    +
    +message
    + +string + +
    +(Optional) +

    message describes cluster details message in current phase.


    +
    +components
    + + +map[string]..ClusterComponentStatus + + +
    +(Optional) +

    components record the current status information of all components of the cluster.


    +
    +clusterDefGeneration
    + +int64 + +
    +(Optional) +

    clusterDefGeneration represents the generation number of ClusterDefinition referenced.


    +
    +conditions
    + + +[]Kubernetes meta/v1.Condition + + +
    +(Optional) +

    Describe current state of cluster API Resource, like warning.


    +
    +

    ClusterStorage +

    +

    +(Appears on:ClusterSpec) +

    +
    +
    + + + + + + + + + + + + + +
    FieldDescription
    +size
    + + +Kubernetes resource.Quantity + + +
    +(Optional) +

    storage size needed, more info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/


    +
    +

    ClusterSwitchPolicy +

    +

    +(Appears on:ClusterComponentSpec) +

    +
    +
    + + + + + + + + + + + + + +
    FieldDescription
    +type
    + + +SwitchPolicyType + + +
    +(Optional) +

    clusterSwitchPolicy defines type of the switchPolicy when workloadType is Replication.
    MaximumAvailability: [WIP] when the primary is active, do switch if the synchronization delay = 0 in the user-defined lagProbe data delay detection logic, otherwise do not switch. The primary is down, switch immediately. It will be available in future versions.
    MaximumDataProtection: [WIP] when the primary is active, do switch if synchronization delay = 0 in the user-defined lagProbe data lag detection logic, otherwise do not switch. If the primary is down, if it can be judged that the primary and secondary data are consistent, then do the switch, otherwise do not switch. It will be available in future versions.
    Noop: KubeBlocks will not perform high-availability switching on components. Users need to implement HA by themselves or integrate open source HA solution.


    +
    +

    ClusterVersionSpec +

    +

    +(Appears on:ClusterVersion) +

    +
    +

    ClusterVersionSpec defines the desired state of ClusterVersion


    +
    + + + + + + + + + + + + + + + + + +
    FieldDescription
    +clusterDefinitionRef
    + +string + +
    +

    ref ClusterDefinition.


    +
    +componentVersions
    + + +[]ClusterComponentVersion + + +
    +

    List of components’ containers versioning context, i.e., container image ID, container commands, args., and environments.


    +
    +

    ClusterVersionStatus +

    +

    +(Appears on:ClusterVersion) +

    +
    +

    ClusterVersionStatus defines the observed state of ClusterVersion


    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +phase
    + + +Phase + + +
    +(Optional) +

    phase - in list of [Available,Unavailable]


    +
    +message
    + +string + +
    +(Optional) +

    A human readable message indicating details about why the ClusterVersion is in this phase.


    +
    +observedGeneration
    + +int64 + +
    +(Optional) +

    generation number


    +
    +clusterDefGeneration
    + +int64 + +
    +(Optional) +

    clusterDefGeneration represents the generation number of ClusterDefinition referenced.


    +
    +

    CmdExecutorConfig +

    +

    +(Appears on:PostStartAction, SwitchoverAction, SystemAccountSpec) +

    +
    +

    CmdExecutorConfig specifies how to perform creation and deletion statements.


    +
    + + + + + + + + + + + + + + + + + +
    FieldDescription
    +CommandExecutorEnvItem
    + + +CommandExecutorEnvItem + + +
    +

    +(Members of CommandExecutorEnvItem are embedded into this type.) +

    +
    +CommandExecutorItem
    + + +CommandExecutorItem + + +
    +

    +(Members of CommandExecutorItem are embedded into this type.) +

    +
    +

    CommandExecutorEnvItem +

    +

    +(Appears on:CmdExecutorConfig, SwitchoverShortSpec, SystemAccountShortSpec) +

    +
    +
    + + + + + + + + + + + + + + + + + +
    FieldDescription
    +image
    + +string + +
    +

    image for Connector when executing the command.


    +
    +env
    + + +[]Kubernetes core/v1.EnvVar + + +
    +(Optional) +

    envs is a list of environment variables.


    +
    +

    CommandExecutorItem +

    +

    +(Appears on:CmdExecutorConfig) +

    +
    +
    + + + + + + + + + + + + + + + + + +
    FieldDescription
    +command
    + +[]string + +
    +

    command to perform statements.


    +
    +args
    + +[]string + +
    +(Optional) +

    args is used to perform statements.


    +
    +

    ComponentClass +

    +

    +(Appears on:ComponentClassDefinitionStatus, ComponentClassSeries) +

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +name
    + +string + +
    +(Optional) +

    name is the class name


    +
    +args
    + +[]string + +
    +(Optional) +

    args are variable’s value


    +
    +cpu
    + + +Kubernetes resource.Quantity + + +
    +(Optional) +

    the CPU of the class


    +
    +memory
    + + +Kubernetes resource.Quantity + + +
    +(Optional) +

    the memory of the class


    +
    +

    ComponentClassDefinitionSpec +

    +

    +(Appears on:ComponentClassDefinition) +

    +
    +

    ComponentClassDefinitionSpec defines the desired state of ComponentClassDefinition


    +
    + + + + + + + + + + + + + +
    FieldDescription
    +groups
    + + +[]ComponentClassGroup + + +
    +(Optional) +

    group defines a list of class series that conform to the same constraint.


    +
    +

    ComponentClassDefinitionStatus +

    +

    +(Appears on:ComponentClassDefinition) +

    +
    +

    ComponentClassDefinitionStatus defines the observed state of ComponentClassDefinition


    +
    + + + + + + + + + + + + + + + + + +
    FieldDescription
    +observedGeneration
    + +int64 + +
    +(Optional) +

    observedGeneration is the most recent generation observed for this
    ComponentClassDefinition. It corresponds to the ComponentClassDefinition’s generation, which is
    updated on mutation by the API Server.


    +
    +classes
    + + +[]ComponentClass + + +
    +

    classes is the list of classes that have been observed for this ComponentClassDefinition


    +
    +

    ComponentClassGroup +

    +

    +(Appears on:ComponentClassDefinitionSpec) +

    +
    +
    + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +template
    + +string + +
    +(Optional) +

    template is a class definition template that uses the Go template syntax and allows for variable declaration.
    When defining a class in Series, specifying the variable’s value is sufficient, as the complete class
    definition will be generated through rendering the template.



    For example:
    template: |
    cpu: “{{ or .cpu 1 }}”
    memory: “{{ or .memory 4 }}Gi”


    +
    +vars
    + +[]string + +
    +(Optional) +

    vars defines the variables declared in the template and will be used to generating the complete class definition by
    render the template.


    +
    +series
    + + +[]ComponentClassSeries + + +
    +(Optional) +

    series is a series of class definitions.


    +
    +

    ComponentClassSeries +

    +

    +(Appears on:ComponentClassGroup) +

    +
    +
    + + + + + + + + + + + + + + + + + +
    FieldDescription
    +namingTemplate
    + +string + +
    +(Optional) +

    namingTemplate is a template that uses the Go template syntax and allows for referencing variables defined
    in ComponentClassGroup.Template. This enables dynamic generation of class names.
    For example:
    name: “general-{{ .cpu }}c{{ .memory }}g”


    +
    +classes
    + + +[]ComponentClass + + +
    +(Optional) +

    classes are definitions of classes that come in two forms. In the first form, only ComponentClass.Args
    need to be defined, and the complete class definition is generated by rendering the ComponentClassGroup.Template
    and Name. In the second form, the Name, CPU and Memory must be defined.


    +
    +

    ComponentConfigSpec +

    +

    +(Appears on:ClusterComponentDefinition, ClusterComponentVersion, ComponentDefinitionSpec, ComponentSpec, ConfigurationItemDetail) +

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +ComponentTemplateSpec
    + + +ComponentTemplateSpec + + +
    +

    +(Members of ComponentTemplateSpec are embedded into this type.) +

    +
    +keys
    + +[]string + +
    +(Optional) +

    Specify a list of keys.
    If empty, ConfigConstraint takes effect for all keys in configmap.


    +
    +legacyRenderedConfigSpec
    + + +LegacyRenderedTemplateSpec + + +
    +(Optional) +

    lazyRenderedConfigSpec is optional: specify the secondary rendered config spec.


    +
    +constraintRef
    + +string + +
    +(Optional) +

    Specify the name of the referenced the configuration constraints object.


    +
    +asEnvFrom
    + +[]string + +
    +(Optional) +

    asEnvFrom is optional: the list of containers will be injected into EnvFrom.


    +
    +

    ComponentDefRef +

    +

    +(Appears on:ClusterComponentDefinition) +

    +
    +

    ComponentDefRef is used to select the component and its fields to be referenced.


    +
    + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +componentDefName
    + +string + +
    +

    componentDefName is the name of the componentDef to select.


    +
    +failurePolicy
    + + +FailurePolicyType + + +
    +(Optional) +

    failurePolicy is the failure policy of the component.
    If failed to find the component, the failure policy will be used.


    +
    +componentRefEnv
    + + +[]ComponentRefEnv + + +
    +(Optional) +

    componentRefEnv specifies a list of values to be injected as env variables to each component.


    +
    +

    ComponentDefinitionRef +

    +

    +(Appears on:OpsDefinitionSpec) +

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +name
    + +string + +
    +

    refer to componentDefinition name.


    +
    +accountName
    + +string + +
    +(Optional) +

    the account name of the component.
    will inject the account username and password to KB_ACCOUNT_USERNAME and KB_ACCOUNT_PASSWORD in env of the job.


    +
    +serviceName
    + +string + +
    +(Optional) +

    reference the services[*].name.
    will map the service name and ports to KB_COMP_SVC_NAME and KB_COMP_SVC_PORT_$(portName) in env of the job.
    portName will replace the characters ‘-’ to ‘_’ and convert to uppercase.


    +
    +varsRef
    + + +VarsRef + + +
    +(Optional) +

    varsRef defines the envs that need to be referenced from the target component pod, and will inject to job’s containers.
    if it is set, will ignore the global “varsRef”.


    +
    +

    ComponentDefinitionSpec +

    +

    +(Appears on:ComponentDefinition) +

    +
    +

    ComponentDefinitionSpec provides a workload component specification with attributes that strongly work with stateful workloads and day-2 operation behaviors.


    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +provider
    + +string + +
    +(Optional) +

    Provider is the name of the component provider.


    +
    +description
    + +string + +
    +(Optional) +

    Description is a brief description of the component.


    +
    +serviceKind
    + +string + +
    +(Optional) +

    ServiceKind defines what kind of well-known service that the component provides (e.g., MySQL, Redis, ETCD, case insensitive).
    Cannot be updated.


    +
    +serviceVersion
    + +string + +
    +(Optional) +

    ServiceVersion defines the version of the well-known service that the component provides.
    Cannot be updated.


    +
    +runtime
    + + +Kubernetes core/v1.PodSpec + + +
    +

    Runtime defines primarily runtime information for the component, including:
    - Init containers
    - Containers
    - Image
    - Commands
    - Args
    - Envs
    - Mounts
    - Ports
    - Security context
    - Probes
    - Lifecycle
    - Volumes
    CPU and memory resource limits, as well as scheduling settings (affinity, toleration, priority), should not be configured within this structure.
    Cannot be updated.


    +
    +vars
    + + +[]EnvVar + + +
    +(Optional) +

    Vars represents user-defined variables.
    These variables can be utilized as environment variables for Pods and Actions, or to render the templates of config and script.
    When used as environment variables, these variables are placed in front of the environment variables declared in the Pod.
    Cannot be updated.


    +
    +volumes
    + + +[]ComponentVolume + + +
    +(Optional) +

    Volumes defines the persistent volumes needed by the component.
    The users are responsible for providing these volumes when creating a component instance.
    Cannot be updated.


    +
    +services
    + + +[]ComponentService + + +
    +(Optional) +

    Services defines endpoints that can be used to access the component service to manage the component.
    In addition, a reserved headless service will be created by default, with the name pattern {clusterName}-{componentName}-headless.
    Cannot be updated.


    +
    +configs
    + + +[]ComponentConfigSpec + + +
    +(Optional) +

    The configs field provided by provider, and
    finally this configTemplateRefs will be rendered into the user’s own configuration file according to the user’s cluster.
    Cannot be updated.
    TODO: support referencing configs from other components or clusters.


    +
    +logConfigs
    + + +[]LogConfig + + +
    +(Optional) +

    LogConfigs is detail log file config which provided by provider.
    Cannot be updated.


    +
    +monitor
    + + +MonitorConfig + + +
    +(Optional) +

    Monitor is monitoring config which provided by provider.
    Cannot be updated.


    +
    +scripts
    + + +[]ComponentTemplateSpec + + +
    +(Optional) +

    The scripts field provided by provider, and
    finally this configTemplateRefs will be rendered into the user’s own configuration file according to the user’s cluster.
    Cannot be updated.


    +
    +policyRules
    + + +[]Kubernetes rbac/v1.PolicyRule + + +
    +(Optional) +

    PolicyRules defines the namespaced policy rules required by the component.
    If any rule application fails (e.g., due to lack of permissions), the provisioning of the component instance will also fail.
    Cannot be updated.


    +
    +labels
    + +map[string]string + +
    +(Optional) +

    Labels defines static labels that will be patched to all k8s resources created for the component.
    If a label key conflicts with any other system labels or user-specified labels, it will be silently ignored.
    Cannot be updated.


    +
    +replicasLimit
    + + +ReplicasLimit + + +
    +(Optional) +

    ReplicasLimit defines the limit of valid replicas supported.
    Cannot be updated.


    +
    +systemAccounts
    + + +[]SystemAccount + + +
    +(Optional) +

    SystemAccounts defines the pre-defined system accounts required to manage the component.
    TODO(component): accounts KB required
    Cannot be updated.


    +
    +updateStrategy
    + + +UpdateStrategy + + +
    +(Optional) +

    UpdateStrategy defines the strategy for updating the component instance.
    Cannot be updated.


    +
    +roles
    + + +[]ReplicaRole + + +
    +(Optional) +

    Roles defines all the roles that the component can assume.
    Cannot be updated.


    +
    +roleArbitrator
    + + +RoleArbitrator + + +
    +(Optional) +

    RoleArbitrator defines the strategy for electing the component’s active role.
    Cannot be updated.


    +
    +lifecycleActions
    + + +ComponentLifecycleActions + + +
    +(Optional) +

    LifecycleActions defines the operational actions that needed to interoperate with the component
    service and processes for lifecycle management.
    Cannot be updated.


    +
    +serviceRefDeclarations
    + + +[]ServiceRefDeclaration + + +
    +(Optional) +

    ServiceRefDeclarations is used to declare the service reference of the current component.
    Cannot be updated.


    +
    +minReadySeconds
    + +int32 + +
    +(Optional) +

    Minimum number of seconds for which a newly created pod should be ready
    without any of its container crashing for it to be considered available.
    Defaults to 0 (pod will be considered available as soon as it is ready)


    +
    +

    ComponentDefinitionStatus +

    +

    +(Appears on:ComponentDefinition) +

    +
    +

    ComponentDefinitionStatus defines the observed state of ComponentDefinition.


    +
    + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +observedGeneration
    + +int64 + +
    +(Optional) +

    ObservedGeneration is the most recent generation observed for this ComponentDefinition.


    +
    +phase
    + + +Phase + + +
    +(Optional) +

    Phase valid values are `,Available, 'Unavailable.
    Available is ComponentDefinition become available, and can be used for co-related objects.


    +
    +message
    + +string + +
    +(Optional) +

    Extra message for current phase.


    +
    +

    ComponentLifecycleActions +

    +

    +(Appears on:ComponentDefinitionSpec) +

    +
    +

    ComponentLifecycleActions defines a set of operational actions for interacting with component services and processes.


    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +postProvision
    + + +LifecycleActionHandler + + +
    +(Optional) +

    PostProvision defines the actions to be executed and the corresponding policy when a component is created.
    You can define the preCondition for executing PostProvision using Action.PreCondition. The default PostProvision action preCondition is ComponentReady.
    The PostProvision Action will be executed only once.
    Dedicated env vars for the action:
    - KB_CLUSTER_COMPONENT_LIST: The list of all components in the cluster, joined by ‘,’ (e.g., “comp1,comp2”).
    - KB_CLUSTER_COMPONENT_POD_NAME_LIST: The list of all pods name in this component, joined by ‘,’ (e.g., “pod1,pod2”).
    - KB_CLUSTER_COMPONENT_POD_IP_LIST: The list of pod IPs where each pod resides in this component, corresponding one-to-one with each pod in the KB_CLUSTER_COMPONENT_POD_NAME_LIST. joined by ‘,’ (e.g., “podIp1,podIp2”).
    - KB_CLUSTER_COMPONENT_POD_HOST_NAME_LIST: The list of hostName where each pod resides in this component, corresponding one-to-one with each pod in the KB_CLUSTER_COMPONENT_POD_NAME_LIST. joined by ‘,’ (e.g., “hostName1,hostName2”).
    - KB_CLUSTER_COMPONENT_POD_HOST_IP_LIST: The list of host IPs where each pod resides in this component, corresponding one-to-one with each pod in the KB_CLUSTER_COMPONENT_POD_NAME_LIST. joined by ‘,’ (e.g., “hostIp1,hostIp2”).
    Cannot be updated.


    +
    +preTerminate
    + + +LifecycleActionHandler + + +
    +(Optional) +

    PreTerminate defines the actions to be executed when a component is terminated due to an API request.
    The PreTerminate Action will be executed only once. Upon receiving a scale-down command for the Component, it is executed immediately.
    Only after the preTerminate action is successfully executed, the destruction of the Component and its underlying resources proceeds.
    Cannot be updated.


    +
    +roleProbe
    + + +RoleProbe + + +
    +(Optional) +

    RoleProbe defines how to probe the role of replicas.
    Cannot be updated.


    +
    +switchover
    + + +ComponentSwitchover + + +
    +(Optional) +

    Switchover defines how to proactively switch the current leader to a new replica to minimize the impact on availability.
    This action is typically invoked when the leader is about to become unavailable due to events, such as:
    - switchover
    - stop
    - restart
    - scale-in
    Dedicated env vars for the action:
    - KB_SWITCHOVER_CANDIDATE_NAME: The name of the new candidate replica’s Pod. It may be empty.
    - KB_SWITCHOVER_CANDIDATE_FQDN: The FQDN of the new candidate replica. It may be empty.
    - KB_LEADER_POD_IP: The IP address of the original leader’s Pod before switchover.
    - KB_LEADER_POD_NAME: The name of the original leader’s Pod before switchover.
    - KB_LEADER_POD_FQDN: The FQDN of the original leader’s Pod before switchover.
    The env vars with following prefix are deprecated and will be removed in the future:
    - KB_REPLICATION_PRIMARYPOD: The prefix of the environment variables of the original primary’s Pod before switchover.
    - KB_CONSENSUS_LEADERPOD: The prefix of the environment variables of the original leader’s Pod before switchover.
    Cannot be updated.


    +
    +memberJoin
    + + +LifecycleActionHandler + + +
    +(Optional) +

    MemberJoin defines how to add a new replica to the replication group.
    This action is typically invoked when a new replica needs to be added, such as during scale-out.
    It may involve updating configuration, notifying other members, and ensuring data consistency.
    Cannot be updated.


    +
    +memberLeave
    + + +LifecycleActionHandler + + +
    +(Optional) +

    MemberLeave defines how to remove a replica from the replication group.
    This action is typically invoked when a replica needs to be removed, such as during scale-in.
    It may involve configuration updates and notifying other members about the departure,
    but it is advisable to avoid performing data migration within this action.
    Cannot be updated.


    +
    +readonly
    + + +LifecycleActionHandler + + +
    +(Optional) +

    Readonly defines how to set a replica service as read-only.
    This action is used to protect a replica in case of volume space exhaustion or excessive traffic.
    Cannot be updated.


    +
    +readwrite
    + + +LifecycleActionHandler + + +
    +(Optional) +

    Readwrite defines how to set a replica service as read-write.
    Cannot be updated.


    +
    +dataPopulate
    + + +LifecycleActionHandler + + +
    +(Optional) +

    DataPopulate defines how to populate the data to create new replicas.
    This action is typically used when a new replica needs to be constructed, such as:
    - scale-out
    - rebuild
    - clone
    It should write the valid data to stdout without including any extraneous information.
    Cannot be updated.


    +
    +dataAssemble
    + + +LifecycleActionHandler + + +
    +(Optional) +

    DataAssemble defines how to assemble data synchronized from external before starting the service for a new replica.
    This action is typically used when creating a new replica, such as:
    - scale-out
    - rebuild
    - clone
    The data will be streamed in via stdin. If any error occurs during the assembly process,
    the action must be able to guarantee idempotence to allow for retries from the beginning.
    Cannot be updated.


    +
    +reconfigure
    + + +LifecycleActionHandler + + +
    +(Optional) +

    Reconfigure defines how to notify the replica service that there is a configuration update.
    Cannot be updated.


    +
    +accountProvision
    + + +LifecycleActionHandler + + +
    +(Optional) +

    AccountProvision defines how to provision accounts.
    Cannot be updated.


    +
    +

    ComponentMessageMap +(map[string]string alias)

    +

    +(Appears on:ClusterComponentStatus, ComponentStatus) +

    +
    +
    +

    ComponentNameSet +(map[string]struct{} alias)

    +
    +
    +

    ComponentOps +

    +

    +(Appears on:Expose, HorizontalScaling, OpsRequestSpec, Reconfigure, ScriptSpec, Switchover, VerticalScaling, VolumeExpansion) +

    +
    +

    ComponentOps defines the common variables of component scope operations.


    +
    + + + + + + + + + + + + + +
    FieldDescription
    +componentName
    + +string + +
    +

    componentName cluster component name.


    +
    +

    ComponentRefEnv +

    +

    +(Appears on:ComponentDefRef) +

    +
    +

    ComponentRefEnv specifies name and value of an env.


    +
    + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +name
    + +string + +
    +

    name is the name of the env to be injected, and it must be a C identifier.


    +
    +value
    + +string + +
    +(Optional) +

    value is the value of the env to be injected.


    +
    +valueFrom
    + + +ComponentValueFrom + + +
    +(Optional) +

    valueFrom specifies the source of the env to be injected.


    +
    +

    ComponentResourceConstraintSelector +

    +

    +(Appears on:ClusterResourceConstraintSelector, ComponentResourceConstraintSpec) +

    +
    +
    + + + + + + + + + + + + + + + + + +
    FieldDescription
    +componentDefRef
    + +string + +
    +

    In versions prior to KB 0.8.0, ComponentDefRef is the name of the component definition in the ClusterDefinition.
    In KB 0.8.0 and later versions, ComponentDefRef is the name of ComponentDefinition.


    +
    +rules
    + +[]string + +
    +

    rules are the constraint rules that will be applied to the component.


    +
    +

    ComponentResourceConstraintSpec +

    +

    +(Appears on:ComponentResourceConstraint) +

    +
    +

    ComponentResourceConstraintSpec defines the desired state of ComponentResourceConstraint


    +
    + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +rules
    + + +[]ResourceConstraintRule + + +
    +

    Component resource constraint rules.


    +
    +selector
    + + +[]ClusterResourceConstraintSelector + + +
    +(Optional) +

    selector is used to bind the resource constraint to cluster definitions based on ClusterDefinition API.


    +
    +componentSelector
    + + +[]ComponentResourceConstraintSelector + + +
    +(Optional) +

    componentSelector is used to bind the resource constraint to components based on ComponentDefinition API.


    +
    +

    ComponentResourceKey +(string alias)

    +
    +

    ComponentResourceKey defines the resource key of component, such as pod/pvc.


    +
    + + + + + + + + + + +
    ValueDescription

    "pods"

    +

    ComponentService +

    +

    +(Appears on:ComponentDefinitionSpec) +

    +
    +
    + + + + + + + + + + + + + + + + + +
    FieldDescription
    +Service
    + + +Service + + +
    +

    +(Members of Service are embedded into this type.) +

    +
    +generatePodOrdinalService
    + +bool + +
    +(Optional) +

    GeneratePodOrdinalService indicates whether to create a corresponding Service for each Pod of the selected Component.
    If sets to true, a set of Service will be automatically generated for each Pod. And Service.RoleSelector will be ignored.
    They can be referred to by adding the PodOrdinal to the defined ServiceName with named pattern $(Service.ServiceName)-$(PodOrdinal).
    And the Service.Name will also be generated with named pattern $(Service.Name)-$(PodOrdinal).
    The PodOrdinal is zero-based, and the number of generated Services is equal to the number of replicas of the Component.
    For example, a Service might be defined as follows:
    - name: my-service
    serviceName: my-service
    generatePodOrdinalService: true
    spec:
    type: NodePort
    ports:
    - name: http
    port: 80
    targetPort: 8080
    Assuming that the Component has 3 replicas, then three services would be generated: my-service-0, my-service-1, and my-service-2, each pointing to its respective Pod.


    +
    +

    ComponentSpec +

    +

    +(Appears on:Component) +

    +
    +

    ComponentSpec defines the desired state of Component


    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +compDef
    + +string + +
    +

    compDef is the name of the referenced componentDefinition.


    +
    +classDefRef
    + + +ClassDefRef + + +
    +(Optional) +

    classDefRef references the class defined in ComponentClassDefinition.


    +
    +serviceRefs
    + + +[]ServiceRef + + +
    +(Optional) +

    serviceRefs define service references for the current component. Based on the referenced services, they can be categorized into two types:
    Service provided by external sources: These services are provided by external sources and are not managed by KubeBlocks. They can be Kubernetes-based or non-Kubernetes services. For external services, you need to provide an additional ServiceDescriptor object to establish the service binding.
    Service provided by other KubeBlocks clusters: These services are provided by other KubeBlocks clusters. You can bind to these services by specifying the name of the hosting cluster.
    Each type of service reference requires specific configurations and bindings to establish the connection and interaction with the respective services.
    It should be noted that the ServiceRef has cluster-level semantic consistency, meaning that within the same Cluster, service references with the same ServiceRef.Name are considered to be the same service. It is only allowed to bind to the same Cluster or ServiceDescriptor.


    +
    +resources
    + + +Kubernetes core/v1.ResourceRequirements + + +
    +(Optional) +

    Resources requests and limits of workload.


    +
    +volumeClaimTemplates
    + + +[]ClusterComponentVolumeClaimTemplate + + +
    +(Optional) +

    VolumeClaimTemplates information for statefulset.spec.volumeClaimTemplates.


    +
    +replicas
    + +int32 + +
    +

    Replicas specifies the desired number of replicas for the component’s workload.


    +
    +configs
    + + +[]ComponentConfigSpec + + +
    +(Optional) +
    +monitor
    + +bool + +
    +(Optional) +

    monitor is a switch to enable monitoring and is set as false by default.
    KubeBlocks provides an extension mechanism to support component level monitoring,
    which will scrape metrics auto or manually from servers in component and export
    metrics to Time Series Database.


    +
    +enabledLogs
    + +[]string + +
    +(Optional) +

    enabledLogs indicates which log file takes effect in the database cluster,
    element is the log type which is defined in ComponentDefinition logConfig.name.


    +
    +serviceAccountName
    + +string + +
    +(Optional) +

    serviceAccountName is the name of the ServiceAccount that running component depends on.


    +
    +affinity
    + + +Affinity + + +
    +(Optional) +

    Affinity specifies the scheduling constraints for the component’s workload.
    If specified, it will override the cluster-wide affinity.


    +
    +tolerations
    + + +[]Kubernetes core/v1.Toleration + + +
    +(Optional) +

    Tolerations specify the tolerations for the component’s workload.
    If specified, they will override the cluster-wide toleration settings.


    +
    +tlsConfig
    + + +TLSConfig + + +
    +(Optional) +
    +rsmTransformPolicy
    + +github.com/apecloud/kubeblocks/apis/workloads/v1alpha1.RsmTransformPolicy + +
    +(Optional) +

    RsmTransformPolicy defines the policy generate sts using rsm.
    ToSts: rsm transform to statefulSet
    ToPod: rsm transform to pods


    +
    +nodes
    + +[]k8s.io/apimachinery/pkg/types.NodeName + +
    +(Optional) +

    Nodes defines the list of nodes that pods can schedule
    If the RsmTransformPolicy is specified as OneToMul,the list of nodes will be used. If the list of nodes is empty,
    no specific node will be assigned. However, if the list of node is filled, all pods will be evenly scheduled
    across the nodes in the list.


    +
    +instances
    + +[]string + +
    +(Optional) +

    Instances defines the list of instance to be deleted priorly


    -

    BackupStatusUpdateStage -(string alias)

    +

    ComponentStatus +

    -(Appears on:BackupStatusUpdate) +(Appears on:Component)

    -

    BackupStatusUpdateStage defines the stage of backup status update.


    -
    -

    BaseBackupType -(string alias)

    -
    -

    BaseBackupType the base backup type, keep synchronized with the BaseBackupType of the data protection API.


    +

    ComponentStatus defines the observed state of Component


    -

    BasePolicy + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +observedGeneration
    + +int64 + +
    +(Optional) +

    observedGeneration is the most recent generation observed for this Component.
    It corresponds to the Cluster’s generation, which is
    updated on mutation by the API Server.


    +
    +conditions
    + + +[]Kubernetes meta/v1.Condition + + +
    +(Optional) +

    Describe current state of component API Resource, like warning.


    +
    +phase
    + + +ClusterComponentPhase + + +
    +

    phase describes the phase of the component and the detail information of the phases are as following:
    Creating: Creating is a special Updating with previous phase empty(means “”) or Creating.
    Running: component replicas > 0 and all pod specs are latest with a Running state.
    Updating: component replicas > 0 and has no failed pods. the component is being updated.
    Abnormal: component replicas > 0 but having some failed pods. the component basically works but in a fragile state.
    Failed: component replicas > 0 but having some failed pods. the component doesn’t work anymore.
    Stopping: component replicas = 0 and has terminating pods.
    Stopped: component replicas = 0 and all pods have been deleted.
    Deleting: the component is being deleted.


    +
    +message
    + + +ComponentMessageMap + + +
    +(Optional) +

    message records the component details message in current phase.
    Keys are podName or deployName or statefulSetName. The format is ObjectKind/Name.


    +
    +

    ComponentSwitchover

    -(Appears on:CommonBackupPolicy, SnapshotPolicy) +(Appears on:ComponentLifecycleActions)

    @@ -1773,62 +7186,126 @@ BackupStatusUpdateStage -target
    +withCandidate
    - -TargetInstance + +Action (Optional) -

    target instance for backup.


    +

    withCandidate corresponds to the switchover of the specified candidate primary or leader instance.
    Currently, only Action.Exec is supported, Action.HTTP is not supported.


    -backupsHistoryLimit
    +withoutCandidate
    -int32 + +Action + (Optional) -

    the number of automatic backups to retain. Value must be non-negative integer.
    0 means NO limit on the number of backups.


    +

    withoutCandidate corresponds to a switchover that does not specify a candidate primary or leader instance.
    Currently, only Action.Exec is supported, Action.HTTP is not supported.


    -onFailAttempted
    +scriptSpecSelectors
    -int32 + +[]ScriptSpecSelector + (Optional) -

    count of backup stop retries on fail.


    +

    scriptSpecSelectors defines the selector of the scriptSpecs that need to be referenced.
    Once ScriptSpecSelectors is defined, the scripts defined in scripts can be referenced in the Action.


    + + + + +

    ComponentTemplateSpec +

    +

    +(Appears on:ClusterComponentDefinition, ComponentConfigSpec, ComponentDefinitionSpec) +

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +name
    + +string + +
    +

    Specify the name of configuration template.


    -backupStatusUpdates
    +templateRef
    - -[]BackupStatusUpdate - +string + +
    +

    Specify the name of the referenced the configuration template ConfigMap object.


    +
    +namespace
    + +string + +
    +(Optional) +

    Specify the namespace of the referenced the configuration template ConfigMap object.
    An empty namespace is equivalent to the “default” namespace.


    +
    +volumeName
    + +string + +
    +

    volumeName is the volume name of PodTemplate, which the configuration file produced through the configuration
    template will be mounted to the corresponding volume. Must be a DNS_LABEL name.
    The volume name must be defined in podSpec.containers[*].volumeMounts.


    +
    +defaultMode
    + +int32
    (Optional) -

    define how to update metadata for backup status.


    +

    defaultMode is optional: mode bits used to set permissions on created files by default.
    Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
    YAML accepts both octal and decimal values, JSON requires decimal values for mode bits.
    Defaults to 0644.
    Directories within the path are not affected by this setting.
    This might be in conflict with other options that affect the file
    mode, like fsGroup, and the result can be other mode bits set.


    -

    CPUConstraint +

    ComponentValueFrom

    -(Appears on:ResourceConstraintRule) +(Appears on:ComponentRefEnv)

    @@ -1842,103 +7319,62 @@ int32 -max
    +type
    - -Kubernetes resource.Quantity + +ComponentValueFromType -(Optional) -

    The maximum count of vcpu cores, [Min, Max] defines a range for valid vcpu cores, and the value in this range
    must be multiple times of Step. It’s useful to define a large number of valid values without defining them one by
    one. Please see the documentation for Step for some examples.
    If Slots is specified, Max, Min, and Step are ignored


    +

    type is the type of the source to select. There are three types: FieldRef, ServiceRef, HeadlessServiceRef.


    -min
    +fieldPath
    - -Kubernetes resource.Quantity - +string (Optional) -

    The minimum count of vcpu cores, [Min, Max] defines a range for valid vcpu cores, and the value in this range
    must be multiple times of Step. It’s useful to define a large number of valid values without defining them one by
    one. Please see the documentation for Step for some examples.
    If Slots is specified, Max, Min, and Step are ignored


    +

    fieldRef is the jsonpath of the source to select when type is FieldRef.
    there are two objects registered in the jsonpath: componentDef and components.
    componentDef is the component definition object specified in componentRef.componentDefName.
    components is the component list objects referring to the component definition object.


    -step
    +format
    - -Kubernetes resource.Quantity - +string (Optional) -

    The minimum granularity of vcpu cores, [Min, Max] defines a range for valid vcpu cores and the value in this range must be
    multiple times of Step.
    For example:
    1. Min is 2, Max is 8, Step is 2, and the valid vcpu core is {2, 4, 6, 8}.
    2. Min is 0.5, Max is 2, Step is 0.5, and the valid vcpu core is {0.5, 1, 1.5, 2}.


    +

    format is the format of each headless service address.
    there are three builtin variables can be used as placeholder: $POD_ORDINAL, $POD_FQDN, $POD_NAME
    $POD_ORDINAL is the ordinal of the pod.
    $POD_FQDN is the fully qualified domain name of the pod.
    $POD_NAME is the name of the pod


    -slots
    +joinWith
    - -[]Kubernetes resource.Quantity - +string (Optional) -

    The valid vcpu cores, it’s useful if you want to define valid vcpu cores explicitly.
    If Slots is specified, Max, Min, and Step are ignored


    +

    joinWith is the string to join the values of headless service addresses.


    -

    CfgFileFormat +

    ComponentValueFromType (string alias)

    -(Appears on:FormatterConfig) +(Appears on:ComponentValueFrom)

    -

    CfgFileFormat defines formatter of configuration files.


    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ValueDescription

    "dotenv"

    "hcl"

    "ini"

    "json"

    "properties"

    "props-plus"

    "redis"

    "toml"

    "xml"

    "yaml"

    -

    CfgReloadType -(string alias)

    -
    -

    CfgReloadType defines reload method.


    +

    ComponentValueFromType specifies the type of component value from.


    @@ -1947,22 +7383,18 @@ Kubernetes resource.Quantity - - - - - + - + - +
    Description

    "http"

    "sql"

    "exec"

    "FieldRef"

    "tpl"

    "HeadlessServiceRef"

    "signal"

    "ServiceRef"

    -

    ClassDefRef +

    ComponentVolume

    -(Appears on:ClusterComponentSpec, LastComponentConfiguration, VerticalScaling) +(Appears on:ComponentDefinitionSpec)

    @@ -1982,29 +7414,65 @@ string
    +

    The Name of the volume.
    Must be a DNS_LABEL and unique within the pod.
    More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    Cannot be updated.


    + + + + +needSnapshot
    + +bool + + + (Optional) -

    Name refers to the name of the ComponentClassDefinition.


    +

    NeedSnapshot indicates whether the volume need to snapshot when making a backup for the component.
    Cannot be updated.


    -class
    +highWatermark
    -string +int -

    Class refers to the name of the class that is defined in the ComponentClassDefinition.


    +(Optional) +

    HighWatermark defines the high watermark threshold for the volume space usage.
    If there is any specified volumes who’s space usage is over the threshold, the pre-defined “LOCK” action
    will be triggered to degrade the service to protect volume from space exhaustion, such as to set the instance
    as read-only. And after that, if all volumes’ space usage drops under the threshold later, the pre-defined
    “UNLOCK” action will be performed to recover the service normally.
    Cannot be updated.


    -

    ClusterBackup +

    ConfigConstraintPhase +(string alias)

    +

    +(Appears on:ConfigConstraintStatus) +

    +
    +

    ConfigConstraintPhase defines the ConfigConstraint CR .status.phase


    +
    + + + + + + + + + + + + + + +
    ValueDescription

    "Available"

    "Deleting"

    "Unavailable"

    +

    ConfigConstraintSpec

    -(Appears on:ClusterSpec) +(Appears on:ConfigConstraint)

    +

    ConfigConstraintSpec defines the desired state of ConfigConstraint


    @@ -2016,439 +7484,501 @@ string - -
    -enabled
    +reloadOptions
    -bool + +ReloadOptions +
    (Optional) -

    enabled defines whether to enable automated backup.


    +

    reloadOptions indicates whether the process supports reload.
    if set, the controller will determine the behavior of the engine instance based on the configuration templates,
    restart or reload depending on whether any parameters in the StaticParameters have been modified.


    -retentionPeriod
    +toolsImageSpec
    -string + +ToolsImageSpec +
    (Optional) -

    retentionPeriod is a time string ending with the ’d’|’D’|‘h’|‘H’ character to describe how long
    the Backup should be retained. if not set, will be retained forever.


    +

    toolConfig used to config init container.


    -method
    +downwardAPIOptions
    -github.com/apecloud/kubeblocks/apis/dataprotection/v1alpha1.BackupMethod + +[]DownwardAPIOption +
    -

    backup method, support: snapshot, backupTool.


    +(Optional) +

    downwardAPIOptions is used to watch pod fields.


    -cronExpression
    +scriptConfigs
    -string + +[]ScriptConfig +
    (Optional) -

    the cron expression for schedule, the timezone is in UTC. see https://en.wikipedia.org/wiki/Cron.


    +

    scriptConfigs, list of ScriptConfig, witch these scripts can be used by volume trigger,downward trigger, or tool image


    -startingDeadlineMinutes
    +cfgSchemaTopLevelName
    -int64 +string
    (Optional) -

    startingDeadlineMinutes defines the deadline in minutes for starting the backup job
    if it misses scheduled time for any reason.


    +

    cfgSchemaTopLevelName is cue type name, which generates openapi schema.


    -repoName
    +configurationSchema
    -string + +CustomParametersValidation +
    (Optional) -

    repoName is the name of the backupRepo, if not set, will use the default backupRepo.


    +

    configurationSchema imposes restrictions on database parameter’s rule.


    -pitrEnabled
    +staticParameters
    -bool +[]string
    (Optional) -

    pitrEnabled defines whether to enable point-in-time recovery.


    +

    staticParameters, list of StaticParameter, modifications of them trigger a process restart.


    -

    ClusterComponentDefinition -

    -

    -(Appears on:ClusterDefinitionSpec) -

    -
    -

    ClusterComponentDefinition provides a workload component specification template,
    with attributes that strongly work with stateful workloads and day-2 operations
    behaviors.


    -
    - - - - + + - - + +
    FieldDescription +dynamicParameters
    + +[]string + +
    +(Optional) +

    dynamicParameters, list of DynamicParameter, modifications of them trigger a config dynamic reload without process restart.


    +
    -name
    +immutableParameters
    -string +[]string
    -

    A component definition name, this name could be used as default name of Cluster.spec.componentSpecs.name,
    and so this name is need to conform with same validation rules as Cluster.spec.componentSpecs.name, that
    is currently comply with IANA Service Naming rule. This name will apply to “apps.kubeblocks.io/component-name”
    object label value.


    +(Optional) +

    immutableParameters describes parameters that prohibit user from modification.


    -description
    +selector
    -string + +Kubernetes meta/v1.LabelSelector +
    -(Optional) -

    The description of component definition.


    +

    selector is used to match the label on the pod,
    for example, a pod of the primary is match on the patroni cluster.


    -workloadType
    +formatterConfig
    - -WorkloadType + +FormatterConfig
    -

    workloadType defines type of the workload.
    Stateless is a stateless workload type used to describe stateless applications.
    Stateful is a stateful workload type used to describe common stateful applications.
    Consensus is a stateful workload type used to describe applications based on consensus protocols, common consensus protocols such as raft and paxos.
    Replication is a stateful workload type used to describe applications based on the primary-secondary data replication protocol.


    +

    formatterConfig describes the format of the configuration file, the controller
    1. parses configuration file
    2. analyzes the modified parameters
    3. applies corresponding policies.


    +

    ConfigConstraintStatus +

    +

    +(Appears on:ConfigConstraint) +

    +
    +

    ConfigConstraintStatus defines the observed state of ConfigConstraint.


    +
    + + + + + + + + + +
    FieldDescription
    -characterType
    +phase
    -string + +ConfigConstraintPhase +
    (Optional) -

    characterType defines well-known database component name, such as mongos(mongodb), proxy(redis), mariadb(mysql)
    KubeBlocks will generate proper monitor configs for well-known characterType when builtIn is true.


    +

    phase is status of configuration template, when set to CCAvailablePhase, it can be referenced by ClusterDefinition or ClusterVersion.


    -configSpecs
    +message
    - -[]ComponentConfigSpec - +string
    (Optional) -

    The configSpec field provided by provider, and
    finally this configTemplateRefs will be rendered into the user’s own configuration file according to the user’s cluster.


    +

    message field describes the reasons of abnormal status.


    -scriptSpecs
    +observedGeneration
    - -[]ComponentTemplateSpec - +int64
    (Optional) -

    The scriptSpec field provided by provider, and
    finally this configTemplateRefs will be rendered into the user’s own configuration file according to the user’s cluster.


    +

    observedGeneration is the latest generation observed for this
    ClusterDefinition. It refers to the ConfigConstraint’s generation, which is
    updated by the API Server.


    +

    ConfigMapRef +

    +

    +(Appears on:UserResourceRefs) +

    +
    +
    + + + + + + + + + +
    FieldDescription
    -probes
    +ResourceMeta
    - -ClusterDefinitionProbes + +ResourceMeta
    -(Optional) -

    probes setting for healthy checks.


    +

    +(Members of ResourceMeta are embedded into this type.) +

    -monitor
    +configMap
    - -MonitorConfig + +Kubernetes core/v1.ConfigMapVolumeSource
    -(Optional) -

    monitor is monitoring config which provided by provider.


    +

    configMap defines the configmap volume source.


    +

    ConfigParams +

    +

    +(Appears on:ConfigurationItemDetail) +

    +
    +
    + + + + + + + + + +
    FieldDescription
    -logConfigs
    +content
    - -[]LogConfig - +string
    (Optional) -

    logConfigs is detail log file config which provided by provider.


    +

    fileContent indicates the configuration file content.


    -podSpec
    +parameters
    - -Kubernetes core/v1.PodSpec - +map[string]*string
    (Optional) -

    podSpec define pod spec template of the cluster component.


    +

    updated parameters for a single configuration file.


    +

    ConfigTemplateExtension +

    +

    +(Appears on:ConfigurationItemDetail, LegacyRenderedTemplateSpec) +

    +
    +
    + + + + + + + + + +
    FieldDescription
    -service
    +templateRef
    - -ServiceSpec - +string
    -(Optional) -

    service defines the behavior of a service spec.
    provide read-write service when WorkloadType is Consensus.


    +

    Specify the name of the referenced the configuration template ConfigMap object.


    -statelessSpec
    +namespace
    - -StatelessSetSpec - +string
    (Optional) -

    statelessSpec defines stateless related spec if workloadType is Stateless.


    +

    Specify the namespace of the referenced the configuration template ConfigMap object.
    An empty namespace is equivalent to the “default” namespace.


    -statefulSpec
    +policy
    - -StatefulSetSpec + +MergedPolicy
    (Optional) -

    statefulSpec defines stateful related spec if workloadType is Stateful.


    +

    policy defines how to merge external imported templates into component templates.


    +

    ConfigurationItem +

    +

    +(Appears on:Reconfigure) +

    +
    +
    + + + + + + + + + +
    FieldDescription
    -consensusSpec
    +name
    - -ConsensusSetSpec - +string
    -(Optional) -

    consensusSpec defines consensus related spec if workloadType is Consensus, required if workloadType is Consensus.


    +

    name is a config template name.


    -replicationSpec
    +policy
    - -ReplicationSetSpec + +UpgradePolicy
    (Optional) -

    replicationSpec defines replication related spec if workloadType is Replication.


    +

    policy defines the upgrade policy.


    -horizontalScalePolicy
    +keys
    - -HorizontalScalePolicy + +[]ParameterConfig
    -(Optional) -

    horizontalScalePolicy controls the behavior of horizontal scale.


    +

    keys is used to set the parameters to be updated.


    +

    ConfigurationItemDetail +

    +

    +(Appears on:ConfigurationSpec) +

    +
    +
    + + + + + + + +
    FieldDescription
    -systemAccounts
    +name
    - -SystemAccountSpec - +string
    -(Optional) -

    Statement to create system account.


    +

    Specify the name of configuration template.


    -volumeTypes
    +version
    - -[]VolumeTypeSpec - +string
    (Optional) -

    volumeTypes is used to describe the purpose of the volumes
    mapping the name of the VolumeMounts in the PodSpec.Container field,
    such as data volume, log volume, etc.
    When backing up the volume, the volume can be correctly backed up
    according to the volumeType.



    For example:
    name: data, type: data means that the volume named data is used to store data.
    name: binlog, type: log means that the volume named binlog is used to store log.



    NOTE:
    When volumeTypes is not defined, the backup function will not be supported,
    even if a persistent volume has been specified.


    +

    Deprecated: Please use payload instead.
    version is the version of configuration template.


    -customLabelSpecs
    +payload
    - -[]CustomLabelSpec + +Payload
    (Optional) -

    customLabelSpecs is used for custom label tags which you want to add to the component resources.


    +

    Payload holds the configuration-related rerender.


    -switchoverSpec
    +configSpec
    - -SwitchoverSpec + +ComponentConfigSpec
    (Optional) -

    switchoverSpec defines command to do switchover.
    in particular, when workloadType=Replication, the command defined in switchoverSpec will only be executed under the condition of cluster.componentSpecs[x].SwitchPolicy.type=Noop.


    +

    configSpec is used to set the configuration template.


    -volumeProtectionSpec
    +importTemplateRef
    - -VolumeProtectionSpec + +ConfigTemplateExtension
    (Optional) +

    Specify the configuration template.


    -componentDefRef
    +configFileParams
    - -[]ComponentDefRef + +map[string]..ConfigParams
    (Optional) -

    componentDefRef is used to inject values from other components into the current component.
    values will be saved and updated in a configmap and mounted to the current component.


    +

    configFileParams is used to set the parameters to be updated.


    -

    ClusterComponentPhase -(string alias)

    -

    -(Appears on:ClusterComponentStatus, OpsRequestComponentStatus) -

    -
    -

    ClusterComponentPhase defines the Cluster CR .status.components.phase


    -
    - - - - - - - - - - - - - - - - - - - - -
    ValueDescription

    "Abnormal"

    "Creating"

    "Failed"

    "Running"

    "Updating"

    Abnormal is a sub-state of failed, where one or more workload pods is not in “Running” phase.


    "Stopped"

    -

    ClusterComponentService +

    ConfigurationItemDetailStatus

    -(Appears on:ClusterComponentSpec, Expose, LastComponentConfiguration) +(Appears on:ConfigurationStatus)

    @@ -2468,267 +7998,303 @@ string -

    Service name


    +

    name is a config template name.


    -serviceType
    +phase
    - -Kubernetes core/v1.ServiceType + +ConfigurationPhase (Optional) -

    serviceType determines how the Service is exposed. Valid
    options are ClusterIP, NodePort, and LoadBalancer.
    “ClusterIP” allocates a cluster-internal IP address for load-balancing
    to endpoints. Endpoints are determined by the selector or if that is not
    specified, they are determined by manual construction of an Endpoints object or
    EndpointSlice objects. If clusterIP is “None”, no virtual IP is
    allocated and the endpoints are published as a set of endpoints rather
    than a virtual IP.
    “NodePort” builds on ClusterIP and allocates a port on every node which
    routes to the same endpoints as the clusterIP.
    “LoadBalancer” builds on NodePort and creates an external load-balancer
    (if supported in the current cloud) which routes to the same endpoints
    as the clusterIP.
    More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types.


    +

    phase is status of configurationItem.


    -annotations
    +lastDoneRevision
    -map[string]string +string (Optional) -

    If ServiceType is LoadBalancer, cloud provider related parameters can be put here
    More info: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer.


    +

    lastDoneRevision is the last done revision of configurationItem.


    - - -

    ClusterComponentSpec -

    -

    -(Appears on:ClusterSpec) -

    -
    -

    ClusterComponentSpec defines the cluster component spec.


    -
    - - - - - - - - + +
    FieldDescription
    -name
    +updateRevision
    string
    -

    name defines cluster’s component name, this name is also part of Service DNS name, so this name will
    comply with IANA Service Naming rule.


    +(Optional) +

    updateRevision is the update revision of configurationItem.


    -componentDefRef
    +message
    string
    -

    componentDefRef references componentDef defined in ClusterDefinition spec. Need to
    comply with IANA Service Naming rule.


    +(Optional) +

    message field describes the reasons of abnormal status.


    -classDefRef
    +reconcileDetail
    - -ClassDefRef + +ReconcileDetail
    (Optional) -

    classDefRef references the class defined in ComponentClassDefinition.


    +

    reconcileDetail describes the details of the configuration change execution.


    +

    ConfigurationItemStatus +

    +

    +(Appears on:ReconfiguringStatus) +

    +
    +
    + + - - + + + + + +
    -monitor
    - -bool - -
    -(Optional) -

    monitor is a switch to enable monitoring and is set as false by default.
    KubeBlocks provides an extension mechanism to support component level monitoring,
    which will scrape metrics auto or manually from servers in component and export
    metrics to Time Series Database.


    -
    FieldDescription
    -enabledLogs
    +name
    -[]string +string
    -(Optional) -

    enabledLogs indicates which log file takes effect in the database cluster.
    element is the log type which is defined in cluster definition logConfig.name,
    and will set relative variables about this log type in database kernel.


    +

    name is a config template name.


    -replicas
    +updatePolicy
    -int32 + +UpgradePolicy +
    -

    Component replicas. The default value is used in ClusterDefinition spec if not specified.


    +(Optional) +

    updatePolicy describes the policy of reconfiguring.


    -affinity
    +status
    - -Affinity - +string
    (Optional) -

    affinity describes affinities specified by users.


    +

    status describes the current state of the reconfiguring state machine.


    -tolerations
    +message
    - -[]Kubernetes core/v1.Toleration - +string
    (Optional) -

    Component tolerations will override ClusterSpec.Tolerations if specified.


    +

    message describes the details about this operation.


    -resources
    +succeedCount
    - -Kubernetes core/v1.ResourceRequirements - +int32
    (Optional) -

    Resources requests and limits of workload.


    +

    succeedCount describes the number of successful reconfiguring.


    -volumeClaimTemplates
    +expectedCount
    - -[]ClusterComponentVolumeClaimTemplate - +int32
    (Optional) -

    volumeClaimTemplates information for statefulset.spec.volumeClaimTemplates.


    +

    expectedCount describes the number of expected reconfiguring.


    -services
    +lastStatus
    - -[]ClusterComponentService - +string
    (Optional) -

    Services expose endpoints that can be accessed by clients.


    +

    lastStatus describes the last status for the reconfiguring controller.


    -switchPolicy
    +lastAppliedConfiguration
    - -ClusterSwitchPolicy - +map[string]string
    (Optional) -

    switchPolicy defines the strategy for switchover and failover when workloadType is Replication.


    +

    LastAppliedConfiguration describes the last configuration.


    -tls
    +updatedParameters
    -bool + +UpdatedParameters +
    (Optional) -

    Enables or disables TLS certs.


    +

    updatedParameters describes the updated parameters.


    +

    ConfigurationPhase +(string alias)

    +

    +(Appears on:ConfigurationItemDetailStatus) +

    +
    +

    ConfigurationPhase defines the Configuration FSM phase


    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ValueDescription

    "Creating"

    "Deleting"

    "FailedAndPause"

    "FailedAndRetry"

    "Finished"

    "Init"

    "MergeFailed"

    "Merged"

    "Pending"

    "Running"

    "Upgrading"

    +

    ConfigurationSpec +

    +

    +(Appears on:Configuration) +

    +
    +

    ConfigurationSpec defines the desired state of Configuration


    +
    + + + + + + + +
    FieldDescription
    -issuer
    +clusterRef
    - -Issuer - +string
    -(Optional) -

    issuer defines provider context for TLS certs.
    required when TLS enabled


    +

    clusterRef references Cluster name.


    -serviceAccountName
    +componentName
    string
    -(Optional) -

    serviceAccountName is the name of the ServiceAccount that running component depends on.


    +

    componentName is cluster component name.


    -noCreatePDB
    +configItemDetails
    -bool + +[]ConfigurationItemDetail +
    (Optional) -

    noCreatePDB defines the PodDisruptionBudget creation behavior and is set to true if creation of PodDisruptionBudget
    for this component is not needed. It defaults to false.


    +

    customConfigurationItems describes user-defined config template.


    -

    ClusterComponentStatus +

    ConfigurationStatus

    -(Appears on:ClusterStatus) +(Appears on:Configuration)

    -

    ClusterComponentStatus records components status.


    +

    ConfigurationStatus defines the observed state of Configuration


    @@ -2740,94 +8306,108 @@ bool + +
    -phase
    +message
    - -ClusterComponentPhase - +string
    -

    phase describes the phase of the component and the detail information of the phases are as following:
    Running: the component is running. [terminal state]
    Stopped: the component is stopped, as no running pod. [terminal state]
    Failed: the component is unavailable, i.e. all pods are not ready for Stateless/Stateful component and
    Leader/Primary pod is not ready for Consensus/Replication component. [terminal state]
    Abnormal: the component is running but part of its pods are not ready.
    Leader/Primary pod is ready for Consensus/Replication component. [terminal state]
    Creating: the component has entered creating process.
    Updating: the component has entered updating process, triggered by Spec. updated.


    +(Optional) +

    message field describes the reasons of abnormal status.


    -message
    +observedGeneration
    - -ComponentMessageMap - +int64
    (Optional) -

    message records the component details message in current phase.
    Keys are podName or deployName or statefulSetName. The format is ObjectKind/Name.


    +

    observedGeneration is the latest generation observed for this
    ClusterDefinition. It refers to the ConfigConstraint’s generation, which is
    updated by the API Server.


    -podsReady
    +conditions
    -bool + +[]Kubernetes meta/v1.Condition +
    (Optional) -

    podsReady checks if all pods of the component are ready.


    +

    conditions describes opsRequest detail status.


    -podsReadyTime
    +configurationStatus
    - -Kubernetes meta/v1.Time + +[]ConfigurationItemDetailStatus
    -(Optional) -

    podsReadyTime what time point of all component pods are ready,
    this time is the ready time of the last component pod.


    +

    configurationStatus describes the status of the component reconfiguring.


    +

    ConnectionCredentialAuth +

    +

    +(Appears on:ServiceDescriptorSpec) +

    +
    +
    + + + + + + + +
    FieldDescription
    -consensusSetStatus
    +username
    - -ConsensusSetStatus + +CredentialVar
    (Optional) -

    consensusSetStatus specifies the mapping of role and pod name.


    +

    service connection based-on username and password credential.


    -replicationSetStatus
    +password
    - -ReplicationSetStatus + +CredentialVar
    (Optional) -

    replicationSetStatus specifies the mapping of role and pod name.


    +

    service connection based-on username and password credential.


    -

    ClusterComponentVersion +

    ConnectionCredentialKey

    -(Appears on:ClusterVersionSpec) +(Appears on:TargetInstance)

    -

    ClusterComponentVersion is an application version component spec.


    @@ -2839,76 +8419,56 @@ ReplicationSetStatus - - - -
    -componentDefRef
    +passwordKey
    string
    -

    componentDefRef reference one of the cluster component definition names in ClusterDefinition API (spec.componentDefs.name).


    -
    -configSpecs
    - - -[]ComponentConfigSpec - - -
    (Optional) -

    configSpecs defines a configuration extension mechanism to handle configuration differences between versions,
    the configTemplateRefs field, together with configTemplateRefs in the ClusterDefinition,
    determines the final configuration file.


    +

    the key of password in the ConnectionCredential secret.
    if not set, the default key is “password”.


    -systemAccountSpec
    +usernameKey
    - -SystemAccountShortSpec - +string
    (Optional) -

    systemAccountSpec define image for the component to connect database or engines.
    It overrides image and env attributes defined in ClusterDefinition.spec.componentDefs.systemAccountSpec.cmdExecutorConfig.
    To clean default envs settings, set SystemAccountSpec.CmdExecutorConfig.Env to empty list.


    +

    the key of username in the ConnectionCredential secret.
    if not set, the default key is “username”.


    -versionsContext
    +hostKey
    - -VersionsContext - +string
    -

    versionContext defines containers images’ context for component versions,
    this value replaces ClusterDefinition.spec.componentDefs.podSpec.[initContainers | containers]


    +

    hostKey specifies the map key of the host in the connection credential secret.


    -switchoverSpec
    +portKey
    - -SwitchoverShortSpec - +string
    -(Optional) -

    switchoverSpec defines images for the component to do switchover.
    It overrides image and env attributes defined in ClusterDefinition.spec.componentDefs.SwitchoverSpec.CommandExecutorEnvItem.


    +

    portKey specifies the map key of the port in the connection credential secret.


    -

    ClusterComponentVolumeClaimTemplate +

    ConsensusMember

    -(Appears on:ClusterComponentSpec) +(Appears on:ConsensusSetSpec)

    @@ -2916,85 +8476,52 @@ SwitchoverShortSpec Field -Description - - - - - -name
    - -string - - - -

    Reference ClusterDefinition.spec.componentDefs.containers.volumeMounts.name.


    - - - - -spec
    - - -PersistentVolumeClaimSpec - - - - -(Optional) -

    spec defines the desired characteristics of a volume requested by a pod author.


    -
    -
    - + + + + - -
    Description
    -accessModes
    +name
    - -[]Kubernetes core/v1.PersistentVolumeAccessMode - +string
    -(Optional) -

    accessModes contains the desired access modes the volume should have.
    More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1.


    +

    name, role name.


    -resources
    +accessMode
    - -Kubernetes core/v1.ResourceRequirements + +AccessMode
    -(Optional) -

    resources represents the minimum resources the volume should have.
    If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements
    that are lower than previous value but must still be higher than capacity recorded in the
    status field of the claim.
    More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources.


    +

    accessMode, what service this member capable.


    -storageClassName
    +replicas
    -string +int32
    (Optional) -

    storageClassName is the name of the StorageClass required by the claim.
    More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1.


    -
    +

    replicas, number of Pods of this role.
    default 1 for Leader
    default 0 for Learner
    default Cluster.spec.componentSpec[*].Replicas - Leader.Replicas - Learner.Replicas for Followers


    -

    ClusterDefinitionProbe +

    ConsensusSetSpec

    -(Appears on:ClusterDefinitionProbes) +(Appears on:ClusterComponentDefinition)

    @@ -3008,57 +8535,66 @@ string -periodSeconds
    +StatefulSetSpec
    -int32 + +StatefulSetSpec + -

    How often (in seconds) to perform the probe.


    +

    +(Members of StatefulSetSpec are embedded into this type.) +

    -timeoutSeconds
    +leader
    -int32 + +ConsensusMember + -

    Number of seconds after which the probe times out. Defaults to 1 second.


    +

    leader, one single leader.


    -failureThreshold
    +followers
    -int32 + +[]ConsensusMember + -

    Minimum consecutive failures for the probe to be considered failed after having succeeded.


    +(Optional) +

    followers, has voting right but not Leader.


    -commands
    +learner
    - -ClusterDefinitionProbeCMDs + +ConsensusMember (Optional) -

    commands used to execute for probe.


    +

    learner, no voting right.


    -

    ClusterDefinitionProbeCMDs +

    CredentialVar

    -(Appears on:ClusterDefinitionProbe) +(Appears on:ConnectionCredentialAuth, ServiceDescriptorSpec)

    @@ -3072,36 +8608,39 @@ ClusterDefinitionProbeCMDs -writes
    +value
    -[]string +string (Optional) -

    Write check executed on probe sidecar, used to check workload’s allow write access.


    +

    Variable references $(VAR_NAME) are expanded
    using the previously defined environment variables in the container and
    any service environment variables. If a variable cannot be resolved,
    the reference in the input string will be unchanged. Double $$ are reduced
    to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e.
    “$$(VAR_NAME)” will produce the string literal “$(VAR_NAME)”.
    Escaped references will never be expanded, regardless of whether the variable
    exists or not.
    Defaults to “”.


    -queries
    +valueFrom
    -[]string + +Kubernetes core/v1.EnvVarSource + (Optional) -

    Read check executed on probe sidecar, used to check workload’s readonly access.


    +

    Source for the environment variable’s value. Cannot be used if value is not empty.


    -

    ClusterDefinitionProbes +

    CredentialVarSelector

    -(Appears on:ClusterComponentDefinition) +(Appears on:VarSource)

    +

    CredentialVarSelector selects a var from a Credential (SystemAccount).


    @@ -3113,67 +8652,87 @@ ClusterDefinitionProbeCMDs + +
    -runningProbe
    +ClusterObjectReference
    - -ClusterDefinitionProbe + +ClusterObjectReference
    -(Optional) -

    Probe for DB running check.


    +

    +(Members of ClusterObjectReference are embedded into this type.) +

    +

    The Credential (SystemAccount) to select from.


    -statusProbe
    +CredentialVars
    - -ClusterDefinitionProbe + +CredentialVars
    -(Optional) -

    Probe for DB status check.


    +

    +(Members of CredentialVars are embedded into this type.) +

    +

    CredentialVars +

    +

    +(Appears on:CredentialVarSelector, ServiceRefVars) +

    +
    +

    CredentialVars defines the vars can be referenced from a Credential (SystemAccount).
    !!!!! CredentialVars will only be used as environment variables for Pods & Actions, and will not be used to render the templates.


    +
    + + + + + + + +
    FieldDescription
    -roleProbe
    +username
    - -ClusterDefinitionProbe + +VarOption
    (Optional) -

    Probe for DB role changed check.


    -roleProbeTimeoutAfterPodsReady
    +password
    -int32 + +VarOption +
    (Optional) -

    roleProbeTimeoutAfterPodsReady(in seconds), when all pods of the component are ready,
    it will detect whether the application is available in the pod.
    if pods exceed the InitializationTimeoutSeconds time without a role label,
    this component will enter the Failed/Abnormal phase.
    Note that this configuration will only take effect if the component supports RoleProbe
    and will not affect the life cycle of the pod. default values are 60 seconds.


    -

    ClusterDefinitionSpec +

    CustomLabelSpec

    -(Appears on:ClusterDefinition) +(Appears on:ClusterComponentDefinition)

    -

    ClusterDefinitionSpec defines the desired state of ClusterDefinition


    @@ -3185,50 +8744,47 @@ int32
    -type
    +key
    string
    -(Optional) -

    Cluster definition type defines well known application cluster type, e.g. mysql/redis/mongodb


    +

    key name of label


    -componentDefs
    +value
    - -[]ClusterComponentDefinition - +string
    -

    componentDefs provides cluster components definitions.


    +

    value of label


    -connectionCredential
    +resources
    -map[string]string + +[]GVKResource +
    -(Optional) -

    Connection credential template used for creating a connection credential
    secret for cluster.apps.kubeblocks.io object.



    Built-in objects are:
    - $(RANDOM_PASSWD) - random 8 characters.
    - $(UUID) - generate a random UUID v4 string.
    - $(UUID_B64) - generate a random UUID v4 BASE64 encoded string.
    - $(UUID_STR_B64) - generate a random UUID v4 string then BASE64 encoded.
    - $(UUID_HEX) - generate a random UUID v4 HEX representation.
    - $(HEADLESS_SVC_FQDN) - headless service FQDN placeholder, value pattern - $(CLUSTER_NAME)-$(1ST_COMP_NAME)-headless.$(NAMESPACE).svc,
    where 1ST_COMP_NAME is the 1st component that provide ClusterDefinition.spec.componentDefs[].service attribute;
    - $(SVC_FQDN) - service FQDN placeholder, value pattern - $(CLUSTER_NAME)-$(1ST_COMP_NAME).$(NAMESPACE).svc,
    where 1ST_COMP_NAME is the 1st component that provide ClusterDefinition.spec.componentDefs[].service attribute;
    - $(SVC_PORT_{PORT-NAME}) - a ServicePort’s port value with specified port name, i.e, a servicePort JSON struct:
    {"name": "mysql", "targetPort": "mysqlContainerPort", "port": 3306}, and “$(SVC_PORT_mysql)” in the
    connection credential value is 3306.


    +

    resources defines the resources to be labeled.


    -

    ClusterDefinitionStatus +

    CustomOpsSpec

    -(Appears on:ClusterDefinition) +(Appears on:OpsRequestSpec)

    -

    ClusterDefinitionStatus defines the observed state of ClusterDefinition


    @@ -3240,47 +8796,44 @@ map[string]string
    -phase
    +componentName
    - -Phase - +string
    -

    ClusterDefinition phase, valid values are empty, Available, ‘Unavailable`.
    Available is ClusterDefinition become available, and can be referenced for co-related objects.


    +

    cluster component name.


    -message
    +opsDefinitionRef
    string
    -(Optional) -

    Extra message in current phase


    +

    reference a opsDefinition


    -observedGeneration
    +params
    -int64 +[]string
    (Optional) -

    observedGeneration is the most recent generation observed for this
    ClusterDefinition. It corresponds to the ClusterDefinition’s generation, which is
    updated on mutation by the API Server.


    +

    the input for this operation declared in the opsDefinition.spec.parametersSchema.
    will create corresponding jobs for each array element.
    if the param type is array, the format must be “v1,v2,v3”.


    -

    ClusterMonitor +

    CustomParametersValidation

    -(Appears on:ClusterSpec) +(Appears on:ConfigConstraintSpec)

    @@ -3294,24 +8847,35 @@ int64 -monitoringInterval
    +schema
    - -Kubernetes api utils intstr.IntOrString + +Kubernetes api extensions v1.JSONSchemaProps +

    schema provides a way for providers to validate the changed parameters through json.


    + + + + +cue
    + +string + + + (Optional) -

    monitoringInterval specifies interval of monitoring, no monitor if set to 0


    +

    cue that to let provider verify user configuration through cue language.


    -

    ClusterNetwork +

    DownwardAPIOption

    -(Appears on:ClusterSpec) +(Appears on:ConfigConstraintSpec)

    @@ -3325,63 +8889,57 @@ Kubernetes api utils intstr.IntOrString -hostNetworkAccessible
    +name
    -bool +string -(Optional) -

    hostNetworkAccessible specifies whether host network is accessible. It defaults to false


    +

    Specify the name of the field.


    -publiclyAccessible
    +mountPoint
    -bool +string -(Optional) -

    publiclyAccessible specifies whether it is publicly accessible. It defaults to false


    +

    mountPoint is the mount point of the scripts file.


    - - -

    ClusterPhase -(string alias)

    -

    -(Appears on:ClusterStatus, OpsRequestBehaviour) -

    -
    -

    ClusterPhase defines the Cluster CR .status.phase


    -
    - - - - + + - - - - - - - - - - - - - - + + + + +
    ValueDescription +items
    + + +[]Kubernetes core/v1.DownwardAPIVolumeFile + + +
    +

    Items is a list of downward API volume file


    +

    "Abnormal"

    "Creating"

    Abnormal is a sub-state of failed, where one of the cluster components has “Failed” or “Abnormal” status phase.


    "Failed"

    "Running"

    REVIEW/TODO: AbnormalClusterPhase provides hybrid, consider remove it if possible


    "Updating"

    "Stopped"

    +command
    + +[]string + +
    +(Optional) +

    command used to execute for downwrad api.


    +
    -

    ClusterResourceConstraintSelector +

    EnvMappingVar

    -(Appears on:ComponentResourceConstraintSpec) +(Appears on:BackupMethod)

    @@ -3395,36 +8953,37 @@ bool -clusterDefRef
    +key
    string -

    clusterDefRef is the name of the cluster definition.


    +

    env key which needs to mapping.


    -components
    +valueFrom
    - -[]ComponentResourceConstraintSelector + +ValueFrom -

    selector is used to bind the resource constraint to components.


    +

    valueFrom defines source of the env value.


    -

    ClusterResources +

    EnvVar

    -(Appears on:ClusterSpec) +(Appears on:ComponentDefinitionSpec)

    +

    EnvVar represents a variable present in the env of Pod/Action or the template of config/script.


    @@ -3436,41 +8995,49 @@ string + + + +
    -cpu
    +name
    - -Kubernetes resource.Quantity - +string + +
    +

    Name of the variable. Must be a C_IDENTIFIER.


    +
    +value
    + +string
    (Optional) -

    cpu resource needed, more info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/


    +

    Variable references $(VAR_NAME) are expanded using the previously defined variables in the current context.
    If a variable cannot be resolved, the reference in the input string will be unchanged.
    Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e.
    “$$(VAR_NAME)” will produce the string literal “$(VAR_NAME)”.
    Escaped references will never be expanded, regardless of whether the variable exists or not.
    Defaults to “”.


    -memory
    +valueFrom
    - -Kubernetes resource.Quantity + +VarSource
    (Optional) -

    memory resource needed, more info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/


    +

    Source for the variable’s value. Cannot be used if value is not empty.


    -

    ClusterSpec +

    EnvVarRef

    -(Appears on:Cluster) +(Appears on:OpsVarSource)

    -

    ClusterSpec defines the desired state of Cluster.


    @@ -3482,200 +9049,297 @@ Kubernetes resource.Quantity + +
    -clusterDefinitionRef
    +containerName
    string
    -

    Cluster referencing ClusterDefinition name. This is an immutable attribute.


    +(Optional) +

    container name which defines in componentDefinition or is injected by kubeBlocks controller.
    if not specified, will use the first container by default.


    -clusterVersionRef
    +envName
    string
    -(Optional) -

    Cluster referencing ClusterVersion name.


    +

    env name, it will .


    +

    ExecAction +

    +

    +(Appears on:Action) +

    +
    +
    + + - - + + + + + +
    -terminationPolicy
    - - -TerminationPolicyType - - -
    -

    Cluster termination policy. Valid values are DoNotTerminate, Halt, Delete, WipeOut.
    DoNotTerminate will block delete operation.
    Halt will delete workload resources such as statefulset, deployment workloads but keep PVCs.
    Delete is based on Halt and deletes PVCs.
    WipeOut is based on Delete and wipe out all volume snapshots and snapshot data from backup storage location.


    -
    FieldDescription
    -componentSpecs
    +command
    - -[]ClusterComponentSpec - +[]string
    -

    List of componentSpecs you want to replace in ClusterDefinition and ClusterVersion. It will replace the field in ClusterDefinition’s and ClusterVersion’s component if type is matching.


    +(Optional) +

    Command is the command line to execute inside the container, the working directory for the
    command is root (‘/’) in the container’s filesystem. The command is simply exec’d, it is
    not run inside a shell, so traditional shell instructions (‘|’, etc) won’t work. To use
    a shell, you need to explicitly call out to that shell.
    Exit status of 0 is treated as live/healthy and non-zero is unhealthy.


    -tenancy
    +args
    - -TenancyType - +[]string
    (Optional) -

    tenancy describes how pods are distributed across node.
    SharedNode means multiple pods may share the same node.
    DedicatedNode means each pod runs on their own dedicated node.


    +

    args is used to perform statements.


    +

    ExporterConfig +

    +

    +(Appears on:MonitorConfig) +

    +
    +
    + + - - + + + + + +
    -availabilityPolicy
    - - -AvailabilityPolicyType - - -
    -(Optional) -

    availabilityPolicy describes the availability policy, including zone, node, and none.


    -
    FieldDescription
    -affinity
    +scrapePort
    - -Affinity + +Kubernetes api utils intstr.IntOrString
    -(Optional) -

    affinity is a group of affinity scheduling rules.


    +

    scrapePort is exporter port for Time Series Database to scrape metrics.


    -tolerations
    +scrapePath
    - -[]Kubernetes core/v1.Toleration - +string
    (Optional) -

    tolerations are attached to tolerate any taint that matches the triple key,value,effect using the matching operator operator.


    +

    scrapePath is exporter url path for Time Series Database to scrape metrics.


    +

    Expose +

    +

    +(Appears on:OpsRequestSpec) +

    +
    +
    + + + + + + + + + +
    FieldDescription
    -replicas
    +ComponentOps
    -int32 + +ComponentOps +
    -(Optional) -

    replicas specifies the replicas of the first componentSpec, if the replicas of the first componentSpec is specified, this value will be ignored.


    +

    +(Members of ComponentOps are embedded into this type.) +

    -resources
    +switch
    - -ClusterResources + +ExposeSwitch
    -(Optional) -

    resources specifies the resources of the first componentSpec, if the resources of the first componentSpec is specified, this value will be ignored.


    +

    switch defines the switch of expose operation.
    if switch is set to Enable, the service will be exposed. if switch is set to Disable, the service will be removed.


    -storage
    +services
    - -ClusterStorage + +[]OpsService
    -(Optional) -

    storage specifies the storage of the first componentSpec, if the storage of the first componentSpec is specified, this value will be ignored.


    +

    Setting the list of services to be exposed or removed.


    +

    ExposeSwitch +(string alias)

    +

    +(Appears on:Expose) +

    +
    +

    ExposeSwitch defines the switch of expose operation.


    +
    + + + + + + + + + + + + +
    ValueDescription

    "Disable"

    "Enable"

    +

    FailurePolicyType +(string alias)

    +

    +(Appears on:ComponentDefRef) +

    +
    +

    FailurePolicyType specifies the type of failure policy


    +
    + + + + + + + + + + + + +
    ValueDescription

    "Fail"

    ReportError means that an error will be reported.


    "Ignore"

    Ignore means that an error will be ignored but logged.


    +

    FormatterConfig +

    +

    +(Appears on:ConfigConstraintSpec) +

    +
    +
    + + + + + + + + + +
    FieldDescription
    -monitor
    +FormatterOptions
    - -ClusterMonitor + +FormatterOptions
    +

    +(Members of FormatterOptions are embedded into this type.) +

    (Optional) -

    monitor specifies the configuration of monitor


    +

    The FormatterOptions represents the special options of configuration file.
    This is optional for now. If not specified.


    -network
    +format
    - -ClusterNetwork + +CfgFileFormat
    -(Optional) -

    network specifies the configuration of network


    +

    The configuration file format. Valid values are ini, xml, yaml, json,
    hcl, dotenv, properties and toml.



    ini: a configuration file that consists of a text-based content with a structure and syntax comprising key–value pairs for properties, reference wiki: https://en.wikipedia.org/wiki/INI_file
    xml: reference wiki: https://en.wikipedia.org/wiki/XML
    yaml: a configuration file support for complex data types and structures.
    json: reference wiki: https://en.wikipedia.org/wiki/JSON
    hcl: : The HashiCorp Configuration Language (HCL) is a configuration language authored by HashiCorp, reference url: https://www.linode.com/docs/guides/introduction-to-hcl/
    dotenv: this was a plain text file with simple key–value pairs, reference wiki: https://en.wikipedia.org/wiki/Configuration_file#MS-DOS
    properties: a file extension mainly used in Java, reference wiki: https://en.wikipedia.org/wiki/.properties
    toml: reference wiki: https://en.wikipedia.org/wiki/TOML
    props-plus: a file extension mainly used in Java, support CamelCase(e.g: brokerMaxConnectionsPerIp)


    +

    FormatterOptions +

    +

    +(Appears on:FormatterConfig) +

    +
    +

    FormatterOptions represents the special options of configuration file.
    Only one of its members may be specified.


    +
    + + + + + + + +
    FieldDescription
    -backup
    +iniConfig
    - -ClusterBackup + +IniConfig
    (Optional) -

    cluster backup configuration.


    +

    iniConfig represents the ini options.


    -

    ClusterStatus +

    GVKResource

    -(Appears on:Cluster) +(Appears on:CustomLabelSpec)

    -

    ClusterStatus defines the observed state of Cluster.


    @@ -3687,119 +9351,151 @@ ClusterBackup + +
    -observedGeneration
    +gvk
    -int64 +string
    -(Optional) -

    observedGeneration is the most recent generation observed for this
    Cluster. It corresponds to the Cluster’s generation, which is
    updated on mutation by the API Server.


    +

    gvk is Group/Version/Kind, for example “v1/Pod”, “apps/v1/StatefulSet”, etc.
    when the gvk resource filtered by the selector already exists, if there is no corresponding custom label, it will be added, and if label already exists, it will be updated.


    -phase
    +selector
    - -ClusterPhase - +map[string]string
    (Optional) -

    phase describes the phase of the Cluster, the detail information of the phases are as following:
    Running: cluster is running, all its components are available. [terminal state]
    Stopped: cluster has stopped, all its components are stopped. [terminal state]
    Failed: cluster is unavailable. [terminal state]
    Abnormal: Cluster is still running, but part of its components are Abnormal/Failed. [terminal state]
    Creating: Cluster has entered creating process.
    Updating: Cluster has entered updating process, triggered by Spec. updated.


    +

    selector is a label query over a set of resources.


    +

    HScaleDataClonePolicyType +(string alias)

    +

    +(Appears on:HorizontalScalePolicy) +

    +
    +

    HScaleDataClonePolicyType defines data clone policy when horizontal scaling.


    +
    + + + + + + + + + + + + + + +
    ValueDescription

    "CloneVolume"

    "Snapshot"

    "None"

    +

    HTTPAction +

    +

    +(Appears on:Action) +

    +
    +

    HTTPAction describes an action based on HTTP requests.


    +
    + + + + + + + + - -
    FieldDescription
    -message
    +path
    string
    (Optional) -

    message describes cluster details message in current phase.


    +

    Path to access on the HTTP server.


    -components
    +port
    - -map[string]github.com/apecloud/kubeblocks/apis/apps/v1alpha1.ClusterComponentStatus + +Kubernetes api utils intstr.IntOrString
    -(Optional) -

    components record the current status information of all components of the cluster.


    +

    Name or number of the port to access on the container.
    Number must be in the range 1 to 65535.
    Name must be an IANA_SVC_NAME.


    -clusterDefGeneration
    +host
    -int64 +string
    (Optional) -

    clusterDefGeneration represents the generation number of ClusterDefinition referenced.


    +

    Host name to connect to, defaults to the pod IP. You probably want to set
    “Host” in httpHeaders instead.


    -conditions
    +scheme
    - -[]Kubernetes meta/v1.Condition + +Kubernetes core/v1.URIScheme
    (Optional) -

    Describe current state of cluster API Resource, like warning.


    +

    Scheme to use for connecting to the host.
    Defaults to HTTP.


    -

    ClusterStorage -

    -

    -(Appears on:ClusterSpec) -

    -
    -
    - - - - + + - -
    FieldDescription +method
    + +string + +
    +(Optional) +

    Method represents the HTTP request method, which can be one of the standard HTTP methods like “GET,” “POST,” “PUT,” etc.
    Defaults to Get.


    +
    -size
    +httpHeaders
    - -Kubernetes resource.Quantity + +[]Kubernetes core/v1.HTTPHeader
    (Optional) -

    storage size needed, more info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/


    +

    Custom headers to set in the request. HTTP allows repeated headers.


    -

    ClusterSwitchPolicy +

    HorizontalScalePolicy

    -(Appears on:ClusterComponentSpec) +(Appears on:ClusterComponentDefinition)

    @@ -3815,67 +9511,49 @@ Kubernetes resource.Quantity type
    - -SwitchPolicyType + +HScaleDataClonePolicyType (Optional) -

    clusterSwitchPolicy defines type of the switchPolicy when workloadType is Replication.
    MaximumAvailability: [WIP] when the primary is active, do switch if the synchronization delay = 0 in the user-defined lagProbe data delay detection logic, otherwise do not switch. The primary is down, switch immediately. It will be available in future versions.
    MaximumDataProtection: [WIP] when the primary is active, do switch if synchronization delay = 0 in the user-defined lagProbe data lag detection logic, otherwise do not switch. If the primary is down, if it can be judged that the primary and secondary data are consistent, then do the switch, otherwise do not switch. It will be available in future versions.
    Noop: KubeBlocks will not perform high-availability switching on components. Users need to implement HA by themselves or integrate open source HA solution.


    +

    type controls what kind of data synchronization do when component scale out.
    Policy is in enum of {None, CloneVolume}. The default policy is None.
    None: Default policy, create empty volume and no data clone.
    CloneVolume: Do data clone to newly scaled pods. Prefer to use volume snapshot first,
    and will try backup tool if volume snapshot is not enabled, finally
    report error if both above cannot work.
    Snapshot: Deprecated, alias for CloneVolume.


    - - -

    ClusterVersionSpec -

    -

    -(Appears on:ClusterVersion) -

    -
    -

    ClusterVersionSpec defines the desired state of ClusterVersion


    -
    - - - - - - - -
    FieldDescription
    -clusterDefinitionRef
    +backupPolicyTemplateName
    string
    -

    ref ClusterDefinition.


    +(Optional) +

    BackupPolicyTemplateName reference the backup policy template.


    -componentVersions
    +volumeMountsName
    - -[]ClusterComponentVersion - +string
    -

    List of components’ containers versioning context, i.e., container image ID, container commands, args., and environments.


    +(Optional) +

    volumeMountsName defines which volumeMount of the container to do backup,
    only work if Type is not None
    if not specified, the 1st volumeMount will be chosen


    -

    ClusterVersionStatus +

    HorizontalScaling

    -(Appears on:ClusterVersion) +(Appears on:OpsRequestSpec)

    -

    ClusterVersionStatus defines the observed state of ClusterVersion


    +

    HorizontalScaling defines the variables of horizontal scaling operation


    @@ -3887,63 +9565,62 @@ string
    -phase
    +ComponentOps
    - -Phase + +ComponentOps
    -(Optional) -

    phase - in list of [Available,Unavailable]


    +

    +(Members of ComponentOps are embedded into this type.) +

    -message
    +replicas
    -string +int32
    -(Optional) -

    A human readable message indicating details about why the ClusterVersion is in this phase.


    +

    replicas for the workloads.


    -observedGeneration
    +nodes
    -int64 +[]k8s.io/apimachinery/pkg/types.NodeName
    (Optional) -

    generation number


    +

    Nodes defines the list of nodes that pods can schedule when scale up
    If the RsmTransformPolicy is specified as ToPod and expected replicas is more than current replicas,the list of
    Nodes will be used. If the list of Nodes is empty, no specific node will be assigned. However, if the list of Nodes
    is filled, all pods will be evenly scheduled across the Nodes in the list when scale up.


    -clusterDefGeneration
    +instances
    -int64 +[]string
    (Optional) -

    clusterDefGeneration represents the generation number of ClusterDefinition referenced.


    +

    Instances defines the name of instance that rsm scale down priorly.
    If the RsmTransformPolicy is specified as ToPod and expected replicas is less than current replicas, the list of
    Instances will be used.
    current replicas - expected replicas > len(Instances): Scale down from the list of Instances priorly, the others
    will select from NodeAssignment.
    current replicas - expected replicas < len(Instances): Scale down from the list of Instances.
    current replicas - expected replicas < len(Instances): Scale down from a part of Instances.


    -

    CmdExecutorConfig +

    IniConfig

    -(Appears on:SwitchoverAction, SystemAccountSpec) +(Appears on:FormatterOptions)

    -

    CmdExecutorConfig specifies how to perform creation and deletion statements.


    @@ -3955,42 +9632,25 @@ int64 - - - -
    -CommandExecutorEnvItem
    - - -CommandExecutorEnvItem - - -
    -

    -(Members of CommandExecutorEnvItem are embedded into this type.) -

    -
    -CommandExecutorItem
    +sectionName
    - -CommandExecutorItem - +string
    -

    -(Members of CommandExecutorItem are embedded into this type.) -

    +(Optional) +

    sectionName describes ini section.


    -

    CommandExecutorEnvItem +

    Issuer

    -(Appears on:CmdExecutorConfig, SwitchoverShortSpec, SystemAccountShortSpec) +(Appears on:ClusterComponentSpec, TLSConfig)

    +

    Issuer defines Tls certs issuer


    @@ -4002,75 +9662,74 @@ CommandExecutorItem
    -image
    +name
    -string + +IssuerName +
    -

    image for Connector when executing the command.


    +

    Name of issuer.
    Options supported:
    - KubeBlocks - Certificates signed by KubeBlocks Operator.
    - UserProvided - User provided own CA-signed certificates.


    -env
    +secretRef
    - -[]Kubernetes core/v1.EnvVar + +TLSSecretRef
    (Optional) -

    envs is a list of environment variables.


    +

    secretRef. TLS certs Secret reference
    required when from is UserProvided


    -

    CommandExecutorItem -

    -

    -(Appears on:CmdExecutorConfig) -

    +

    IssuerName +(string alias)

    +

    +(Appears on:Issuer) +

    +
    +

    IssuerName defines Tls certs issuer name


    +
    + + + + + + + + + + + + +
    ValueDescription

    "KubeBlocks"

    IssuerKubeBlocks Certificates signed by KubeBlocks Operator.


    "UserProvided"

    IssuerUserProvided User provided own CA-signed certificates.


    +

    KBAccountType +(byte alias)

    +

    KBAccountType is used for bitwise operation.


    - + - - - - - - - - - - + + +
    FieldValue Description
    -command
    - -[]string - -
    -

    command to perform statements.


    -
    -args
    - -[]string - -
    -(Optional) -

    args is used to perform statements.


    -

    0

    -

    CommonBackupPolicy +

    LastComponentConfiguration

    -(Appears on:BackupPolicy) +(Appears on:LastConfiguration)

    @@ -4084,108 +9743,95 @@ string -BasePolicy
    +replicas
    - -BasePolicy - +int32 -

    -(Members of BasePolicy are embedded into this type.) -

    +(Optional) +

    replicas are the last replicas of the component.


    -backupToolName
    +ResourceRequirements
    -string + +Kubernetes core/v1.ResourceRequirements + -

    which backup tool to perform database backup, only support one tool.


    - - - - -

    ComponentClass -

    -(Appears on:ComponentClassDefinitionStatus, ComponentClassSeries) +(Members of ResourceRequirements are embedded into this type.)

    -
    -
    - - - - - +(Optional) +

    the last resources of the component.


    + - -
    FieldDescription
    -name
    +classDefRef
    -string + +ClassDefRef +
    (Optional) -

    name is the class name


    +

    classDefRef reference class defined in ComponentClassDefinition.


    -args
    +volumeClaimTemplates
    -[]string + +[]OpsRequestVolumeClaimTemplate +
    (Optional) -

    args are variable’s value


    +

    volumeClaimTemplates records the last volumeClaimTemplates of the component.


    -cpu
    +services
    - -Kubernetes resource.Quantity + +[]ClusterComponentService
    (Optional) -

    the CPU of the class


    +

    services records the last services of the component.


    -memory
    +targetResources
    - -Kubernetes resource.Quantity - +map[..ComponentResourceKey][]string
    (Optional) -

    the memory of the class


    +

    targetResources records the affecting target resources information for the component.
    resource key is in list of [pods].


    -

    ComponentClassDefinitionSpec +

    LastConfiguration

    -(Appears on:ComponentClassDefinition) +(Appears on:OpsRequestStatus)

    -

    ComponentClassDefinitionSpec defines the desired state of ComponentClassDefinition


    @@ -4197,27 +9843,38 @@ Kubernetes resource.Quantity + + + +
    -groups
    +clusterVersionRef
    - -[]ComponentClassGroup +string + +
    +(Optional) +

    clusterVersionRef references ClusterVersion name.


    +
    +components
    + + +map[string]..LastComponentConfiguration
    (Optional) -

    group defines a list of class series that conform to the same constraint.


    +

    components records last configuration of the component.


    -

    ComponentClassDefinitionStatus +

    LegacyRenderedTemplateSpec

    -(Appears on:ComponentClassDefinition) +(Appears on:ComponentConfigSpec)

    -

    ComponentClassDefinitionStatus defines the observed state of ComponentClassDefinition


    @@ -4229,35 +9886,48 @@ Kubernetes resource.Quantity - - - -
    -observedGeneration
    - -int64 - -
    -(Optional) -

    observedGeneration is the most recent generation observed for this
    ComponentClassDefinition. It corresponds to the ComponentClassDefinition’s generation, which is
    updated on mutation by the API Server.


    -
    -classes
    +ConfigTemplateExtension
    - -[]ComponentClass + +ConfigTemplateExtension
    -

    classes is the list of classes that have been observed for this ComponentClassDefinition


    +

    +(Members of ConfigTemplateExtension are embedded into this type.) +

    -

    ComponentClassGroup +

    LetterCase +(string alias)

    +

    +(Appears on:PasswordConfig) +

    +
    +

    LetterCase defines cases to use in password generation.


    +
    + + + + + + + + + + + + + + +
    ValueDescription

    "LowerCases"

    "MixedCases"

    "UpperCases"

    +

    LifecycleActionHandler

    -(Appears on:ComponentClassDefinitionSpec) +(Appears on:ComponentLifecycleActions, RoleProbe)

    @@ -4271,48 +9941,38 @@ int64 -template
    - -string - - - -(Optional) -

    template is a class definition template that uses the Go template syntax and allows for variable declaration.
    When defining a class in Series, specifying the variable’s value is sufficient, as the complete class
    definition will be generated through rendering the template.



    For example:
    template: |
    cpu: “{{ or .cpu 1 }}”
    memory: “{{ or .memory 4 }}Gi”


    - - - - -vars
    +builtinHandler
    -[]string + +BuiltinActionHandlerType + (Optional) -

    vars defines the variables declared in the template and will be used to generating the complete class definition by
    render the template.


    +

    builtinHandler specifies the builtin action handler name to do the action.
    the BuiltinHandler within the same ComponentLifecycleActions should be consistent. Details can be queried through official documentation in the future.
    use CustomHandler to define your own actions if none of them satisfies the requirement.


    -series
    +customHandler
    - -[]ComponentClassSeries + +Action (Optional) -

    series is a series of class definitions.


    +

    customHandler defines the custom way to do action.


    -

    ComponentClassSeries +

    LogConfig

    -(Appears on:ComponentClassGroup) +(Appears on:ClusterComponentDefinition, ComponentDefinitionSpec)

    @@ -4326,36 +9986,32 @@ string -namingTemplate
    +name
    string -(Optional) -

    namingTemplate is a template that uses the Go template syntax and allows for referencing variables defined
    in ComponentClassGroup.Template. This enables dynamic generation of class names.
    For example:
    name: “general-{{ .cpu }}c{{ .memory }}g”


    +

    name log type name, such as slow for MySQL slow log file.


    -classes
    +filePathPattern
    - -[]ComponentClass - +string -(Optional) -

    classes are definitions of classes that come in two forms. In the first form, only ComponentClass.Args
    need to be defined, and the complete class definition is generated by rendering the ComponentClassGroup.Template
    and Name. In the second form, the Name, CPU and Memory must be defined.


    +

    filePathPattern log file path pattern which indicate how to find this file
    corresponding to variable (log path) in database kernel. please don’t set this casually.


    -

    ComponentConfigSpec +

    MemoryConstraint

    -(Appears on:ClusterComponentDefinition, ClusterComponentVersion) +(Appears on:ResourceConstraintRule)

    @@ -4369,78 +10025,79 @@ string -ComponentTemplateSpec
    +sizePerCPU
    - -ComponentTemplateSpec + +Kubernetes resource.Quantity -

    -(Members of ComponentTemplateSpec are embedded into this type.) -

    - - - - -keys
    - -[]string - - - (Optional) -

    Specify a list of keys.
    If empty, ConfigConstraint takes effect for all keys in configmap.


    +

    The size of memory per vcpu core.
    For example: 1Gi, 200Mi.
    If SizePerCPU is specified, MinPerCPU and MaxPerCPU are ignore.


    -lazyRenderedConfigSpec
    +maxPerCPU
    - -LazyRenderedTemplateSpec + +Kubernetes resource.Quantity (Optional) -

    lazyRenderedConfigSpec is optional: specify the secondary rendered config spec.


    - - - - -constraintRef
    - -string - - - -(Optional) -

    Specify the name of the referenced the configuration constraints object.


    +

    The maximum size of memory per vcpu core, [MinPerCPU, MaxPerCPU] defines a range for valid memory size per vcpu core.
    It is useful on GCP as the ratio between the CPU and memory may be a range.
    If SizePerCPU is specified, MinPerCPU and MaxPerCPU are ignored.
    Reference: https://cloud.google.com/compute/docs/general-purpose-machines#custom_machine_types


    -asEnvFrom
    +minPerCPU
    -[]string + +Kubernetes resource.Quantity + (Optional) -

    asEnvFrom is optional: the list of containers will be injected into EnvFrom.


    +

    The minimum size of memory per vcpu core, [MinPerCPU, MaxPerCPU] defines a range for valid memory size per vcpu core.
    It is useful on GCP as the ratio between the CPU and memory may be a range.
    If SizePerCPU is specified, MinPerCPU and MaxPerCPU are ignored.
    Reference: https://cloud.google.com/compute/docs/general-purpose-machines#custom_machine_types


    -

    ComponentDefRef +

    MergedPolicy +(string alias)

    +

    +(Appears on:ConfigTemplateExtension) +

    +
    +

    MergedPolicy defines how to merge external imported templates into component templates.


    +
    + + + + + + + + + + + + + + + + +
    ValueDescription

    "none"

    "add"

    "patch"

    "replace"

    +

    MonitorConfig

    -(Appears on:ClusterComponentDefinition) +(Appears on:ClusterComponentDefinition, ComponentDefinitionSpec)

    -

    ComponentDefRef is used to select the component and its fields to be referenced.


    @@ -4452,63 +10109,38 @@ string - - - -
    -componentDefName
    - -string - -
    -

    componentDefName is the name of the componentDef to select.


    -
    -failurePolicy
    +builtIn
    - -FailurePolicyType - +bool
    (Optional) -

    failurePolicy is the failure policy of the component.
    If failed to find the component, the failure policy will be used.


    +

    builtIn is a switch to enable KubeBlocks builtIn monitoring.
    If BuiltIn is set to true, monitor metrics will be scraped automatically.
    If BuiltIn is set to false, the provider should set ExporterConfig and Sidecar container own.


    -componentRefEnv
    +exporterConfig
    - -[]ComponentRefEnv + +ExporterConfig
    (Optional) -

    componentRefEnv specifies a list of values to be injected as env variables to each component.


    +

    exporterConfig provided by provider, which specify necessary information to Time Series Database.
    exporterConfig is valid when builtIn is false.


    -

    ComponentMessageMap -(map[string]string alias)

    -

    -(Appears on:ClusterComponentStatus) -

    -
    -
    -

    ComponentNameSet -(map[string]struct{} alias)

    -
    -
    -

    ComponentOps +

    NamedVar

    -(Appears on:Expose, HorizontalScaling, OpsRequestSpec, Reconfigure, ScriptSpec, Switchover, VerticalScaling, VolumeExpansion) +(Appears on:ServiceVars)

    -

    ComponentOps defines the common variables of component scope operations.


    @@ -4520,24 +10152,37 @@ FailurePolicyType + + + +
    -componentName
    +name
    string
    -

    componentName cluster component name.


    +(Optional) +
    +option
    + + +VarOption + + +
    +(Optional)
    -

    ComponentRefEnv +

    OpsDefinitionSpec

    -(Appears on:ComponentDefRef) +(Appears on:OpsDefinition)

    -

    ComponentRefEnv specifies name and value of an env.


    +

    OpsDefinitionSpec defines the desired state of OpsDefinition


    @@ -4549,49 +10194,81 @@ string + + + + + + + +
    -name
    +componentDefinitionRefs
    -string + +[]ComponentDefinitionRef +
    -

    name is the name of the env to be injected, and it must be a C identifier.


    +

    componentDefinitionRefs indicates which types of componentDefinitions are supported by the operation,
    and can refer some vars of the componentDefinition.
    if it is set, the component that does not meet the conditions will be intercepted.


    -value
    +varsRef
    -string + +VarsRef +
    (Optional) -

    value is the value of the env to be injected.


    +

    varsRef defines the envs that need to be referenced from the target component pod, and will inject to job’s containers.


    -valueFrom
    +parametersSchema
    - -ComponentValueFrom + +ParametersSchema
    (Optional) -

    valueFrom specifies the source of the env to be injected.


    +

    parametersSchema describes the schema used for validation, pruning, and defaulting.


    +
    +jobSpec
    + + +Kubernetes batch/v1.JobSpec + + +
    +

    jobSpec describes the job spec for the operation.


    +
    +preConditions
    + + +[]PreCondition + + +
    +(Optional) +

    preCondition if it meets the requirements to run the job for the operation.


    -

    ComponentResourceConstraintSelector +

    OpsDefinitionStatus

    -(Appears on:ClusterResourceConstraintSelector) +(Appears on:OpsDefinition)

    +

    OpsDefinitionStatus defines the observed state of OpsDefinition


    @@ -4603,35 +10280,50 @@ ComponentValueFrom + + + +
    -componentDefRef
    +observedGeneration
    -string +int64
    -

    componentDefRef is the name of the component definition in the cluster definition.


    +(Optional) +

    ObservedGeneration is the most recent generation observed for this OpsDefinition.


    -rules
    +phase
    -[]string + +Phase +
    -

    rules are the constraint rules that will be applied to the component.


    +(Optional) +

    Phase valid values are `,Available, 'Unavailable.
    Available is OpsDefinition become available, and can be used for co-related objects.


    +
    +message
    + +string + +
    +(Optional) +

    Extra message for current phase.


    -

    ComponentResourceConstraintSpec +

    OpsEnvVar

    -(Appears on:ComponentResourceConstraint) +(Appears on:VarsRef)

    -

    ComponentResourceConstraintSpec defines the desired state of ComponentResourceConstraint


    @@ -4643,37 +10335,37 @@ string
    -rules
    +name
    - -[]ResourceConstraintRule - +string
    -

    Component resource constraint rules.


    +

    Name of the variable. Must be a C_IDENTIFIER.


    -selector
    +valueFrom
    - -[]ClusterResourceConstraintSelector + +OpsVarSource
    -(Optional) -

    selector is used to bind the resource constraint to cluster definitions.


    +

    Source for the variable’s value. Cannot be used if value is not empty.


    -

    ComponentResourceKey +

    OpsPhase (string alias)

    +

    +(Appears on:OpsRequestStatus) +

    -

    ComponentResourceKey defines the resource key of component, such as pod/pvc.


    +

    OpsPhase defines opsRequest phase.


    @@ -4682,15 +10374,24 @@ string - + + + + + + + + + + + + +
    Description

    "pods"

    "Cancelled"

    "Cancelling"

    "Creating"

    "Failed"

    "Pending"

    "Running"

    "Succeed"

    -

    ComponentTemplateSpec +

    OpsRecorder

    -

    -(Appears on:ClusterComponentDefinition, ComponentConfigSpec) -

    @@ -4709,61 +10410,77 @@ string + +
    -

    Specify the name of configuration template.


    +

    name OpsRequest name


    -templateRef
    +type
    -string + +OpsType +
    -

    Specify the name of the referenced the configuration template ConfigMap object.


    +

    opsRequest type


    -namespace
    +inQueue
    -string +bool
    -(Optional) -

    Specify the namespace of the referenced the configuration template ConfigMap object.
    An empty namespace is equivalent to the “default” namespace.


    +

    indicates whether the current opsRequest is in the queue


    +

    OpsRequestBehaviour +

    +
    +
    + + + + + + + +
    FieldDescription
    -volumeName
    +FromClusterPhases
    -string + +[]ClusterPhase +
    -

    volumeName is the volume name of PodTemplate, which the configuration file produced through the configuration
    template will be mounted to the corresponding volume. Must be a DNS_LABEL name.
    The volume name must be defined in podSpec.containers[*].volumeMounts.


    -defaultMode
    +ToClusterPhase
    -int32 + +ClusterPhase +
    -(Optional) -

    defaultMode is optional: mode bits used to set permissions on created files by default.
    Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
    YAML accepts both octal and decimal values, JSON requires decimal values for mode bits.
    Defaults to 0644.
    Directories within the path are not affected by this setting.
    This might be in conflict with other options that affect the file
    mode, like fsGroup, and the result can be other mode bits set.


    -

    ComponentValueFrom +

    OpsRequestComponentStatus

    -(Appears on:ComponentRefEnv) +(Appears on:OpsRequestStatus)

    @@ -4773,112 +10490,97 @@ int32 Field Description - - + + + + +phase
    + + +ClusterComponentPhase + + + + +(Optional) +

    phase describes the component phase, reference Cluster.status.component.phase.


    + + + + +lastFailedTime
    + + +Kubernetes meta/v1.Time + + + + +(Optional) +

    lastFailedTime is the last time the component phase transitioned to Failed or Abnormal.


    + + -type
    +progressDetails
    - -ComponentValueFromType + +[]ProgressStatusDetail -

    type is the type of the source to select. There are three types: FieldRef, ServiceRef, HeadlessServiceRef.


    +(Optional) +

    progressDetails describes the progress details of the component for this operation.


    -fieldPath
    +workloadType
    -string + +WorkloadType + (Optional) -

    fieldRef is the jsonpath of the source to select when type is FieldRef.
    there are two objects registered in the jsonpath: componentDef and components.
    componentDef is the component definition object specified in componentRef.componentDefName.
    components is the component list objects referring to the component definition object.


    +

    workloadType references workload type of component in ClusterDefinition.


    -format
    +reason
    string (Optional) -

    format is the format of each headless service address.
    there are three builtin variables can be used as placerholder: $POD_ORDINAL, $POD_FQDN, $POD_NAME
    $POD_ORDINAL is the ordinal of the pod.
    $POD_FQDN is the fully qualified domain name of the pod.
    $POD_NAME is the name of the pod


    +

    reason describes the reason for the component phase.


    -joinWith
    +message
    string (Optional) -

    joinWith is the string to join the values of headless service addresses.


    +

    message is a human-readable message indicating details about this operation.


    -

    ComponentValueFromType -(string alias)

    -

    -(Appears on:ComponentValueFrom) -

    -
    -

    ComponentValueFromType specifies the type of component value from.


    -
    - - - - - - - - - - - - - - -
    ValueDescription

    "FieldRef"

    "HeadlessServiceRef"

    "ServiceRef"

    -

    ConfigConstraintPhase -(string alias)

    -

    -(Appears on:ConfigConstraintStatus) -

    -
    -

    ConfigConstraintPhase defines the ConfigConstraint CR .status.phase


    -
    - - - - - - - - - - - - - - -
    ValueDescription

    "Available"

    "Deleting"

    "Unavailable"

    -

    ConfigConstraintSpec +

    OpsRequestSpec

    -(Appears on:ConfigConstraint) +(Appears on:OpsRequest)

    -

    ConfigConstraintSpec defines the desired state of ConfigConstraint


    +

    OpsRequestSpec defines the desired state of OpsRequest


    @@ -4890,267 +10592,267 @@ string - -
    -reloadOptions
    +clusterRef
    - -ReloadOptions - +string
    -(Optional) -

    reloadOptions indicates whether the process supports reload.
    if set, the controller will determine the behavior of the engine instance based on the configuration templates,
    restart or reload depending on whether any parameters in the StaticParameters have been modified.


    +

    clusterRef references cluster object.


    -toolsImageSpec
    +cancel
    - -ToolsImageSpec - +bool
    (Optional) -

    toolConfig used to config init container.


    +

    cancel defines the action to cancel the Pending/Creating/Running opsRequest, supported types: [VerticalScaling, HorizontalScaling].
    once cancel is set to true, this opsRequest will be canceled and modifying this property again will not take effect.


    -downwardAPIOptions
    +type
    - -[]DownwardAPIOption + +OpsType
    -(Optional) -

    downwardAPIOptions is used to watch pod fields.


    +

    type defines the operation type.


    -scriptConfigs
    +ttlSecondsAfterSucceed
    - -[]ScriptConfig - +int32
    (Optional) -

    scriptConfigs, list of ScriptConfig, witch these scripts can be used by volume trigger,downward trigger, or tool image


    +

    ttlSecondsAfterSucceed OpsRequest will be deleted after TTLSecondsAfterSucceed second when OpsRequest.status.phase is Succeed.


    -cfgSchemaTopLevelName
    +upgrade
    -string + +Upgrade +
    (Optional) -

    cfgSchemaTopLevelName is cue type name, which generates openapi schema.


    +

    upgrade specifies the cluster version by specifying clusterVersionRef.


    -configurationSchema
    +horizontalScaling
    - -CustomParametersValidation + +[]HorizontalScaling
    (Optional) -

    configurationSchema imposes restrictions on database parameter’s rule.


    +

    horizontalScaling defines what component need to horizontal scale the specified replicas.


    -staticParameters
    +volumeExpansion
    -[]string + +[]VolumeExpansion +
    (Optional) -

    staticParameters, list of StaticParameter, modifications of them trigger a process restart.


    +

    volumeExpansion defines what component and volumeClaimTemplate need to expand the specified storage.


    -dynamicParameters
    +restart
    -[]string + +[]ComponentOps +
    (Optional) -

    dynamicParameters, list of DynamicParameter, modifications of them trigger a config dynamic reload without process restart.


    +

    restart the specified components.


    -immutableParameters
    +switchover
    -[]string + +[]Switchover +
    (Optional) -

    immutableParameters describes parameters that prohibit user from modification.


    +

    switchover the specified components.


    -selector
    +verticalScaling
    - -Kubernetes meta/v1.LabelSelector + +[]VerticalScaling
    -

    selector is used to match the label on the pod,
    for example, a pod of the primary is match on the patroni cluster.


    +(Optional) +

    verticalScaling defines what component need to vertical scale the specified compute resources.


    -formatterConfig
    +reconfigure
    - -FormatterConfig + +Reconfigure
    -

    formatterConfig describes the format of the configuration file, the controller
    1. parses configuration file
    2. analyzes the modified parameters
    3. applies corresponding policies.


    +(Optional) +

    reconfigure defines the variables that need to input when updating configuration.


    -

    ConfigConstraintStatus -

    -

    -(Appears on:ConfigConstraint) -

    -
    -

    ConfigConstraintStatus defines the observed state of ConfigConstraint.


    -
    - - - - + + - - - -
    FieldDescription +reconfigures
    + + +[]Reconfigure + + +
    +(Optional) +

    reconfigure defines the variables that need to input when updating configuration.


    +
    -phase
    +expose
    - -ConfigConstraintPhase + +[]Expose
    (Optional) -

    phase is status of configuration template, when set to CCAvailablePhase, it can be referenced by ClusterDefinition or ClusterVersion.


    +

    expose defines services the component needs to expose.


    -message
    +restoreFrom
    -string + +RestoreFromSpec +
    (Optional) -

    message field describes the reasons of abnormal status.


    +

    cluster RestoreFrom backup or point in time


    -observedGeneration
    +ttlSecondsBeforeAbort
    -int64 +int32
    (Optional) -

    observedGeneration is the latest generation observed for this
    ClusterDefinition. It refers to the ConfigConstraint’s generation, which is
    updated by the API Server.


    +

    ttlSecondsBeforeAbort OpsRequest will wait at most TTLSecondsBeforeAbort seconds for start-conditions to be met.
    If not specified, the default value is 0, which means that the start-conditions must be met immediately.


    -

    Configuration -

    -

    -(Appears on:Reconfigure) -

    -
    -
    - - - - + + - -
    FieldDescription +scriptSpec
    + + +ScriptSpec + + +
    +(Optional) +

    scriptSpec defines the script to be executed.


    +
    -name
    +backupSpec
    -string + +BackupSpec +
    -

    name is a config template name.


    +(Optional) +

    backupSpec defines how to backup the cluster.


    -policy
    +restoreSpec
    - -UpgradePolicy + +RestoreSpec
    (Optional) -

    policy defines the upgrade policy.


    +

    restoreSpec defines how to restore the cluster.
    note that this restore operation will roll back cluster services.


    -keys
    +customSpec
    - -[]ParameterConfig + +CustomOpsSpec
    -

    keys is used to set the parameters to be updated.


    -

    ConfigurationStatus +

    OpsRequestStatus

    -(Appears on:ReconfiguringStatus) +(Appears on:OpsRequest)

    +

    OpsRequestStatus defines the observed state of OpsRequest


    @@ -5162,150 +10864,157 @@ UpgradePolicy - -
    -name
    +clusterGeneration
    -string +int64
    -

    name is a config template name.


    +(Optional) +

    ClusterGeneration records the cluster generation after handling the opsRequest action.


    -updatePolicy
    +phase
    - -UpgradePolicy + +OpsPhase
    -(Optional) -

    updatePolicy describes the policy of reconfiguring.


    +

    phase describes OpsRequest phase.


    -status
    +progress
    string
    -(Optional) -

    status describes the current state of the reconfiguring state machine.


    -succeedCount
    +lastConfiguration
    -int32 + +LastConfiguration +
    (Optional) -

    succeedCount describes the number of successful reconfiguring.


    +

    lastConfiguration records the last configuration before this operation take effected.


    -expectedCount
    +components
    -int32 + +map[string]..OpsRequestComponentStatus +
    (Optional) -

    expectedCount describes the number of expected reconfiguring.


    +

    components defines the recorded the status information of changed components for operation request.


    -lastStatus
    +startTimestamp
    -string + +Kubernetes meta/v1.Time +
    (Optional) -

    lastStatus describes the last status for the reconfiguring controller.


    +

    startTimestamp The time when the OpsRequest started processing.


    -lastAppliedConfiguration
    +completionTimestamp
    -map[string]string + +Kubernetes meta/v1.Time +
    (Optional) -

    LastAppliedConfiguration describes the last configuration.


    +

    completionTimestamp defines the OpsRequest completion time.


    -updatedParameters
    +cancelTimestamp
    - -UpdatedParameters + +Kubernetes meta/v1.Time
    (Optional) -

    updatedParameters describes the updated parameters.


    +

    CancelTimestamp defines cancel time.


    -

    ConnectionCredentialKey -

    -

    -(Appears on:TargetInstance) -

    -
    -
    - - - - + + - -
    FieldDescription +reconfiguringStatus
    + + +ReconfiguringStatus + + +
    +(Optional) +

    reconfiguringStatus defines the status information of reconfiguring.


    +
    -passwordKey
    +reconfiguringStatusAsComponent
    -string + +map[string]*..ReconfiguringStatus +
    (Optional) -

    the key of password in the ConnectionCredential secret.
    if not set, the default key is “password”.


    +

    reconfiguringStatus defines the status information of reconfiguring.


    -usernameKey
    +conditions
    -string + +[]Kubernetes meta/v1.Condition +
    (Optional) -

    the key of username in the ConnectionCredential secret.
    if not set, the default key is “username”.


    +

    conditions describes opsRequest detail status.


    -

    ConsensusMember +

    OpsRequestVolumeClaimTemplate

    -(Appears on:ConsensusSetSpec) +(Appears on:LastComponentConfiguration, VolumeExpansion)

    @@ -5319,46 +11028,34 @@ string -name
    - -string - - - -

    name, role name.


    - - - - -accessMode
    +storage
    - -AccessMode + +Kubernetes resource.Quantity -

    accessMode, what service this member capable.


    +

    Request storage size.


    -replicas
    +name
    -int32 +string -(Optional) -

    replicas, number of Pods of this role.
    default 1 for Leader
    default 0 for Learner
    default Cluster.spec.componentSpec[*].Replicas - Leader.Replicas - Learner.Replicas for Followers


    +

    name references volumeClaimTemplate name from cluster components.


    -

    ConsensusMemberStatus +

    OpsService

    -(Appears on:ConsensusSetStatus) +(Appears on:Expose)

    @@ -5378,112 +11075,154 @@ string -

    Defines the role name.


    +

    Name defines the name of the service.
    otherwise, it indicates the name of the service.
    Others can refer to this service by its name. (e.g., connection credential)
    Cannot be updated.


    -accessMode
    +annotations
    - -AccessMode - +map[string]string -

    accessMode defines what service this pod provides.


    +(Optional) +

    If ServiceType is LoadBalancer, cloud provider related parameters can be put here
    More info: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer.


    -pod
    +ports
    -string + +[]Kubernetes core/v1.ServicePort + -

    Pod name.


    +(Optional) +

    The list of ports that are exposed by this service.
    If Ports are not provided, the default Services Ports defined in the ClusterDefinition or ComponentDefinition that are neither of NodePort nor LoadBalancer service type will be used.
    If there is no corresponding Service defined in the ClusterDefinition or ComponentDefinition, the expose operation will fail.
    More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies


    - - -

    ConsensusSetSpec -

    -

    -(Appears on:ClusterComponentDefinition) -

    -
    -
    - - - - - - - - + +
    FieldDescription
    -StatefulSetSpec
    +roleSelector
    - -StatefulSetSpec - +string
    -

    -(Members of StatefulSetSpec are embedded into this type.) -

    +(Optional) +

    RoleSelector extends the ServiceSpec.Selector by allowing you to specify defined role as selector for the service.


    -leader
    +selector
    - -ConsensusMember - +map[string]string
    -

    leader, one single leader.


    +(Optional) +

    Route service traffic to pods with label keys and values matching this
    selector. If empty or not present, the service is assumed to have an
    external process managing its endpoints, which Kubernetes will not
    modify. Only applies to types ClusterIP, NodePort, and LoadBalancer.
    Ignored if type is ExternalName.
    More info: https://kubernetes.io/docs/concepts/services-networking/service/


    -followers
    +serviceType
    - -[]ConsensusMember + +Kubernetes core/v1.ServiceType
    (Optional) -

    followers, has voting right but not Leader.


    +

    type determines how the Service is exposed. Defaults to ClusterIP. Valid
    options are ExternalName, ClusterIP, NodePort, and LoadBalancer.
    “ClusterIP” allocates a cluster-internal IP address for load-balancing
    to endpoints. Endpoints are determined by the selector or if that is not
    specified, by manual construction of an Endpoints object or
    EndpointSlice objects. If clusterIP is “None”, no virtual IP is
    allocated and the endpoints are published as a set of endpoints rather
    than a virtual IP.
    “NodePort” builds on ClusterIP and allocates a port on every node which
    routes to the same endpoints as the clusterIP.
    “LoadBalancer” builds on NodePort and creates an external load-balancer
    (if supported in the current cloud) which routes to the same endpoints
    as the clusterIP.
    “ExternalName” aliases this service to the specified externalName.
    Several other fields do not apply to ExternalName services.
    More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types


    +

    OpsType +(string alias)

    +

    +(Appears on:OpsRecorder, OpsRequestSpec) +

    +
    +

    OpsType defines operation types.


    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ValueDescription

    "Backup"

    DataScriptType the data script operation will execute the data script against the cluster.


    "Custom"

    "DataScript"

    "Expose"

    StartType the start operation will start the pods which is deleted in stop operation.


    "HorizontalScaling"

    "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) +

    +
    +
    + + + + + + + +
    FieldDescription
    -learner
    +envVarRef
    - -ConsensusMember + +EnvVarRef
    -(Optional) -

    learner, no voting right.


    +

    envVarRef defines which container and env that the variable references from.
    source: “env” or “envFrom” of the container.


    -

    ConsensusSetStatus +

    ParameterConfig

    -(Appears on:ClusterComponentStatus) +(Appears on:ConfigurationItem)

    @@ -5497,51 +11236,47 @@ ConsensusMember -leader
    +key
    - -ConsensusMemberStatus - +string -

    Leader status.


    +

    key indicates the key name of ConfigMap.


    -followers
    +parameters
    - -[]ConsensusMemberStatus + +[]ParameterPair (Optional) -

    Followers status.


    +

    Setting the list of parameters for a single configuration file.
    update specified the parameters.


    -learner
    +fileContent
    - -ConsensusMemberStatus - +string (Optional) -

    Learner status.


    +

    fileContent indicates the configuration file content.
    update whole file.


    -

    CustomLabelSpec +

    ParameterPair

    -(Appears on:ClusterComponentDefinition) +(Appears on:ParameterConfig)

    @@ -5561,7 +11296,7 @@ string -

    key name of label


    +

    key is name of the parameter to be updated.


    @@ -5572,28 +11307,16 @@ string -

    value of label


    - - - - -resources
    - - -[]GVKResource - - - - -

    resources defines the resources to be labeled.


    +(Optional) +

    parameter values to be updated.
    if set nil, the parameter defined by the key field will be deleted from the configuration file.


    -

    CustomParametersValidation +

    ParametersSchema

    -(Appears on:ConfigConstraintSpec) +(Appears on:OpsDefinitionSpec)

    @@ -5607,7 +11330,7 @@ string -schema
    +openAPIV3Schema
    Kubernetes api extensions v1.JSONSchemaProps @@ -5615,29 +11338,19 @@ Kubernetes api extensions v1.JSONSchemaProps -

    schema provides a way for providers to validate the changed parameters through json.


    - - - - -cue
    - -string - - - (Optional) -

    cue that to let provider verify user configuration through cue language.


    +

    openAPIV3Schema is the OpenAPI v3 schema to use for parameter schema.
    supported properties types:
    - string
    - number
    - integer
    - array: only supported the item with string type.


    -

    DownwardAPIOption +

    PasswordConfig

    -(Appears on:ConfigConstraintSpec) +(Appears on:SystemAccount, SystemAccountSpec)

    +

    PasswordConfig helps provide to customize complexity of password generation pattern.


    @@ -5649,99 +11362,72 @@ string - - - - - -
    -name
    - -string - -
    -

    Specify the name of the field.


    -
    -mountPoint
    +length
    -string +int32
    -

    mountPoint is the mount point of the scripts file.


    +(Optional) +

    length defines the length of password.


    -items
    +numDigits
    - -[]Kubernetes core/v1.DownwardAPIVolumeFile - +int32
    -

    Items is a list of downward API volume file


    +(Optional) +

    numDigits defines number of digits.


    -command
    +numSymbols
    -[]string +int32
    (Optional) -

    command used to execute for downwrad api.


    +

    numSymbols defines number of symbols.


    -

    ExporterConfig -

    -

    -(Appears on:MonitorConfig) -

    -
    -
    - - - - - - - -
    FieldDescription
    -scrapePort
    +letterCase
    - -Kubernetes api utils intstr.IntOrString + +LetterCase
    -

    scrapePort is exporter port for Time Series Database to scrape metrics.


    +(Optional) +

    letterCase defines to use lower-cases, upper-cases or mixed-cases of letters.


    -scrapePath
    +seed
    string
    (Optional) -

    scrapePath is exporter url path for Time Series Database to scrape metrics.


    +

    seed specifies the seed used to generate the account’s password.
    Cannot be updated.


    -

    Expose +

    Payload

    -(Appears on:OpsRequestSpec) +(Appears on:ConfigurationItemDetail)

    @@ -5755,59 +11441,21 @@ string -ComponentOps
    - - -ComponentOps - - - - -

    -(Members of ComponentOps are embedded into this type.) -

    - - - - -services
    +-
    - -[]ClusterComponentService - +map[string]any -

    Setting the list of services to be exposed.


    +(Optional) -

    FailurePolicyType -(string alias)

    -

    -(Appears on:ComponentDefRef) -

    -
    -

    FailurePolicyType specifies the type of failure policy


    -
    - - - - - - - - - - - - -
    ValueDescription

    "Fail"

    ReportError means that an error will be reported.


    "Ignore"

    Ignore means that an error will be ignored but logged.


    -

    FormatterConfig +

    PersistentVolumeClaimSpec

    -(Appears on:ConfigConstraintSpec) +(Appears on:ClusterComponentVolumeClaimTemplate)

    @@ -5821,115 +11469,109 @@ ComponentOps -FormatterOptions
    +accessModes
    - -FormatterOptions + +[]Kubernetes core/v1.PersistentVolumeAccessMode -

    -(Members of FormatterOptions are embedded into this type.) -

    (Optional) -

    The FormatterOptions represents the special options of configuration file.
    This is optional for now. If not specified.


    +

    accessModes contains the desired access modes the volume should have.
    More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1.


    -format
    +resources
    - -CfgFileFormat + +Kubernetes core/v1.ResourceRequirements -

    The configuration file format. Valid values are ini, xml, yaml, json,
    hcl, dotenv, properties and toml.



    ini: a configuration file that consists of a text-based content with a structure and syntax comprising key–value pairs for properties, reference wiki: https://en.wikipedia.org/wiki/INI_file
    xml: reference wiki: https://en.wikipedia.org/wiki/XML
    yaml: a configuration file support for complex data types and structures.
    json: reference wiki: https://en.wikipedia.org/wiki/JSON
    hcl: : The HashiCorp Configuration Language (HCL) is a configuration language authored by HashiCorp, reference url: https://www.linode.com/docs/guides/introduction-to-hcl/
    dotenv: this was a plain text file with simple key–value pairs, reference wiki: https://en.wikipedia.org/wiki/Configuration_file#MS-DOS
    properties: a file extension mainly used in Java, reference wiki: https://en.wikipedia.org/wiki/.properties
    toml: reference wiki: https://en.wikipedia.org/wiki/TOML
    props-plus: a file extension mainly used in Java, support CamelCase(e.g: brokerMaxConnectionsPerIp)


    +(Optional) +

    resources represents the minimum resources the volume should have.
    If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements
    that are lower than previous value but must still be higher than capacity recorded in the
    status field of the claim.
    More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources.


    - - -

    FormatterOptions -

    -

    -(Appears on:FormatterConfig) -

    -
    -

    FormatterOptions represents the special options of configuration file.
    Only one of its members may be specified.


    -
    - - - - + + - -
    FieldDescription +storageClassName
    + +string + +
    +(Optional) +

    storageClassName is the name of the StorageClass required by the claim.
    More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1.


    +
    -iniConfig
    +volumeMode
    - -IniConfig + +Kubernetes core/v1.PersistentVolumeMode
    (Optional) -

    iniConfig represents the ini options.


    +

    volumeMode defines what type of volume is required by the claim.


    -

    GVKResource -

    +

    Phase +(string alias)

    -(Appears on:CustomLabelSpec) +(Appears on:ClusterDefinitionStatus, ClusterVersionStatus, ComponentDefinitionStatus, OpsDefinitionStatus, ServiceDescriptorStatus)

    +

    Phase defines the ClusterDefinition and ClusterVersion CR .status.phase


    - + - - - - - - - - + + + + + +
    FieldValue Description
    -gvk
    - -string - -
    -

    gvk is Group/Version/Kind, for example “v1/Pod”, “apps/v1/StatefulSet”, etc.
    when the gvk resource filtered by the selector already exists, if there is no corresponding custom label, it will be added, and if label already exists, it will be updated.


    -
    -selector
    - -map[string]string - -
    -(Optional) -

    selector is a label query over a set of resources.


    -

    "Available"

    "Unavailable"

    +

    PodAntiAffinity +(string alias)

    +

    +(Appears on:Affinity) +

    +
    +

    PodAntiAffinity defines pod anti-affinity strategy.


    +
    + + + + + - + + + + + +
    ValueDescription

    "Preferred"

    "Required"

    -

    HScaleDataClonePolicyType +

    PodSelectionStrategy (string alias)

    -(Appears on:HorizontalScalePolicy) +(Appears on:VarsRef)

    -

    HScaleDataClonePolicyType defines data clone policy when horizontal scaling.


    +

    PodSelectionStrategy pod selection strategy.


    @@ -5938,18 +11580,16 @@ map[string]string - - - + - +
    Description

    "CloneVolume"

    "Snapshot"

    "Available"

    "None"

    "PreferredAvailable"

    -

    HorizontalScalePolicy +

    PointInTimeRefSpec

    -(Appears on:ClusterComponentDefinition) +(Appears on:RestoreFromSpec)

    @@ -5963,51 +11603,40 @@ map[string]string -type
    +time
    - -HScaleDataClonePolicyType + +Kubernetes meta/v1.Time (Optional) -

    type controls what kind of data synchronization do when component scale out.
    Policy is in enum of {None, CloneVolume}. The default policy is None.
    None: Default policy, create empty volume and no data clone.
    CloneVolume: Do data clone to newly scaled pods. Prefer to use volume snapshot first,
    and will try backup tool if volume snapshot is not enabled, finally
    report error if both above cannot work.
    Snapshot: Deprecated, alias for CloneVolume.


    - - - - -backupPolicyTemplateName
    - -string - - - -(Optional) -

    BackupPolicyTemplateName reference the backup policy template.


    +

    specify the time point to restore, with UTC as the time zone.


    -volumeMountsName
    +ref
    -string + +RefNamespaceName + (Optional) -

    volumeMountsName defines which volumeMount of the container to do backup,
    only work if Type is not None
    if not specified, the 1st volumeMount will be chosen


    +

    specify a reference source cluster to restore


    -

    HorizontalScaling +

    PostStartAction

    -(Appears on:OpsRequestSpec) +(Appears on:ClusterComponentDefinition)

    -

    HorizontalScaling defines the variables of horizontal scaling operation


    @@ -6019,36 +11648,37 @@ string
    -ComponentOps
    +cmdExecutorConfig
    - -ComponentOps + +CmdExecutorConfig
    -

    -(Members of ComponentOps are embedded into this type.) -

    +

    cmdExecutorConfig is the executor configuration of the post-start command.


    -replicas
    +scriptSpecSelectors
    -int32 + +[]ScriptSpecSelector +
    -

    replicas for the workloads.


    +(Optional) +

    scriptSpecSelectors defines the selector of the scriptSpecs that need to be referenced.
    Once ScriptSpecSelectors is defined, the scripts defined in scriptSpecs can be referenced in the PostStartAction.CmdExecutorConfig.


    -

    IniConfig +

    PreCondition

    -(Appears on:FormatterOptions) +(Appears on:OpsDefinitionSpec)

    @@ -6062,25 +11692,39 @@ int32 -sectionName
    +rule
    -string + +Rule + + + + +

    condition declares how the operation can be executed.


    + + + + +exec
    + + +PreConditionExec + (Optional) -

    sectionName describes ini section.


    +

    a job will be run to execute preCondition.
    and the operation will be executed when the exec job is succeed.


    -

    Issuer +

    PreConditionExec

    -(Appears on:ClusterComponentSpec) +(Appears on:PreCondition)

    -

    Issuer defines Tls certs issuer


    @@ -6092,40 +11736,62 @@ string + + + + + + + +
    -name
    +image
    - -IssuerName - +string
    -

    Name of issuer.
    Options supported:
    - KubeBlocks - Certificates signed by KubeBlocks Operator.
    - UserProvided - User provided own CA-signed certificates.


    +

    image name.


    -secretRef
    +env
    - -TLSSecretRef + +[]Kubernetes core/v1.EnvVar
    (Optional) -

    secretRef. TLS certs Secret reference
    required when from is UserProvided


    +

    container env.


    +
    +command
    + +[]string + +
    +(Optional) +

    container commands.


    +
    +args
    + +[]string + +
    +(Optional) +

    container args.


    -

    IssuerName +

    PreConditionType (string alias)

    -(Appears on:Issuer) +(Appears on:Action)

    -

    IssuerName defines Tls certs issuer name


    +

    PreConditionType defines the preCondition type of the action execution.


    @@ -6134,16 +11800,23 @@ TLSSecretRef - - - - + + + + + + + +
    Description

    "KubeBlocks"

    IssuerKubeBlocks Certificates signed by KubeBlocks Operator.


    "UserProvided"

    IssuerUserProvided User provided own CA-signed certificates.


    "ClusterReady"

    "ComponentReady"

    "Immediately"

    "RuntimeReady"

    -

    KBAccountType -(byte alias)

    +

    ProgressStatus +(string alias)

    +

    +(Appears on:ProgressStatusDetail) +

    -

    KBAccountType is used for bitwise operation.


    +

    ProgressStatus defines the status of the opsRequest progress.


    @@ -6152,14 +11825,20 @@ TLSSecretRef - + + + + + + +
    Description

    0

    "Failed"

    "Pending"

    "Processing"

    "Succeed"

    -

    LastComponentConfiguration +

    ProgressStatusDetail

    -(Appears on:LastConfiguration) +(Appears on:OpsRequestComponentStatus)

    @@ -6173,93 +11852,86 @@ TLSSecretRef -replicas
    +group
    -int32 +string (Optional) -

    replicas are the last replicas of the component.


    +

    group describes which group the current object belongs to.
    if the objects of a component belong to the same group, we can ignore it.


    -ResourceRequirements
    +objectKey
    - -Kubernetes core/v1.ResourceRequirements - +string -

    -(Members of ResourceRequirements are embedded into this type.) -

    -(Optional) -

    the last resources of the component.


    +

    objectKey is the unique key of the object.


    -classDefRef
    +status
    - -ClassDefRef + +ProgressStatus -(Optional) -

    classDefRef reference class defined in ComponentClassDefinition.


    +

    status describes the state of processing the object.


    -volumeClaimTemplates
    +message
    - -[]OpsRequestVolumeClaimTemplate - +string (Optional) -

    volumeClaimTemplates records the last volumeClaimTemplates of the component.


    +

    message is a human readable message indicating details about the object condition.


    -services
    +startTime
    - -[]ClusterComponentService + +Kubernetes meta/v1.Time (Optional) -

    services records the last services of the component.


    +

    startTime is the start time of object processing.


    -targetResources
    +endTime
    -map[github.com/apecloud/kubeblocks/apis/apps/v1alpha1.ComponentResourceKey][]string + +Kubernetes meta/v1.Time + (Optional) -

    targetResources records the affecting target resources information for the component.
    resource key is in list of [pods].


    +

    endTime is the completion time of object processing.


    -

    LastConfiguration +

    ProtectedVolume

    -(Appears on:OpsRequestStatus) +(Appears on:VolumeProtectionSpec)

    @@ -6273,38 +11945,37 @@ map[github.com/apecloud/kubeblocks/apis/apps/v1alpha1.ComponentResourceKey][]str -clusterVersionRef
    +name
    string (Optional) -

    clusterVersionRef references ClusterVersion name.


    +

    Name of volume to protect.


    -components
    +highWatermark
    - -map[string]github.com/apecloud/kubeblocks/apis/apps/v1alpha1.LastComponentConfiguration - +int (Optional) -

    components records last configuration of the component.


    +

    Volume specified high watermark threshold, it will override the component level threshold.
    If the value is invalid, it will be ignored and the component level threshold will be used.


    -

    LazyRenderedTemplateSpec +

    ProvisionPolicy

    -(Appears on:ComponentConfigSpec) +(Appears on:SystemAccountConfig)

    +

    ProvisionPolicy defines the policy details for creating accounts.


    @@ -6316,50 +11987,67 @@ map[string]github.com/apecloud/kubeblocks/apis/apps/v1alpha1.LastComponentConfig + + + +
    -templateRef
    +type
    -string + +ProvisionPolicyType +
    -

    Specify the name of the referenced the configuration template ConfigMap object.


    +

    type defines the way to provision an account, either CreateByStmt or ReferToExisting.


    -namespace
    +scope
    -string + +ProvisionScope + + +
    +

    scope is the scope to provision account, and the scope could be AnyPods or AllPods.


    +
    +statements
    + + +ProvisionStatements +
    (Optional) -

    Specify the namespace of the referenced the configuration template ConfigMap object.
    An empty namespace is equivalent to the “default” namespace.


    +

    statements will be used when Type is CreateByStmt.


    -policy
    +secretRef
    - -MergedPolicy + +ProvisionSecretRef
    (Optional) -

    policy defines how to merge external imported templates into component templates.


    +

    secretRef will be used when Type is ReferToExisting.


    -

    LetterCase +

    ProvisionPolicyType (string alias)

    -(Appears on:PasswordConfig) +(Appears on:ProvisionPolicy)

    -

    LetterCase defines cases to use in password generation.


    +

    ProvisionPolicyType defines the policy for creating accounts.


    @@ -6368,20 +12056,40 @@ MergedPolicy - - - - - - + + + +
    Description

    "LowerCases"

    "MixedCases"

    "UpperCases"

    "CreateByStmt"

    CreateByStmt will create account w.r.t. deletion and creation statement given by provider.


    "ReferToExisting"

    ReferToExisting will not create account, but create a secret by copying data from referred secret file.


    -

    LogConfig +

    ProvisionScope +(string alias)

    +

    +(Appears on:ProvisionPolicy) +

    +
    +

    ProvisionScope defines the scope (within component) of provision.


    +
    + + + + + + + + + + + + +
    ValueDescription

    "AllPods"

    AllPods will create accounts for all pods belong to the component.


    "AnyPods"

    AnyPods will only create accounts on one pod.


    +

    ProvisionSecretRef

    -(Appears on:ClusterComponentDefinition) +(Appears on:ProvisionPolicy, SystemAccount)

    +

    ProvisionSecretRef defines the information of secret referred to.


    @@ -6399,28 +12107,29 @@ string
    -

    name log type name, such as slow for MySQL slow log file.


    +

    name refers to the name of the secret.


    -filePathPattern
    +namespace
    string
    -

    filePathPattern log file path pattern which indicate how to find this file
    corresponding to variable (log path) in database kernel. please don’t set this casually.


    +

    namespace refers to the namespace of the secret.


    -

    MemoryConstraint +

    ProvisionStatements

    -(Appears on:ResourceConstraintRule) +(Appears on:ProvisionPolicy)

    +

    ProvisionStatements defines the statements used to create accounts.


    @@ -6432,74 +12141,42 @@ string
    -sizePerCPU
    +creation
    - -Kubernetes resource.Quantity - +string
    -(Optional) -

    The size of memory per vcpu core.
    For example: 1Gi, 200Mi.
    If SizePerCPU is specified, MinPerCPU and MaxPerCPU are ignore.


    +

    creation specifies statement how to create this account with required privileges.


    -maxPerCPU
    +update
    - -Kubernetes resource.Quantity - +string
    (Optional) -

    The maximum size of memory per vcpu core, [MinPerCPU, MaxPerCPU] defines a range for valid memory size per vcpu core.
    It is useful on GCP as the ratio between the CPU and memory may be a range.
    If SizePerCPU is specified, MinPerCPU and MaxPerCPU are ignored.
    Reference: https://cloud.google.com/compute/docs/general-purpose-machines#custom_machine_types


    +

    update specifies statement how to update account’s password.


    -minPerCPU
    +deletion
    - -Kubernetes resource.Quantity - +string
    (Optional) -

    The minimum size of memory per vcpu core, [MinPerCPU, MaxPerCPU] defines a range for valid memory size per vcpu core.
    It is useful on GCP as the ratio between the CPU and memory may be a range.
    If SizePerCPU is specified, MinPerCPU and MaxPerCPU are ignored.
    Reference: https://cloud.google.com/compute/docs/general-purpose-machines#custom_machine_types


    +

    deletion specifies statement how to delete this account.
    Used in combination with CreateionStatement to delete the account before create it.
    For instance, one usually uses drop user if exists statement followed by create user statement to create an account.
    Deprecated: this field is deprecated, use update instead.


    -

    MergedPolicy -(string alias)

    -

    -(Appears on:LazyRenderedTemplateSpec) -

    -
    -

    MergedPolicy defines how to merge external imported templates into component templates.


    -
    - - - - - - - - - - - - - - - - -
    ValueDescription

    "none"

    "add"

    "patch"

    "replace"

    -

    MonitorConfig +

    RSMSpec

    (Appears on:ClusterComponentDefinition) @@ -6516,103 +12193,59 @@ Kubernetes resource.Quantity -builtIn
    +roles
    -bool +[]github.com/apecloud/kubeblocks/apis/workloads/v1alpha1.ReplicaRole (Optional) -

    builtIn is a switch to enable KubeBlocks builtIn monitoring.
    If BuiltIn is set to true, monitor metrics will be scraped automatically.
    If BuiltIn is set to false, the provider should set ExporterConfig and Sidecar container own.


    +

    Roles, a list of roles defined in the system.


    -exporterConfig
    +roleProbe
    - -ExporterConfig - +github.com/apecloud/kubeblocks/apis/workloads/v1alpha1.RoleProbe (Optional) -

    exporterConfig provided by provider, which specify necessary information to Time Series Database.
    exporterConfig is valid when builtIn is false.


    +

    RoleProbe provides method to probe role.


    - - -

    OpsPhase -(string alias)

    -

    -(Appears on:OpsRequestStatus) -

    -
    -

    OpsPhase defines opsRequest phase.


    -
    - - - - - - - - - - - - - - - - - - - - - - -
    ValueDescription

    "Cancelled"

    "Cancelling"

    "Creating"

    "Failed"

    "Pending"

    "Running"

    "Succeed"

    -

    OpsRecorder -

    -
    -
    - - - - - - - -
    FieldDescription
    -name
    +membershipReconfiguration
    -string +github.com/apecloud/kubeblocks/apis/workloads/v1alpha1.MembershipReconfiguration
    -

    name OpsRequest name


    +(Optional) +

    MembershipReconfiguration provides actions to do membership dynamic reconfiguration.


    -type
    +memberUpdateStrategy
    - -OpsType - +github.com/apecloud/kubeblocks/apis/workloads/v1alpha1.MemberUpdateStrategy
    -

    clusterPhase the cluster phase when the OpsRequest is running


    +(Optional) +

    MemberUpdateStrategy, Members(Pods) update strategy.
    serial: update Members one by one that guarantee minimum component unavailable time.
    Learner -> Follower(with AccessMode=none) -> Follower(with AccessMode=readonly) -> Follower(with AccessMode=readWrite) -> Leader
    bestEffortParallel: update Members in parallel that guarantee minimum component un-writable time.
    Learner, Follower(minority) in parallel -> Follower(majority) -> Leader, keep majority online all the time.
    parallel: force parallel


    -

    OpsRequestBehaviour +

    ReconcileDetail

    +

    +(Appears on:ConfigurationItemDetailStatus) +

    @@ -6625,144 +12258,130 @@ OpsType - -
    -FromClusterPhases
    +policy
    - -[]ClusterPhase - +string
    +(Optional) +

    policy is the policy of the latest execution.


    -ToClusterPhase
    +execResult
    - -ClusterPhase - +string
    +(Optional) +

    execResult is the result of the latest execution.


    -ProcessingReasonInClusterCondition
    +currentRevision
    string
    +(Optional) +

    currentRevision is the current revision of configurationItem.


    -

    OpsRequestComponentStatus -

    -

    -(Appears on:OpsRequestStatus) -

    -
    -
    - - - - - - - - + +
    FieldDescription
    -phase
    +succeedCount
    - -ClusterComponentPhase - +int32
    (Optional) -

    phase describes the component phase, reference Cluster.status.component.phase.


    +

    succeedCount is the number of pods for which configuration changes were successfully executed.


    -lastFailedTime
    +expectedCount
    - -Kubernetes meta/v1.Time - +int32
    (Optional) -

    lastFailedTime is the last time the component phase transitioned to Failed or Abnormal.


    +

    expectedCount is the number of pods that need to be executed for configuration changes.


    -progressDetails
    +errMessage
    - -[]ProgressStatusDetail - +string
    (Optional) -

    progressDetails describes the progress details of the component for this operation.


    +

    errMessage is the error message when the configuration change execution fails.


    +

    Reconfigure +

    +

    +(Appears on:OpsRequestSpec) +

    +
    +

    Reconfigure defines the variables that need to input when updating configuration.


    +
    + + - - + + + +
    -workloadType
    - - -WorkloadType - - -
    -(Optional) -

    workloadType references workload type of component in ClusterDefinition.


    -
    FieldDescription
    -reason
    +ComponentOps
    -string + +ComponentOps +
    -(Optional) -

    reason describes the reason for the component phase.


    +

    +(Members of ComponentOps are embedded into this type.) +

    -message
    +configurations
    -string + +[]ConfigurationItem +
    -(Optional) -

    message is a human-readable message indicating details about this operation.


    +

    configurations defines which components perform the operation.


    -

    OpsRequestSpec +

    ReconfiguringStatus

    -(Appears on:OpsRequest) +(Appears on:OpsRequestStatus)

    -

    OpsRequestSpec defines the desired state of OpsRequest


    @@ -6774,213 +12393,259 @@ string - - - - + +
    -clusterRef
    - -string - -
    -

    clusterRef references clusterDefinition.


    -
    -cancel
    +conditions
    -bool + +[]Kubernetes meta/v1.Condition +
    (Optional) -

    cancel defines the action to cancel the Pending/Creating/Running opsRequest, supported types: [VerticalScaling, HorizontalScaling].
    once cancel is set to true, this opsRequest will be canceled and modifying this property again will not take effect.


    +

    conditions describes reconfiguring detail status.


    -type
    +configurationStatus
    - -OpsType + +[]ConfigurationItemStatus
    -

    type defines the operation type.


    +

    configurationStatus describes the status of the component reconfiguring.


    +

    RefNamespaceName +

    +

    +(Appears on:BackupRefSpec, PointInTimeRefSpec) +

    +
    +
    + + + + + + + + + +
    FieldDescription
    -ttlSecondsAfterSucceed
    +name
    -int32 +string
    (Optional) -

    ttlSecondsAfterSucceed OpsRequest will be deleted after TTLSecondsAfterSucceed second when OpsRequest.status.phase is Succeed.


    +

    specified the name


    -upgrade
    +namespace
    - -Upgrade - +string
    (Optional) -

    upgrade specifies the cluster version by specifying clusterVersionRef.


    +

    specified the namespace


    +

    ReloadOptions +

    +

    +(Appears on:ConfigConstraintSpec) +

    +
    +

    ReloadOptions defines reload options
    Only one of its members may be specified.


    +
    + + + + + + + + + +
    FieldDescription
    -horizontalScaling
    +unixSignalTrigger
    - -[]HorizontalScaling + +UnixSignalTrigger
    (Optional) -

    horizontalScaling defines what component need to horizontal scale the specified replicas.


    +

    unixSignalTrigger used to reload by sending a signal.


    -volumeExpansion
    +shellTrigger
    - -[]VolumeExpansion + +ShellTrigger
    (Optional) -

    volumeExpansion defines what component and volumeClaimTemplate need to expand the specified storage.


    +

    shellTrigger performs the reload command.


    -restart
    +tplScriptTrigger
    - -[]ComponentOps + +TPLScriptTrigger
    (Optional) -

    restart the specified components.


    +

    goTplTrigger performs the reload command.


    -switchover
    +autoTrigger
    - -[]Switchover + +AutoTrigger
    (Optional) -

    switchover the specified components.


    +

    autoTrigger performs the reload command.


    +

    ReplicaRole +

    +

    +(Appears on:ComponentDefinitionSpec) +

    +
    +

    ReplicaRole represents a role that can be assumed by a component instance.


    +
    + + + + + + + + + +
    FieldDescription
    -verticalScaling
    +name
    - -[]VerticalScaling - +string
    -(Optional) -

    verticalScaling defines what component need to vertical scale the specified compute resources.


    +

    Name of the role. It will apply to “apps.kubeblocks.io/role” object label value.
    Cannot be updated.


    -reconfigure
    +serviceable
    - -Reconfigure - +bool
    (Optional) -

    reconfigure defines the variables that need to input when updating configuration.


    +

    Serviceable indicates whether a replica with this role can provide services.
    Cannot be updated.


    -expose
    +writable
    - -[]Expose - +bool
    (Optional) -

    expose defines services the component needs to expose.


    +

    Writable indicates whether a replica with this role is allowed to write data.
    Cannot be updated.


    -restoreFrom
    +votable
    - -RestoreFromSpec - +bool
    (Optional) -

    cluster RestoreFrom backup or point in time


    +

    Votable indicates whether a replica with this role is allowed to vote.
    Cannot be updated.


    +

    ReplicasLimit +

    +

    +(Appears on:ComponentDefinitionSpec) +

    +
    +

    ReplicasLimit defines the limit of valid replicas supported.


    +
    + + + + + + + +
    FieldDescription
    -ttlSecondsBeforeAbort
    +minReplicas
    int32
    -(Optional) -

    ttlSecondsBeforeAbort OpsRequest will wait at most TTLSecondsBeforeAbort seconds for start-conditions to be met.
    If not specified, the default value is 0, which means that the start-conditions must be met immediately.


    +

    The minimum limit of replicas.


    -scriptSpec
    +maxReplicas
    - -ScriptSpec - +int32
    -(Optional) -

    scriptSpec defines the script to be executed.


    +

    The maximum limit of replicas.


    -

    OpsRequestStatus +

    ReplicationSetSpec

    -(Appears on:OpsRequest) +(Appears on:ClusterComponentDefinition)

    -

    OpsRequestStatus defines the observed state of OpsRequest


    @@ -6992,143 +12657,156 @@ ScriptSpec + +
    -clusterGeneration
    +StatefulSetSpec
    -int64 + +StatefulSetSpec +
    -(Optional) -

    ClusterGeneration records the cluster generation after handling the opsRequest action.


    +

    +(Members of StatefulSetSpec are embedded into this type.) +

    +

    ResourceConstraintRule +

    +

    +(Appears on:ComponentResourceConstraintSpec) +

    +
    +
    + + - - + + + + + +
    -phase
    - - -OpsPhase - - -
    -

    phase describes OpsRequest phase.


    -
    FieldDescription
    -progress
    +name
    string
    +

    The name of the constraint.


    -lastConfiguration
    +cpu
    - -LastConfiguration + +CPUConstraint
    -(Optional) -

    lastConfiguration records the last configuration before this operation take effected.


    +

    The constraint for vcpu cores.


    -components
    +memory
    - -map[string]github.com/apecloud/kubeblocks/apis/apps/v1alpha1.OpsRequestComponentStatus + +MemoryConstraint
    -(Optional) -

    components defines the recorded the status information of changed components for operation request.


    +

    The constraint for memory size.


    -startTimestamp
    +storage
    - -Kubernetes meta/v1.Time + +StorageConstraint
    (Optional) -

    startTimestamp The time when the OpsRequest started processing.


    +

    The constraint for storage size.


    +

    ResourceMeta +

    +

    +(Appears on:ConfigMapRef, SecretRef) +

    +
    +
    + + + + + + + +
    FieldDescription
    -completionTimestamp
    +name
    - -Kubernetes meta/v1.Time - +string
    -(Optional) -

    completionTimestamp defines the OpsRequest completion time.


    +

    name is the name of the referenced the Configmap/Secret object.


    -cancelTimestamp
    +mountPoint
    - -Kubernetes meta/v1.Time - +string
    -(Optional) -

    CancelTimestamp defines cancel time.


    +

    mountPath is the path at which to mount the volume.


    -reconfiguringStatus
    +subPath
    - -ReconfiguringStatus - +string
    (Optional) -

    reconfiguringStatus defines the status information of reconfiguring.


    +

    subPath is a relative file path within the volume to mount.


    -conditions
    +asVolumeFrom
    - -[]Kubernetes meta/v1.Condition - +[]string
    (Optional) -

    conditions describes opsRequest detail status.


    +

    asVolumeFrom defines the list of containers where volumeMounts will be injected into.


    -

    OpsRequestVolumeClaimTemplate +

    RestoreFromSpec

    -(Appears on:LastComponentConfiguration, VolumeExpansion) +(Appears on:OpsRequestSpec)

    @@ -7142,73 +12820,38 @@ ReconfiguringStatus -storage
    +backup
    - -Kubernetes resource.Quantity + +[]BackupRefSpec -

    Request storage size.


    +(Optional) +

    use the backup name and component name for restore, support for multiple components’ recovery.


    -name
    +pointInTime
    -string + +PointInTimeRefSpec + -

    name references volumeClaimTemplate name from cluster components.


    +(Optional) +

    specified the point in time to recovery


    -

    OpsType -(string alias)

    -

    -(Appears on:OpsRecorder, OpsRequestSpec) -

    -
    -

    OpsType defines operation types.


    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ValueDescription

    "DataScript"

    "Expose"

    StartType the start operation will start the pods which is deleted in stop operation.


    "HorizontalScaling"

    "Reconfiguring"

    "Restart"

    "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"

    -

    ParameterConfig +

    RestoreSpec

    -(Appears on:Configuration) +(Appears on:OpsRequestSpec)

    @@ -7222,47 +12865,54 @@ string -key
    +backupName
    string -

    key indicates the key name of ConfigMap.


    +

    backupName is the name of the backup.


    -parameters
    +effectiveCommonComponentDef
    - -[]ParameterPair - +bool -(Optional) -

    Setting the list of parameters for a single configuration file.
    update specified the parameters.


    +

    effectiveCommonComponentDef describes this backup will be restored for all components which refer to common ComponentDefinition.


    -fileContent
    +restoreTimeStr
    string -(Optional) -

    fileContent indicates the configuration file content.
    update whole file.


    +

    restoreTime point in time to restore


    + + + + +volumeRestorePolicy
    + +string + + + +

    the volume claim restore policy, support values: [Serial, Parallel]


    -

    ParameterPair +

    RetryPolicy

    -(Appears on:ParameterConfig) +(Appears on:Action)

    @@ -7276,36 +12926,57 @@ string -key
    +maxRetries
    -string +int -

    key is name of the parameter to be updated.


    +(Optional) +

    MaxRetries specifies the maximum number of times the action should be retried.


    -value
    +retryInterval
    -string +time.Duration (Optional) -

    parameter values to be updated.
    if set nil, the parameter defined by the key field will be deleted from the configuration file.


    +

    RetryInterval specifies the interval between retry attempts.


    -

    PasswordConfig +

    RoleArbitrator +(string alias)

    +

    +(Appears on:ComponentDefinitionSpec) +

    +
    +

    RoleArbitrator defines how to arbitrate the role of replicas.


    +
    + + + + + + + + + + + + +
    ValueDescription

    "External"

    "Lorry"

    +

    RoleProbe

    -(Appears on:SystemAccountSpec) +(Appears on:ComponentLifecycleActions)

    -

    PasswordConfig helps provide to customize complexity of password generation pattern.


    @@ -7317,159 +12988,97 @@ string - - - - - -
    -length
    +LifecycleActionHandler
    -int32 + +LifecycleActionHandler +
    -(Optional) -

    length defines the length of password.


    +

    +(Members of LifecycleActionHandler are embedded into this type.) +

    -numDigits
    +initialDelaySeconds
    int32
    (Optional) -

    numDigits defines number of digits.


    +

    Number of seconds after the container has started before liveness probes are initiated.
    More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes


    -numSymbols
    +timeoutSeconds
    int32
    (Optional) -

    numSymbols defines number of symbols.


    -
    -letterCase
    - - -LetterCase - - -
    -(Optional) -

    letterCase defines to use lower-cases, upper-cases or mixed-cases of letters.


    +

    Number of seconds after which the probe times out.
    Defaults to 1 second. Minimum value is 1.
    More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes


    -

    PersistentVolumeClaimSpec -

    -

    -(Appears on:ClusterComponentVolumeClaimTemplate) -

    -
    -
    - - - - - - - - - - -
    FieldDescription
    -accessModes
    +periodSeconds
    - -[]Kubernetes core/v1.PersistentVolumeAccessMode - +int32
    (Optional) -

    accessModes contains the desired access modes the volume should have.
    More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1.


    +

    How often (in seconds) to perform the probe.
    Default to 10 seconds. Minimum value is 1.


    -resources
    +successThreshold
    - -Kubernetes core/v1.ResourceRequirements - +int32
    (Optional) -

    resources represents the minimum resources the volume should have.
    If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements
    that are lower than previous value but must still be higher than capacity recorded in the
    status field of the claim.
    More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources.


    +

    Minimum consecutive successes for the probe to be considered successful after having failed.
    Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1.


    -storageClassName
    +failureThreshold
    -string +int32
    (Optional) -

    storageClassName is the name of the StorageClass required by the claim.
    More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1.


    +

    Minimum consecutive failures for the probe to be considered failed after having succeeded.
    Defaults to 3. Minimum value is 1.


    -

    Phase -(string alias)

    -

    -(Appears on:ClusterDefinitionStatus, ClusterVersionStatus) -

    -
    -

    Phase defines the ClusterDefinition and ClusterVersion CR .status.phase


    -
    - - - - - - - - - - - - -
    ValueDescription

    "Available"

    "Unavailable"

    -

    PodAntiAffinity -(string alias)

    -

    -(Appears on:Affinity) -

    -
    -

    PodAntiAffinity defines pod anti-affinity strategy.


    -
    - - + - - + + - - - - - - +
    ValueDescription +terminationGracePeriodSeconds
    + +int64 + +
    +(Optional) +

    Optional duration in seconds the pod needs to terminate gracefully upon probe failure.
    The grace period is the duration in seconds after the processes running in the pod are sent
    a termination signal and the time when the processes are forcibly halted with a kill signal.
    Set this value longer than the expected cleanup time for your process.
    If this value is nil, the pod’s terminationGracePeriodSeconds will be used. Otherwise, this
    value overrides the value provided by the pod spec.
    Value must be non-negative integer. The value zero indicates stop immediately via
    the kill signal (no opportunity to shut down).
    This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate.
    Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset.


    +

    "Preferred"

    "Required"

    -

    PointInTimeRefSpec +

    Rule

    -(Appears on:RestoreFromSpec) +(Appears on:PreCondition)

    @@ -7483,63 +13092,32 @@ string -time
    +expression
    - -Kubernetes meta/v1.Time - +string -(Optional) -

    specify the time point to restore, with UTC as the time zone.


    +

    expression declares how the operation can be executed using go template expression.
    it should return “true” or “false”, built-in objects:
    - “params” are input parameters.
    - “cluster” is referenced cluster object.
    - “component” is referenced the component Object.


    -ref
    +message
    - -RefNamespaceName - +string -(Optional) -

    specify a reference source cluster to restore


    +

    report the message if the rule is not matched.


    -

    ProgressStatus -(string alias)

    -

    -(Appears on:ProgressStatusDetail) -

    -
    -

    ProgressStatus defines the status of the opsRequest progress.


    -
    - - - - - - - - - - - - - - - - -
    ValueDescription

    "Failed"

    "Pending"

    "Processing"

    "Succeed"

    -

    ProgressStatusDetail +

    SchedulePolicy

    -(Appears on:OpsRequestComponentStatus) +(Appears on:BackupPolicy)

    @@ -7553,88 +13131,145 @@ RefNamespaceName -group
    +enabled
    -string +bool (Optional) -

    group describes which group the current object belongs to.
    if the objects of a component belong to the same group, we can ignore it.


    +

    enabled specifies whether the backup schedule is enabled or not.


    -objectKey
    +backupMethod
    string -

    objectKey is the unique key of the object.


    +

    backupMethod specifies the backup method name that is defined in backupPolicy.


    -status
    +cronExpression
    - -ProgressStatus - +string -

    status describes the state of processing the object.


    +

    the cron expression for schedule, the timezone is in UTC.
    see https://en.wikipedia.org/wiki/Cron.


    -message
    +retentionPeriod
    + +github.com/apecloud/kubeblocks/apis/dataprotection/v1alpha1.RetentionPeriod + + + +(Optional) +

    retentionPeriod determines a duration up to which the backup should be kept.
    controller will remove all backups that are older than the RetentionPeriod.
    For example, RetentionPeriod of 30d will keep only the backups of last 30 days.
    Sample duration format:
    - years: 2y
    - months: 6mo
    - days: 30d
    - hours: 12h
    - minutes: 30m
    You can also combine the above durations. For example: 30d12h30m


    + + + + +

    ScriptConfig +

    +

    +(Appears on:ConfigConstraintSpec, TPLScriptTrigger) +

    +
    +
    + + + + + + + + + + + + + + + +
    FieldDescription
    +scriptConfigMapRef
    + +string + +
    +

    scriptConfigMapRef used to execute for reload.


    +
    +namespace
    string
    (Optional) -

    message is a human readable message indicating details about the object condition.


    +

    Specify the namespace of the referenced the tpl script ConfigMap object.
    An empty namespace is equivalent to the “default” namespace.


    +

    ScriptFrom +

    +

    +(Appears on:ScriptSpec) +

    +
    +

    ScriptFrom defines the script to be executed from configMap or secret.


    +
    + + + + + + + +
    FieldDescription
    -startTime
    +configMapRef
    - -Kubernetes meta/v1.Time + +[]Kubernetes core/v1.ConfigMapKeySelector
    (Optional) -

    startTime is the start time of object processing.


    +

    configMapRef defines the configMap to be executed.


    -endTime
    +secretRef
    - -Kubernetes meta/v1.Time + +[]Kubernetes core/v1.SecretKeySelector
    (Optional) -

    endTime is the completion time of object processing.


    +

    secretRef defines the secret to be executed.


    -

    ProtectedVolume +

    ScriptSecret

    -(Appears on:VolumeProtectionSpec) +(Appears on:ScriptSpec)

    +

    ScriptSecret defines the secret to be used to execute the script.


    @@ -7652,31 +13287,42 @@ string + + + +
    +

    name is the name of the secret.


    +
    +usernameKey
    + +string + +
    (Optional) -

    Name of volume to protect.


    +

    usernameKey field is used to specify the username of the secret.


    -highWatermark
    +passwordKey
    -int +string
    (Optional) -

    Volume specified high watermark threshold, it will override the component level threshold.
    If the value is invalid, it will be ignored and the component level threshold will be used.


    +

    passwordKey field is used to specify the password of the secret.


    -

    ProvisionPolicy +

    ScriptSpec

    -(Appears on:SystemAccountConfig) +(Appears on:OpsRequestSpec)

    -

    ProvisionPolicy defines the policy details for creating accounts.


    +

    ScriptSpec defines the script to be executed. It is not a general purpose script executor.
    It is designed to execute the script to perform some specific operations, such as create database, create user, etc.
    It is applicable for engines, such as MySQL, PostgreSQL, Redis, MongoDB, etc.


    @@ -7688,109 +13334,121 @@ int + + + + - -
    -type
    +ComponentOps
    - -ProvisionPolicyType + +ComponentOps
    -

    type defines the way to provision an account, either CreateByStmt or ReferToExisting.


    +

    +(Members of ComponentOps are embedded into this type.) +

    -scope
    +image
    - -ProvisionScope - +string
    -

    scope is the scope to provision account, and the scope could be AnyPods or AllPods.


    +(Optional) +

    exec command with image, by default use the image of kubeblocks-datascript.


    -statements
    +secret
    - -ProvisionStatements + +ScriptSecret
    (Optional) -

    statements will be used when Type is CreateByStmt.


    +

    secret defines the secret to be used to execute the script.
    If not specified, the default cluster root credential secret will be used.


    -secretRef
    +script
    - -ProvisionSecretRef +[]string + +
    +(Optional) +

    script defines the script to be executed.


    +
    +scriptFrom
    + + +ScriptFrom
    (Optional) -

    secretRef will be used when Type is ReferToExisting.


    +

    scriptFrom defines the script to be executed from configMap or secret.


    -

    ProvisionPolicyType -(string alias)

    -

    -(Appears on:ProvisionPolicy) -

    -
    -

    ProvisionPolicyType defines the policy for creating accounts.


    -
    - - - - + + - - - - - - +
    ValueDescription +selector
    + + +Kubernetes meta/v1.LabelSelector + + +
    +(Optional) +

    KubeBlocks, by default, will execute the script on the primary pod, with role=leader.
    There are some exceptions, such as Redis, which does not synchronize accounts info between primary and secondary.
    In this case, we need to execute the script on all pods, matching the selector.
    selector indicates the components on which the script is executed.


    +

    "CreateByStmt"

    CreateByStmt will create account w.r.t. deletion and creation statement given by provider.


    "ReferToExisting"

    ReferToExisting will not create account, but create a secret by copying data from referred secret file.


    -

    ProvisionScope -(string alias)

    +

    ScriptSpecSelector +

    -(Appears on:ProvisionPolicy) +(Appears on:ComponentSwitchover, PostStartAction, SwitchoverAction)

    -

    ProvisionScope defines the scope (within component) of provision.


    - + - - - - - + + + + + +
    ValueField Description

    "AllPods"

    AllPods will create accounts for all pods belong to the component.


    "AnyPods"

    AndyPods will only create accounts on one pod.


    +name
    + +string + +
    +

    ScriptSpec name of the referent, refer to componentDefs[x].scriptSpecs[y].Name.


    +
    -

    ProvisionSecretRef +

    SecretRef

    -(Appears on:ProvisionPolicy) +(Appears on:UserResourceRefs)

    -

    ProvisionSecretRef defines the information of secret referred to.


    @@ -7802,35 +13460,40 @@ ProvisionSecretRef
    -name
    +ResourceMeta
    -string + +ResourceMeta +
    -

    name refers to the name of the secret.


    +

    +(Members of ResourceMeta are embedded into this type.) +

    -namespace
    +secret
    -string + +Kubernetes core/v1.SecretVolumeSource +
    -

    namespace refers to the namespace of the secret.


    +

    secret defines the secret volume source.


    -

    ProvisionStatements +

    Service

    -(Appears on:ProvisionPolicy) +(Appears on:ClusterService, ComponentService)

    -

    ProvisionStatements defines the statements used to create accounts.


    @@ -7842,328 +13505,321 @@ string - -
    -creation
    +name
    string
    -

    creation specifies statement how to create this account with required privileges.


    +

    Name defines the name of the service.
    otherwise, it indicates the name of the service.
    Others can refer to this service by its name. (e.g., connection credential)
    Cannot be updated.


    -update
    +serviceName
    string
    (Optional) -

    update specifies statement how to update account’s password.


    +

    ServiceName defines the name of the underlying service object.
    If not specified, the default service name with different patterns will be used:
    - CLUSTER_NAME: for cluster-level services
    - CLUSTER_NAME-COMPONENT_NAME: for component-level services
    Only one default service name is allowed.
    Cannot be updated.


    -deletion
    +annotations
    -string +map[string]string
    (Optional) -

    deletion specifies statement how to delete this account.
    Used in combination with CreateionStatement to delete the account before create it.
    For instance, one usually uses drop user if exists statement followed by create user statement to create an account.
    Deprecated: this field is deprecated, use update instead.


    +

    If ServiceType is LoadBalancer, cloud provider related parameters can be put here
    More info: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer.


    -

    Reconfigure -

    -

    -(Appears on:OpsRequestSpec) -

    -
    -

    Reconfigure defines the variables that need to input when updating configuration.


    -
    + + +spec
    + + +Kubernetes core/v1.ServiceSpec + + + + +(Optional) +

    Spec defines the behavior of a service.
    https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status


    +
    +
    - - - + + - - - -
    FieldDescription +ports
    + + +[]Kubernetes core/v1.ServicePort + + +
    +

    The list of ports that are exposed by this service.
    More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies


    +
    -ComponentOps
    +selector
    - -ComponentOps - +map[string]string
    -

    -(Members of ComponentOps are embedded into this type.) -

    +(Optional) +

    Route service traffic to pods with label keys and values matching this
    selector. If empty or not present, the service is assumed to have an
    external process managing its endpoints, which Kubernetes will not
    modify. Only applies to types ClusterIP, NodePort, and LoadBalancer.
    Ignored if type is ExternalName.
    More info: https://kubernetes.io/docs/concepts/services-networking/service/


    -configurations
    +clusterIP
    - -[]Configuration - +string
    -

    configurations defines which components perform the operation.


    +(Optional) +

    clusterIP is the IP address of the service and is usually assigned
    randomly. If an address is specified manually, is in-range (as per
    system configuration), and is not in use, it will be allocated to the
    service; otherwise creation of the service will fail. This field may not
    be changed through updates unless the type field is also being changed
    to ExternalName (which requires this field to be blank) or the type
    field is being changed from ExternalName (in which case this field may
    optionally be specified, as describe above). Valid values are “None”,
    empty string (“”), or a valid IP address. Setting this to “None” makes a
    “headless service” (no virtual IP), which is useful when direct endpoint
    connections are preferred and proxying is not required. Only applies to
    types ClusterIP, NodePort, and LoadBalancer. If this field is specified
    when creating a Service of type ExternalName, creation will fail. This
    field will be wiped when updating a Service to type ExternalName.
    More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies


    -

    ReconfiguringStatus -

    -

    -(Appears on:OpsRequestStatus) -

    -
    -
    - - - - + + - - - -
    FieldDescription +clusterIPs
    + +[]string + +
    +(Optional) +

    ClusterIPs is a list of IP addresses assigned to this service, and are
    usually assigned randomly. If an address is specified manually, is
    in-range (as per system configuration), and is not in use, it will be
    allocated to the service; otherwise creation of the service will fail.
    This field may not be changed through updates unless the type field is
    also being changed to ExternalName (which requires this field to be
    empty) or the type field is being changed from ExternalName (in which
    case this field may optionally be specified, as describe above). Valid
    values are “None”, empty string (“”), or a valid IP address. Setting
    this to “None” makes a “headless service” (no virtual IP), which is
    useful when direct endpoint connections are preferred and proxying is
    not required. Only applies to types ClusterIP, NodePort, and
    LoadBalancer. If this field is specified when creating a Service of type
    ExternalName, creation will fail. This field will be wiped when updating
    a Service to type ExternalName. If this field is not specified, it will
    be initialized from the clusterIP field. If this field is specified,
    clients must ensure that clusterIPs[0] and clusterIP have the same
    value.



    This field may hold a maximum of two entries (dual-stack IPs, in either order).
    These IPs must correspond to the values of the ipFamilies field. Both
    clusterIPs and ipFamilies are governed by the ipFamilyPolicy field.
    More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies


    +
    -configurationStatus
    +type
    - -[]ConfigurationStatus + +Kubernetes core/v1.ServiceType
    -

    configurationStatus describes the status of the component reconfiguring.


    +(Optional) +

    type determines how the Service is exposed. Defaults to ClusterIP. Valid
    options are ExternalName, ClusterIP, NodePort, and LoadBalancer.
    “ClusterIP” allocates a cluster-internal IP address for load-balancing
    to endpoints. Endpoints are determined by the selector or if that is not
    specified, by manual construction of an Endpoints object or
    EndpointSlice objects. If clusterIP is “None”, no virtual IP is
    allocated and the endpoints are published as a set of endpoints rather
    than a virtual IP.
    “NodePort” builds on ClusterIP and allocates a port on every node which
    routes to the same endpoints as the clusterIP.
    “LoadBalancer” builds on NodePort and creates an external load-balancer
    (if supported in the current cloud) which routes to the same endpoints
    as the clusterIP.
    “ExternalName” aliases this service to the specified externalName.
    Several other fields do not apply to ExternalName services.
    More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types


    -

    RefNamespaceName -

    -

    -(Appears on:BackupRefSpec, PointInTimeRefSpec) -

    -
    -
    - - - - + + - - - -
    FieldDescription +externalIPs
    + +[]string + +
    +(Optional) +

    externalIPs is a list of IP addresses for which nodes in the cluster
    will also accept traffic for this service. These IPs are not managed by
    Kubernetes. The user is responsible for ensuring that traffic arrives
    at a node with this IP. A common example is external load-balancers
    that are not part of the Kubernetes system.


    +
    -name
    +sessionAffinity
    -string + +Kubernetes core/v1.ServiceAffinity +
    (Optional) -

    specified the name


    +

    Supports “ClientIP” and “None”. Used to maintain session affinity.
    Enable client IP based session affinity.
    Must be ClientIP or None.
    Defaults to None.
    More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies


    -namespace
    +loadBalancerIP
    string
    (Optional) -

    specified the namespace


    +

    Only applies to Service Type: LoadBalancer.
    This feature depends on whether the underlying cloud-provider supports specifying
    the loadBalancerIP when a load balancer is created.
    This field will be ignored if the cloud-provider does not support the feature.
    Deprecated: This field was under-specified and its meaning varies across implementations.
    Using it is non-portable and it may not support dual-stack.
    Users are encouraged to use implementation-specific annotations when available.


    -

    ReloadOptions -

    -

    -(Appears on:ConfigConstraintSpec) -

    -
    -

    ReloadOptions defines reload options
    Only one of its members may be specified.


    -
    - - - - + + - - - -
    FieldDescription +loadBalancerSourceRanges
    + +[]string + +
    +(Optional) +

    If specified and supported by the platform, this will restrict traffic through the cloud-provider
    load-balancer will be restricted to the specified client IPs. This field will be ignored if the
    cloud-provider does not support the feature.”
    More info: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/


    +
    -unixSignalTrigger
    +externalName
    - -UnixSignalTrigger - +string
    (Optional) -

    unixSignalTrigger used to reload by sending a signal.


    +

    externalName is the external reference that discovery mechanisms will
    return as an alias for this service (e.g. a DNS CNAME record). No
    proxying will be involved. Must be a lowercase RFC-1123 hostname
    (https://tools.ietf.org/html/rfc1123) and requires type to be “ExternalName”.


    -shellTrigger
    +externalTrafficPolicy
    - -ShellTrigger + +Kubernetes core/v1.ServiceExternalTrafficPolicy
    (Optional) -

    shellTrigger performs the reload command.


    +

    externalTrafficPolicy describes how nodes distribute service traffic they
    receive on one of the Service’s “externally-facing” addresses (NodePorts,
    ExternalIPs, and LoadBalancer IPs). If set to “Local”, the proxy will configure
    the service in a way that assumes that external load balancers will take care
    of balancing the service traffic between nodes, and so each node will deliver
    traffic only to the node-local endpoints of the service, without masquerading
    the client source IP. (Traffic mistakenly sent to a node with no endpoints will
    be dropped.) The default value, “Cluster”, uses the standard behavior of
    routing to all endpoints evenly (possibly modified by topology and other
    features). Note that traffic sent to an External IP or LoadBalancer IP from
    within the cluster will always get “Cluster” semantics, but clients sending to
    a NodePort from within the cluster may need to take traffic policy into account
    when picking a node.


    -tplScriptTrigger
    +healthCheckNodePort
    - -TPLScriptTrigger - +int32
    (Optional) -

    goTplTrigger performs the reload command.


    +

    healthCheckNodePort specifies the healthcheck nodePort for the service.
    This only applies when type is set to LoadBalancer and
    externalTrafficPolicy is set to Local. If a value is specified, is
    in-range, and is not in use, it will be used. If not specified, a value
    will be automatically allocated. External systems (e.g. load-balancers)
    can use this port to determine if a given node holds endpoints for this
    service or not. If this field is specified when creating a Service
    which does not need it, creation will fail. This field will be wiped
    when updating a Service to no longer need it (e.g. changing type).
    This field cannot be updated once set.


    -

    ReplicationMemberStatus -

    -

    -(Appears on:ReplicationSetStatus) -

    -
    -
    - - - - + + - - - -
    FieldDescription +publishNotReadyAddresses
    + +bool + +
    +(Optional) +

    publishNotReadyAddresses indicates that any agent which deals with endpoints for this
    Service should disregard any indications of ready/not-ready.
    The primary use case for setting this field is for a StatefulSet’s Headless Service to
    propagate SRV DNS records for its Pods for the purpose of peer discovery.
    The Kubernetes controllers that generate Endpoints and EndpointSlice resources for
    Services interpret this to mean that all endpoints are considered “ready” even if the
    Pods themselves are not. Agents which consume only Kubernetes generated endpoints
    through the Endpoints or EndpointSlice resources can safely assume this behavior.


    +
    -pod
    +sessionAffinityConfig
    -string + +Kubernetes core/v1.SessionAffinityConfig +
    -

    Pod name.


    +(Optional) +

    sessionAffinityConfig contains the configurations of session affinity.


    -

    ReplicationSetSpec -

    -

    -(Appears on:ClusterComponentDefinition) -

    -
    -
    - - - - + + - - - -
    FieldDescription +ipFamilies
    + + +[]Kubernetes core/v1.IPFamily + + +
    +(Optional) +

    IPFamilies is a list of IP families (e.g. IPv4, IPv6) assigned to this
    service. This field is usually assigned automatically based on cluster
    configuration and the ipFamilyPolicy field. If this field is specified
    manually, the requested family is available in the cluster,
    and ipFamilyPolicy allows it, it will be used; otherwise creation of
    the service will fail. This field is conditionally mutable: it allows
    for adding or removing a secondary IP family, but it does not allow
    changing the primary IP family of the Service. Valid values are “IPv4”
    and “IPv6”. This field only applies to Services of types ClusterIP,
    NodePort, and LoadBalancer, and does apply to “headless” services.
    This field will be wiped when updating a Service to type ExternalName.



    This field may hold a maximum of two entries (dual-stack families, in
    either order). These families must correspond to the values of the
    clusterIPs field, if specified. Both clusterIPs and ipFamilies are
    governed by the ipFamilyPolicy field.


    +
    -StatefulSetSpec
    +ipFamilyPolicy
    - -StatefulSetSpec + +Kubernetes core/v1.IPFamilyPolicy
    -

    -(Members of StatefulSetSpec are embedded into this type.) -

    +(Optional) +

    IPFamilyPolicy represents the dual-stack-ness requested or required by
    this Service. If there is no value provided, then this field will be set
    to SingleStack. Services can be “SingleStack” (a single IP family),
    “PreferDualStack” (two IP families on dual-stack configured clusters or
    a single IP family on single-stack clusters), or “RequireDualStack”
    (two IP families on dual-stack configured clusters, otherwise fail). The
    ipFamilies and clusterIPs fields depend on the value of this field. This
    field will be wiped when updating a service to type ExternalName.


    -

    ReplicationSetStatus -

    -

    -(Appears on:ClusterComponentStatus) -

    -
    -
    - - - - + + - - + +
    FieldDescription +allocateLoadBalancerNodePorts
    + +bool + +
    +(Optional) +

    allocateLoadBalancerNodePorts defines if NodePorts will be automatically
    allocated for services with type LoadBalancer. Default is “true”. It
    may be set to “false” if the cluster load-balancer does not rely on
    NodePorts. If the caller requests specific NodePorts (by specifying a
    value), those requests will be respected, regardless of this field.
    This field may only be set for services with type LoadBalancer and will
    be cleared if the type is changed to any other type.


    +
    -primary
    +loadBalancerClass
    - -ReplicationMemberStatus - +string
    -

    Primary status.


    +(Optional) +

    loadBalancerClass is the class of the load balancer implementation this Service belongs to.
    If specified, the value of this field must be a label-style identifier, with an optional prefix,
    e.g. “internal-vip” or “example.com/internal-vip”. Unprefixed names are reserved for end-users.
    This field can only be set when the Service type is ‘LoadBalancer’. If not set, the default load
    balancer implementation is used, today this is typically done through the cloud provider integration,
    but should apply for any default implementation. If set, it is assumed that a load balancer
    implementation is watching for Services with a matching class. Any default load balancer
    implementation (e.g. cloud providers) should ignore Services that set this field.
    This field can only be set when creating or updating a Service to type ‘LoadBalancer’.
    Once set, it can not be changed. This field will be wiped when a service is updated to a non ‘LoadBalancer’ type.


    -secondaries
    +internalTrafficPolicy
    - -[]ReplicationMemberStatus + +Kubernetes core/v1.ServiceInternalTrafficPolicy
    (Optional) -

    Secondaries status.


    +

    InternalTrafficPolicy describes how nodes distribute service traffic they
    receive on the ClusterIP. If set to “Local”, the proxy will assume that pods
    only want to talk to endpoints of the service on the same node as the pod,
    dropping the traffic if there are no local endpoints. The default value,
    “Cluster”, uses the standard behavior of routing to all endpoints evenly
    (possibly modified by topology and other features).


    +
    + + + + +roleSelector
    + +string + + + +(Optional) +

    RoleSelector extends the ServiceSpec.Selector by allowing you to specify defined role as selector for the service.
    if GeneratePodOrdinalService sets to true, RoleSelector will be ignored.


    -

    ResourceConstraintRule +

    ServiceDescriptorSpec

    -(Appears on:ComponentResourceConstraintSpec) +(Appears on:ServiceDescriptor)

    +

    ServiceDescriptorSpec defines the desired state of ServiceDescriptor


    @@ -8175,63 +13831,77 @@ ReplicationMemberStatus + + + +
    -name
    +serviceKind
    string
    -

    The name of the constraint.


    +

    service kind, indicating the type or nature of the service. It should be well-known application cluster type, e.g. {mysql, redis, mongodb}.
    The serviceKind is case-insensitive and supports abbreviations for some well-known databases.
    For example, both ‘zk’ and ‘zookeeper’ will be considered as a ZooKeeper cluster, and ‘pg’, ‘postgres’, ‘postgresql’ will all be considered as a PostgreSQL cluster.


    -cpu
    +serviceVersion
    - -CPUConstraint +string + +
    +

    The version of the service reference.


    +
    +endpoint
    + + +CredentialVar
    -

    The constraint for vcpu cores.


    +(Optional) +

    endpoint is the endpoint of the service connection credential.


    -memory
    +auth
    - -MemoryConstraint + +ConnectionCredentialAuth
    -

    The constraint for memory size.


    +(Optional) +

    auth is the auth of the service connection credential.


    -storage
    +port
    - -StorageConstraint + +CredentialVar
    (Optional) -

    The constraint for storage size.


    +

    port is the port of the service connection credential.


    -

    RestoreFromSpec +

    ServiceDescriptorStatus

    -(Appears on:OpsRequestSpec) +(Appears on:ServiceDescriptor)

    +

    ServiceDescriptorStatus defines the observed state of ServiceDescriptor


    @@ -8243,67 +13913,48 @@ StorageConstraint - -
    -backup
    +phase
    - -[]BackupRefSpec + +Phase
    (Optional) -

    use the backup name and component name for restore, support for multiple components’ recovery.


    +

    phase - in list of [Available,Unavailable]


    -pointInTime
    +message
    - -PointInTimeRefSpec - +string
    (Optional) -

    specified the point in time to recovery


    +

    A human-readable message indicating details about why the ServiceConnectionCredential is in this phase.


    -

    RetentionSpec -

    -

    -(Appears on:BackupPolicy) -

    -
    -
    - - - - - - - -
    FieldDescription
    -ttl
    +observedGeneration
    -string +int64
    (Optional) -

    ttl is a time string ending with the ’d’|’D’|‘h’|‘H’ character to describe how long
    the Backup should be retained. if not set, will be retained forever.


    +

    generation number


    -

    Schedule +

    ServicePort

    -(Appears on:BackupPolicy) +(Appears on:ServiceSpec)

    @@ -8317,64 +13968,72 @@ string -startingDeadlineMinutes
    +name
    -int64 +string -(Optional) -

    startingDeadlineMinutes defines the deadline in minutes for starting the backup job
    if it misses scheduled time for any reason.


    +

    The name of this port within the service. This must be a DNS_LABEL.
    All ports within a ServiceSpec must have unique names. When considering
    the endpoints for a Service, this must match the ‘name’ field in the
    EndpointPort.


    -snapshot
    +protocol
    - -SchedulePolicy + +Kubernetes core/v1.Protocol (Optional) -

    schedule policy for snapshot backup.


    +

    The IP protocol for this port. Supports “TCP”, “UDP”, and “SCTP”.
    Default is TCP.


    -datafile
    +appProtocol
    - -SchedulePolicy - +string (Optional) -

    schedule policy for datafile backup.


    +

    The application protocol for this port.
    This field follows standard Kubernetes label syntax.
    Un-prefixed names are reserved for IANA standard service names (as per
    RFC-6335 and https://www.iana.org/assignments/service-names).
    Non-standard protocols should use prefixed names such as
    mycompany.com/my-custom-protocol.


    -logfile
    +port
    - -SchedulePolicy +int32 + + + +

    The port that will be exposed by this service.


    + + + + +targetPort
    + +
    +Kubernetes api utils intstr.IntOrString (Optional) -

    schedule policy for logfile backup.


    +

    Number or name of the port to access on the pods targeted by the service.
    Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
    If this is a string, it will be looked up as a named port in the
    target Pod’s container ports. If this is not specified, the value
    of the ‘port’ field is used (an identity map).
    This field is ignored for services with clusterIP=None, and should be
    omitted or set equal to the ‘port’ field.
    More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service


    -

    SchedulePolicy +

    ServiceRef

    -(Appears on:Schedule) +(Appears on:ClusterComponentSpec, ComponentSpec)

    @@ -8388,75 +14047,59 @@ SchedulePolicy -cronExpression
    +name
    string -

    the cron expression for schedule, the timezone is in UTC. see https://en.wikipedia.org/wiki/Cron.


    +

    name of the service reference declaration. references the serviceRefDeclaration name defined in clusterDefinition.componentDefs[].serviceRefDeclarations[].name


    -enable
    +namespace
    -bool +string -

    enable or disable the schedule.


    +(Optional) +

    namespace defines the namespace of the referenced Cluster or the namespace of the referenced ServiceDescriptor object.
    If not set, the referenced Cluster and ServiceDescriptor will be searched in the namespace of the current cluster by default.


    - - -

    ScriptConfig -

    -

    -(Appears on:ConfigConstraintSpec, TPLScriptTrigger) -

    -
    -
    - - - - - - - -
    FieldDescription
    -scriptConfigMapRef
    +cluster
    string
    -

    scriptConfigMapRef used to execute for reload.


    +(Optional) +

    When referencing a service provided by other KubeBlocks cluster, you need to provide the name of the Cluster being referenced.
    By default, when other KubeBlocks Cluster are referenced, the ClusterDefinition.spec.connectionCredential secret corresponding to the referenced Cluster will be used to bind to the current component.
    Currently, if a KubeBlocks cluster is to be referenced, the connection credential secret should include and correspond to the following fields: endpoint, port, username, and password.
    Under this referencing approach, the ServiceKind and ServiceVersion of service reference declaration defined in the ClusterDefinition will not be validated.
    If both Cluster and ServiceDescriptor are specified, the Cluster takes precedence.


    -namespace
    +serviceDescriptor
    string
    (Optional) -

    Specify the namespace of the referenced the tpl script ConfigMap object.
    An empty namespace is equivalent to the “default” namespace.


    +

    serviceDescriptor defines the service descriptor of the service provided by external sources.
    When referencing a service provided by external sources, you need to provide the ServiceDescriptor object name to establish the service binding.
    And serviceDescriptor is the name of the ServiceDescriptor object, furthermore, the ServiceDescriptor.spec.serviceKind and ServiceDescriptor.spec.serviceVersion
    should match clusterDefinition.componentDefs[].serviceRefDeclarations[].serviceRefDeclarationSpecs[].serviceKind
    and the regular expression defines in clusterDefinition.componentDefs[
    ].serviceRefDeclarations[].serviceRefDeclarationSpecs[].serviceVersion.
    If both Cluster and ServiceDescriptor are specified, the Cluster takes precedence.


    -

    ScriptFrom +

    ServiceRefDeclaration

    -(Appears on:ScriptSpec) +(Appears on:ClusterComponentDefinition, ComponentDefinitionSpec)

    -

    ScriptFrom defines the script to be executed from configMap or secret.


    @@ -8468,41 +14111,36 @@ string
    -configMapRef
    +name
    - -[]Kubernetes core/v1.ConfigMapKeySelector - +string
    -(Optional) -

    configMapRef defines the configMap to be executed.


    +

    The name of the service reference declaration.
    The service reference can come from an external service that is not part of KubeBlocks, or services provided by other KubeBlocks Cluster objects.
    The specific type of service reference depends on the binding declaration when creates a Cluster.


    -secretRef
    +serviceRefDeclarationSpecs
    - -[]Kubernetes core/v1.SecretKeySelector + +[]ServiceRefDeclarationSpec
    -(Optional) -

    secretRef defines the secret to be executed.


    +

    serviceRefDeclarationSpecs is a collection of service descriptions for a service reference declaration.
    Each ServiceRefDeclarationSpec defines a service Kind and Version. When multiple ServiceRefDeclarationSpecs are defined,
    it indicates that the ServiceRefDeclaration can be any one of the specified ServiceRefDeclarationSpecs.
    For example, when the ServiceRefDeclaration is declared to require an OLTP database, which can be either MySQL or PostgreSQL,
    you can define a ServiceRefDeclarationSpec for MySQL and another ServiceRefDeclarationSpec for PostgreSQL,
    when referencing the service within the cluster, as long as the serviceKind and serviceVersion match either MySQL or PostgreSQL, it can be used.


    -

    ScriptSecret +

    ServiceRefDeclarationSpec

    -(Appears on:ScriptSpec) +(Appears on:ServiceRefDeclaration)

    -

    ScriptSecret defines the secret to be used to execute the script.


    @@ -8514,48 +14152,35 @@ string - - - -
    -name
    - -string - -
    -

    name is the name of the secret.


    -
    -usernameKey
    +serviceKind
    string
    -(Optional) -

    usernameKey field is used to specify the username of the secret.


    +

    service kind, indicating the type or nature of the service. It should be well-known application cluster type, e.g. {mysql, redis, mongodb}.
    The serviceKind is case-insensitive and supports abbreviations for some well-known databases.
    For example, both ‘zk’ and ‘zookeeper’ will be considered as a ZooKeeper cluster, and ‘pg’, ‘postgres’, ‘postgresql’ will all be considered as a PostgreSQL cluster.


    -passwordKey
    +serviceVersion
    string
    -(Optional) -

    passwordKey field is used to specify the password of the secret.


    +

    The service version of the service reference. It is a regular expression that matches a version number pattern.
    For example, ^8.0.8$, 8.0.\d{1,2}$, ^[v\-]*?(\d{1,2}\.){0,3}\d{1,2}$


    -

    ScriptSpec +

    ServiceRefVarSelector

    -(Appears on:OpsRequestSpec) +(Appears on:VarSource)

    -

    ScriptSpec defines the script to be executed. It is not a general purpose script executor.
    It is designed to execute the script to perform some specific operations, such as create database, create user, etc.
    It is applicable for engines, such as MySQL, PostgreSQL, Redis, MongoDB, etc.


    +

    ServiceRefVarSelector selects a var from a ServiceRefDeclaration.


    @@ -8567,77 +14192,100 @@ string + +
    -ComponentOps
    +ClusterObjectReference
    - -ComponentOps + +ClusterObjectReference

    -(Members of ComponentOps are embedded into this type.) +(Members of ClusterObjectReference are embedded into this type.)

    +

    The ServiceRefDeclaration to select from.


    -image
    +ServiceRefVars
    -string + +ServiceRefVars +
    -(Optional) -

    exec command with image, by default use the image of kubeblocks-datascript.


    +

    +(Members of ServiceRefVars are embedded into this type.) +

    +

    ServiceRefVars +

    +

    +(Appears on:ServiceRefVarSelector) +

    +
    +

    ServiceRefVars defines the vars can be referenced from a ServiceRef.


    +
    + + + + + + + + -
    FieldDescription
    -secret
    +endpoint
    - -ScriptSecret + +VarOption
    (Optional) -

    secret defines the secret to be used to execute the script.
    If not specified, the default cluster root credential secret will be used.


    -script
    +port
    -[]string + +VarOption +
    (Optional) -

    script defines the script to be executed.


    -scriptFrom
    +CredentialVars
    - -ScriptFrom + +CredentialVars
    -(Optional) -

    scriptFrom defines the script to be executed from configMap or secret.


    +
    +

    +(Members of CredentialVars are embedded into this type.) +

    -

    ScriptSpecSelector +

    ServiceSpec

    -(Appears on:SwitchoverAction) +(Appears on:ClusterComponentDefinition)

    @@ -8651,23 +14299,27 @@ ScriptFrom -name
    +ports
    -string + +[]ServicePort + -

    ScriptSpec name of the referent, refer to componentDefs[x].scriptSpecs[y].Name.


    +(Optional) +

    The list of ports that are exposed by this service.
    More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies


    -

    ServicePort +

    ServiceVarSelector

    -(Appears on:ServiceSpec) +(Appears on:VarSource)

    +

    ServiceVarSelector selects a var from a Service.


    @@ -8679,74 +14331,113 @@ string + + + + + +
    -name
    +ClusterObjectReference
    -string + +ClusterObjectReference +
    -

    The name of this port within the service. This must be a DNS_LABEL.
    All ports within a ServiceSpec must have unique names. When considering
    the endpoints for a Service, this must match the ‘name’ field in the
    EndpointPort.


    +

    +(Members of ClusterObjectReference are embedded into this type.) +

    +

    The Service to select from.
    It can be referenced from the default headless service by setting the name to “headless”.


    -protocol
    +ServiceVars
    - -Kubernetes core/v1.Protocol + +ServiceVars
    +

    +(Members of ServiceVars are embedded into this type.) +

    +
    +generatePodOrdinalServiceVar
    + +bool + +
    (Optional) -

    The IP protocol for this port. Supports “TCP”, “UDP”, and “SCTP”.
    Default is TCP.


    +

    GeneratePodOrdinalServiceVar indicates whether to create a corresponding ServiceVars reference variable for each Pod.
    If set to true, a set of ServiceVars that can be referenced will be automatically generated for each Pod Ordinal.
    They can be referred to by adding the PodOrdinal to the defined name template with named pattern $(Vars[x].Name)_$(PodOrdinal).
    For example, a ServiceVarRef might be defined as follows:
    - name: MY_SERVICE_PORT
    valueFrom:
    serviceVarRef:
    compDef: my-component-definition
    name: my-service
    optional: true
    generatePodOrdinalServiceVar: true
    port:
    name: redis-sentinel
    Assuming that the Component has 3 replicas, then you can reference the port of existing services named my-service-0, my-service-1,
    and my-service-2 with $MY_SERVICE_PORT_0, $MY_SERVICE_PORT_1, and $MY_SERVICE_PORT_2, respectively.
    It should be used in conjunction with Service.GeneratePodOrdinalService.


    +

    ServiceVars +

    +

    +(Appears on:ServiceVarSelector) +

    +
    +

    ServiceVars defines the vars can be referenced from a Service.


    +
    + + + + + + + +
    FieldDescription
    -appProtocol
    +host
    -string + +VarOption +
    (Optional) -

    The application protocol for this port.
    This field follows standard Kubernetes label syntax.
    Un-prefixed names are reserved for IANA standard service names (as per
    RFC-6335 and https://www.iana.org/assignments/service-names).
    Non-standard protocols should use prefixed names such as
    mycompany.com/my-custom-protocol.


    port
    -int32 + +NamedVar +
    -

    The port that will be exposed by this service.


    +(Optional)
    -targetPort
    +nodePort
    - -Kubernetes api utils intstr.IntOrString + +NamedVar
    (Optional) -

    Number or name of the port to access on the pods targeted by the service.
    Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
    If this is a string, it will be looked up as a named port in the
    target Pod’s container ports. If this is not specified, the value
    of the ‘port’ field is used (an identity map).
    This field is ignored for services with clusterIP=None, and should be
    omitted or set equal to the ‘port’ field.
    More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service


    -

    ServiceSpec +

    ShardingSpec

    -(Appears on:ClusterComponentDefinition) +(Appears on:ClusterSpec)

    +

    ShardingSpec defines the sharding spec.


    @@ -8758,16 +14449,37 @@ Kubernetes api utils intstr.IntOrString + + + + + + + + @@ -8891,52 +14603,6 @@ bool
    -ports
    +name
    - -[]ServicePort +string + +
    +

    name defines sharding name, this name is also part of Service DNS name, so this name will comply with IANA Service Naming rule.
    The name is also used to generate the name of the underlying components with the naming pattern $(ShardingSpec.Name)-$(ShardID).
    At the same time, the name of component template defined in ShardingSpec.Template.Name will be ignored.


    +
    +template
    + + +ClusterComponentSpec
    -(Optional) -

    The list of ports that are exposed by this service.
    More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies


    +

    template defines the component template.
    A ShardingSpec generates a set of components (also called shards) based on the component template, and this group of components or shards have the same specifications and definitions.


    +
    +shards
    + +int32 + +
    +

    shards indicates the number of component, and these components have the same specifications and definitions.
    It should be noted that the number of replicas for each component should be defined by template.replicas.
    Moreover, the logical relationship between these components should be maintained by the components themselves,
    KubeBlocks only provides the following capabilities for managing the lifecycle of sharding:
    1. When the number of shards increases, the postProvision Action defined in the ComponentDefinition will be executed if the conditions are met.
    2. When the number of shards decreases, the preTerminate Action defined in the ComponentDefinition will be executed if the conditions are met.
    Additionally, the resources and data associated with the corresponding Component will be deleted as well.


    -

    SnapshotPolicy -

    -

    -(Appears on:BackupPolicy) -

    -
    -
    - - - - - - - - - - - - - - - - - -
    FieldDescription
    -BasePolicy
    - - -BasePolicy - - -
    -

    -(Members of BasePolicy are embedded into this type.) -

    -
    -hooks
    - - -BackupPolicyHook - - -
    -(Optional) -

    execute hook commands for backup.


    -

    StatefulSetSpec

    @@ -9100,26 +14766,6 @@ Kubernetes resource.Quantity -

    SwitchStepRole -(string alias)

    -
    -

    SwitchStepRole defines the role to execute the switch command.


    -
    - - - - - - - - - - - - - - -
    ValueDescription

    "NewPrimary"

    "OldPrimary"

    "Secondaries"

    Switchover

    @@ -9283,6 +14929,86 @@ SwitchoverAction +

    SystemAccount +

    +

    +(Appears on:ComponentDefinitionSpec) +

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +name
    + +string + +
    +

    The name of the account.
    Others can refer to this account by the name.
    Cannot be updated.


    +
    +initAccount
    + +bool + +
    +(Optional) +

    InitAccount indicates whether this is the unique system initialization account (e.g., MySQL root).
    Only one system init account is allowed.
    Cannot be updated.


    +
    +statement
    + +string + +
    +(Optional) +

    Statement specifies the statement used to create the account with required privileges.
    Cannot be updated.


    +
    +passwordGenerationPolicy
    + + +PasswordConfig + + +
    +(Optional) +

    PasswordGenerationPolicy defines the policy for generating the account’s password.
    Cannot be updated.


    +
    +secretRef
    + + +ProvisionSecretRef + + +
    +(Optional) +

    SecretRef specifies the secret from which data will be copied to create the new account.
    Cannot be updated.


    +

    SystemAccountConfig

    @@ -9391,26 +15117,67 @@ CmdExecutorConfig passwordConfig
    - -PasswordConfig - + +PasswordConfig + + + + +

    passwordConfig defines the pattern to generate password.


    + + + + +accounts
    + + +[]SystemAccountConfig + + + + +

    accounts defines system account config settings.


    + + + + +

    TLSConfig +

    +

    +(Appears on:ComponentSpec) +

    +
    +
    + + + + + + + + + + @@ -9524,7 +15291,7 @@ bool

    TargetInstance

    -(Appears on:BasePolicy) +(Appears on:BackupMethod, BackupPolicy)

    @@ -9544,7 +15311,6 @@ string @@ -9562,6 +15328,18 @@ string + + + +
    FieldDescription
    +enable
    + +bool
    -

    passwordConfig defines the pattern to generate password.


    +(Optional)
    -accounts
    +issuer
    - -[]SystemAccountConfig + +Issuer
    -

    accounts defines system account config settings.


    +(Optional)
    -(Optional)

    select instance of corresponding role for backup, role are:
    - the name of Leader/Follower/Leaner for Consensus component.
    - primary or secondary for Replication component.
    finally, invalid role of the component will be ignored.
    such as if workload type is Replication and component’s replicas is 1,
    the secondary role is invalid. and it also will be ignored when component is Stateful/Stateless.
    the role will be transformed to a role LabelSelector for BackupPolicy’s target attribute.


    +strategy
    + +github.com/apecloud/kubeblocks/apis/dataprotection/v1alpha1.PodSelectionStrategy + +
    +(Optional) +

    PodSelectionStrategy specifies the strategy to select when multiple pods are
    selected for backup target.
    Valid values are:
    - Any: select any one pod that match the labelsSelector.
    - All: select all pods that match the labelsSelector.


    +
    connectionCredentialKey
    @@ -9570,11 +15348,37 @@ ConnectionCredentialKey
    +(Optional)

    connectionCredentialKey defines connection credential key in secret
    which created by spec.ConnectionCredential of the ClusterDefinition.
    it will be ignored when “account” is set.


    +

    TargetPodSelector +(string alias)

    +

    +(Appears on:Action) +

    +
    +

    TargetPodSelector defines how to select pod(s) to execute a action.


    +
    + + + + + + + + + + + + + + + + +
    ValueDescription

    "All"

    "Any"

    "Ordinal"

    "Role"

    TenancyType (string alias)

    @@ -9758,7 +15562,7 @@ string

    UpdateStrategy (string alias)

    -(Appears on:StatefulSetSpec) +(Appears on:ClusterComponentSpec, ComponentDefinitionSpec, StatefulSetSpec)

    UpdateStrategy defines Cluster Component update strategy.


    @@ -9781,7 +15585,7 @@ string

    UpdatedParameters

    -(Appears on:ConfigurationStatus) +(Appears on:ConfigurationItemStatus)

    @@ -9863,7 +15667,7 @@ string

    UpgradePolicy (string alias)

    -(Appears on:Configuration, ConfigurationStatus) +(Appears on:ConfigurationItem, ConfigurationItemStatus)

    UpgradePolicy defines the policy of reconfiguring.


    @@ -9889,6 +15693,274 @@ string +

    UserResourceRefs +

    +

    +(Appears on:ClusterComponentSpec) +

    +
    +
    + + + + + + + + + + + + + + + + + +
    FieldDescription
    +secretRefs
    + + +[]SecretRef + + +
    +(Optional) +

    secretRefs defines the user-defined secrets.


    +
    +configMapRefs
    + + +[]ConfigMapRef + + +
    +(Optional) +

    configMapRefs defines the user-defined configmaps.


    +
    +

    ValueFrom +

    +

    +(Appears on:EnvMappingVar) +

    +
    +
    + + + + + + + + + + + + + + + + + +
    FieldDescription
    +clusterVersionRef
    + + +[]ValueMapping + + +
    +(Optional) +

    mapped ClusterVersionRef to env value.


    +
    +componentDef
    + + +[]ValueMapping + + +
    +(Optional) +

    mapped ComponentDefinition to env value.


    +
    +

    ValueMapping +

    +

    +(Appears on:ValueFrom) +

    +
    +
    + + + + + + + + + + + + + + + + + +
    FieldDescription
    +names
    + +[]string + +
    +

    the array of ClusterVersion name which can be mapped to the env value.


    +
    +mappingValue
    + +string + +
    +

    mapping value for the specified ClusterVersion names.


    +
    +

    VarOption +(string alias)

    +

    +(Appears on:CredentialVars, NamedVar, ServiceRefVars, ServiceVars) +

    +
    +

    VarOption defines whether a variable is required or optional.


    +
    +

    VarSource +

    +

    +(Appears on:EnvVar) +

    +
    +

    VarSource represents a source for the value of an EnvVar.


    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    +configMapKeyRef
    + + +Kubernetes core/v1.ConfigMapKeySelector + + +
    +(Optional) +

    Selects a key of a ConfigMap.


    +
    +secretKeyRef
    + + +Kubernetes core/v1.SecretKeySelector + + +
    +(Optional) +

    Selects a key of a Secret.


    +
    +serviceVarRef
    + + +ServiceVarSelector + + +
    +(Optional) +

    Selects a defined var of a Service.


    +
    +credentialVarRef
    + + +CredentialVarSelector + + +
    +(Optional) +

    Selects a defined var of a Credential (SystemAccount).


    +
    +serviceRefVarRef
    + + +ServiceRefVarSelector + + +
    +(Optional) +

    Selects a defined var of a ServiceRef.


    +
    +

    VarsRef +

    +

    +(Appears on:ComponentDefinitionRef, OpsDefinitionSpec) +

    +
    +
    + + + + + + + + + + + + + + + + + +
    FieldDescription
    +podSelectionStrategy
    + + +PodSelectionStrategy + + +
    +

    podSelectionStrategy how to select the target component pod for variable references based on the strategy.
    - PreferredAvailable: prioritize the selection of available pod.
    - Available: only select available pod. if not found, terminating the operation.


    +
    +vars
    + + +[]OpsEnvVar + + +
    +

    List of environment variables to set in the job’s container.


    +

    VersionsContext

    diff --git a/docs/user_docs/lorryctl/cli.md b/docs/user_docs/lorryctl/cli.md new file mode 100644 index 00000000000..035a36f02c9 --- /dev/null +++ b/docs/user_docs/lorryctl/cli.md @@ -0,0 +1,66 @@ +--- +title: KubeBlocks Lorry CLI Overview +description: KubeBlocks Lorry CLI overview +sidebar_position: 1 +--- + +## [createuser](lorryctl_createuser.md) + +create user. + + + +## [deleteuser](lorryctl_deleteuser.md) + +delete user. + + + +## [describeuser](lorryctl_describeuser.md) + +describe user. + + + +## [grant-role](lorryctl_grant-role.md) + +grant user role. + + + +## [listsystemaccounts](lorryctl_listsystemaccounts.md) + +list system accounts. + + + +## [listusers](lorryctl_listusers.md) + +list normal users. + + + +## [revoke-role](lorryctl_revoke-role.md) + +revoke user role. + + + +## [run](lorryctl_run.md) + +Run Lorry and db service. + + + +## [switchover](lorryctl_switchover.md) + +execute a switchover request. + + + +## [vault-plugin](lorryctl_vault-plugin.md) + +run a vault-plugin service. + + + diff --git a/docs/user_docs/lorryctl/lorryctl.md b/docs/user_docs/lorryctl/lorryctl.md new file mode 100644 index 00000000000..c7368ed4375 --- /dev/null +++ b/docs/user_docs/lorryctl/lorryctl.md @@ -0,0 +1,45 @@ +--- +title: lorryctl +--- + +LORRY CLI + +### Synopsis + +``` + + / / ____ ____________ __ / ____/ /______/ / + / / / __ \/ ___/ ___/ / / / / / / __/ ___/ / + / /___/ /_/ / / / / / /_/ / / /___/ /_/ / / / +/_____/\____/_/ /_/ \__, / \____/\__/_/ /_/ + /____/ +=============================== +Lorry service client +``` + +``` +lorryctl [flags] +``` + +### Options + +``` + -h, --help help for lorryctl + --kb-runtime-dir string The directory of kubeblocks binaries (default "/kubeblocks/") +``` + +### SEE ALSO + +* [lorryctl createuser](lorryctl_createuser.md) - create user. +* [lorryctl deleteuser](lorryctl_deleteuser.md) - delete user. +* [lorryctl describeuser](lorryctl_describeuser.md) - describe user. +* [lorryctl grant-role](lorryctl_grant-role.md) - grant user role. +* [lorryctl listsystemaccounts](lorryctl_listsystemaccounts.md) - list system accounts. +* [lorryctl listusers](lorryctl_listusers.md) - list normal users. +* [lorryctl revoke-role](lorryctl_revoke-role.md) - revoke user role. +* [lorryctl run](lorryctl_run.md) - Run Lorry and db service. +* [lorryctl switchover](lorryctl_switchover.md) - execute a switchover request. +* [lorryctl vault-plugin](lorryctl_vault-plugin.md) - run a vault-plugin service. + +#### Go Back to [LorryCtl Overview](cli.md) Homepage. + diff --git a/docs/user_docs/lorryctl/lorryctl_createuser.md b/docs/user_docs/lorryctl/lorryctl_createuser.md new file mode 100644 index 00000000000..846210e8e82 --- /dev/null +++ b/docs/user_docs/lorryctl/lorryctl_createuser.md @@ -0,0 +1,39 @@ +--- +title: lorryctl createuser +--- + +create user. + +``` +lorryctl createuser [flags] +``` + +### Examples + +``` + +lorryctl createuser --username xxx --password xxx + +``` + +### Options + +``` + -h, --help Print this help message + --lorry-addr string The addr of lorry to request (default "http://localhost:3501/v1.0/") + --password string The password of user to create + --username string The name of user to create +``` + +### Options inherited from parent commands + +``` + --kb-runtime-dir string The directory of kubeblocks binaries (default "/kubeblocks/") +``` + +### SEE ALSO + +* [lorryctl](lorryctl.md) - LORRY CLI + +#### Go Back to [LorryCtl Overview](cli.md) Homepage. + diff --git a/docs/user_docs/lorryctl/lorryctl_deleteuser.md b/docs/user_docs/lorryctl/lorryctl_deleteuser.md new file mode 100644 index 00000000000..a05ebb820fd --- /dev/null +++ b/docs/user_docs/lorryctl/lorryctl_deleteuser.md @@ -0,0 +1,38 @@ +--- +title: lorryctl deleteuser +--- + +delete user. + +``` +lorryctl deleteuser [flags] +``` + +### Examples + +``` + +lorryctl deleteuser --username xxx + +``` + +### Options + +``` + -h, --help Print this help message + --lorry-addr string The addr of lorry to request (default "http://localhost:3501/v1.0/") + --username string The name of user to delete +``` + +### Options inherited from parent commands + +``` + --kb-runtime-dir string The directory of kubeblocks binaries (default "/kubeblocks/") +``` + +### SEE ALSO + +* [lorryctl](lorryctl.md) - LORRY CLI + +#### Go Back to [LorryCtl Overview](cli.md) Homepage. + diff --git a/docs/user_docs/lorryctl/lorryctl_describeuser.md b/docs/user_docs/lorryctl/lorryctl_describeuser.md new file mode 100644 index 00000000000..c196ee0cac7 --- /dev/null +++ b/docs/user_docs/lorryctl/lorryctl_describeuser.md @@ -0,0 +1,38 @@ +--- +title: lorryctl describeuser +--- + +describe user. + +``` +lorryctl describeuser [flags] +``` + +### Examples + +``` + +lorryctl describeuser --username xxx + +``` + +### Options + +``` + -h, --help Print this help message + --lorry-addr string The addr of lorry to request (default "http://localhost:3501/v1.0/") + --username string The name of user to describe +``` + +### Options inherited from parent commands + +``` + --kb-runtime-dir string The directory of kubeblocks binaries (default "/kubeblocks/") +``` + +### SEE ALSO + +* [lorryctl](lorryctl.md) - LORRY CLI + +#### Go Back to [LorryCtl Overview](cli.md) Homepage. + diff --git a/docs/user_docs/lorryctl/lorryctl_grant-role.md b/docs/user_docs/lorryctl/lorryctl_grant-role.md new file mode 100644 index 00000000000..8de4a980776 --- /dev/null +++ b/docs/user_docs/lorryctl/lorryctl_grant-role.md @@ -0,0 +1,39 @@ +--- +title: lorryctl grant-role +--- + +grant user role. + +``` +lorryctl grant-role [flags] +``` + +### Examples + +``` + +lorryctl grant-role --username xxx --rolename xxx + +``` + +### Options + +``` + -h, --help Print this help message + --lorry-addr string The addr of lorry to request (default "http://localhost:3501/v1.0/") + --rolename string The name of role to grant + --username string The name of user to grant +``` + +### Options inherited from parent commands + +``` + --kb-runtime-dir string The directory of kubeblocks binaries (default "/kubeblocks/") +``` + +### SEE ALSO + +* [lorryctl](lorryctl.md) - LORRY CLI + +#### Go Back to [LorryCtl Overview](cli.md) Homepage. + diff --git a/docs/user_docs/lorryctl/lorryctl_listsystemaccounts.md b/docs/user_docs/lorryctl/lorryctl_listsystemaccounts.md new file mode 100644 index 00000000000..426000444b7 --- /dev/null +++ b/docs/user_docs/lorryctl/lorryctl_listsystemaccounts.md @@ -0,0 +1,37 @@ +--- +title: lorryctl listsystemaccounts +--- + +list system accounts. + +``` +lorryctl listsystemaccounts [flags] +``` + +### Examples + +``` + +lorryctl listsystemaccounts + +``` + +### Options + +``` + -h, --help Print this help message + --lorry-addr string The addr of lorry to request (default "http://localhost:3501/v1.0/") +``` + +### Options inherited from parent commands + +``` + --kb-runtime-dir string The directory of kubeblocks binaries (default "/kubeblocks/") +``` + +### SEE ALSO + +* [lorryctl](lorryctl.md) - LORRY CLI + +#### Go Back to [LorryCtl Overview](cli.md) Homepage. + diff --git a/docs/user_docs/lorryctl/lorryctl_listusers.md b/docs/user_docs/lorryctl/lorryctl_listusers.md new file mode 100644 index 00000000000..d084940bf7e --- /dev/null +++ b/docs/user_docs/lorryctl/lorryctl_listusers.md @@ -0,0 +1,37 @@ +--- +title: lorryctl listusers +--- + +list normal users. + +``` +lorryctl listusers [flags] +``` + +### Examples + +``` + +lorryctl listusers + +``` + +### Options + +``` + -h, --help Print this help message + --lorry-addr string The addr of lorry to request (default "http://localhost:3501/v1.0/") +``` + +### Options inherited from parent commands + +``` + --kb-runtime-dir string The directory of kubeblocks binaries (default "/kubeblocks/") +``` + +### SEE ALSO + +* [lorryctl](lorryctl.md) - LORRY CLI + +#### Go Back to [LorryCtl Overview](cli.md) Homepage. + diff --git a/docs/user_docs/lorryctl/lorryctl_revoke-role.md b/docs/user_docs/lorryctl/lorryctl_revoke-role.md new file mode 100644 index 00000000000..41bd687636d --- /dev/null +++ b/docs/user_docs/lorryctl/lorryctl_revoke-role.md @@ -0,0 +1,39 @@ +--- +title: lorryctl revoke-role +--- + +revoke user role. + +``` +lorryctl revoke-role [flags] +``` + +### Examples + +``` + +lorryctl revoke-role --username xxx --rolename xxx + +``` + +### Options + +``` + -h, --help Print this help message + --lorry-addr string The addr of lorry to request (default "http://localhost:3501/v1.0/") + --rolename string The name of role to revoke + --username string The name of user to revoke +``` + +### Options inherited from parent commands + +``` + --kb-runtime-dir string The directory of kubeblocks binaries (default "/kubeblocks/") +``` + +### SEE ALSO + +* [lorryctl](lorryctl.md) - LORRY CLI + +#### Go Back to [LorryCtl Overview](cli.md) Homepage. + diff --git a/docs/user_docs/lorryctl/lorryctl_run.md b/docs/user_docs/lorryctl/lorryctl_run.md new file mode 100644 index 00000000000..01a18a7c943 --- /dev/null +++ b/docs/user_docs/lorryctl/lorryctl_run.md @@ -0,0 +1,42 @@ +--- +title: lorryctl run +--- + +Run Lorry and db service. + +``` +lorryctl run [flags] +``` + +### Examples + +``` + +lorryctl run -- mysqld + +``` + +### Options + +``` + -d, --components-path string The path for components directory (default "/kubeblocks/config/probe/components") + -c, --config string Dapr configuration file (default "/kubeblocks/config/probe/config.yaml") + -G, --dapr-grpc-port int The gRPC port for Dapr to listen on (default -1) + -H, --dapr-http-port int The HTTP port for Dapr to listen on (default -1) + -I, --dapr-internal-grpc-port int The gRPC port for the Dapr internal API to listen on (default 56471) + -h, --help Print this help message + --log-level string The log verbosity. Valid values are: debug, info, warn, error, fatal, or panic (default "info") +``` + +### Options inherited from parent commands + +``` + --kb-runtime-dir string The directory of kubeblocks binaries (default "/kubeblocks/") +``` + +### SEE ALSO + +* [lorryctl](lorryctl.md) - LORRY CLI + +#### Go Back to [LorryCtl Overview](cli.md) Homepage. + diff --git a/docs/user_docs/lorryctl/lorryctl_switchover.md b/docs/user_docs/lorryctl/lorryctl_switchover.md new file mode 100644 index 00000000000..23362b39a5d --- /dev/null +++ b/docs/user_docs/lorryctl/lorryctl_switchover.md @@ -0,0 +1,40 @@ +--- +title: lorryctl switchover +--- + +execute a switchover request. + +``` +lorryctl switchover [flags] +``` + +### Examples + +``` + +lorryctl switchover --primary xxx --candidate xxx + +``` + +### Options + +``` + -c, --candidate string The candidate pod name + -f, --force force to swithover if failed + -h, --help Print this help message + --lorry-addr string The addr of lorry to request (default "http://localhost:3501/v1.0/") + -p, --primary string The primary pod name +``` + +### Options inherited from parent commands + +``` + --kb-runtime-dir string The directory of kubeblocks binaries (default "/kubeblocks/") +``` + +### SEE ALSO + +* [lorryctl](lorryctl.md) - LORRY CLI + +#### Go Back to [LorryCtl Overview](cli.md) Homepage. + diff --git a/docs/user_docs/lorryctl/lorryctl_vault-plugin.md b/docs/user_docs/lorryctl/lorryctl_vault-plugin.md new file mode 100644 index 00000000000..df0e6dc7927 --- /dev/null +++ b/docs/user_docs/lorryctl/lorryctl_vault-plugin.md @@ -0,0 +1,39 @@ +--- +title: lorryctl vault-plugin +--- + +run a vault-plugin service. + +``` +lorryctl vault-plugin [flags] +``` + +### Examples + +``` + +lorryctl vault-plugin --primary xxx --candidate xxx + +``` + +### Options + +``` + -c, --candidate string The candidate pod name + -h, --help Print this help message + --lorry-addr string The addr of lorry to request (default "localhost:3501") + -l, --primary string The primary pod name +``` + +### Options inherited from parent commands + +``` + --kb-runtime-dir string The directory of kubeblocks binaries (default "/kubeblocks/") +``` + +### SEE ALSO + +* [lorryctl](lorryctl.md) - LORRY CLI + +#### Go Back to [LorryCtl Overview](cli.md) Homepage. +