Cluster API Reference
Packages:
apps.kubeblocks.io/v1alpha1
Resource Types:- BackupPolicyTemplate
- Cluster
- ClusterDefinition
- ClusterVersion
- Component
- ComponentClassDefinition
- ComponentDefinition
- ComponentResourceConstraint
- ConfigConstraint
- Configuration
- OpsDefinition
- OpsRequest
- ServiceDescriptor
BackupPolicyTemplate
BackupPolicyTemplate is the Schema for the BackupPolicyTemplates API (defined by provider)
Field | Description | ||||||
---|---|---|---|---|---|---|---|
apiVersion string | apps.kubeblocks.io/v1alpha1 | ||||||
kind string | BackupPolicyTemplate | ||||||
metadata Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||||
spec BackupPolicyTemplateSpec |
| ||||||
status BackupPolicyTemplateStatus |
Cluster
Cluster is the Schema for the clusters API.
Field | Description | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
apiVersion string | apps.kubeblocks.io/v1alpha1 | ||||||||||||||||||||||||||||||||||
kind string | Cluster | ||||||||||||||||||||||||||||||||||
metadata Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||||||||||||||||||||||||||||||||
spec ClusterSpec |
| ||||||||||||||||||||||||||||||||||
status ClusterStatus |
ClusterDefinition
ClusterDefinition is the Schema for the clusterdefinitions API
Field | Description | ||||||
---|---|---|---|---|---|---|---|
apiVersion string | apps.kubeblocks.io/v1alpha1 | ||||||
kind string | ClusterDefinition | ||||||
metadata Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||||
spec ClusterDefinitionSpec |
| ||||||
status ClusterDefinitionStatus |
ClusterVersion
ClusterVersion is the Schema for the ClusterVersions API
Field | Description | ||||
---|---|---|---|---|---|
apiVersion string | apps.kubeblocks.io/v1alpha1 | ||||
kind string | ClusterVersion | ||||
metadata Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||
spec ClusterVersionSpec |
| ||||
status ClusterVersionStatus |
Component
Component is the Schema for the components API
Field | Description | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
apiVersion string | apps.kubeblocks.io/v1alpha1 | ||||||||||||||||||||||||||||||||||||||||||||
kind string | Component | ||||||||||||||||||||||||||||||||||||||||||||
metadata Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||||||||||||||||||||||||||||||||||||||||||
spec ComponentSpec |
| ||||||||||||||||||||||||||||||||||||||||||||
status ComponentStatus |
ComponentClassDefinition
ComponentClassDefinition is the Schema for the componentclassdefinitions API
Field | Description | ||
---|---|---|---|
apiVersion string | apps.kubeblocks.io/v1alpha1 | ||
kind string | ComponentClassDefinition | ||
metadata Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||
spec ComponentClassDefinitionSpec |
| ||
status ComponentClassDefinitionStatus |
ComponentDefinition
ComponentDefinition is the Schema for the componentdefinitions API
Field | Description | ||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
apiVersion string | apps.kubeblocks.io/v1alpha1 | ||||||||||||||||||||||||||||||||||||||||||
kind string | ComponentDefinition | ||||||||||||||||||||||||||||||||||||||||||
metadata Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||||||||||||||||||||||||||||||||||||||||
spec ComponentDefinitionSpec |
| ||||||||||||||||||||||||||||||||||||||||||
status ComponentDefinitionStatus |
ComponentResourceConstraint
ComponentResourceConstraint is the Schema for the componentresourceconstraints API
Field | Description | ||||||
---|---|---|---|---|---|---|---|
apiVersion string | apps.kubeblocks.io/v1alpha1 | ||||||
kind string | ComponentResourceConstraint | ||||||
metadata Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||||
spec ComponentResourceConstraintSpec |
|
ConfigConstraint
ConfigConstraint is the Schema for the configconstraint API
Field | Description | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
apiVersion string | apps.kubeblocks.io/v1alpha1 | ||||||||||||||||||||||||||
kind string | ConfigConstraint | ||||||||||||||||||||||||||
metadata Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||||||||||||||||||||||||
spec ConfigConstraintSpec |
| ||||||||||||||||||||||||||
status ConfigConstraintStatus |
Configuration
Configuration is the Schema for the configurations API
Field | Description | ||||||
---|---|---|---|---|---|---|---|
apiVersion string | apps.kubeblocks.io/v1alpha1 | ||||||
kind string | Configuration | ||||||
metadata Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||||
spec ConfigurationSpec |
| ||||||
status ConfigurationStatus |
OpsDefinition
OpsDefinition is the Schema for the opsdefinitions API
Field | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
apiVersion string | apps.kubeblocks.io/v1alpha1 | ||||||||||
kind string | OpsDefinition | ||||||||||
metadata Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||||||||
spec OpsDefinitionSpec |
| ||||||||||
status OpsDefinitionStatus |
OpsRequest
OpsRequest is the Schema for the opsrequests API
Field | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
apiVersion string | apps.kubeblocks.io/v1alpha1 | ||||||||||||||||||||||||||||||||||||||||
kind string | OpsRequest | ||||||||||||||||||||||||||||||||||||||||
metadata Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||||||||||||||||||||||||||||||||||||||
spec OpsRequestSpec |
| ||||||||||||||||||||||||||||||||||||||||
status OpsRequestStatus |
ServiceDescriptor
ServiceDescriptor is the Schema for the servicedescriptors API
Field | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
apiVersion string | apps.kubeblocks.io/v1alpha1 | ||||||||||
kind string | ServiceDescriptor | ||||||||||
metadata Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||||||||
spec ServiceDescriptorSpec |
| ||||||||||
status ServiceDescriptorStatus |
AccessMode (string
alias)
(Appears on:ConsensusMember, ConsensusMemberStatus)
AccessMode defines SVC access mode enums.
Value | Description |
---|---|
"None" | |
"ReadWrite" | |
"Readonly" |
AccountName (string
alias)
(Appears on:SystemAccountConfig)
AccountName defines system account names.
Value | Description |
---|---|
"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).
Field | Description |
---|---|
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 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.
the execution process does not impact the state of the Component and the Cluster. Cannot be updated. |
Affinity
(Appears on:ClusterComponentSpec, ClusterSpec, ComponentSpec)
Field | Description |
---|---|
podAntiAffinity PodAntiAffinity | (Optional) podAntiAffinity describes the anti-affinity level of pods within a component. Preferred means try spread pods by |
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 |
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)
Field | Description |
---|---|
processName string | (Optional) processName is process name |
AvailabilityPolicyType (string
alias)
(Appears on:ClusterSpec)
AvailabilityPolicyType for cluster affinity policy.
Value | Description |
---|---|
"node" | |
"none" | |
"zone" |
BackupMethod
(Appears on:BackupPolicy)
Field | Description |
---|---|
BackupMethod github.com/apecloud/kubeblocks/apis/dataprotection/v1alpha1.BackupMethod | (Members of |
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)
Field | Description |
---|---|
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
Field | Description |
---|---|
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)
Field | Description |
---|---|
ref RefNamespaceName | (Optional) Refers to a reference backup that needs to be restored. |
BackupSpec
(Appears on:OpsRequestSpec)
Field | Description |
---|---|
backupName string | (Optional) Specifies the name of the backup. |
backupPolicyName string | (Optional) Indicates the backupPolicy applied to perform this backup. |
backupMethod string | (Optional) Defines the backup method that is defined in backupPolicy. |
deletionPolicy string | (Optional) Determines whether the backup contents stored in backup repository should be deleted when the backup custom resource is deleted. Supported values are |
retentionPeriod string | (Optional) 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
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.
Value | Description |
---|---|
"apecloud-postgresql" | |
"custom" | |
"etcd" | |
"mongodb" | |
"mysql" | |
"oceanbase" | |
"official-postgresql" | |
"polardbx" | |
"postgresql" | |
"redis" | |
"unknown" | |
"wesql" |
CPUConstraint
(Appears on:ResourceConstraintRule)
Field | Description |
---|---|
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.
Value | Description |
---|---|
"dotenv" | |
"hcl" | |
"ini" | |
"json" | |
"properties" | |
"props-plus" | |
"redis" | |
"toml" | |
"xml" | |
"yaml" |
CfgReloadType (string
alias)
CfgReloadType defines reload method.
Value | Description |
---|---|
"auto" | |
"http" | |
"sql" | |
"exec" | |
"tpl" | |
"signal" |
ClassDefRef
(Appears on:ClusterComponentSpec, ComponentSpec, LastComponentConfiguration, VerticalScaling)
Field | Description |
---|---|
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)
Field | Description |
---|---|
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
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.
Field | Description |
---|---|
name string | A component definition name, this name could be used as default name of |
description string | (Optional) The description of component definition. |
workloadType WorkloadType | workloadType defines type of the workload.
|
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. It 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:
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
Value | Description |
---|---|
"Abnormal" | |
"Creating" | |
"Deleting" | |
"Failed" | |
"Running" | |
"Stopped" | |
"Stopping" | |
"Updating" |
ClusterComponentService
(Appears on:ClusterComponentSpec, LastComponentConfiguration)
Field | Description |
---|---|
name string | Service name |
serviceType Kubernetes core/v1.ServiceType | (Optional) serviceType determines how the Service is exposed. Valid options are ClusterIP, NodePort, and LoadBalancer.
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.
Field | Description |
---|---|
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. |
componentDefRef string | (Optional) componentDefRef references componentDef defined in ClusterDefinition spec. Need to comply with IANA Service Naming rule. |
componentDef string | (Optional) componentDef references the name of the ComponentDefinition. If both componentDefRef and componentDef are provided, the componentDef will take precedence over componentDefRef. |
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:
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. |
labels map[string]string | (Optional) Specifies Labels to override or add for underlying Pods. |
annotations map[string]string | (Optional) Specifies Annotations to override or add for underlying Pods. |
env []Kubernetes core/v1.EnvVar | (Optional) List of environment variables to add. These environment variables will be placed after the environment variables declared in the Pod. |
replicas int32 | Component replicas. |
schedulingPolicy SchedulingPolicy | (Optional) Specifies the scheduling policy for the component. |
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. |
volumes []Kubernetes core/v1.Volume | (Optional) List of volumes to override. |
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. |
noCreatePDB bool | (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. |
updateStrategy UpdateStrategy | (Optional) updateStrategy defines the update strategy for the component. |
userResourceRefs UserResourceRefs | (Optional) userResourceRefs defines the user-defined volumes. |
rsmTransformPolicy 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.
Field | Description |
---|---|
phase ClusterComponentPhase | phase describes the phase of the component and the detail information of the phases are as following:
|
message ComponentMessageMap | (Optional) message records the component details message in current phase. Keys are podName or deployName or statefulSetName. The format is |
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. |
consensusSetStatus ConsensusSetStatus | (Optional) consensusSetStatus specifies the mapping of role and pod name. |
replicationSetStatus ReplicationSetStatus | (Optional) replicationSetStatus specifies the mapping of role and pod name. |
membersStatus []MemberStatus | (Optional) members’ status. |
ClusterComponentVersion
(Appears on:ClusterVersionSpec)
ClusterComponentVersion is an application version component spec.
Field | Description |
---|---|
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 |
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 |
ClusterComponentVolumeClaimTemplate
(Appears on:ClusterComponentSpec, ComponentSpec)
Field | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
name string | Reference | ||||||||
spec PersistentVolumeClaimSpec | (Optional) spec defines the desired characteristics of a volume requested by a pod author.
|
ClusterDefinitionProbe
(Appears on:ClusterDefinitionProbes)
Field | Description |
---|---|
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)
Field | Description |
---|---|
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)
Field | Description |
---|---|
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
Field | Description |
---|---|
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:
|
ClusterDefinitionStatus
(Appears on:ClusterDefinition)
ClusterDefinitionStatus defines the observed state of ClusterDefinition
Field | Description |
---|---|
phase Phase | ClusterDefinition phase, valid values are |
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)
Field | Description |
---|---|
monitoringInterval Kubernetes api utils intstr.IntOrString | (Optional) monitoringInterval specifies interval of monitoring, no monitor if set to 0 |
ClusterNetwork
(Appears on:ClusterSpec)
Field | Description |
---|---|
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 defines information to let you locate the referenced object inside the same cluster.
Field | Description |
---|---|
compDef string | (Optional) CompDef specifies the definition used by the component that the referent object resident in. If not specified, the component itself will be used. |
name string | (Optional) Name of the referent object. |
optional bool | (Optional) Specify whether the object must be defined. |
multipleClusterObjectOption MultipleClusterObjectOption | (Optional) This option defines the behavior when multiple component objects match the specified @CompDef. If not provided, an error will be raised when handling multiple matches. |
ClusterPhase (string
alias)
(Appears on:ClusterStatus, OpsRequestBehaviour)
ClusterPhase defines the Cluster CR .status.phase
Value | Description |
---|---|
"Abnormal" | |
"Creating" | |
"Deleting" | |
"Failed" | |
"Running" | |
"Stopped" | |
"Stopping" | |
"Updating" |
ClusterResourceConstraintSelector
(Appears on:ComponentResourceConstraintSpec)
Field | Description |
---|---|
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)
Field | Description |
---|---|
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.
Field | Description |
---|---|
Service Service | (Members of |
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.
Field | Description |
---|---|
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
|
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. |
schedulingPolicy SchedulingPolicy | (Optional) Specifies the scheduling policy for the component. |
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 |
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.
Field | Description |
---|---|
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:
|
message string | (Optional) message describes cluster details message in current phase. |
components map[string]github.com/apecloud/kubeblocks/apis/apps/v1alpha1.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)
Field | Description |
---|---|
size Kubernetes resource.Quantity | (Optional) storage size needed, more info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ |
ClusterSwitchPolicy
(Appears on:ClusterComponentSpec)
Field | Description |
---|---|
type SwitchPolicyType | (Optional) clusterSwitchPolicy defines type of the switchPolicy when workloadType is Replication.
|
ClusterVersionSpec
(Appears on:ClusterVersion)
ClusterVersionSpec defines the desired state of ClusterVersion
Field | Description |
---|---|
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
Field | Description |
---|---|
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.
Field | Description |
---|---|
CommandExecutorEnvItem CommandExecutorEnvItem | (Members of |
CommandExecutorItem CommandExecutorItem | (Members of |
CommandExecutorEnvItem
(Appears on:CmdExecutorConfig, SwitchoverShortSpec, SystemAccountShortSpec)
Field | Description |
---|---|
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)
Field | Description |
---|---|
command []string | command to perform statements. |
args []string | (Optional) args is used to perform statements. |
ComponentClass
(Appears on:ComponentClassDefinitionStatus, ComponentClassSeries)
Field | Description |
---|---|
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
Field | Description |
---|---|
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
Field | Description |
---|---|
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)
Field | Description |
---|---|
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:
|
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)
Field | Description |
---|---|
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)
Field | Description |
---|---|
ComponentTemplateSpec ComponentTemplateSpec | (Members of |
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.
Field | Description |
---|---|
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)
Field | Description |
---|---|
name string | Refers to the name of the component definition. This is a required field with a maximum length of 32 characters. |
accountName string | (Optional) Represents the account name of the component. If provided, the account username and password will be injected into the job environment variables |
serviceName string | (Optional) References the name of the service. If provided, the service name and ports will be mapped to the job environment variables |
varsRef VarsRef | (Optional) Defines the environment variables that need to be referenced from the target component pod and will be injected into the job’s containers. If this field is set, the global “varsRef” will be ignored. |
ComponentDefinitionSpec
(Appears on:ComponentDefinition)
ComponentDefinitionSpec provides a workload component specification with attributes that strongly work with stateful workloads and day-2 operation behaviors.
Field | Description |
---|---|
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:
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 |
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. |
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. 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. |
ComponentDefinitionStatus
(Appears on:ComponentDefinition)
ComponentDefinitionStatus defines the observed state of ComponentDefinition.
Field | Description |
---|---|
observedGeneration int64 | (Optional) ObservedGeneration is the most recent generation observed for this ComponentDefinition. |
phase Phase | (Optional) Phase valid values are ` |
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.
Field | Description |
---|---|
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:
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 the mechanism to probe the role of replicas periodically. The specified action will be executed by Lorry at the configured interval. If the execution is successful, the output will be used as the replica’s assigned role, and the role must be one of the names defined in the componentdefinition roles. The output will be compared with the last successful result. If there is a change, a role change event will be created to notify the controller and trigger updating the replica’s role. Defining a RoleProbe is required if roles are configured for the component. Otherwise, the replicas’ pods will lack role information after the cluster is created, and services will not route to the replica correctly. The following dedicated environment variables are available for the action:
Output of the action: - ROLE: the role of the replica. It must be one of the names defined in the roles. - ERROR: Any error message if the action fails. This field 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:
Dedicated env vars for the action:
The env vars with following prefix are deprecated and will be removed in the future:
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. The function does not specify or constrain the role of the new member. The role assignment is handled by the scripts implemented in the action commands. This provides flexibility as the new member can be automatically scaled and assigned a role based on the cluster’s needs. The following dedicated environment variables are available for the action:
Output of the action: - ERROR: Any error message if the action fails. For example, the following command can be used to add a new OBServer to the OceanBase Cluster in zone1: command: - bash - -c - | ADDRESS=$(KB_MEMBER_ADDRESSES%%,*) HOST=$(echo $ADDRESS | cut -d ‘:’ -f 1) PORT=$(echo $ADDRESS | cut -d ‘:’ -f 2) CLIENT=“mysql -u $KB_SERVICE_USER -p$KB_SERVICE_PASSWORD -P $PORT -h $HOST -e” $CLIENT “ALTER SYSTEM ADD SERVER ‘$KB_NEW_MEMBER_POD_IP:$KB_SERVICE_PORT’ ZONE ‘zone1’” This field 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. The following dedicated environment variables are available for the action:
Output of the action: - ERROR: Any error message if the action fails. For example, the following command can be used to delete a OBServer from the OceanBase Cluster in zone1: command: - bash - -c - | ADDRESS=$(KB_MEMBER_ADDRESSES%%,*) HOST=$(echo $ADDRESS | cut -d ‘:’ -f 1) PORT=$(echo $ADDRESS | cut -d ‘:’ -f 2) CLIENT=“mysql -u $KB_SERVICE_USER -p$KB_SERVICE_PASSWORD -P $PORT -h $HOST -e” $CLIENT “ALTER SYSTEM DELETE SERVER ‘$KB_NEW_MEMBER_POD_IP:$KB_SERVICE_PORT’ ZONE ‘zone1’” This field 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. The following dedicated environment variables are available for the action:
Output of the action: - ERROR: Any error message if the action fails. This field cannot be updated. |
readwrite LifecycleActionHandler | (Optional) Readwrite defines how to set a replica service as read-write. The following dedicated environment variables are available for the action:
Output of the action: - ERROR: Any error message if the action fails. This field 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:
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:
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, RebuildInstance, Reconfigure, ScriptSpec, Switchover, VerticalScaling, VolumeExpansion)
ComponentOps represents the common variables required for operations within the scope of a component.
Field | Description |
---|---|
componentName string | Specifies the name of the cluster component. |
ComponentRefEnv
(Appears on:ComponentDefRef)
ComponentRefEnv specifies name and value of an env.
Field | Description |
---|---|
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)
Field | Description |
---|---|
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
Field | Description |
---|---|
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.
Value | Description |
---|---|
"pods" |
ComponentService
(Appears on:ComponentDefinitionSpec)
Field | Description |
---|---|
Service Service | (Members of |
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
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
Field | Description |
---|---|
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:
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. |
labels map[string]string | (Optional) Specifies Labels to override or add for underlying Pods. |
annotations map[string]string | (Optional) Specifies Annotations to override or add for underlying Pods. |
env []Kubernetes core/v1.EnvVar | (Optional) List of environment variables to add. |
resources Kubernetes core/v1.ResourceRequirements | (Optional) Resources requests and limits of workload. |
volumeClaimTemplates []ClusterComponentVolumeClaimTemplate | (Optional) VolumeClaimTemplates information for statefulset.spec.volumeClaimTemplates. |
volumes []Kubernetes core/v1.Volume | (Optional) List of volumes to override. |
replicas int32 | Component replicas. The default value is used in ClusterDefinition spec if not specified. |
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, and will set relative variables about this log type in database kernel. |
updateStrategy UpdateStrategy | (Optional) |
serviceAccountName string | (Optional) serviceAccountName is the name of the ServiceAccount that running component depends on. |
schedulingPolicy SchedulingPolicy | (Optional) Specifies the scheduling policy for the component. |
affinity Affinity | (Optional) |
tolerations []Kubernetes core/v1.Toleration | (Optional) |
tlsConfig TLSConfig | (Optional) |
rsmTransformPolicy 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 |
ComponentStatus
(Appears on:Component)
ComponentStatus defines the observed state of Component
Field | Description |
---|---|
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:
|
message ComponentMessageMap | (Optional) message records the component details message in current phase. Keys are podName or deployName or statefulSetName. The format is |
ComponentSwitchover
(Appears on:ComponentLifecycleActions)
Field | Description |
---|---|
withCandidate Action | (Optional) withCandidate corresponds to the switchover of the specified candidate primary or leader instance. Currently, only Action.Exec is supported, Action.HTTP is not supported. |
withoutCandidate Action | (Optional) 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. |
scriptSpecSelectors []ScriptSpecSelector | (Optional) 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)
Field | Description |
---|---|
name string | Specify the name of configuration template. |
templateRef 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) 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
(Appears on:ComponentRefEnv)
Field | Description |
---|---|
type ComponentValueFromType | type is the type of the source to select. There are three types: |
fieldPath string | (Optional) fieldRef is the jsonpath of the source to select when type is
|
format string | (Optional) 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
|
joinWith string | (Optional) joinWith is the string to join the values of headless service addresses. |
ComponentValueFromType (string
alias)
(Appears on:ComponentValueFrom)
ComponentValueFromType specifies the type of component value from.
Value | Description |
---|---|
"FieldRef" | |
"HeadlessServiceRef" | |
"ServiceRef" |
ComponentVolume
(Appears on:ComponentDefinitionSpec)
Field | Description |
---|---|
name 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/#namesCannot be updated. |
needSnapshot bool | (Optional) NeedSnapshot indicates whether the volume need to snapshot when making a backup for the component. Cannot be updated. |
highWatermark int | (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. |
ConfigConstraintPhase (string
alias)
(Appears on:ConfigConstraintStatus)
ConfigConstraintPhase defines the ConfigConstraint CR .status.phase
Value | Description |
---|---|
"Available" | |
"Deleting" | |
"Unavailable" |
ConfigConstraintSpec
(Appears on:ConfigConstraint)
ConfigConstraintSpec defines the desired state of ConfigConstraint
Field | Description |
---|---|
reloadOptions ReloadOptions | (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. |
dynamicActionCanBeMerged bool | (Optional) Indicates the dynamic reload action and restart action can be merged to a restart action. When a batch of parameters updates incur both restart & dynamic reload, it works as: - set to true, the two actions merged to only one restart action - set to false, the two actions cannot be merged, the actions executed in order [dynamic reload, restart] |
dynamicParameterSelectedPolicy DynamicParameterSelectedPolicy | (Optional) Specifies the policy for selecting the parameters of dynamic reload actions. |
toolsImageSpec ToolsImageSpec | (Optional) toolConfig used to config init container. |
downwardAPIOptions []DownwardAPIOption | (Optional) downwardAPIOptions is used to watch pod fields. |
scriptConfigs []ScriptConfig | (Optional) scriptConfigs, list of ScriptConfig, witch these scripts can be used by volume trigger,downward trigger, or tool image |
cfgSchemaTopLevelName string | (Optional) cfgSchemaTopLevelName is cue type name, which generates openapi schema. |
configurationSchema CustomParametersValidation | (Optional) configurationSchema imposes restrictions on database parameter’s rule. |
staticParameters []string | (Optional) staticParameters, list of StaticParameter, modifications of them trigger a process restart. |
dynamicParameters []string | (Optional) dynamicParameters, list of DynamicParameter, modifications of them trigger a config dynamic reload without process restart. |
immutableParameters []string | (Optional) immutableParameters describes parameters that prohibit user from modification. |
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 FormatterConfig | formatterConfig describes the format of the configuration file, the controller will:
|
ConfigConstraintStatus
(Appears on:ConfigConstraint)
ConfigConstraintStatus defines the observed state of ConfigConstraint.
Field | Description |
---|---|
phase ConfigConstraintPhase | (Optional) phase is status of configuration template, when set to CCAvailablePhase, it can be referenced by ClusterDefinition or ClusterVersion. |
message string | (Optional) message field describes the reasons of abnormal status. |
observedGeneration int64 | (Optional) 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)
Field | Description |
---|---|
ResourceMeta ResourceMeta | (Members of |
configMap Kubernetes core/v1.ConfigMapVolumeSource | configMap defines the configmap volume source. |
ConfigParams
(Appears on:ConfigurationItemDetail)
Field | Description |
---|---|
content string | (Optional) fileContent indicates the configuration file content. |
parameters map[string]*string | (Optional) updated parameters for a single configuration file. |
ConfigTemplateExtension
(Appears on:ConfigurationItemDetail, LegacyRenderedTemplateSpec)
Field | Description |
---|---|
templateRef 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. |
policy MergedPolicy | (Optional) policy defines how to merge external imported templates into component templates. |
ConfigurationItem
(Appears on:Reconfigure)
Field | Description |
---|---|
name string | Specifies the name of the configuration template. |
policy UpgradePolicy | (Optional) Defines the upgrade policy for the configuration. This field is optional. |
keys []ParameterConfig | Sets the parameters to be updated. It should contain at least one item. The keys are merged and retained during patch operations. |
ConfigurationItemDetail
(Appears on:ConfigurationSpec)
Field | Description |
---|---|
name string | Specify the name of configuration template. |
version string | (Optional) Deprecated: Please use payload instead. version is the version of configuration template. |
payload Payload | (Optional) Payload holds the configuration-related rerender. |
configSpec ComponentConfigSpec | (Optional) configSpec is used to set the configuration template. |
importTemplateRef ConfigTemplateExtension | (Optional) Specify the configuration template. |
configFileParams map[string]github.com/apecloud/kubeblocks/apis/apps/v1alpha1.ConfigParams | (Optional) configFileParams is used to set the parameters to be updated. |
ConfigurationItemDetailStatus
(Appears on:ConfigurationStatus)
Field | Description |
---|---|
name string | name is a config template name. |
phase ConfigurationPhase | (Optional) phase is status of configurationItem. |
lastDoneRevision string | (Optional) lastDoneRevision is the last done revision of configurationItem. |
updateRevision string | (Optional) updateRevision is the update revision of configurationItem. |
message string | (Optional) message field describes the reasons of abnormal status. |
reconcileDetail ReconcileDetail | (Optional) reconcileDetail describes the details of the configuration change execution. |
ConfigurationItemStatus
(Appears on:ReconfiguringStatus)
Field | Description |
---|---|
name string | Specifies the name of the configuration template. |
updatePolicy UpgradePolicy | (Optional) Defines the policy for reconfiguration. |
status string | (Optional) Indicates the current state of the reconfiguration state machine. |
message string | (Optional) Provides details about the operation. |
succeedCount int32 | (Optional) Counts the number of successful reconfigurations. |
expectedCount int32 | (Optional) Specifies the number of expected reconfigurations. |
lastStatus string | (Optional) Records the last status of the reconfiguration controller. |
lastAppliedConfiguration map[string]string | (Optional) Stores the last applied configuration. |
updatedParameters UpdatedParameters | (Optional) Contains the updated parameters. |
ConfigurationPhase (string
alias)
(Appears on:ConfigurationItemDetailStatus)
ConfigurationPhase defines the Configuration FSM phase
Value | Description |
---|---|
"Creating" | |
"Deleting" | |
"FailedAndPause" | |
"FailedAndRetry" | |
"Finished" | |
"Init" | |
"MergeFailed" | |
"Merged" | |
"Pending" | |
"Running" | |
"Upgrading" |
ConfigurationSpec
(Appears on:Configuration)
ConfigurationSpec defines the desired state of Configuration
Field | Description |
---|---|
clusterRef string | clusterRef references Cluster name. |
componentName string | componentName is cluster component name. |
configItemDetails []ConfigurationItemDetail | (Optional) customConfigurationItems describes user-defined config template. |
ConfigurationStatus
(Appears on:Configuration)
ConfigurationStatus defines the observed state of Configuration
Field | Description |
---|---|
message string | (Optional) message field describes the reasons of abnormal status. |
observedGeneration int64 | (Optional) observedGeneration is the latest generation observed for this ClusterDefinition. It refers to the ConfigConstraint’s generation, which is updated by the API Server. |
conditions []Kubernetes meta/v1.Condition | (Optional) conditions describes opsRequest detail status. |
configurationStatus []ConfigurationItemDetailStatus | configurationStatus describes the status of the component reconfiguring. |
ConnectionCredentialAuth
(Appears on:ServiceDescriptorSpec)
Field | Description |
---|---|
username CredentialVar | (Optional) service connection based-on username and password credential. |
password CredentialVar | (Optional) service connection based-on username and password credential. |
ConnectionCredentialKey
(Appears on:TargetInstance)
Field | Description |
---|---|
passwordKey string | (Optional) the key of password in the ConnectionCredential secret. if not set, the default key is “password”. |
usernameKey string | (Optional) the key of username in the ConnectionCredential secret. if not set, the default key is “username”. |
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. |
ConsensusMember
(Appears on:ConsensusSetSpec)
Field | Description |
---|---|
name string | name, role name. |
accessMode AccessMode | accessMode, what service this member capable. |
replicas int32 | (Optional) replicas, number of Pods of this role.
|
ConsensusMemberStatus
(Appears on:ConsensusSetStatus)
Field | Description |
---|---|
name string | Defines the role name. |
accessMode AccessMode | accessMode defines what service this pod provides. |
pod string | Pod name. |
ConsensusSetSpec
(Appears on:ClusterComponentDefinition)
Field | Description |
---|---|
StatefulSetSpec StatefulSetSpec | (Members of |
leader ConsensusMember | leader, one single leader. |
followers []ConsensusMember | (Optional) followers, has voting right but not Leader. |
learner ConsensusMember | (Optional) learner, no voting right. |
ConsensusSetStatus
(Appears on:ClusterComponentStatus)
Field | Description |
---|---|
leader ConsensusMemberStatus | Leader status. |
followers []ConsensusMemberStatus | (Optional) Followers status. |
learner ConsensusMemberStatus | (Optional) Learner status. |
CredentialVar
(Appears on:ConnectionCredentialAuth, ServiceDescriptorSpec)
Field | Description |
---|---|
value string | (Optional) 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 “”. |
valueFrom Kubernetes core/v1.EnvVarSource | (Optional) Source for the environment variable’s value. Cannot be used if value is not empty. |
CredentialVarSelector
(Appears on:VarSource)
CredentialVarSelector selects a var from a Credential (SystemAccount).
Field | Description |
---|---|
ClusterObjectReference ClusterObjectReference | (Members of The Credential (SystemAccount) to select from. |
CredentialVars CredentialVars | (Members of |
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.
Field | Description |
---|---|
username VarOption | (Optional) |
password VarOption | (Optional) |
CustomLabelSpec
(Appears on:ClusterComponentDefinition)
Field | Description |
---|---|
key string | key name of label |
value string | value of label |
resources []GVKResource | resources defines the resources to be labeled. |
CustomOpsSpec
(Appears on:OpsRequestSpec)
Field | Description |
---|---|
componentName string | Refers to the name of the cluster component. |
opsDefinitionRef string | Is a reference to an OpsDefinition. |
params []string | (Optional) Represents the input for this operation as declared in the opsDefinition.spec.parametersSchema. It will create corresponding jobs for each array element. If the param type is an array, the format must be “v1,v2,v3”. |
CustomParametersValidation
(Appears on:ConfigConstraintSpec)
Field | Description |
---|---|
schema 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. |
DownwardAPIOption
(Appears on:ConfigConstraintSpec)
Field | Description |
---|---|
name string | Specify the name of the field. |
mountPoint string | mountPoint is the mount point of the scripts file. |
items []Kubernetes core/v1.DownwardAPIVolumeFile | Items is a list of downward API volume file |
command []string | (Optional) command used to execute for downwrad api. |
DynamicParameterSelectedPolicy (string
alias)
(Appears on:ConfigConstraintSpec)
DynamicParameterSelectedPolicy determines how to select the parameters of dynamic reload actions
Value | Description |
---|---|
"all" | |
"dynamic" |
EnvMappingVar
(Appears on:BackupMethod)
Field | Description |
---|---|
key string | env key which needs to mapping. |
valueFrom ValueFrom | valueFrom defines source of the env value. |
EnvVar
(Appears on:ComponentDefinitionSpec)
EnvVar represents a variable present in the env of Pod/Action or the template of config/script.
Field | Description |
---|---|
name string | Name of the variable. Must be a C_IDENTIFIER. |
value string | (Optional) 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.
Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to “”. |
valueFrom VarSource | (Optional) Source for the variable’s value. Cannot be used if value is not empty. |
EnvVarRef
(Appears on:OpsVarSource)
Field | Description |
---|---|
containerName string | (Optional) Specifies the name of the container as defined in the componentDefinition or as injected by the kubeBlocks controller. If not specified, the first container will be used by default. |
envName string | Defines the name of the environment variable. |
ExecAction
(Appears on:Action)
Field | Description |
---|---|
command []string | (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. |
args []string | (Optional) args is used to perform statements. |
ExporterConfig
(Appears on:MonitorConfig)
Field | Description |
---|---|
scrapePort Kubernetes api utils intstr.IntOrString | scrapePort is exporter port for Time Series Database to scrape metrics. |
scrapePath string | (Optional) scrapePath is exporter url path for Time Series Database to scrape metrics. |
Expose
(Appears on:OpsRequestSpec)
Field | Description |
---|---|
ComponentOps ComponentOps | (Members of |
switch ExposeSwitch | Controls the expose operation. If set to Enable, the corresponding service will be exposed. Conversely, if set to Disable, the service will be removed. |
services []OpsService | A list of services that are to be exposed or removed. If componentNamem is not specified, each |
ExposeSwitch (string
alias)
(Appears on:Expose)
ExposeSwitch Specifies the switch for the expose operation. This switch can be used to enable or disable the expose operation.
Value | Description |
---|---|
"Disable" | |
"Enable" |
FailurePolicyType (string
alias)
(Appears on:ComponentDefRef)
FailurePolicyType specifies the type of failure policy
Value | Description |
---|---|
"Fail" | ReportError means that an error will be reported. |
"Ignore" | Ignore means that an error will be ignored but logged. |
FormatterConfig
(Appears on:ConfigConstraintSpec)
Field | Description |
---|---|
FormatterOptions FormatterOptions | (Members of The FormatterOptions represents the special options of configuration file. This is optional for now. If not specified. |
format CfgFileFormat | The configuration file format. Valid values are
|
FormatterOptions
(Appears on:FormatterConfig)
FormatterOptions represents the special options of configuration file. Only one of its members may be specified.
Field | Description |
---|---|
iniConfig IniConfig | (Optional) iniConfig represents the ini options. |
GVKResource
(Appears on:CustomLabelSpec)
Field | 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. |
HScaleDataClonePolicyType (string
alias)
(Appears on:HorizontalScalePolicy)
HScaleDataClonePolicyType defines data clone policy when horizontal scaling.
Value | Description |
---|---|
"CloneVolume" | |
"Snapshot" | |
"None" |
HTTPAction
(Appears on:Action)
HTTPAction describes an action based on HTTP requests.
Field | Description |
---|---|
path string | (Optional) Path to access on the HTTP server. |
port Kubernetes api utils intstr.IntOrString | 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. |
host string | (Optional) Host name to connect to, defaults to the pod IP. You probably want to set “Host” in httpHeaders instead. |
scheme Kubernetes core/v1.URIScheme | (Optional) Scheme to use for connecting to the host. Defaults to HTTP. |
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. |
httpHeaders []Kubernetes core/v1.HTTPHeader | (Optional) Custom headers to set in the request. HTTP allows repeated headers. |
HorizontalScalePolicy
(Appears on:ClusterComponentDefinition)
Field | Description |
---|---|
type HScaleDataClonePolicyType | (Optional) type controls what kind of data synchronization do when component scale out. Policy is in enum of {None, CloneVolume}. The default policy is
|
backupPolicyTemplateName string | (Optional) BackupPolicyTemplateName reference the backup policy template. |
volumeMountsName string | (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 |
HorizontalScaling
(Appears on:OpsRequestSpec)
HorizontalScaling defines the variables of horizontal scaling operation
Field | Description |
---|---|
ComponentOps ComponentOps | (Members of |
replicas int32 | Specifies the number of replicas for the workloads. |
nodes []k8s.io/apimachinery/pkg/types.NodeName | (Optional) Defines the list of nodes where pods can be scheduled during a scale-up operation. If the RsmTransformPolicy is set to ToPod and the expected number of replicas is greater than the current number, the list of Nodes will be used. If the list of Nodes is empty, pods will not be assigned to any specific node. However, if the list of Nodes is populated, pods will be evenly distributed across the nodes in the list during scale-up. |
instances []string | (Optional) Defines the names of instances that the rsm should prioritize for scale-down operations. If the RsmTransformPolicy is set to ToPod and the expected number of replicas is less than the current number, the list of Instances will be used.
|
IniConfig
(Appears on:FormatterOptions)
Field | Description |
---|---|
sectionName string | (Optional) sectionName describes ini section. |
Instance
(Appears on:RebuildInstance)
Field | Description |
---|---|
name string | Pod name of the instance. |
targetNodeName string | (Optional) The instance will rebuild on the specified node when the instance uses local PersistentVolume as the storage disk. If not set, it will rebuild on a random node. |
Issuer
(Appears on:ClusterComponentSpec, TLSConfig)
Issuer defines Tls certs issuer
Field | Description |
---|---|
name IssuerName | Name of issuer. Options supported:
|
secretRef TLSSecretRef | (Optional) secretRef. TLS certs Secret reference required when from is UserProvided |
IssuerName (string
alias)
(Appears on:Issuer)
IssuerName defines Tls certs issuer name
Value | Description |
---|---|
"KubeBlocks" | IssuerKubeBlocks Certificates signed by KubeBlocks Operator. |
"UserProvided" | IssuerUserProvided User provided own CA-signed certificates. |
KBAccountType (byte
alias)
KBAccountType is used for bitwise operation.
Value | Description |
---|---|
0 |
LastComponentConfiguration
(Appears on:LastConfiguration)
Field | Description |
---|---|
replicas int32 | (Optional) Represents the last replicas of the component. |
ResourceRequirements Kubernetes core/v1.ResourceRequirements | (Members of Represents the last resources of the component. |
classDefRef ClassDefRef | (Optional) References a class defined in ComponentClassDefinition. |
volumeClaimTemplates []OpsRequestVolumeClaimTemplate | (Optional) Records the last volumeClaimTemplates of the component. |
services []ClusterComponentService | (Optional) Records the last services of the component. |
targetResources map[github.com/apecloud/kubeblocks/apis/apps/v1alpha1.ComponentResourceKey][]string | (Optional) Records the information about the target resources affected by the component. The resource key is in the list of [pods]. |
LastConfiguration
(Appears on:OpsRequestStatus)
Field | Description |
---|---|
clusterVersionRef string | (Optional) Specifies the reference to the ClusterVersion name. |
components map[string]github.com/apecloud/kubeblocks/apis/apps/v1alpha1.LastComponentConfiguration | (Optional) Records the last configuration of the component. |
LegacyRenderedTemplateSpec
(Appears on:ComponentConfigSpec)
Field | Description |
---|---|
ConfigTemplateExtension ConfigTemplateExtension | (Members of |
LetterCase (string
alias)
(Appears on:PasswordConfig)
LetterCase defines cases to use in password generation.
Value | Description |
---|---|
"LowerCases" | |
"MixedCases" | |
"UpperCases" |
LifecycleActionHandler
(Appears on:ComponentLifecycleActions, RoleProbe)
Field | Description |
---|---|
builtinHandler BuiltinActionHandlerType | (Optional) 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. |
customHandler Action | (Optional) customHandler defines the custom way to do action. |
LogConfig
(Appears on:ClusterComponentDefinition, ComponentDefinitionSpec)
Field | Description |
---|---|
name string | name log type name, such as slow for MySQL slow log file. |
filePathPattern 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. |
MemoryConstraint
(Appears on:ResourceConstraintRule)
Field | Description |
---|---|
sizePerCPU Kubernetes resource.Quantity | (Optional) The size of memory per vcpu core. For example: 1Gi, 200Mi. If SizePerCPU is specified, MinPerCPU and MaxPerCPU are ignore. |
maxPerCPU Kubernetes resource.Quantity | (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 |
minPerCPU Kubernetes resource.Quantity | (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 |
MergedPolicy (string
alias)
(Appears on:ConfigTemplateExtension)
MergedPolicy defines how to merge external imported templates into component templates.
Value | Description |
---|---|
"none" | |
"add" | |
"patch" | |
"replace" |
MonitorConfig
(Appears on:ClusterComponentDefinition, ComponentDefinitionSpec)
Field | Description |
---|---|
builtIn bool | (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. |
exporterConfig ExporterConfig | (Optional) exporterConfig provided by provider, which specify necessary information to Time Series Database. exporterConfig is valid when builtIn is false. |
MultipleClusterObjectCombinedOption
(Appears on:MultipleClusterObjectOption)
MultipleClusterObjectCombinedOption defines options for handling combined variables.
Field | Description |
---|---|
newVarSuffix string | (Optional) If set, the existing variable will be kept, and a new variable will be defined with the specified suffix in pattern: $(var.name)_$(suffix). The new variable will be auto-created and placed behind the existing one. If not set, the existing variable will be reused with the value format defined below. |
valueFormat MultipleClusterObjectValueFormat | (Optional) The format of the value that the operator will use to compose values from multiple components. |
flattenFormat MultipleClusterObjectValueFormatFlatten | (Optional) The flatten format, default is: $(comp-name-1):value,$(comp-name-2):value. |
MultipleClusterObjectOption
(Appears on:ClusterObjectReference)
MultipleClusterObjectOption defines the options for handling multiple cluster objects matched.
Field | Description |
---|---|
strategy MultipleClusterObjectStrategy | Define the strategy for handling multiple cluster objects. |
combinedOption MultipleClusterObjectCombinedOption | (Optional) Define the options for handling combined variables. Valid only when the strategy is set to “combined”. |
MultipleClusterObjectStrategy (string
alias)
(Appears on:MultipleClusterObjectOption)
MultipleClusterObjectStrategy defines the strategy for handling multiple cluster objects.
Value | Description |
---|---|
"combined" | MultipleClusterObjectStrategyCombined - the values from all matched components will be combined into a single variable using the specified option. |
"individual" | MultipleClusterObjectStrategyIndividual - each matched component will have its individual variable with its name as the suffix. This is required when referencing credential variables that cannot be passed by values. |
MultipleClusterObjectValueFormat (string
alias)
(Appears on:MultipleClusterObjectCombinedOption)
MultipleClusterObjectValueFormat defines the format details for the value.
Value | Description |
---|---|
"Flatten" |
MultipleClusterObjectValueFormatFlatten
(Appears on:MultipleClusterObjectCombinedOption)
MultipleClusterObjectValueFormatFlatten defines the flatten format for the value.
Field | Description |
---|---|
delimiter string | Pair delimiter. |
keyValueDelimiter string | Key-value delimiter. |
NamedVar
(Appears on:ServiceVars)
Field | Description |
---|---|
name string | (Optional) |
option VarOption | (Optional) |
OpsDefinitionSpec
(Appears on:OpsDefinition)
OpsDefinitionSpec defines the desired state of OpsDefinition
Field | Description |
---|---|
componentDefinitionRefs []ComponentDefinitionRef | Specifies the types of componentDefinitions that are supported by the operation. It can refer to some variables of the componentDefinition. If set, any component that does not meet the conditions will be intercepted. |
varsRef VarsRef | (Optional) Defines the environment variables that need to be referenced from the target component pod, and will be injected into the job’s containers. |
parametersSchema ParametersSchema | (Optional) Describes the schema used for validation, pruning, and defaulting. |
jobSpec Kubernetes batch/v1.JobSpec | Describes the job specification for the operation. |
preConditions []PreCondition | (Optional) Specifies the preconditions that must be met to run the job for the operation. |
OpsDefinitionStatus
(Appears on:OpsDefinition)
OpsDefinitionStatus defines the observed state of OpsDefinition
Field | Description |
---|---|
observedGeneration int64 | (Optional) Refers to the most recent generation observed for this OpsDefinition. |
phase Phase | (Optional) Represents the current state of the OpsDefinition. Valid values are ` |
message string | (Optional) Provides additional information about the current phase. |
OpsEnvVar
(Appears on:VarsRef)
Field | Description |
---|---|
name string | Specifies the name of the variable. This must be a C_IDENTIFIER. |
valueFrom OpsVarSource | Defines the source for the variable’s value. |
OpsPhase (string
alias)
(Appears on:OpsRequestStatus)
OpsPhase defines opsRequest phase.
Value | Description |
---|---|
"Cancelled" | |
"Cancelling" | |
"Creating" | |
"Failed" | |
"Pending" | |
"Running" | |
"Succeed" |
OpsRecorder
Field | Description |
---|---|
name string | name OpsRequest name |
type OpsType | opsRequest type |
inQueue bool | indicates whether the current opsRequest is in the queue |
OpsRequestBehaviour
Field | Description |
---|---|
FromClusterPhases []ClusterPhase | |
ToClusterPhase ClusterPhase |
OpsRequestComponentStatus
(Appears on:OpsRequestStatus)
Field | Description |
---|---|
phase ClusterComponentPhase | (Optional) Describes the component phase, referencing Cluster.status.component.phase. |
lastFailedTime Kubernetes meta/v1.Time | (Optional) Indicates the last time the component phase transitioned to Failed or Abnormal. |
progressDetails []ProgressStatusDetail | (Optional) Describes the progress details of the component for this operation. |
workloadType WorkloadType | (Optional) References the workload type of component in ClusterDefinition. |
reason string | (Optional) Describes the reason for the component phase. |
message string | (Optional) Provides a human-readable message indicating details about this operation. |
OpsRequestSpec
(Appears on:OpsRequest)
OpsRequestSpec defines the desired state of OpsRequest
Field | Description |
---|---|
clusterRef string | References the cluster object. |
cancel bool | (Optional) Defines the action to cancel the |
type OpsType | Defines the operation type. |
ttlSecondsAfterSucceed int32 | (Optional) OpsRequest will be deleted after TTLSecondsAfterSucceed second when OpsRequest.status.phase is Succeed. |
upgrade Upgrade | (Optional) Specifies the cluster version by specifying clusterVersionRef. |
horizontalScaling []HorizontalScaling | (Optional) Defines what component need to horizontal scale the specified replicas. |
volumeExpansion []VolumeExpansion | (Optional) Note: Quantity struct can not do immutable check by CEL. Defines what component and volumeClaimTemplate need to expand the specified storage. |
restart []ComponentOps | (Optional) Restarts the specified components. |
switchover []Switchover | (Optional) Switches over the specified components. |
verticalScaling []VerticalScaling | (Optional) Note: Quantity struct can not do immutable check by CEL. Defines what component need to vertical scale the specified compute resources. |
reconfigure Reconfigure | (Optional) Deprecated: replace by reconfigures. Defines the variables that need to input when updating configuration. |
reconfigures []Reconfigure | (Optional) Defines the variables that need to input when updating configuration. |
expose []Expose | (Optional) Defines services the component needs to expose. |
restoreFrom RestoreFromSpec | (Optional) Cluster RestoreFrom backup or point in time. |
ttlSecondsBeforeAbort int32 | (Optional) 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) Defines the script to be executed. |
rebuildFrom []RebuildInstance | (Optional) Specifies the instances that require re-creation. |
backupSpec BackupSpec | (Optional) Defines how to backup the cluster. |
restoreSpec RestoreSpec | (Optional) Defines how to restore the cluster. Note that this restore operation will roll back cluster services. |
customSpec CustomOpsSpec | (Optional) Specifies a custom operation as defined by OpsDefinition. |
OpsRequestStatus
(Appears on:OpsRequest)
OpsRequestStatus represents the observed state of an OpsRequest.
Field | Description |
---|---|
clusterGeneration int64 | (Optional) Specifies the cluster generation after the OpsRequest action has been handled. |
phase OpsPhase | Defines the phase of the OpsRequest. |
progress string | Represents the progress of the OpsRequest. |
lastConfiguration LastConfiguration | (Optional) Records the last configuration before this operation took effect. |
components map[string]github.com/apecloud/kubeblocks/apis/apps/v1alpha1.OpsRequestComponentStatus | (Optional) Records the status information of components changed due to the operation request. |
startTimestamp Kubernetes meta/v1.Time | (Optional) Indicates the time when the OpsRequest started processing. |
completionTimestamp Kubernetes meta/v1.Time | (Optional) Specifies the time when the OpsRequest was completed. |
cancelTimestamp Kubernetes meta/v1.Time | (Optional) Defines the time when the OpsRequest was cancelled. |
reconfiguringStatus ReconfiguringStatus | (Optional) Deprecated: Replaced by ReconfiguringStatusAsComponent. Defines the status information of reconfiguring. |
reconfiguringStatusAsComponent map[string]*github.com/apecloud/kubeblocks/apis/apps/v1alpha1.ReconfiguringStatus | (Optional) Represents the status information of reconfiguring. |
conditions []Kubernetes meta/v1.Condition | (Optional) Describes the detailed status of the OpsRequest. |
OpsRequestVolumeClaimTemplate
(Appears on:LastComponentConfiguration, VolumeExpansion)
Field | Description |
---|---|
storage Kubernetes resource.Quantity | Specifies the requested storage size for the volume. |
name string | A reference to the volumeClaimTemplate name from the cluster components. |
OpsService
(Appears on:Expose)
Field | Description |
---|---|
name string | Specifies the name of the service. This name is used by others to refer to this service (e.g., connection credential). Note: This field cannot be updated. |
annotations map[string]string | (Optional) Contains cloud provider related parameters if ServiceType is LoadBalancer. More info: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer. |
ports []Kubernetes core/v1.ServicePort | (Optional) Lists the ports that are exposed by this service. If 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 |
roleSelector string | (Optional) Allows you to specify a defined role as a selector for the service, extending the ServiceSpec.Selector. |
selector map[string]string | (Optional) Routes 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. This only applies to types ClusterIP, NodePort, and LoadBalancer and is ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/ |
serviceType Kubernetes core/v1.ServiceType | (Optional) Determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. - |
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. |
ipFamilyPolicy Kubernetes core/v1.IPFamilyPolicy | (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. |
OpsType (string
alias)
(Appears on:OpsRecorder, OpsRequestSpec)
OpsType defines operation types.
Value | Description |
---|---|
"Backup" | DataScriptType the data script operation will execute the data script against the cluster. |
"Custom" | RebuildInstance rebuilding an instance is very useful when a node is offline or an instance is unrecoverable. |
"DataScript" | |
"Expose" | StartType the start operation will start the pods which is deleted in stop operation. |
"HorizontalScaling" | |
"RebuildInstance" | |
"Reconfiguring" | |
"Restart" | |
"Restore" | |
"Start" | StopType the stop operation will delete all pods in a cluster concurrently. |
"Stop" | RestartType the restart operation is a special case of the rolling update operation. |
"Switchover" | |
"Upgrade" | |
"VerticalScaling" | |
"VolumeExpansion" |
OpsVarSource
(Appears on:OpsEnvVar)
Field | Description |
---|---|
envVarRef EnvVarRef | Specifies a reference to a specific environment variable within a container. Used to specify the source of the variable, which can be either “env” or “envFrom”. |
ParameterConfig
(Appears on:ConfigurationItem)
Field | Description |
---|---|
key string | Represents the unique identifier for the ConfigMap. |
parameters []ParameterPair | (Optional) Defines a list of key-value pairs for a single configuration file. These parameters are used to update the specified configuration settings. |
fileContent string | (Optional) Represents the content of the configuration file. This field is used to update the entire content of the file. |
ParameterPair
(Appears on:ParameterConfig)
Field | Description |
---|---|
key string | Represents the name of the parameter that is to be updated. |
value string | (Optional) Represents the parameter values that are to be updated. If set to nil, the parameter defined by the Key field will be removed from the configuration file. |
ParametersSchema
(Appears on:OpsDefinitionSpec)
Field | Description |
---|---|
openAPIV3Schema Kubernetes api extensions v1.JSONSchemaProps | (Optional) Defines the OpenAPI v3 schema used for the parameter schema. The supported property types include: - string - number - integer - array: Note that only items of string type are supported. |
PasswordConfig
(Appears on:SystemAccount, SystemAccountSpec)
PasswordConfig helps provide to customize complexity of password generation pattern.
Field | Description |
---|---|
length int32 | (Optional) length defines the length of password. |
numDigits int32 | (Optional) numDigits defines number of digits. |
numSymbols int32 | (Optional) numSymbols defines number of symbols. |
letterCase LetterCase | (Optional) letterCase defines to use lower-cases, upper-cases or mixed-cases of letters. |
seed string | (Optional) seed specifies the seed used to generate the account’s password. Cannot be updated. |
Payload
(Appears on:ConfigurationItemDetail)
Field | Description |
---|---|
- map[string]any | (Optional) |
PersistentVolumeClaimSpec
(Appears on:ClusterComponentVolumeClaimTemplate)
Field | Description |
---|---|
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. |
Phase (string
alias)
(Appears on:ClusterDefinitionStatus, ClusterVersionStatus, ComponentDefinitionStatus, OpsDefinitionStatus, ServiceDescriptorStatus)
Phase defines the ClusterDefinition and ClusterVersion CR .status.phase
Value | Description |
---|---|
"Available" | |
"Unavailable" |
PodAntiAffinity (string
alias)
(Appears on:Affinity)
PodAntiAffinity defines pod anti-affinity strategy.
Value | Description |
---|---|
"Preferred" | |
"Required" |
PodSelectionStrategy (string
alias)
(Appears on:VarsRef)
PodSelectionStrategy pod selection strategy.
Value | Description |
---|---|
"Available" | |
"PreferredAvailable" |
PointInTimeRefSpec
(Appears on:RestoreFromSpec)
Field | Description |
---|---|
time Kubernetes meta/v1.Time | (Optional) Refers to the specific time point for restoration, with UTC as the time zone. |
ref RefNamespaceName | (Optional) Refers to a reference source cluster that needs to be restored. |
PostStartAction
(Appears on:ClusterComponentDefinition)
Field | Description |
---|---|
cmdExecutorConfig CmdExecutorConfig | cmdExecutorConfig is the executor configuration of the post-start command. |
scriptSpecSelectors []ScriptSpecSelector | (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. |
PreCondition
(Appears on:OpsDefinitionSpec)
Field | Description |
---|---|
rule Rule | Defines the conditions under which the operation can be executed. |
exec PreConditionExec | (Optional) Represents a job that will be run to execute the PreCondition. The operation will only be executed if the job is successful. |
PreConditionExec
(Appears on:PreCondition)
Field | Description |
---|---|
image string | Specifies the name of the Docker image to be used for the execution. |
env []Kubernetes core/v1.EnvVar | (Optional) Defines the environment variables to be set in the container. |
command []string | (Optional) Specifies the commands to be executed in the container. |
args []string | (Optional) Represents the arguments to be passed to the command in the container. |
PreConditionType (string
alias)
(Appears on:Action)
PreConditionType defines the preCondition type of the action execution.
Value | Description |
---|---|
"ClusterReady" | |
"ComponentReady" | |
"Immediately" | |
"RuntimeReady" |
ProgressStatus (string
alias)
(Appears on:ProgressStatusDetail)
ProgressStatus defines the status of the opsRequest progress.
Value | Description |
---|---|
"Failed" | |
"Pending" | |
"Processing" | |
"Succeed" |
ProgressStatusDetail
(Appears on:OpsRequestComponentStatus)
Field | Description |
---|---|
group string | (Optional) Specifies the group to which the current object belongs. If the objects of a component belong to the same group, they can be ignored. |
objectKey string | Represents the unique key of the object. |
status ProgressStatus | Indicates the state of processing the object. |
message string | (Optional) Provides a human-readable message detailing the condition of the object. |
startTime Kubernetes meta/v1.Time | (Optional) Represents the start time of object processing. |
endTime Kubernetes meta/v1.Time | (Optional) Represents the completion time of object processing. |
ProtectedVolume
(Appears on:VolumeProtectionSpec)
Field | Description |
---|---|
name string | (Optional) Name of volume to protect. |
highWatermark int | (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. |
ProvisionPolicy
(Appears on:SystemAccountConfig)
ProvisionPolicy defines the policy details for creating accounts.
Field | Description |
---|---|
type ProvisionPolicyType | type defines the way to provision an account, either |
scope ProvisionScope | scope is the scope to provision account, and the scope could be |
statements ProvisionStatements | (Optional) statements will be used when Type is CreateByStmt. |
secretRef ProvisionSecretRef | (Optional) secretRef will be used when Type is ReferToExisting. |
ProvisionPolicyType (string
alias)
(Appears on:ProvisionPolicy)
ProvisionPolicyType defines the policy for creating accounts.
Value | Description |
---|---|
"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)
(Appears on:ProvisionPolicy)
ProvisionScope defines the scope (within component) of provision.
Value | Description |
---|---|
"AllPods" | AllPods will create accounts for all pods belong to the component. |
"AnyPods" | AnyPods will only create accounts on one pod. |
ProvisionSecretRef
(Appears on:ProvisionPolicy, SystemAccount)
ProvisionSecretRef defines the information of secret referred to.
Field | Description |
---|---|
name string | name refers to the name of the secret. |
namespace string | namespace refers to the namespace of the secret. |
ProvisionStatements
(Appears on:ProvisionPolicy)
ProvisionStatements defines the statements used to create accounts.
Field | Description |
---|---|
creation string | creation specifies statement how to create this account with required privileges. |
update string | (Optional) update specifies statement how to update account’s password. |
deletion string | (Optional) deletion specifies statement how to delete this account. Used in combination with |
RSMSpec
(Appears on:ClusterComponentDefinition)
Field | Description |
---|---|
roles []ReplicaRole | (Optional) Roles, a list of roles defined in the system. |
roleProbe RoleProbe | (Optional) RoleProbe provides method to probe role. |
membershipReconfiguration MembershipReconfiguration | (Optional) MembershipReconfiguration provides actions to do membership dynamic reconfiguration. |
memberUpdateStrategy MemberUpdateStrategy | (Optional) MemberUpdateStrategy, Members(Pods) update strategy.
|
RebuildInstance
(Appears on:OpsRequestSpec)
Field | Description |
---|---|
ComponentOps ComponentOps | (Members of |
instances []Instance | Defines the instances that need to be rebuilt. |
backupName string | (Optional) Indicates the name of the backup from which to recover. Currently, only a full physical backup is supported unless your component only has one replica. Such as ‘xtrabackup’ is full physical backup for mysql and ‘mysqldump’ is not. And if no specified backupName, the instance will be recreated with empty ‘PersistentVolumes’. |
envForRestore []Kubernetes core/v1.EnvVar | (Optional) List of environment variables to set in the container for restore. These will be merged with the env of Backup and ActionSet. The priority of merging is as follows: |
ReconcileDetail
(Appears on:ConfigurationItemDetailStatus)
Field | Description |
---|---|
policy string | (Optional) policy is the policy of the latest execution. |
execResult string | (Optional) execResult is the result of the latest execution. |
currentRevision string | (Optional) currentRevision is the current revision of configurationItem. |
succeedCount int32 | (Optional) succeedCount is the number of pods for which configuration changes were successfully executed. |
expectedCount int32 | (Optional) expectedCount is the number of pods that need to be executed for configuration changes. |
errMessage string | (Optional) errMessage is the error message when the configuration change execution fails. |
Reconfigure
(Appears on:OpsRequestSpec)
Reconfigure represents the variables required for updating a configuration.
Field | Description |
---|---|
ComponentOps ComponentOps | (Members of |
configurations []ConfigurationItem | Specifies the components that will perform the operation. |
ReconfiguringStatus
(Appears on:OpsRequestStatus)
Field | Description |
---|---|
conditions []Kubernetes meta/v1.Condition | (Optional) Describes the reconfiguring detail status. |
configurationStatus []ConfigurationItemStatus | Describes the status of the component reconfiguring. |
RefNamespaceName
(Appears on:BackupRefSpec, PointInTimeRefSpec)
Field | Description |
---|---|
name string | (Optional) Refers to the specific name of the resource. |
namespace string | (Optional) Refers to the specific namespace of the resource. |
ReloadOptions
(Appears on:ConfigConstraintSpec)
ReloadOptions defines reload options Only one of its members may be specified.
Field | Description |
---|---|
unixSignalTrigger UnixSignalTrigger | (Optional) unixSignalTrigger used to reload by sending a signal. |
shellTrigger ShellTrigger | (Optional) shellTrigger performs the reload command. |
tplScriptTrigger TPLScriptTrigger | (Optional) goTplTrigger performs the reload command. |
autoTrigger AutoTrigger | (Optional) autoTrigger performs the reload command. |
ReplicaRole
(Appears on:ComponentDefinitionSpec)
ReplicaRole represents a role that can be assumed by a component instance.
Field | Description |
---|---|
name string | Name of the role. It will apply to “apps.kubeblocks.io/role” object label value. Cannot be updated. |
serviceable bool | (Optional) Serviceable indicates whether a replica with this role can provide services. Cannot be updated. |
writable bool | (Optional) Writable indicates whether a replica with this role is allowed to write data. Cannot be updated. |
votable bool | (Optional) 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.
Field | Description |
---|---|
minReplicas int32 | The minimum limit of replicas. |
maxReplicas int32 | The maximum limit of replicas. |
ReplicationMemberStatus
(Appears on:ReplicationSetStatus)
Field | Description |
---|---|
pod string | Pod name. |
ReplicationSetSpec
(Appears on:ClusterComponentDefinition)
Field | Description |
---|---|
StatefulSetSpec StatefulSetSpec | (Members of |
ReplicationSetStatus
(Appears on:ClusterComponentStatus)
Field | Description |
---|---|
primary ReplicationMemberStatus | Primary status. |
secondaries []ReplicationMemberStatus | (Optional) Secondaries status. |
ResourceConstraintRule
(Appears on:ComponentResourceConstraintSpec)
Field | Description |
---|---|
name string | The name of the constraint. |
cpu CPUConstraint | The constraint for vcpu cores. |
memory MemoryConstraint | The constraint for memory size. |
storage StorageConstraint | (Optional) The constraint for storage size. |
ResourceMeta
(Appears on:ConfigMapRef, SecretRef)
Field | Description |
---|---|
name string | name is the name of the referenced the Configmap/Secret object. |
mountPoint string | mountPath is the path at which to mount the volume. |
subPath string | (Optional) subPath is a relative file path within the volume to mount. |
asVolumeFrom []string | (Optional) asVolumeFrom defines the list of containers where volumeMounts will be injected into. |
RestoreFromSpec
(Appears on:OpsRequestSpec)
Field | Description |
---|---|
backup []BackupRefSpec | (Optional) Refers to the backup name and component name used for restoration. Supports recovery of multiple components. |
pointInTime PointInTimeRefSpec | (Optional) Refers to the specific point in time for recovery. |
RestoreSpec
(Appears on:OpsRequestSpec)
Field | Description |
---|---|
backupName string | Specifies the name of the backup. |
effectiveCommonComponentDef bool | Indicates if this backup will be restored for all components which refer to common ComponentDefinition. |
restoreTimeStr string | Defines the point in time to restore. |
volumeRestorePolicy string | Specifies the volume claim restore policy, support values: [Serial, Parallel] |
doReadyRestoreAfterClusterRunning bool | If set to true, the recovery process in the PostReady phase will be performed after the cluster is running successfully. otherwise, it will be performed after component is running. |
RetryPolicy
(Appears on:Action)
Field | Description |
---|---|
maxRetries int | (Optional) MaxRetries specifies the maximum number of times the action should be retried. |
retryInterval time.Duration | (Optional) RetryInterval specifies the interval between retry attempts. |
RoleArbitrator (string
alias)
(Appears on:ComponentDefinitionSpec)
RoleArbitrator defines how to arbitrate the role of replicas.
Value | Description |
---|---|
"External" | |
"Lorry" |
RoleProbe
(Appears on:ComponentLifecycleActions)
Field | Description |
---|---|
LifecycleActionHandler LifecycleActionHandler | (Members of |
initialDelaySeconds int32 | (Optional) 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 |
timeoutSeconds int32 | (Optional) 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 |
periodSeconds int32 | (Optional) How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. |
Rule
(Appears on:PreCondition)
Field | Description |
---|---|
expression string | Defines how the operation can be executed using a Go template expression. Should return either |
message string | Reported if the rule is not matched. |
SchedulePolicy
(Appears on:BackupPolicy)
Field | Description |
---|---|
enabled bool | (Optional) enabled specifies whether the backup schedule is enabled or not. |
backupMethod string | backupMethod specifies the backup method name that is defined in backupPolicy. |
cronExpression string | the cron expression for schedule, the timezone is in UTC. see https://en.wikipedia.org/wiki/Cron. |
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
|
SchedulingPolicy
(Appears on:ClusterComponentSpec, ClusterSpec, ComponentSpec)
Field | Description |
---|---|
schedulerName string | (Optional) If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. |
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/ |
nodeName string | (Optional) 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. |
affinity Kubernetes core/v1.Affinity | (Optional) If specified, the cluster’s scheduling constraints. |
tolerations []Kubernetes core/v1.Toleration | (Optional) Attached to tolerate any taint that matches the triple |
topologySpreadConstraints []Kubernetes core/v1.TopologySpreadConstraint | (Optional) 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. All topologySpreadConstraints are ANDed. |
ScriptConfig
(Appears on:ConfigConstraintSpec, TPLScriptTrigger)
Field | Description |
---|---|
scriptConfigMapRef string | scriptConfigMapRef used to execute for reload. |
namespace string | (Optional) 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 represents the script that is to be executed from a configMap or a secret.
Field | Description |
---|---|
configMapRef []Kubernetes core/v1.ConfigMapKeySelector | (Optional) Specifies the configMap that is to be executed. |
secretRef []Kubernetes core/v1.SecretKeySelector | (Optional) Specifies the secret that is to be executed. |
ScriptSecret
(Appears on:ScriptSpec)
ScriptSecret represents the secret that is used to execute the script.
Field | Description |
---|---|
name string | Specifies the name of the secret. |
usernameKey string | (Optional) Used to specify the username part of the secret. |
passwordKey string | (Optional) Used to specify the password part of the secret. |
ScriptSpec
(Appears on:OpsRequestSpec)
ScriptSpec is designed to execute specific operations such as creating a database or user. It is not a general-purpose script executor and is applicable for engines like MySQL, PostgreSQL, Redis, MongoDB, etc.
Field | Description |
---|---|
ComponentOps ComponentOps | (Members of |
image string | (Optional) Specifies the image to be used for the exec command. By default, the image of kubeblocks-datascript is used. |
secret ScriptSecret | (Optional) Defines the secret to be used to execute the script. If not specified, the default cluster root credential secret is used. |
script []string | (Optional) Defines the script to be executed. |
scriptFrom ScriptFrom | (Optional) Defines the script to be executed from a configMap or secret. |
selector Kubernetes meta/v1.LabelSelector | (Optional) By default, KubeBlocks will execute the script on the primary pod with role=leader. Exceptions exist, such as Redis, which does not synchronize account information between primary and secondary. In such cases, the script needs to be executed on all pods matching the selector. Indicates the components on which the script is executed. |
ScriptSpecSelector
(Appears on:ComponentSwitchover, PostStartAction, SwitchoverAction)
Field | Description |
---|---|
name string | ScriptSpec name of the referent, refer to componentDefs[x].scriptSpecs[y].Name. |
SecretRef
(Appears on:UserResourceRefs)
Field | Description |
---|---|
ResourceMeta ResourceMeta | (Members of |
secret Kubernetes core/v1.SecretVolumeSource | secret defines the secret volume source. |
Service
(Appears on:ClusterService, ComponentService)
Field | Description | ||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
name string | 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. | ||||||||||||||||||||||||||||||||||||||
serviceName string | (Optional) ServiceName defines the name of the underlying service object. If not specified, the default service name with different patterns will be used:
Only one default service name is allowed. Cannot be updated. | ||||||||||||||||||||||||||||||||||||||
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. | ||||||||||||||||||||||||||||||||||||||
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
| ||||||||||||||||||||||||||||||||||||||
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. |
ServiceDescriptorSpec
(Appears on:ServiceDescriptor)
ServiceDescriptorSpec defines the desired state of ServiceDescriptor
Field | Description |
---|---|
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 |
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. |
ServiceDescriptorStatus
(Appears on:ServiceDescriptor)
ServiceDescriptorStatus defines the observed state of ServiceDescriptor
Field | Description |
---|---|
phase Phase | (Optional) phase - in list of [Available,Unavailable] |
message string | (Optional) A human-readable message indicating details about why the ServiceConnectionCredential is in this phase. |
observedGeneration int64 | (Optional) generation number |
ServicePort
(Appears on:ServiceSpec)
Field | Description |
---|---|
name string | 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. |
protocol Kubernetes core/v1.Protocol | (Optional) The IP protocol for this port. Supports “TCP”, “UDP”, and “SCTP”. Default is TCP. |
appProtocol string | (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 | The port that will be exposed by this service. |
targetPort Kubernetes api utils intstr.IntOrString | (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.
This field is ignored for services with clusterIP=None, and should be omitted or set equal to the More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service |
ServiceRef
(Appears on:ClusterComponentSpec, ComponentSpec)
Field | Description |
---|---|
name string | name of the service reference declaration. references the serviceRefDeclaration name defined in clusterDefinition.componentDefs[].serviceRefDeclarations[].name |
namespace string | (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. |
cluster string | (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. |
serviceDescriptor string | (Optional) 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 If both Cluster and ServiceDescriptor are specified, the Cluster takes precedence. |
ServiceRefDeclaration
(Appears on:ClusterComponentDefinition, ComponentDefinitionSpec)
Field | Description |
---|---|
name string | 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. |
serviceRefDeclarationSpecs []ServiceRefDeclarationSpec | 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. |
ServiceRefDeclarationSpec
(Appears on:ServiceRefDeclaration)
Field | Description |
---|---|
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 |
serviceVersion string | The service version of the service reference. It is a regular expression that matches a version number pattern. For example, |
ServiceRefVarSelector
(Appears on:VarSource)
ServiceRefVarSelector selects a var from a ServiceRefDeclaration.
Field | Description |
---|---|
ClusterObjectReference ClusterObjectReference | (Members of The ServiceRefDeclaration to select from. |
ServiceRefVars ServiceRefVars | (Members of |
ServiceRefVars
(Appears on:ServiceRefVarSelector)
ServiceRefVars defines the vars can be referenced from a ServiceRef.
Field | Description |
---|---|
endpoint VarOption | (Optional) |
port VarOption | (Optional) |
CredentialVars CredentialVars | (Members of |
ServiceSpec
(Appears on:ClusterComponentDefinition)
Field | Description |
---|---|
ports []ServicePort | (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 |
ServiceVarSelector
(Appears on:VarSource)
ServiceVarSelector selects a var from a Service.
Field | Description |
---|---|
ClusterObjectReference ClusterObjectReference | (Members of The Service to select from. It can be referenced from the default headless service by setting the name to “headless”. |
ServiceVars ServiceVars | (Members of |
generatePodOrdinalServiceVar bool | (Optional) 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
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.
Field | Description |
---|---|
host VarOption | (Optional) |
port NamedVar | (Optional) |
nodePort NamedVar | (Optional) |
ShardingSpec
(Appears on:ClusterSpec)
ShardingSpec defines the sharding spec.
Field | Description |
---|---|
name 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 |
template ClusterComponentSpec | 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:
|
ShellTrigger
(Appears on:ReloadOptions)
Field | Description |
---|---|
command []string | command used to execute for reload. |
sync bool | (Optional) Specify synchronize updates parameters to the config manager. |
SignalType (string
alias)
(Appears on:UnixSignalTrigger)
SignalType defines which signals are valid.
Value | Description |
---|---|
"SIGABRT" | |
"SIGALRM" | |
"SIGBUS" | |
"SIGCHLD" | |
"SIGCONT" | |
"SIGFPE" | |
"SIGHUP" | |
"SIGILL" | |
"SIGINT" | |
"SIGIO" | |
"SIGKILL" | |
"SIGPIPE" | |
"SIGPROF" | |
"SIGPWR" | |
"SIGQUIT" | |
"SIGSEGV" | |
"SIGSTKFLT" | |
"SIGSTOP" | |
"SIGSYS" | |
"SIGTERM" | |
"SIGTRAP" | |
"SIGTSTP" | |
"SIGTTIN" | |
"SIGTTOU" | |
"SIGURG" | |
"SIGUSR1" | |
"SIGUSR2" | |
"SIGVTALRM" | |
"SIGWINCH" | |
"SIGXCPU" | |
"SIGXFSZ" |
StatefulSetSpec
(Appears on:ClusterComponentDefinition, ConsensusSetSpec, ReplicationSetSpec)
Field | Description |
---|---|
updateStrategy UpdateStrategy | (Optional) updateStrategy, Pods update strategy. In case of workloadType=Consensus the update strategy will be following:
|
llPodManagementPolicy Kubernetes apps/v1.PodManagementPolicyType | (Optional) llPodManagementPolicy is the low-level controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down.
|
llUpdateStrategy Kubernetes apps/v1.StatefulSetUpdateStrategy | (Optional) llUpdateStrategy indicates the low-level StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template. Will ignore |
StatefulSetWorkload
StatefulSetWorkload interface
StatelessSetSpec
(Appears on:ClusterComponentDefinition)
Field | Description |
---|---|
updateStrategy Kubernetes apps/v1.DeploymentStrategy | (Optional) updateStrategy defines the underlying deployment strategy to use to replace existing pods with new ones. |
StorageConstraint
(Appears on:ResourceConstraintRule)
Field | Description |
---|---|
min Kubernetes resource.Quantity | (Optional) The minimum size of storage. |
max Kubernetes resource.Quantity | (Optional) The maximum size of storage. |
SwitchPolicyType (string
alias)
(Appears on:ClusterSwitchPolicy)
SwitchPolicyType defines switchPolicy type. Currently, only Noop is supported. MaximumAvailability and MaximumDataProtection will be supported in the future.
Value | Description |
---|---|
"MaximumAvailability" | |
"MaximumDataProtection" | |
"Noop" |
Switchover
(Appears on:OpsRequestSpec)
Field | Description |
---|---|
ComponentOps ComponentOps | (Members of |
instanceName string | Utilized to designate the candidate primary or leader instance for the switchover process. If assigned “*”, it signifies that no specific primary or leader is designated for the switchover, and the switchoverAction defined in It is mandatory that If assigned a valid instance name other than “*”, it signifies that a specific candidate primary or leader is designated for the switchover. The value can be retrieved using In this scenario, the |
SwitchoverAction
(Appears on:SwitchoverSpec)
Field | Description |
---|---|
cmdExecutorConfig CmdExecutorConfig | cmdExecutorConfig is the executor configuration of the switchover command. |
scriptSpecSelectors []ScriptSpecSelector | (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 SwitchoverAction.CmdExecutorConfig. |
SwitchoverShortSpec
(Appears on:ClusterComponentVersion)
SwitchoverShortSpec is a short version of SwitchoverSpec, with only CommandExecutorEnvItem field.
Field | Description |
---|---|
cmdExecutorConfig CommandExecutorEnvItem | CmdExecutorConfig is the command executor config. |
SwitchoverSpec
(Appears on:ClusterComponentDefinition)
Field | Description |
---|---|
withCandidate SwitchoverAction | (Optional) withCandidate corresponds to the switchover of the specified candidate primary or leader instance. |
withoutCandidate SwitchoverAction | (Optional) withoutCandidate corresponds to a switchover that does not specify a candidate primary or leader instance. |
SystemAccount
(Appears on:ComponentDefinitionSpec)
Field | Description |
---|---|
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
(Appears on:SystemAccountSpec)
SystemAccountConfig specifies how to create and delete system accounts.
Field | Description |
---|---|
name AccountName | name is the name of a system account. |
provisionPolicy ProvisionPolicy | provisionPolicy defines how to create account. |
SystemAccountShortSpec
(Appears on:ClusterComponentVersion)
SystemAccountShortSpec is a short version of SystemAccountSpec, with only CmdExecutorConfig field.
Field | Description |
---|---|
cmdExecutorConfig CommandExecutorEnvItem | cmdExecutorConfig configs how to get client SDK and perform statements. |
SystemAccountSpec
(Appears on:ClusterComponentDefinition)
SystemAccountSpec specifies information to create system accounts.
Field | Description |
---|---|
cmdExecutorConfig CmdExecutorConfig | cmdExecutorConfig configs how to get client SDK and perform statements. |
passwordConfig PasswordConfig | passwordConfig defines the pattern to generate password. |
accounts []SystemAccountConfig | accounts defines system account config settings. |
TLSConfig
(Appears on:ComponentSpec)
Field | Description |
---|---|
enable bool | (Optional) |
issuer Issuer | (Optional) |
TLSSecretRef
(Appears on:Issuer)
TLSSecretRef defines Secret contains Tls certs
Field | Description |
---|---|
name string | Name of the Secret |
ca string | CA cert key in Secret |
cert string | Cert key in Secret |
key string | Key of TLS private key in Secret |
TPLScriptTrigger
(Appears on:ReloadOptions)
Field | Description |
---|---|
ScriptConfig ScriptConfig | (Members of |
sync bool | (Optional) Specify synchronize updates parameters to the config manager. |
TargetInstance
(Appears on:BackupMethod, BackupPolicy)
Field | Description |
---|---|
role string | select instance of corresponding role for backup, role are:
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. |
account string | (Optional) refer to spec.componentDef.systemAccounts.accounts[*].name in ClusterDefinition. the secret created by this account will be used to connect the database. if not set, the secret created by spec.ConnectionCredential of the ClusterDefinition will be used. it will be transformed to a secret for BackupPolicy’s target secret. |
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:
|
connectionCredentialKey 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.
Value | Description |
---|---|
"All" | |
"Any" | |
"Ordinal" | |
"Role" |
TenancyType (string
alias)
(Appears on:Affinity, ClusterSpec)
TenancyType for cluster tenant resources.
Value | Description |
---|---|
"DedicatedNode" | |
"SharedNode" |
TerminationPolicyType (string
alias)
(Appears on:ClusterSpec)
TerminationPolicyType defines termination policy types.
Value | Description |
---|---|
"Delete" | Delete is based on Halt and deletes PVCs. |
"DoNotTerminate" | DoNotTerminate will block delete operation. |
"Halt" | Halt will delete workload resources such as statefulset, deployment workloads but keep PVCs. |
"WipeOut" | WipeOut is based on Delete and wipe out all volume snapshots and snapshot data from backup storage location. |
ToolConfig
(Appears on:ToolsImageSpec)
Field | Description |
---|---|
name string | Specify the name of initContainer. Must be a DNS_LABEL name. |
image string | (Optional) tools Container image name. |
command []string | exec used to execute for init containers. |
ToolsImageSpec
(Appears on:ConfigConstraintSpec)
Field | Description |
---|---|
mountPoint string | mountPoint is the mount point of the scripts file. |
toolConfigs []ToolConfig | (Optional) toolConfig used to config init container. |
UnixSignalTrigger
(Appears on:ReloadOptions)
Field | Description |
---|---|
signal SignalType | signal is valid for unix signal. e.g: SIGHUP url: ../../pkg/configuration/configmap/handler.go:allUnixSignals |
processName string | processName is process name, sends unix signal to proc. |
UpdateStrategy (string
alias)
(Appears on:ClusterComponentSpec, ComponentDefinitionSpec, ComponentSpec, StatefulSetSpec)
UpdateStrategy defines Cluster Component update strategy.
Value | Description |
---|---|
"BestEffortParallel" | |
"Parallel" | |
"Serial" |
UpdatedParameters
(Appears on:ConfigurationItemStatus)
Field | Description |
---|---|
addedKeys map[string]string | (Optional) Lists the keys that have been added. |
deletedKeys map[string]string | (Optional) Lists the keys that have been deleted. |
updatedKeys map[string]string | (Optional) Lists the keys that have been updated. |
Upgrade
(Appears on:OpsRequestSpec)
Upgrade represents the parameters required for an upgrade operation.
Field | Description |
---|---|
clusterVersionRef string | A reference to the name of the ClusterVersion. |
UpgradePolicy (string
alias)
(Appears on:ConfigurationItem, ConfigurationItemStatus)
UpgradePolicy defines the policy of reconfiguring.
Value | Description |
---|---|
"autoReload" | |
"dynamicReloadBeginRestart" | |
"none" | |
"simple" | |
"parallel" | |
"rolling" | |
"operatorSyncUpdate" |
UserResourceRefs
(Appears on:ClusterComponentSpec)
Field | Description |
---|---|
secretRefs []SecretRef | (Optional) secretRefs defines the user-defined secrets. |
configMapRefs []ConfigMapRef | (Optional) configMapRefs defines the user-defined configmaps. |
ValueFrom
(Appears on:EnvMappingVar)
Field | Description |
---|---|
clusterVersionRef []ValueMapping | (Optional) mapped ClusterVersionRef to env value. |
componentDef []ValueMapping | (Optional) mapped ComponentDefinition to env value. |
ValueMapping
(Appears on:ValueFrom)
Field | Description |
---|---|
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.
Field | Description |
---|---|
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)
Field | Description |
---|---|
podSelectionStrategy PodSelectionStrategy | Defines the method to select the target component pod for variable references. The strategy can be either ‘PreferredAvailable’ which prioritizes the selection of available pods, or ‘Available’ which selects only available pods and terminates the operation if none are found. |
vars []OpsEnvVar | Represents a list of environment variables to be set in the job’s container. |
VersionsContext
(Appears on:ClusterComponentVersion)
Field | Description |
---|---|
initContainers []Kubernetes core/v1.Container | (Optional) Provide ClusterDefinition.spec.componentDefs.podSpec.initContainers override values, typical scenarios are application container image updates. |
containers []Kubernetes core/v1.Container | (Optional) Provide ClusterDefinition.spec.componentDefs.podSpec.containers override values, typical scenarios are application container image updates. |
VerticalScaling
(Appears on:OpsRequestSpec)
VerticalScaling defines the parameters required for scaling compute resources.
Field | Description |
---|---|
ComponentOps ComponentOps | (Members of |
ResourceRequirements Kubernetes core/v1.ResourceRequirements | (Members of Defines the computational resource size for vertical scaling. |
classDefRef ClassDefRef | (Optional) A reference to a class defined in ComponentClassDefinition. |
VolumeExpansion
(Appears on:OpsRequestSpec)
VolumeExpansion encapsulates the parameters required for a volume expansion operation.
Field | Description |
---|---|
ComponentOps ComponentOps | (Members of |
volumeClaimTemplates []OpsRequestVolumeClaimTemplate | volumeClaimTemplates specifies the storage size and volumeClaimTemplate name. |
VolumeProtectionSpec
(Appears on:ClusterComponentDefinition)
Field | Description |
---|---|
highWatermark int | (Optional) The high watermark threshold for 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. |
volumes []ProtectedVolume | (Optional) Volumes to protect. |
VolumeType (string
alias)
(Appears on:VolumeTypeSpec)
VolumeType defines volume type for backup data or log.
Value | Description |
---|---|
"data" | |
"log" |
VolumeTypeSpec
(Appears on:ClusterComponentDefinition)
Field | Description |
---|---|
name string | name definition is the same as the name of the VolumeMounts field in PodSpec.Container, similar to the relations of Volumes[].name and VolumesMounts[].name in Pod.Spec. |
type VolumeType | (Optional) type is in enum of {data, log}. VolumeTypeData: the volume is for the persistent data storage. VolumeTypeLog: the volume is for the persistent log storage. |
WorkloadType (string
alias)
(Appears on:ClusterComponentDefinition, OpsRequestComponentStatus)
WorkloadType defines ClusterDefinition’s component workload type.
Value | Description |
---|---|
"Consensus" | |
"Replication" | |
"Stateful" | |
"Stateless" |
workloads.kubeblocks.io/v1alpha1
Resource Types:ReplicatedStateMachine
ReplicatedStateMachine is the Schema for the replicatedstatemachines API.
Field | Description | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
apiVersion string | workloads.kubeblocks.io/v1alpha1 | ||||||||||||||||||||||||||||||||||
kind string | ReplicatedStateMachine | ||||||||||||||||||||||||||||||||||
metadata Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||||||||||||||||||||||||||||||||
spec ReplicatedStateMachineSpec |
| ||||||||||||||||||||||||||||||||||
status ReplicatedStateMachineStatus |
AccessMode (string
alias)
(Appears on:ReplicaRole)
AccessMode defines SVC access mode enums.
Value | Description |
---|---|
"None" | |
"ReadWrite" | |
"Readonly" |
Action
(Appears on:MembershipReconfiguration, RoleProbe)
Field | Description |
---|---|
image string | (Optional) utility image contains command that can be used to retrieve of process role info |
command []string | Command will be executed in Container to retrieve or process role info |
Credential
(Appears on:ReplicatedStateMachineSpec)
Field | Description |
---|---|
username CredentialVar | Username variable name will be KB_RSM_USERNAME |
password CredentialVar | Password variable name will be KB_RSM_PASSWORD |
CredentialVar
(Appears on:Credential)
Field | Description |
---|---|
value string | (Optional) 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 “”. |
valueFrom Kubernetes core/v1.EnvVarSource | (Optional) Source for the environment variable’s value. Cannot be used if value is not empty. |
MemberStatus
(Appears on:ClusterComponentStatus, ReplicatedStateMachineStatus)
Field | Description |
---|---|
podName string | PodName pod name. |
role ReplicaRole | |
readyWithoutPrimary bool | (Optional) Is it required for rsm to have at least one primary pod to be ready. |
MemberUpdateStrategy (string
alias)
(Appears on:RSMSpec, ReplicatedStateMachineSpec)
MemberUpdateStrategy defines Cluster Component update strategy.
Value | Description |
---|---|
"BestEffortParallel" | |
"Parallel" | |
"Serial" |
MembershipReconfiguration
(Appears on:RSMSpec, ReplicatedStateMachineSpec)
Field | Description |
---|---|
switchoverAction Action | (Optional) Environment variables can be used in all following Actions:
SwitchoverAction specifies how to do switchover latest BusyBox image will be used if Image not configured |
memberJoinAction Action | (Optional) MemberJoinAction specifies how to add member previous none-nil action’s Image will be used if not configured |
memberLeaveAction Action | (Optional) MemberLeaveAction specifies how to remove member previous none-nil action’s Image will be used if not configured |
logSyncAction Action | (Optional) LogSyncAction specifies how to trigger the new member to start log syncing previous none-nil action’s Image will be used if not configured |
promoteAction Action | (Optional) PromoteAction specifies how to tell the cluster that the new member can join voting now previous none-nil action’s Image will be used if not configured |
NodeAssignment
(Appears on:ReplicatedStateMachineSpec)
Field | Description |
---|---|
name string | (Optional) Name defines the name of statefulSet that needs to allocate node. |
nodeSpec NodeSpec | (Optional) NodeSpec defines the detailed node info that will assign to the statefulSet. |
NodeSpec
(Appears on:NodeAssignment)
Field | Description |
---|---|
nodeName k8s.io/apimachinery/pkg/types.NodeName | (Optional) |
ReplicaRole
(Appears on:RSMSpec, MemberStatus, ReplicatedStateMachineSpec)
Field | Description |
---|---|
name string | Name, role name. |
accessMode AccessMode | AccessMode, what service this member capable. |
canVote bool | (Optional) CanVote, whether this member has voting rights |
isLeader bool | (Optional) IsLeader, whether this member is the leader |
ReplicatedStateMachineSpec
(Appears on:ReplicatedStateMachine)
ReplicatedStateMachineSpec defines the desired state of ReplicatedStateMachine
Field | Description |
---|---|
replicas int32 | (Optional) replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1. |
selector Kubernetes meta/v1.LabelSelector | selector is a label query over pods that should match the replica count. It must match the pod template’s labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors |
serviceName string | serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where “pod-specific-string” is managed by the StatefulSet controller. |
service Kubernetes core/v1.Service | (Optional) service defines the behavior of a service spec. provides read-write servicehttps://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status |
alternativeServices []Kubernetes core/v1.Service | (Optional) AlternativeServices defines Alternative Services selector pattern specifier. can be used for creating Readonly service. |
template Kubernetes core/v1.PodTemplateSpec | |
volumeClaimTemplates []Kubernetes core/v1.PersistentVolumeClaim | (Optional) volumeClaimTemplates is a list of claims that pods are allowed to reference. The ReplicatedStateMachine controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name. |
podManagementPolicy Kubernetes apps/v1.PodManagementPolicyType | (Optional) podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down.
|
updateStrategy Kubernetes apps/v1.StatefulSetUpdateStrategy | updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the RSM when a revision is made to Template. UpdateStrategy.Type will be set to appsv1.OnDeleteStatefulSetStrategyType if MemberUpdateStrategy is not nil |
roles []ReplicaRole | (Optional) Roles, a list of roles defined in the system. |
roleProbe RoleProbe | (Optional) RoleProbe provides method to probe role. |
membershipReconfiguration MembershipReconfiguration | (Optional) MembershipReconfiguration provides actions to do membership dynamic reconfiguration. |
memberUpdateStrategy MemberUpdateStrategy | (Optional) MemberUpdateStrategy, Members(Pods) update strategy.
|
paused bool | (Optional) Paused indicates that the rsm is paused, means the reconciliation of this rsm object will be paused. |
credential Credential | (Optional) Credential used to connect to DB engine |
rsmTransformPolicy RsmTransformPolicy | (Optional) RsmTransformPolicy defines the policy generate sts using rsm. Passed from cluster. ToSts: rsm transform to statefulSet ToPod: rsm transform to pod |
nodeAssignment []NodeAssignment | (Optional) NodeAssignment defines the expected assignment of nodes. |
ReplicatedStateMachineStatus
(Appears on:ReplicatedStateMachine)
ReplicatedStateMachineStatus defines the observed state of ReplicatedStateMachine
Field | Description |
---|---|
StatefulSetStatus Kubernetes apps/v1.StatefulSetStatus | (Members of |
initReplicas int32 | InitReplicas is the number of pods(members) when cluster first initialized it’s set to spec.Replicas at object creation time and never changes |
readyInitReplicas int32 | (Optional) ReadyInitReplicas is the number of pods(members) already in MembersStatus in the cluster initialization stage will never change once equals to InitReplicas |
currentGeneration int64 | (Optional) CurrentGeneration, if not empty, indicates the version of the RSM used to generate the underlying workload |
membersStatus []MemberStatus | (Optional) members’ status. |
RoleProbe
(Appears on:RSMSpec, ReplicatedStateMachineSpec)
RoleProbe defines how to observe role
Field | Description |
---|---|
builtinHandlerName string | (Optional) BuiltinHandler specifies the builtin handler name to use to probe the role of the main container. current available handlers: mysql, postgres, mongodb, redis, etcd, kafka. use CustomHandler to define your own role probe function if none of them satisfies the requirement. |
customHandler []Action | (Optional) CustomHandler defines the custom way to do role probe. if the BuiltinHandler satisfies the requirement, use it instead. how the actions defined here works: Actions will be taken in serial. after all actions done, the final output should be a single string of the role name defined in spec.Roles latest BusyBox image will be used if Image not configured Environment variables can be used in Command:
|
initialDelaySeconds int32 | (Optional) Number of seconds after the container has started before role probe has started. |
timeoutSeconds int32 | (Optional) Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. |
periodSeconds int32 | (Optional) How often (in seconds) to perform the probe. Default to 2 seconds. Minimum value is 1. |
successThreshold int32 | (Optional) Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Minimum value is 1. |
failureThreshold int32 | (Optional) Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. |
roleUpdateMechanism RoleUpdateMechanism | (Optional) RoleUpdateMechanism specifies the way how pod role label being updated. |
RoleUpdateMechanism (string
alias)
(Appears on:RoleProbe)
RoleUpdateMechanism defines the way how pod role label being updated.
Value | Description |
---|---|
"DirectAPIServerEventUpdate" | |
"ReadinessProbeEventUpdate" |
RsmTransformPolicy (string
alias)
(Appears on:ClusterComponentSpec, ComponentSpec, ReplicatedStateMachineSpec)
RsmTransformPolicy defines rsm transform type ToSts and ToPod is supported
Value | Description |
---|---|
"ToPod" | |
"ToSts" |
Generated with gen-crd-api-reference-docs