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 | ||||||
---|---|---|---|---|---|---|---|
|
| ||||||
|
| ||||||
Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
| ||||||
BackupPolicyTemplateSpec |
| ||||||
BackupPolicyTemplateStatus |
Cluster
Cluster is the Schema for the clusters API.
Field | Description | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| ||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||
Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
| ||||||||||||||||||||||||||||||||||
ClusterSpec |
| ||||||||||||||||||||||||||||||||||
ClusterStatus |
ClusterDefinition
ClusterDefinition is the Schema for the clusterdefinitions API
Field | Description | ||||||
---|---|---|---|---|---|---|---|
|
| ||||||
|
| ||||||
Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
| ||||||
ClusterDefinitionSpec |
| ||||||
ClusterDefinitionStatus |
ClusterVersion
ClusterVersion is the Schema for the ClusterVersions API
Field | Description | ||||
---|---|---|---|---|---|
|
| ||||
|
| ||||
Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
| ||||
ClusterVersionSpec |
| ||||
ClusterVersionStatus |
Component
Component is the Schema for the components API
Field | Description | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| ||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||
Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
| ||||||||||||||||||||||||||||||||||||||||||||
ComponentSpec |
| ||||||||||||||||||||||||||||||||||||||||||||
ComponentStatus |
ComponentClassDefinition
ComponentClassDefinition is the Schema for the componentclassdefinitions API
Field | Description | ||
---|---|---|---|
|
| ||
|
| ||
Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
| ||
ComponentClassDefinitionSpec |
| ||
ComponentClassDefinitionStatus |
ComponentDefinition
ComponentDefinition is the Schema for the componentdefinitions API
Field | Description | ||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| ||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||
Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
| ||||||||||||||||||||||||||||||||||||||||||
ComponentDefinitionSpec |
| ||||||||||||||||||||||||||||||||||||||||||
ComponentDefinitionStatus |
ComponentResourceConstraint
ComponentResourceConstraint is the Schema for the componentresourceconstraints API
Field | Description | ||||||
---|---|---|---|---|---|---|---|
|
| ||||||
|
| ||||||
Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
| ||||||
ComponentResourceConstraintSpec |
|
ConfigConstraint
ConfigConstraint is the Schema for the configconstraint API
Field | Description | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| ||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||
Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
| ||||||||||||||||||||||||||
ConfigConstraintSpec |
| ||||||||||||||||||||||||||
ConfigConstraintStatus |
Configuration
Configuration is the Schema for the configurations API
Field | Description | ||||||
---|---|---|---|---|---|---|---|
|
| ||||||
|
| ||||||
Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
| ||||||
ConfigurationSpec |
| ||||||
ConfigurationStatus |
OpsDefinition
OpsDefinition is the Schema for the opsdefinitions API
Field | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
| ||||||||||
|
| ||||||||||
Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
| ||||||||||
OpsDefinitionSpec |
| ||||||||||
OpsDefinitionStatus |
OpsRequest
OpsRequest is the Schema for the opsrequests API
Field | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| ||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||
Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
| ||||||||||||||||||||||||||||||||||||||||
OpsRequestSpec |
| ||||||||||||||||||||||||||||||||||||||||
OpsRequestStatus |
ServiceDescriptor
ServiceDescriptor is the Schema for the servicedescriptors API
Field | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
| ||||||||||
|
| ||||||||||
Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
| ||||||||||
ServiceDescriptorSpec |
| ||||||||||
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 |
---|---|
string | (Optional) Image defines the container image to run the action. Cannot be updated. |
ExecAction | (Optional) Exec specifies the action to take. Cannot be updated. |
HTTPAction | (Optional) HTTP specifies the http request to perform. Cannot be updated. |
[]Kubernetes core/v1.EnvVar | (Optional) List of environment variables to set in the container. Cannot be updated. |
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. |
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. |
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. |
int32 | (Optional) TimeoutSeconds defines the timeout duration for the action in seconds. Cannot be updated. |
RetryPolicy | (Optional) RetryPolicy defines the strategy for retrying the action in case of failure. Cannot be updated. |
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 | (Optional) podAntiAffinity describes the anti-affinity level of pods within a component.
Preferred means try spread pods by |
[]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 |
map[string]string | (Optional) nodeLabels describes that pods must be scheduled to the nodes with the specified node labels. |
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 |
---|---|
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 |
---|---|
github.com/apecloud/kubeblocks/apis/dataprotection/v1alpha1.BackupMethod | (Members of |
TargetInstance | (Optional) target instance for backup. |
[]EnvMappingVar | (Optional) envMapping defines the variables of cluster mapped to env values’ keys. |
BackupPolicy
(Appears on:BackupPolicyTemplateSpec)
Field | Description |
---|---|
string | (Optional) componentDefRef references componentDef defined in ClusterDefinition spec. Need to comply with IANA Service Naming rule. |
[]string | (Optional) componentDef references componentDefinition. Need to comply with IANA Service Naming rule. |
TargetInstance | (Optional) target instance for backup. |
[]SchedulePolicy | (Optional) schedule policy for backup. |
[]BackupMethod | backupMethods defines the backup methods. |
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 |
---|---|
string | clusterDefinitionRef references ClusterDefinition name, this is an immutable attribute. |
[]BackupPolicy | backupPolicies is a list of backup policy template for the specified componentDefinition. |
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 |
---|---|
RefNamespaceName | (Optional) Refers to a reference backup that needs to be restored. |
BackupSpec
(Appears on:OpsRequestSpec)
Field | Description |
---|---|
string | (Optional) Specifies the name of the backup. |
string | (Optional) Indicates the backupPolicy applied to perform this backup. |
string | (Optional) Defines the backup method that is defined in backupPolicy. |
string | (Optional) Determines whether the backup contents stored in backup repository
should be deleted when the backup custom resource is deleted.
Supported values are
|
string | (Optional) Determines 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. |
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 |
---|---|
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 |
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 |
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:
|
[]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 |
---|---|
string | (Optional) Name refers to the name of the ComponentClassDefinition. |
string | Class refers to the name of the class that is defined in the ComponentClassDefinition. |
ClusterBackup
(Appears on:ClusterSpec)
Field | Description |
---|---|
bool | (Optional) enabled defines whether to enable automated backup. |
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 |
string | (Optional) backup method name to use, that is defined in backupPolicy. |
string | (Optional) the cron expression for schedule, the timezone is in UTC. see https://en.wikipedia.org/wiki/Cron. |
int64 | (Optional) startingDeadlineMinutes defines the deadline in minutes for starting the backup job if it misses scheduled time for any reason. |
string | (Optional) repoName is the name of the backupRepo, if not set, will use the default backupRepo. |
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 |
---|---|
string | A component definition name, this name could be used as default name of |
string | (Optional) The description of component definition. |
WorkloadType | workloadType defines type of the workload.
|
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. |
[]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. |
[]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. |
ClusterDefinitionProbes | (Optional) probes setting for healthy checks. |
MonitorConfig | (Optional) monitor is monitoring config which provided by provider. |
[]LogConfig | (Optional) logConfigs is detail log file config which provided by provider. |
Kubernetes core/v1.PodSpec | (Optional) podSpec define pod spec template of the cluster component. |
ServiceSpec | (Optional) service defines the behavior of a service spec. provide read-write service when WorkloadType is Consensus. |
StatelessSetSpec | (Optional) statelessSpec defines stateless related spec if workloadType is Stateless. |
StatefulSetSpec | (Optional) statefulSpec defines stateful related spec if workloadType is Stateful. |
ConsensusSetSpec | (Optional) consensusSpec defines consensus related spec if workloadType is Consensus, required if workloadType is Consensus. |
ReplicationSetSpec | (Optional) replicationSpec defines replication related spec if workloadType is Replication. |
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 | (Optional) horizontalScalePolicy controls the behavior of horizontal scale. |
SystemAccountSpec | (Optional) Statement to create system account. |
[]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. |
[]CustomLabelSpec | (Optional) customLabelSpecs is used for custom label tags which you want to add to the component resources. |
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. |
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 | (Optional) |
[]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. |
[]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 |
---|---|
string | Service name |
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. |
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 |
---|---|
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. |
string | (Optional) componentDefRef references componentDef defined in ClusterDefinition spec. Need to comply with IANA Service Naming rule. |
string | (Optional) componentDef references the name of the ComponentDefinition. If both componentDefRef and componentDef are provided, the componentDef will take precedence over componentDefRef. |
ClassDefRef | (Optional) classDefRef references the class defined in ComponentClassDefinition. |
[]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. |
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. |
[]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. |
map[string]string | (Optional) Specifies Labels to override or add for underlying Pods. |
map[string]string | (Optional) Specifies Annotations to override or add for underlying Pods. |
[]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. |
int32 | Component replicas. |
SchedulingPolicy | (Optional) Specifies the scheduling policy for the component. |
Affinity | (Optional) affinity describes affinities specified by users. |
[]Kubernetes core/v1.Toleration | (Optional) Component tolerations will override ClusterSpec.Tolerations if specified. |
Kubernetes core/v1.ResourceRequirements | (Optional) Resources requests and limits of workload. |
[]ClusterComponentVolumeClaimTemplate | (Optional) volumeClaimTemplates information for statefulset.spec.volumeClaimTemplates. |
[]Kubernetes core/v1.Volume | (Optional) List of volumes to override. |
[]ClusterComponentService | (Optional) Services expose endpoints that can be accessed by clients. |
ClusterSwitchPolicy | (Optional) switchPolicy defines the strategy for switchover and failover when workloadType is Replication. |
bool | (Optional) Enables or disables TLS certs. |
Issuer | (Optional) issuer defines provider context for TLS certs. required when TLS enabled |
string | (Optional) serviceAccountName is the name of the ServiceAccount that running component depends on. |
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 | (Optional) updateStrategy defines the update strategy for the component. |
UserResourceRefs | (Optional) userResourceRefs defines the user-defined volumes. |
RsmTransformPolicy | (Optional) RsmTransformPolicy defines the policy generate sts using rsm. ToSts: rsm transforms to statefulSet ToPod: rsm transforms to pods |
[]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. |
[]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 |
---|---|
ClusterComponentPhase | phase describes the phase of the component and the detail information of the phases are as following:
|
ComponentMessageMap | (Optional) message records the component details message in current phase.
Keys are podName or deployName or statefulSetName. The format is |
bool | (Optional) podsReady checks if all pods of the component are ready. |
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 | (Optional) consensusSetStatus specifies the mapping of role and pod name. |
ReplicationSetStatus | (Optional) replicationSetStatus specifies the mapping of role and pod name. |
[]MemberStatus | (Optional) members’ status. |
ClusterComponentVersion
(Appears on:ClusterVersionSpec)
ClusterComponentVersion is an application version component spec.
Field | Description |
---|---|
string | componentDefRef reference one of the cluster component definition names in ClusterDefinition API (spec.componentDefs.name). |
[]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. |
SystemAccountShortSpec | (Optional) systemAccountSpec define image for the component to connect database or engines.
It overrides |
VersionsContext | versionContext defines containers images’ context for component versions, this value replaces ClusterDefinition.spec.componentDefs.podSpec.[initContainers | containers] |
SwitchoverShortSpec | (Optional) switchoverSpec defines images for the component to do switchover.
It overrides |
ClusterComponentVolumeClaimTemplate
(Appears on:ClusterComponentSpec, ComponentSpec)
Field | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
string | Reference | ||||||||
PersistentVolumeClaimSpec | (Optional) spec defines the desired characteristics of a volume requested by a pod author.
|
ClusterDefinitionProbe
(Appears on:ClusterDefinitionProbes)
Field | Description |
---|---|
int32 | How often (in seconds) to perform the probe. |
int32 | Number of seconds after which the probe times out. Defaults to 1 second. |
int32 | Minimum consecutive failures for the probe to be considered failed after having succeeded. |
ClusterDefinitionProbeCMDs | (Optional) commands used to execute for probe. |
ClusterDefinitionProbeCMDs
(Appears on:ClusterDefinitionProbe)
Field | Description |
---|---|
[]string | (Optional) Write check executed on probe sidecar, used to check workload’s allow write access. |
[]string | (Optional) Read check executed on probe sidecar, used to check workload’s readonly access. |
ClusterDefinitionProbes
(Appears on:ClusterComponentDefinition)
Field | Description |
---|---|
ClusterDefinitionProbe | (Optional) Probe for DB running check. |
ClusterDefinitionProbe | (Optional) Probe for DB status check. |
ClusterDefinitionProbe | (Optional) Probe for DB role changed check. |
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 |
---|---|
string | (Optional) Cluster definition type defines well known application cluster type, e.g. mysql/redis/mongodb |
[]ClusterComponentDefinition | componentDefs provides cluster components definitions. |
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 | ClusterDefinition phase, valid values are |
string | (Optional) Extra message in current phase |
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 |
---|---|
Kubernetes api utils intstr.IntOrString | (Optional) monitoringInterval specifies interval of monitoring, no monitor if set to 0 |
ClusterNetwork
(Appears on:ClusterSpec)
Field | Description |
---|---|
bool | (Optional) hostNetworkAccessible specifies whether host network is accessible. It defaults to false |
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 |
---|---|
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. |
string | (Optional) Name of the referent object. |
bool | (Optional) Specify whether the object must be defined. |
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 |
---|---|
string | clusterDefRef is the name of the cluster definition. |
[]ComponentResourceConstraintSelector | selector is used to bind the resource constraint to components. |
ClusterResources
(Appears on:ClusterSpec)
Field | Description |
---|---|
Kubernetes resource.Quantity | (Optional) cpu resource needed, more info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ |
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 | (Members of |
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. |
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 |
---|---|
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. |
string | (Optional) Cluster referencing ClusterVersion name. |
TerminationPolicyType | Cluster termination policy. Valid values are
|
[]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. |
[]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. |
[]ClusterService | (Optional) services defines the services to access a cluster. |
SchedulingPolicy | (Optional) Specifies the scheduling policy for the component. |
Affinity | (Optional) affinity is a group of affinity scheduling rules. |
[]Kubernetes core/v1.Toleration | (Optional) tolerations are attached to tolerate any taint that matches the triple |
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. |
AvailabilityPolicyType | (Optional) availabilityPolicy describes the availability policy, including zone, node, and none. |
int32 | (Optional) replicas specifies the replicas of the first componentSpec, if the replicas of the first componentSpec is specified, this value will be ignored. |
ClusterResources | (Optional) resources specifies the resources of the first componentSpec, if the resources of the first componentSpec is specified, this value will be ignored. |
ClusterStorage | (Optional) storage specifies the storage of the first componentSpec, if the storage of the first componentSpec is specified, this value will be ignored. |
ClusterMonitor | (Optional) monitor specifies the configuration of monitor |
ClusterNetwork | (Optional) network specifies the configuration of network |
ClusterBackup | (Optional) cluster backup configuration. |
ClusterStatus
(Appears on:Cluster)
ClusterStatus defines the observed state of Cluster.
Field | Description |
---|---|
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. |
ClusterPhase | (Optional) phase describes the phase of the Cluster, the detail information of the phases are as following:
|
string | (Optional) message describes cluster details message in current phase. |
map[string]github.com/apecloud/kubeblocks/apis/apps/v1alpha1.ClusterComponentStatus | (Optional) components record the current status information of all components of the cluster. |
int64 | (Optional) clusterDefGeneration represents the generation number of ClusterDefinition referenced. |
[]Kubernetes meta/v1.Condition | (Optional) Describe current state of cluster API Resource, like warning. |
ClusterStorage
(Appears on:ClusterSpec)
Field | Description |
---|---|
Kubernetes resource.Quantity | (Optional) storage size needed, more info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ |
ClusterSwitchPolicy
(Appears on:ClusterComponentSpec)
Field | Description |
---|---|
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 |
---|---|
string | ref ClusterDefinition. |
[]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 | (Optional) phase - in list of [Available,Unavailable] |
string | (Optional) A human readable message indicating details about why the ClusterVersion is in this phase. |
int64 | (Optional) generation number |
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 | (Members of |
CommandExecutorItem | (Members of |
CommandExecutorEnvItem
(Appears on:CmdExecutorConfig, SwitchoverShortSpec, SystemAccountShortSpec)
Field | Description |
---|---|
string | image for Connector when executing the command. |
[]Kubernetes core/v1.EnvVar | (Optional) envs is a list of environment variables. |
CommandExecutorItem
(Appears on:CmdExecutorConfig)
Field | Description |
---|---|
[]string | command to perform statements. |
[]string | (Optional) args is used to perform statements. |
ComponentClass
(Appears on:ComponentClassDefinitionStatus, ComponentClassSeries)
Field | Description |
---|---|
string | (Optional) name is the class name |
[]string | (Optional) args are variable’s value |
Kubernetes resource.Quantity | (Optional) the CPU of the class |
Kubernetes resource.Quantity | (Optional) the memory of the class |
ComponentClassDefinitionSpec
(Appears on:ComponentClassDefinition)
ComponentClassDefinitionSpec defines the desired state of ComponentClassDefinition
Field | Description |
---|---|
[]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 |
---|---|
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. |
[]ComponentClass | classes is the list of classes that have been observed for this ComponentClassDefinition |
ComponentClassGroup
(Appears on:ComponentClassDefinitionSpec)
Field | Description |
---|---|
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:
|
[]string | (Optional) vars defines the variables declared in the template and will be used to generating the complete class definition by render the template. |
[]ComponentClassSeries | (Optional) series is a series of class definitions. |
ComponentClassSeries
(Appears on:ComponentClassGroup)
Field | Description |
---|---|
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” |
[]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 | (Members of |
[]string | (Optional) Specify a list of keys. If empty, ConfigConstraint takes effect for all keys in configmap. |
LegacyRenderedTemplateSpec | (Optional) lazyRenderedConfigSpec is optional: specify the secondary rendered config spec. |
string | (Optional) Specify the name of the referenced the configuration constraints object. |
[]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 |
---|---|
string | componentDefName is the name of the componentDef to select. |
FailurePolicyType | (Optional) failurePolicy is the failure policy of the component. If failed to find the component, the failure policy will be used. |
[]ComponentRefEnv | (Optional) componentRefEnv specifies a list of values to be injected as env variables to each component. |
ComponentDefinitionRef
(Appears on:OpsDefinitionSpec)
Field | Description |
---|---|
string | Refers to the name of the component definition. This is a required field with a maximum length of 32 characters. |
string | (Optional) Represents the account name of the component.
If provided, the account username and password will be injected into the job environment variables |
string | (Optional) References the name of the service.
If provided, the service name and ports will be mapped to the job environment variables |
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 |
---|---|
string | (Optional) Provider is the name of the component provider. |
string | (Optional) Description is a brief description of the component. |
string | (Optional) ServiceKind defines what kind of well-known service that the component provides (e.g., MySQL, Redis, ETCD, case insensitive). Cannot be updated. |
string | (Optional) ServiceVersion defines the version of the well-known service that the component provides. Cannot be updated. |
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. |
[]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. |
[]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. |
[]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 |
[]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. |
[]LogConfig | (Optional) LogConfigs is detail log file config which provided by provider. Cannot be updated. |
MonitorConfig | (Optional) Monitor is monitoring config which provided by provider. Cannot be updated. |
[]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. |
[]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. |
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 | (Optional) ReplicasLimit defines the limit of valid replicas supported. Cannot be updated. |
[]SystemAccount | (Optional) SystemAccounts defines the pre-defined system accounts required to manage the component. Cannot be updated. |
UpdateStrategy | (Optional) UpdateStrategy defines the strategy for updating the component instance. Cannot be updated. |
[]ReplicaRole | (Optional) Roles defines all the roles that the component can assume. Cannot be updated. |
RoleArbitrator | (Optional) RoleArbitrator defines the strategy for electing the component’s active role. Cannot be updated. |
ComponentLifecycleActions | (Optional) LifecycleActions defines the operational actions that needed to interoperate with the component service and processes for lifecycle management. Cannot be updated. |
[]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 |
---|---|
int64 | (Optional) ObservedGeneration is the most recent generation observed for this ComponentDefinition. |
Phase | (Optional) Phase valid values are ``, |
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 |
---|---|
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. |
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 | (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:
This field cannot be updated. |
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. |
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:
For example, the following command can be used to add a new OBServer to the OceanBase Cluster in zone1: command:
This field cannot be updated. |
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:
For example, the following command can be used to delete a OBServer from the OceanBase Cluster in zone1: command:
This field cannot be updated. |
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:
This field cannot be updated. |
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:
This field cannot be updated. |
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. |
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. |
LifecycleActionHandler | (Optional) Reconfigure defines how to notify the replica service that there is a configuration update. Cannot be updated. |
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 |
---|---|
string | Specifies the name of the cluster component. |
ComponentRefEnv
(Appears on:ComponentDefRef)
ComponentRefEnv specifies name and value of an env.
Field | Description |
---|---|
string | name is the name of the env to be injected, and it must be a C identifier. |
string | (Optional) value is the value of the env to be injected. |
ComponentValueFrom | (Optional) valueFrom specifies the source of the env to be injected. |
ComponentResourceConstraintSelector
(Appears on:ClusterResourceConstraintSelector, ComponentResourceConstraintSpec)
Field | Description |
---|---|
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. |
[]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 |
---|---|
[]ResourceConstraintRule | Component resource constraint rules. |
[]ClusterResourceConstraintSelector | (Optional) selector is used to bind the resource constraint to cluster definitions based on ClusterDefinition API. |
[]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 | (Members of |
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 |
---|---|
string | compDef is the name of the referenced componentDefinition. |
ClassDefRef | (Optional) classDefRef references the class defined in ComponentClassDefinition. |
[]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. |
map[string]string | (Optional) Specifies Labels to override or add for underlying Pods. |
map[string]string | (Optional) Specifies Annotations to override or add for underlying Pods. |
[]Kubernetes core/v1.EnvVar | (Optional) List of environment variables to add. |
Kubernetes core/v1.ResourceRequirements | (Optional) Resources requests and limits of workload. |
[]ClusterComponentVolumeClaimTemplate | (Optional) VolumeClaimTemplates information for statefulset.spec.volumeClaimTemplates. |
[]Kubernetes core/v1.Volume | (Optional) List of volumes to override. |
int32 | Component replicas. The default value is used in ClusterDefinition spec if not specified. |
[]ComponentConfigSpec | (Optional) |
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. |
[]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 | (Optional) |
string | (Optional) serviceAccountName is the name of the ServiceAccount that running component depends on. |
SchedulingPolicy | (Optional) Specifies the scheduling policy for the component. |
Affinity | (Optional) |
[]Kubernetes core/v1.Toleration | (Optional) |
TLSConfig | (Optional) |
RsmTransformPolicy | (Optional) RsmTransformPolicy defines the policy generate sts using rsm. ToSts: rsm transform to statefulSet ToPod: rsm transform to pods |
[]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. |
[]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 |
---|---|
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. |
[]Kubernetes meta/v1.Condition | (Optional) Describe current state of component API Resource, like warning. |
ClusterComponentPhase | phase describes the phase of the component and the detail information of the phases are as following:
|
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 |
---|---|
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. |
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. |
[]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 |
---|---|
string | Specify the name of configuration template. |
string | Specify the name of the referenced the configuration template ConfigMap object. |
string | (Optional) Specify the namespace of the referenced the configuration template ConfigMap object. An empty namespace is equivalent to the “default” namespace. |
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. |
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 |
---|---|
ComponentValueFromType | type is the type of the source to select. There are three types: |
string | (Optional) fieldRef is the jsonpath of the source to select when type is
|
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
|
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 |
---|---|
string | The Name of the volume. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names Cannot be updated. |
bool | (Optional) NeedSnapshot indicates whether the volume need to snapshot when making a backup for the component. Cannot be updated. |
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 | (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. |
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:
|
DynamicParameterSelectedPolicy | (Optional) Specifies the policy for selecting the parameters of dynamic reload actions. |
ToolsImageSpec | (Optional) toolConfig used to config init container. |
[]DownwardAPIOption | (Optional) downwardAPIOptions is used to watch pod fields. |
[]ScriptConfig | (Optional) scriptConfigs, list of ScriptConfig, witch these scripts can be used by volume trigger,downward trigger, or tool image |
string | (Optional) cfgSchemaTopLevelName is cue type name, which generates openapi schema. |
CustomParametersValidation | (Optional) configurationSchema imposes restrictions on database parameter’s rule. |
[]string | (Optional) staticParameters, list of StaticParameter, modifications of them trigger a process restart. |
[]string | (Optional) dynamicParameters, list of DynamicParameter, modifications of them trigger a config dynamic reload without process restart. |
[]string | (Optional) immutableParameters describes parameters that prohibit user from modification. |
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 describes the format of the configuration file, the controller will:
|
ConfigConstraintStatus
(Appears on:ConfigConstraint)
ConfigConstraintStatus defines the observed state of ConfigConstraint.
Field | Description |
---|---|
ConfigConstraintPhase | (Optional) phase is status of configuration template, when set to CCAvailablePhase, it can be referenced by ClusterDefinition or ClusterVersion. |
string | (Optional) message field describes the reasons of abnormal status. |
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 | (Members of |
Kubernetes core/v1.ConfigMapVolumeSource | configMap defines the configmap volume source. |
ConfigParams
(Appears on:ConfigurationItemDetail)
Field | Description |
---|---|
string | (Optional) fileContent indicates the configuration file content. |
map[string]*string | (Optional) updated parameters for a single configuration file. |
ConfigTemplateExtension
(Appears on:ConfigurationItemDetail, LegacyRenderedTemplateSpec)
Field | Description |
---|---|
string | Specify the name of the referenced the configuration template ConfigMap object. |
string | (Optional) Specify the namespace of the referenced the configuration template ConfigMap object. An empty namespace is equivalent to the “default” namespace. |
MergedPolicy | (Optional) policy defines how to merge external imported templates into component templates. |
ConfigurationItem
(Appears on:Reconfigure)
Field | Description |
---|---|
string | Specifies the name of the configuration template. |
UpgradePolicy | (Optional) Defines the upgrade policy for the configuration. This field is optional. |
[]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 |
---|---|
string | Specify the name of configuration template. |
string | (Optional) Deprecated: Please use payload instead. version is the version of configuration template. |
Payload | (Optional) Payload holds the configuration-related rerender. |
ComponentConfigSpec | (Optional) configSpec is used to set the configuration template. |
ConfigTemplateExtension | (Optional) Specify the configuration template. |
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 |
---|---|
string | name is a config template name. |
ConfigurationPhase | (Optional) phase is status of configurationItem. |
string | (Optional) lastDoneRevision is the last done revision of configurationItem. |
string | (Optional) updateRevision is the update revision of configurationItem. |
string | (Optional) message field describes the reasons of abnormal status. |
ReconcileDetail | (Optional) reconcileDetail describes the details of the configuration change execution. |
ConfigurationItemStatus
(Appears on:ReconfiguringStatus)
Field | Description |
---|---|
string | Specifies the name of the configuration template. |
UpgradePolicy | (Optional) Defines the policy for reconfiguration. |
string | (Optional) Indicates the current state of the reconfiguration state machine. |
string | (Optional) Provides details about the operation. |
int32 | (Optional) Counts the number of successful reconfigurations. |
int32 | (Optional) Specifies the number of expected reconfigurations. |
string | (Optional) Records the last status of the reconfiguration controller. |
map[string]string | (Optional) Stores the last applied configuration. |
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 |
---|---|
string | clusterRef references Cluster name. |
string | componentName is cluster component name. |
[]ConfigurationItemDetail | (Optional) customConfigurationItems describes user-defined config template. |
ConfigurationStatus
(Appears on:Configuration)
ConfigurationStatus defines the observed state of Configuration
Field | Description |
---|---|
string | (Optional) message field describes the reasons of abnormal status. |
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. |
[]Kubernetes meta/v1.Condition | (Optional) conditions describes opsRequest detail status. |
[]ConfigurationItemDetailStatus | configurationStatus describes the status of the component reconfiguring. |
ConnectionCredentialAuth
(Appears on:ServiceDescriptorSpec)
Field | Description |
---|---|
CredentialVar | (Optional) service connection based-on username and password credential. |
CredentialVar | (Optional) service connection based-on username and password credential. |
ConnectionCredentialKey
(Appears on:TargetInstance)
Field | Description |
---|---|
string | (Optional) the key of password in the ConnectionCredential secret. if not set, the default key is “password”. |
string | (Optional) the key of username in the ConnectionCredential secret. if not set, the default key is “username”. |
string | hostKey specifies the map key of the host in the connection credential secret. |
string | portKey specifies the map key of the port in the connection credential secret. |
ConsensusMember
(Appears on:ConsensusSetSpec)
Field | Description |
---|---|
string | name, role name. |
AccessMode | accessMode, what service this member capable. |
int32 | (Optional) replicas, number of Pods of this role.
|
ConsensusMemberStatus
(Appears on:ConsensusSetStatus)
Field | Description |
---|---|
string | Defines the role name. |
AccessMode | accessMode defines what service this pod provides. |
string | Pod name. |
ConsensusSetSpec
(Appears on:ClusterComponentDefinition)
Field | Description |
---|---|
StatefulSetSpec | (Members of |
ConsensusMember | leader, one single leader. |
[]ConsensusMember | (Optional) followers, has voting right but not Leader. |
ConsensusMember | (Optional) learner, no voting right. |
ConsensusSetStatus
(Appears on:ClusterComponentStatus)
Field | Description |
---|---|
ConsensusMemberStatus | Leader status. |
[]ConsensusMemberStatus | (Optional) Followers status. |
ConsensusMemberStatus | (Optional) Learner status. |
CredentialVar
(Appears on:ConnectionCredentialAuth, ServiceDescriptorSpec)
Field | Description |
---|---|
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 “”. |
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 | (Members of The Credential (SystemAccount) to select from. |
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 |
---|---|
VarOption | (Optional) |
VarOption | (Optional) |
CustomLabelSpec
(Appears on:ClusterComponentDefinition)
Field | Description |
---|---|
string | key name of label |
string | value of label |
[]GVKResource | resources defines the resources to be labeled. |
CustomOpsSpec
(Appears on:OpsRequestSpec)
Field | Description |
---|---|
string | Refers to the name of the cluster component. |
string | Is a reference to an OpsDefinition. |
[]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 |
---|---|
Kubernetes api extensions v1.JSONSchemaProps | schema provides a way for providers to validate the changed parameters through json. |
string | (Optional) cue that to let provider verify user configuration through cue language. |
DownwardAPIOption
(Appears on:ConfigConstraintSpec)
Field | Description |
---|---|
string | Specify the name of the field. |
string | mountPoint is the mount point of the scripts file. |
[]Kubernetes core/v1.DownwardAPIVolumeFile | Items is a list of downward API volume file |
[]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 |
---|---|
string | env key which needs to mapping. |
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 |
---|---|
string | Name of the variable. Must be a C_IDENTIFIER. |
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 “”. |
VarSource | (Optional) Source for the variable’s value. Cannot be used if value is not empty. |
EnvVarRef
(Appears on:OpsVarSource)
Field | Description |
---|---|
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. |
string | Defines the name of the environment variable. |
ExecAction
(Appears on:Action)
Field | Description |
---|---|
[]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. |
[]string | (Optional) args is used to perform statements. |
ExporterConfig
(Appears on:MonitorConfig)
Field | Description |
---|---|
Kubernetes api utils intstr.IntOrString | scrapePort is exporter port for Time Series Database to scrape metrics. |
string | (Optional) scrapePath is exporter url path for Time Series Database to scrape metrics. |
Expose
(Appears on:OpsRequestSpec)
Field | Description |
---|---|
ComponentOps | (Members of |
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. |
[]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 | (Members of The FormatterOptions represents the special options of configuration file. This is optional for now. If not specified. |
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 | (Optional) iniConfig represents the ini options. |
GVKResource
(Appears on:CustomLabelSpec)
Field | Description |
---|---|
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. |
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 |
---|---|
string | (Optional) Path to access on the HTTP server. |
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. |
string | (Optional) Host name to connect to, defaults to the pod IP. You probably want to set “Host” in httpHeaders instead. |
Kubernetes core/v1.URIScheme | (Optional) Scheme to use for connecting to the host. Defaults to HTTP. |
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. |
[]Kubernetes core/v1.HTTPHeader | (Optional) Custom headers to set in the request. HTTP allows repeated headers. |
HorizontalScalePolicy
(Appears on:ClusterComponentDefinition)
Field | Description |
---|---|
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
|
string | (Optional) BackupPolicyTemplateName reference the backup policy template. |
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 | (Members of |
int32 | Specifies the number of replicas for the workloads. |
[]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. |
[]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 |
---|---|
string | (Optional) sectionName describes ini section. |
Instance
(Appears on:RebuildInstance)
Field | Description |
---|---|
string | Pod name of the instance. |
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 |
---|---|
IssuerName | Name of issuer. Options supported:
|
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 |
---|---|
int32 | (Optional) Represents the last replicas of the component. |
Kubernetes core/v1.ResourceRequirements | (Members of Represents the last resources of the component. |
ClassDefRef | (Optional) References a class defined in ComponentClassDefinition. |
[]OpsRequestVolumeClaimTemplate | (Optional) Records the last volumeClaimTemplates of the component. |
[]ClusterComponentService | (Optional) Records the last services of the component. |
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 |
---|---|
string | (Optional) Specifies the reference to the ClusterVersion name. |
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 | (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 |
---|---|
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. |
Action | (Optional) customHandler defines the custom way to do action. |
LogConfig
(Appears on:ClusterComponentDefinition, ComponentDefinitionSpec)
Field | Description |
---|---|
string | name log type name, such as slow for MySQL slow log file. |
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 |
---|---|
Kubernetes resource.Quantity | (Optional) The size of memory per vcpu core. For example: 1Gi, 200Mi. If SizePerCPU is specified, MinPerCPU and MaxPerCPU are ignore. |
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 |
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 |
---|---|
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 | (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 |
---|---|
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. |
MultipleClusterObjectValueFormat | (Optional) The format of the value that the operator will use to compose values from multiple components. |
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 |
---|---|
MultipleClusterObjectStrategy | Define the strategy for handling multiple cluster objects. |
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 |
---|---|
string | Pair delimiter. |
string | Key-value delimiter. |
NamedVar
(Appears on:ServiceVars)
Field | Description |
---|---|
string | (Optional) |
VarOption | (Optional) |
OpsDefinitionSpec
(Appears on:OpsDefinition)
OpsDefinitionSpec defines the desired state of OpsDefinition
Field | Description |
---|---|
[]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 | (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 | (Optional) Describes the schema used for validation, pruning, and defaulting. |
Kubernetes batch/v1.JobSpec | Describes the job specification for the operation. |
[]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 |
---|---|
int64 | (Optional) Refers to the most recent generation observed for this OpsDefinition. |
Phase | (Optional) Represents the current state of the OpsDefinition. Valid values are ``, |
string | (Optional) Provides additional information about the current phase. |
OpsEnvVar
(Appears on:VarsRef)
Field | Description |
---|---|
string | Specifies the name of the variable. This must be a C_IDENTIFIER. |
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 |
---|---|
string | name OpsRequest name |
OpsType | opsRequest type |
bool | indicates whether the current opsRequest is in the queue |
OpsRequestBehaviour
Field | Description |
---|---|
[]ClusterPhase | |
ClusterPhase |
OpsRequestComponentStatus
(Appears on:OpsRequestStatus)
Field | Description |
---|---|
ClusterComponentPhase | (Optional) Describes the component phase, referencing Cluster.status.component.phase. |
Kubernetes meta/v1.Time | (Optional) Indicates the last time the component phase transitioned to Failed or Abnormal. |
[]ProgressStatusDetail | (Optional) Describes the progress details of the component for this operation. |
WorkloadType | (Optional) References the workload type of component in ClusterDefinition. |
string | (Optional) Describes the reason for the component phase. |
string | (Optional) Provides a human-readable message indicating details about this operation. |
OpsRequestSpec
(Appears on:OpsRequest)
OpsRequestSpec defines the desired state of OpsRequest
Field | Description |
---|---|
string | References the cluster object. |
bool | (Optional) Defines the action to cancel the |
OpsType | Defines the operation type. |
int32 | (Optional) OpsRequest will be deleted after TTLSecondsAfterSucceed second when OpsRequest.status.phase is Succeed. |
Upgrade | (Optional) Specifies the cluster version by specifying clusterVersionRef. |
[]HorizontalScaling | (Optional) Defines what component need to horizontal scale the specified replicas. |
[]VolumeExpansion | (Optional) Note: Quantity struct can not do immutable check by CEL. Defines what component and volumeClaimTemplate need to expand the specified storage. |
[]ComponentOps | (Optional) Restarts the specified components. |
[]Switchover | (Optional) Switches over the specified components. |
[]VerticalScaling | (Optional) Note: Quantity struct can not do immutable check by CEL. Defines what component need to vertical scale the specified compute resources. |
Reconfigure | (Optional) Deprecated: replace by reconfigures. Defines the variables that need to input when updating configuration. |
[]Reconfigure | (Optional) Defines the variables that need to input when updating configuration. |
[]Expose | (Optional) Defines services the component needs to expose. |
RestoreFromSpec | (Optional) Cluster RestoreFrom backup or point in time. |
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 | (Optional) Defines the script to be executed. |
[]RebuildInstance | (Optional) Specifies the instances that require re-creation. |
BackupSpec | (Optional) Defines how to backup the cluster. |
RestoreSpec | (Optional) Defines how to restore the cluster. Note that this restore operation will roll back cluster services. |
CustomOpsSpec | (Optional) Specifies a custom operation as defined by OpsDefinition. |
OpsRequestStatus
(Appears on:OpsRequest)
OpsRequestStatus represents the observed state of an OpsRequest.
Field | Description |
---|---|
int64 | (Optional) Specifies the cluster generation after the OpsRequest action has been handled. |
OpsPhase | Defines the phase of the OpsRequest. |
string | Represents the progress of the OpsRequest. |
LastConfiguration | (Optional) Records the last configuration before this operation took effect. |
map[string]github.com/apecloud/kubeblocks/apis/apps/v1alpha1.OpsRequestComponentStatus | (Optional) Records the status information of components changed due to the operation request. |
Kubernetes meta/v1.Time | (Optional) Indicates the time when the OpsRequest started processing. |
Kubernetes meta/v1.Time | (Optional) Specifies the time when the OpsRequest was completed. |
Kubernetes meta/v1.Time | (Optional) Defines the time when the OpsRequest was cancelled. |
ReconfiguringStatus | (Optional) Deprecated: Replaced by ReconfiguringStatusAsComponent. Defines the status information of reconfiguring. |
map[string]*github.com/apecloud/kubeblocks/apis/apps/v1alpha1.ReconfiguringStatus | (Optional) Represents the status information of reconfiguring. |
[]Kubernetes meta/v1.Condition | (Optional) Describes the detailed status of the OpsRequest. |
OpsRequestVolumeClaimTemplate
(Appears on:LastComponentConfiguration, VolumeExpansion)
Field | Description |
---|---|
Kubernetes resource.Quantity | Specifies the requested storage size for the volume. |
string | A reference to the volumeClaimTemplate name from the cluster components. |
OpsService
(Appears on:Expose)
Field | Description |
---|---|
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. |
map[string]string | (Optional) Contains cloud provider related parameters if ServiceType is LoadBalancer. More info: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer. |
[]Kubernetes core/v1.ServicePort | (Optional) 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 |
string | (Optional) Allows you to specify a defined role as a selector for the service, extending the ServiceSpec.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/ |
Kubernetes core/v1.ServiceType | (Optional) Determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer.
|
[]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. |
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 | 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 |
---|---|
string | Represents the unique identifier for the ConfigMap. |
[]ParameterPair | (Optional) Defines a list of key-value pairs for a single configuration file. These parameters are used to update the specified configuration settings. |
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 |
---|---|
string | Represents the name of the parameter that is to be updated. |
string | (Optional) Represents the parameter values that are to be updated. If set to nil, the parameter defined by the Key field will be removed from the configuration file. |
ParametersSchema
(Appears on:OpsDefinitionSpec)
Field | Description |
---|---|
Kubernetes api extensions v1.JSONSchemaProps | (Optional) Defines the OpenAPI v3 schema used for the parameter schema. The supported property types include:
|
PasswordConfig
(Appears on:SystemAccount, SystemAccountSpec)
PasswordConfig helps provide to customize complexity of password generation pattern.
Field | Description |
---|---|
int32 | (Optional) length defines the length of password. |
int32 | (Optional) numDigits defines number of digits. |
int32 | (Optional) numSymbols defines number of symbols. |
LetterCase | (Optional) letterCase defines to use lower-cases, upper-cases or mixed-cases of letters. |
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 |
---|---|
[]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. |
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. |
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. |
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 |
---|---|
Kubernetes meta/v1.Time | (Optional) Refers to the specific time point for restoration, with UTC as the time zone. |
RefNamespaceName | (Optional) Refers to a reference source cluster that needs to be restored. |
PostStartAction
(Appears on:ClusterComponentDefinition)
Field | Description |
---|---|
CmdExecutorConfig | cmdExecutorConfig is the executor configuration of the post-start command. |
[]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 | Defines the conditions under which the operation can be executed. |
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 |
---|---|
string | Specifies the name of the Docker image to be used for the execution. |
[]Kubernetes core/v1.EnvVar | (Optional) Defines the environment variables to be set in the container. |
[]string | (Optional) Specifies the commands to be executed in the container. |
[]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 |
---|---|
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. |
string | Represents the unique key of the object. |
ProgressStatus | Indicates the state of processing the object. |
string | (Optional) Provides a human-readable message detailing the condition of the object. |
Kubernetes meta/v1.Time | (Optional) Represents the start time of object processing. |
Kubernetes meta/v1.Time | (Optional) Represents the completion time of object processing. |
ProtectedVolume
(Appears on:VolumeProtectionSpec)
Field | Description |
---|---|
string | (Optional) Name of volume to protect. |
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 |
---|---|
ProvisionPolicyType | type defines the way to provision an account, either |
ProvisionScope | scope is the scope to provision account, and the scope could be |
ProvisionStatements | (Optional) statements will be used when Type is CreateByStmt. |
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 |
---|---|
string | name refers to the name of the secret. |
string | namespace refers to the namespace of the secret. |
ProvisionStatements
(Appears on:ProvisionPolicy)
ProvisionStatements defines the statements used to create accounts.
Field | Description |
---|---|
string | creation specifies statement how to create this account with required privileges. |
string | (Optional) update specifies statement how to update account’s password. |
string | (Optional) deletion specifies statement how to delete this account.
Used in combination with |
RSMSpec
(Appears on:ClusterComponentDefinition)
Field | Description |
---|---|
[]ReplicaRole | (Optional) Roles, a list of roles defined in the system. |
RoleProbe | (Optional) RoleProbe provides method to probe role. |
MembershipReconfiguration | (Optional) MembershipReconfiguration provides actions to do membership dynamic reconfiguration. |
MemberUpdateStrategy | (Optional) MemberUpdateStrategy, Members(Pods) update strategy.
|
RebuildInstance
(Appears on:OpsRequestSpec)
Field | Description |
---|---|
ComponentOps | (Members of |
[]Instance | Defines the instances that need to be rebuilt. |
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’. |
[]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 |
---|---|
string | (Optional) policy is the policy of the latest execution. |
string | (Optional) execResult is the result of the latest execution. |
string | (Optional) currentRevision is the current revision of configurationItem. |
int32 | (Optional) succeedCount is the number of pods for which configuration changes were successfully executed. |
int32 | (Optional) expectedCount is the number of pods that need to be executed for configuration changes. |
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 | (Members of |
[]ConfigurationItem | Specifies the components that will perform the operation. |
ReconfiguringStatus
(Appears on:OpsRequestStatus)
Field | Description |
---|---|
[]Kubernetes meta/v1.Condition | (Optional) Describes the reconfiguring detail status. |
[]ConfigurationItemStatus | Describes the status of the component reconfiguring. |
RefNamespaceName
(Appears on:BackupRefSpec, PointInTimeRefSpec)
Field | Description |
---|---|
string | (Optional) Refers to the specific name of the resource. |
string | (Optional) Refers to the specific namespace of the resource. |
ReloadOptions
(Appears on:ConfigConstraintSpec)
ReloadOptions defines reload options Only one of its members may be specified.
Field | Description |
---|---|
UnixSignalTrigger | (Optional) unixSignalTrigger used to reload by sending a signal. |
ShellTrigger | (Optional) shellTrigger performs the reload command. |
TPLScriptTrigger | (Optional) goTplTrigger performs the reload command. |
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 |
---|---|
string | Name of the role. It will apply to “apps.kubeblocks.io/role” object label value. Cannot be updated. |
bool | (Optional) Serviceable indicates whether a replica with this role can provide services. Cannot be updated. |
bool | (Optional) Writable indicates whether a replica with this role is allowed to write data. Cannot be updated. |
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 |
---|---|
int32 | The minimum limit of replicas. |
int32 | The maximum limit of replicas. |
ReplicationMemberStatus
(Appears on:ReplicationSetStatus)
Field | Description |
---|---|
string | Pod name. |
ReplicationSetSpec
(Appears on:ClusterComponentDefinition)
Field | Description |
---|---|
StatefulSetSpec | (Members of |
ReplicationSetStatus
(Appears on:ClusterComponentStatus)
Field | Description |
---|---|
ReplicationMemberStatus | Primary status. |
[]ReplicationMemberStatus | (Optional) Secondaries status. |
ResourceConstraintRule
(Appears on:ComponentResourceConstraintSpec)
Field | Description |
---|---|
string | The name of the constraint. |
CPUConstraint | The constraint for vcpu cores. |
MemoryConstraint | The constraint for memory size. |
StorageConstraint | (Optional) The constraint for storage size. |
ResourceMeta
(Appears on:ConfigMapRef, SecretRef)
Field | Description |
---|---|
string | name is the name of the referenced the Configmap/Secret object. |
string | mountPath is the path at which to mount the volume. |
string | (Optional) subPath is a relative file path within the volume to mount. |
[]string | (Optional) asVolumeFrom defines the list of containers where volumeMounts will be injected into. |
RestoreFromSpec
(Appears on:OpsRequestSpec)
Field | Description |
---|---|
[]BackupRefSpec | (Optional) Refers to the backup name and component name used for restoration. Supports recovery of multiple components. |
PointInTimeRefSpec | (Optional) Refers to the specific point in time for recovery. |
RestoreSpec
(Appears on:OpsRequestSpec)
Field | Description |
---|---|
string | Specifies the name of the backup. |
bool | Indicates if this backup will be restored for all components which refer to common ComponentDefinition. |
string | Defines the point in time to restore. |
string | Specifies the volume claim restore policy, support values: [Serial, Parallel] |
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 |
---|---|
int | (Optional) MaxRetries specifies the maximum number of times the action should be retried. |
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 | (Members of |
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 |
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 |
int32 | (Optional) How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. |
Rule
(Appears on:PreCondition)
Field | Description |
---|---|
string | Defines how the operation can be executed using a Go template expression.
Should return either
|
string | Reported if the rule is not matched. |
SchedulePolicy
(Appears on:BackupPolicy)
Field | Description |
---|---|
bool | (Optional) enabled specifies whether the backup schedule is enabled or not. |
string | backupMethod specifies the backup method name that is defined in backupPolicy. |
string | the cron expression for schedule, the timezone is in UTC. see https://en.wikipedia.org/wiki/Cron. |
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 |
---|---|
string | (Optional) If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. |
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/ |
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. |
Kubernetes core/v1.Affinity | (Optional) If specified, the cluster’s scheduling constraints. |
[]Kubernetes core/v1.Toleration | (Optional) Attached to tolerate any taint that matches the triple |
[]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 |
---|---|
string | scriptConfigMapRef used to execute for reload. |
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 |
---|---|
[]Kubernetes core/v1.ConfigMapKeySelector | (Optional) Specifies the configMap that is to be executed. |
[]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 |
---|---|
string | Specifies the name of the secret. |
string | (Optional) Used to specify the username part of the secret. |
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 | (Members of |
string | (Optional) Specifies the image to be used for the exec command. By default, the image of kubeblocks-datascript is used. |
ScriptSecret | (Optional) Defines the secret to be used to execute the script. If not specified, the default cluster root credential secret is used. |
[]string | (Optional) Defines the script to be executed. |
ScriptFrom | (Optional) Defines the script to be executed from a configMap or secret. |
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 |
---|---|
string | ScriptSpec name of the referent, refer to componentDefs[x].scriptSpecs[y].Name. |
SecretRef
(Appears on:UserResourceRefs)
Field | Description |
---|---|
ResourceMeta | (Members of |
Kubernetes core/v1.SecretVolumeSource | secret defines the secret volume source. |
Service
(Appears on:ClusterService, ComponentService)
Field | Description | ||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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. | ||||||||||||||||||||||||||||||||||||||
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. | ||||||||||||||||||||||||||||||||||||||
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. | ||||||||||||||||||||||||||||||||||||||
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
| ||||||||||||||||||||||||||||||||||||||
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 |
---|---|
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 |
string | The version of the service reference. |
CredentialVar | (Optional) endpoint is the endpoint of the service connection credential. |
ConnectionCredentialAuth | (Optional) auth is the auth of the service connection credential. |
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 | (Optional) phase - in list of [Available,Unavailable] |
string | (Optional) A human-readable message indicating details about why the ServiceConnectionCredential is in this phase. |
int64 | (Optional) generation number |
ServicePort
(Appears on:ServiceSpec)
Field | Description |
---|---|
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. |
Kubernetes core/v1.Protocol | (Optional) The IP protocol for this port. Supports “TCP”, “UDP”, and “SCTP”. Default is TCP. |
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. |
int32 | The port that will be exposed by this service. |
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 |
---|---|
string | name of the service reference declaration. references the serviceRefDeclaration name defined in clusterDefinition.componentDefs[].serviceRefDeclarations[].name |
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. |
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. |
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 |
---|---|
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. |
[]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 |
---|---|
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 |
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 | (Members of The ServiceRefDeclaration to select from. |
ServiceRefVars | (Members of |
ServiceRefVars
(Appears on:ServiceRefVarSelector)
ServiceRefVars defines the vars can be referenced from a ServiceRef.
Field | Description |
---|---|
VarOption | (Optional) |
VarOption | (Optional) |
CredentialVars | (Members of |
ServiceSpec
(Appears on:ClusterComponentDefinition)
Field | Description |
---|---|
[]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 | (Members of The Service to select from. It can be referenced from the default headless service by setting the name to “headless”. |
ServiceVars | (Members of |
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 |
---|---|
VarOption | (Optional) |
NamedVar | (Optional) |
NamedVar | (Optional) |
ShardingSpec
(Appears on:ClusterSpec)
ShardingSpec defines the sharding spec.
Field | Description |
---|---|
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 |
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. |
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 |
---|---|
[]string | command used to execute for reload. |
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 | (Optional) updateStrategy, Pods update strategy. In case of workloadType=Consensus the update strategy will be following:
|
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.
|
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 |
---|---|
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 |
---|---|
Kubernetes resource.Quantity | (Optional) The minimum size of storage. |
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 | (Members of |
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 is the executor configuration of the switchover command. |
[]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 |
---|---|
CommandExecutorEnvItem | CmdExecutorConfig is the command executor config. |
SwitchoverSpec
(Appears on:ClusterComponentDefinition)
Field | Description |
---|---|
SwitchoverAction | (Optional) withCandidate corresponds to the switchover of the specified candidate primary or leader instance. |
SwitchoverAction | (Optional) withoutCandidate corresponds to a switchover that does not specify a candidate primary or leader instance. |
SystemAccount
(Appears on:ComponentDefinitionSpec)
Field | Description |
---|---|
string | The name of the account. Others can refer to this account by the name. Cannot be updated. |
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. |
string | (Optional) Statement specifies the statement used to create the account with required privileges. Cannot be updated. |
PasswordConfig | (Optional) PasswordGenerationPolicy defines the policy for generating the account’s password. Cannot be updated. |
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 |
---|---|
AccountName | name is the name of a system account. |
ProvisionPolicy | provisionPolicy defines how to create account. |
SystemAccountShortSpec
(Appears on:ClusterComponentVersion)
SystemAccountShortSpec is a short version of SystemAccountSpec, with only CmdExecutorConfig field.
Field | Description |
---|---|
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 configs how to get client SDK and perform statements. |
PasswordConfig | passwordConfig defines the pattern to generate password. |
[]SystemAccountConfig | accounts defines system account config settings. |
TLSConfig
(Appears on:ComponentSpec)
Field | Description |
---|---|
bool | (Optional) |
Issuer | (Optional) |
TLSSecretRef
(Appears on:Issuer)
TLSSecretRef defines Secret contains Tls certs
Field | Description |
---|---|
string | Name of the Secret |
string | CA cert key in Secret |
string | Cert key in Secret |
string | Key of TLS private key in Secret |
TPLScriptTrigger
(Appears on:ReloadOptions)
Field | Description |
---|---|
ScriptConfig | (Members of |
bool | (Optional) Specify synchronize updates parameters to the config manager. |
TargetInstance
(Appears on:BackupMethod, BackupPolicy)
Field | Description |
---|---|
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. |
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. |
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 | (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 |
---|---|
string | Specify the name of initContainer. Must be a DNS_LABEL name. |
string | (Optional) tools Container image name. |
[]string | exec used to execute for init containers. |
ToolsImageSpec
(Appears on:ConfigConstraintSpec)
Field | Description |
---|---|
string | mountPoint is the mount point of the scripts file. |
[]ToolConfig | (Optional) toolConfig used to config init container. |
UnixSignalTrigger
(Appears on:ReloadOptions)
Field | Description |
---|---|
SignalType | signal is valid for unix signal. e.g: SIGHUP url: ../../pkg/configuration/configmap/handler.go:allUnixSignals |
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 |
---|---|
map[string]string | (Optional) Lists the keys that have been added. |
map[string]string | (Optional) Lists the keys that have been deleted. |
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 |
---|---|
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 |
---|---|
[]SecretRef | (Optional) secretRefs defines the user-defined secrets. |
[]ConfigMapRef | (Optional) configMapRefs defines the user-defined configmaps. |
ValueFrom
(Appears on:EnvMappingVar)
Field | Description |
---|---|
[]ValueMapping | (Optional) mapped ClusterVersionRef to env value. |
[]ValueMapping | (Optional) mapped ComponentDefinition to env value. |
ValueMapping
(Appears on:ValueFrom)
Field | Description |
---|---|
[]string | the array of ClusterVersion name which can be mapped to the env value. |
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 |
---|---|
Kubernetes core/v1.ConfigMapKeySelector | (Optional) Selects a key of a ConfigMap. |
Kubernetes core/v1.SecretKeySelector | (Optional) Selects a key of a Secret. |
ServiceVarSelector | (Optional) Selects a defined var of a Service. |
CredentialVarSelector | (Optional) Selects a defined var of a Credential (SystemAccount). |
ServiceRefVarSelector | (Optional) Selects a defined var of a ServiceRef. |
VarsRef
(Appears on:ComponentDefinitionRef, OpsDefinitionSpec)
Field | Description |
---|---|
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. |
[]OpsEnvVar | Represents a list of environment variables to be set in the job’s container. |
VersionsContext
(Appears on:ClusterComponentVersion)
Field | Description |
---|---|
[]Kubernetes core/v1.Container | (Optional) Provide ClusterDefinition.spec.componentDefs.podSpec.initContainers override values, typical scenarios are application container image updates. |
[]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 | (Members of |
Kubernetes core/v1.ResourceRequirements | (Members of Defines the computational resource size for vertical scaling. |
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 | (Members of |
[]OpsRequestVolumeClaimTemplate | volumeClaimTemplates specifies the storage size and volumeClaimTemplate name. |
VolumeProtectionSpec
(Appears on:ClusterComponentDefinition)
Field | Description |
---|---|
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. |
[]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 |
---|---|
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. |
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 | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| ||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||
Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
| ||||||||||||||||||||||||||||||||||
ReplicatedStateMachineSpec |
| ||||||||||||||||||||||||||||||||||
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 |
---|---|
string | (Optional) utility image contains command that can be used to retrieve of process role info |
[]string | Command will be executed in Container to retrieve or process role info |
Credential
(Appears on:ReplicatedStateMachineSpec)
Field | Description |
---|---|
CredentialVar | Username variable name will be KB_RSM_USERNAME |
CredentialVar | Password variable name will be KB_RSM_PASSWORD |
CredentialVar
(Appears on:Credential)
Field | Description |
---|---|
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 “”. |
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 |
---|---|
string | PodName pod name. |
ReplicaRole | |
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 |
---|---|
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 |
Action | (Optional) MemberJoinAction specifies how to add member previous none-nil action’s Image will be used if not configured |
Action | (Optional) MemberLeaveAction specifies how to remove member previous none-nil action’s Image will be used if not configured |
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 |
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 |
---|---|
string | (Optional) Name defines the name of statefulSet that needs to allocate node. |
NodeSpec | (Optional) NodeSpec defines the detailed node info that will assign to the statefulSet. |
NodeSpec
(Appears on:NodeAssignment)
Field | Description |
---|---|
k8s.io/apimachinery/pkg/types.NodeName | (Optional) |
ReplicaRole
(Appears on:RSMSpec, MemberStatus, ReplicatedStateMachineSpec)
Field | Description |
---|---|
string | Name, role name. |
AccessMode | AccessMode, what service this member capable. |
bool | (Optional) CanVote, whether this member has voting rights |
bool | (Optional) IsLeader, whether this member is the leader |
ReplicatedStateMachineSpec
(Appears on:ReplicatedStateMachine)
ReplicatedStateMachineSpec defines the desired state of ReplicatedStateMachine
Field | Description |
---|---|
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. |
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 |
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. |
Kubernetes core/v1.Service | (Optional) service defines the behavior of a service spec. provides read-write service https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status |
[]Kubernetes core/v1.Service | (Optional) AlternativeServices defines Alternative Services selector pattern specifier. can be used for creating Readonly service. |
Kubernetes core/v1.PodTemplateSpec | |
[]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. |
Kubernetes apps/v1.PodManagementPolicyType | (Optional) podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down.
|
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 |
[]ReplicaRole | (Optional) Roles, a list of roles defined in the system. |
RoleProbe | (Optional) RoleProbe provides method to probe role. |
MembershipReconfiguration | (Optional) MembershipReconfiguration provides actions to do membership dynamic reconfiguration. |
MemberUpdateStrategy | (Optional) MemberUpdateStrategy, Members(Pods) update strategy.
|
bool | (Optional) Paused indicates that the rsm is paused, means the reconciliation of this rsm object will be paused. |
Credential | (Optional) Credential used to connect to DB engine |
RsmTransformPolicy | (Optional) RsmTransformPolicy defines the policy generate sts using rsm. Passed from cluster. ToSts: rsm transform to statefulSet ToPod: rsm transform to pod |
[]NodeAssignment | (Optional) NodeAssignment defines the expected assignment of nodes. |
ReplicatedStateMachineStatus
(Appears on:ReplicatedStateMachine)
ReplicatedStateMachineStatus defines the observed state of ReplicatedStateMachine
Field | Description |
---|---|
Kubernetes apps/v1.StatefulSetStatus | (Members of |
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 |
int32 | (Optional) ReadyInitReplicas is the number of pods(members) already in MembersStatus in the cluster initialization stage will never change once equals to InitReplicas |
int64 | (Optional) CurrentGeneration, if not empty, indicates the version of the RSM used to generate the underlying workload |
[]MemberStatus | (Optional) members’ status. |
RoleProbe
(Appears on:RSMSpec, ReplicatedStateMachineSpec)
RoleProbe defines how to observe role
Field | Description |
---|---|
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. |
[]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:
|
int32 | (Optional) Number of seconds after the container has started before role probe has started. |
int32 | (Optional) Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. |
int32 | (Optional) How often (in seconds) to perform the probe. Default to 2 seconds. Minimum value is 1. |
int32 | (Optional) Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Minimum value is 1. |
int32 | (Optional) Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. |
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