Documentation ¶
Overview ¶
+k8s:deepcopy-gen=package,register +k8s:openapi-gen=true +groupName=apps.kubeblocks.io
Package v1alpha1 contains API Schema definitions for the apps v1alpha1 API group +kubebuilder:object:generate=true +groupName=apps.kubeblocks.io
Package v1alpha1 contains API Schema definitions for the apps v1alpha1 API group
Index ¶
- Constants
- Variables
- func ComponentPodsAreReady(podsAreReady *bool) bool
- func NewBackupCondition(ops *OpsRequest) *metav1.Condition
- func NewCancelFailedCondition(ops *OpsRequest, err error) *metav1.Condition
- func NewCancelSucceedCondition(opsName string) *metav1.Condition
- func NewCancelingCondition(ops *OpsRequest) *metav1.Condition
- func NewDataScriptCondition(ops *OpsRequest) *metav1.Condition
- func NewExposingCondition(ops *OpsRequest) *metav1.Condition
- func NewFailedCondition(ops *OpsRequest, err error) *metav1.Condition
- func NewHorizontalScalingCondition(ops *OpsRequest) *metav1.Condition
- func NewInstancesRebuildingCondition(ops *OpsRequest) *metav1.Condition
- func NewReconfigureCondition(ops *OpsRequest) *metav1.Condition
- func NewReconfigureFailedCondition(ops *OpsRequest, err error) *metav1.Condition
- func NewReconfigureRunningCondition(ops *OpsRequest, conditionType string, configSpecName string, info ...string) *metav1.Condition
- func NewRestartingCondition(ops *OpsRequest) *metav1.Condition
- func NewRestoreCondition(ops *OpsRequest) *metav1.Condition
- func NewStartCondition(ops *OpsRequest) *metav1.Condition
- func NewStopCondition(ops *OpsRequest) *metav1.Condition
- func NewSucceedCondition(ops *OpsRequest) *metav1.Condition
- func NewSwitchoveringCondition(generation int64, message string) *metav1.Condition
- func NewUpgradingCondition(ops *OpsRequest) *metav1.Condition
- func NewValidateFailedCondition(reason, message string) *metav1.Condition
- func NewValidatePassedCondition(opsRequestName string) *metav1.Condition
- func NewVerticalScalingCondition(ops *OpsRequest) *metav1.Condition
- func NewVolumeExpandingCondition(ops *OpsRequest) *metav1.Condition
- func NewWaitForProcessingCondition(ops *OpsRequest) *metav1.Condition
- func RegisterWebhookManager(mgr manager.Manager)
- func Resource(resource string) schema.GroupResource
- type AccessMode
- type AccountName
- type Action
- type Affinity
- type AutoTrigger
- type AvailabilityPolicyType
- type BackupMethod
- type BackupPolicy
- type BackupPolicyTemplate
- type BackupPolicyTemplateList
- type BackupPolicyTemplateSpec
- type BackupPolicyTemplateStatus
- type BackupRefSpec
- type BackupSpec
- type BackupStatusUpdateStage
- type BaseBackupType
- type BuiltinActionHandlerType
- type CPUConstraint
- type CfgFileFormat
- type CfgReloadType
- type ClassDefRef
- type Cluster
- func (in *Cluster) DeepCopy() *Cluster
- func (in *Cluster) DeepCopyInto(out *Cluster)
- func (in *Cluster) DeepCopyObject() runtime.Object
- func (r *Cluster) GetVolumeClaimNames(compName string, claimNames ...string) []string
- func (r Cluster) IsDeleting() bool
- func (r Cluster) IsStatusUpdating() bool
- func (r Cluster) IsUpdating() bool
- func (r *Cluster) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (r *Cluster) ValidateCreate() (admission.Warnings, error)
- func (r *Cluster) ValidateDelete() (admission.Warnings, error)
- func (r *Cluster) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
- type ClusterBackup
- type ClusterComponentDefinition
- func (in *ClusterComponentDefinition) DeepCopy() *ClusterComponentDefinition
- func (in *ClusterComponentDefinition) DeepCopyInto(out *ClusterComponentDefinition)
- func (r *ClusterComponentDefinition) GetCommonStatefulSpec() (*StatefulSetSpec, error)
- func (r *ClusterComponentDefinition) GetMaxUnavailable() *intstr.IntOrString
- func (r *ClusterComponentDefinition) GetMinAvailable() *intstr.IntOrString
- func (r *ClusterComponentDefinition) GetStatefulSetWorkload() StatefulSetWorkload
- func (r *ClusterComponentDefinition) IsStatelessWorkload() bool
- type ClusterComponentPhase
- type ClusterComponentService
- type ClusterComponentSpec
- func (in *ClusterComponentSpec) DeepCopy() *ClusterComponentSpec
- func (in *ClusterComponentSpec) DeepCopyInto(out *ClusterComponentSpec)
- func (r *ClusterComponentSpec) GetMinAvailable(prefer *intstr.IntOrString) *intstr.IntOrString
- func (r *ClusterComponentSpec) ToVolumeClaimTemplates() []corev1.PersistentVolumeClaimTemplate
- type ClusterComponentStatus
- func (in *ClusterComponentStatus) DeepCopy() *ClusterComponentStatus
- func (in *ClusterComponentStatus) DeepCopyInto(out *ClusterComponentStatus)
- func (r ClusterComponentStatus) GetMessage() ComponentMessageMap
- func (r ClusterComponentStatus) GetObjectMessage(objectKind, objectName string) string
- func (r *ClusterComponentStatus) SetMessage(messageMap ComponentMessageMap)
- func (r *ClusterComponentStatus) SetObjectMessage(objectKind, objectName, message string)
- type ClusterComponentVersion
- type ClusterComponentVolumeClaimTemplate
- type ClusterDefinition
- func (in *ClusterDefinition) DeepCopy() *ClusterDefinition
- func (in *ClusterDefinition) DeepCopyInto(out *ClusterDefinition)
- func (in *ClusterDefinition) DeepCopyObject() runtime.Object
- func (r *ClusterDefinition) Default()
- func (r *ClusterDefinition) GetComponentDefByName(compDefName string) *ClusterComponentDefinition
- func (r *ClusterDefinition) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (r *ClusterDefinition) ValidateCreate() (admission.Warnings, error)
- func (r *ClusterDefinition) ValidateDelete() (admission.Warnings, error)
- func (r *ClusterDefinition) ValidateEnabledLogConfigs(compDefName string, enabledLogs []string) []string
- func (r *ClusterDefinition) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
- type ClusterDefinitionList
- type ClusterDefinitionProbe
- type ClusterDefinitionProbeCMDs
- type ClusterDefinitionProbes
- type ClusterDefinitionSpec
- type ClusterDefinitionStatus
- type ClusterList
- type ClusterMonitor
- type ClusterNetwork
- type ClusterObjectReference
- type ClusterPhase
- type ClusterResourceConstraintSelector
- type ClusterResources
- type ClusterService
- type ClusterSpec
- func (in *ClusterSpec) DeepCopy() *ClusterSpec
- func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec)
- func (r ClusterSpec) GetComponentByName(componentName string) *ClusterComponentSpec
- func (r ClusterSpec) GetComponentDefRefName(componentName string) string
- func (r ClusterSpec) GetDefNameMappingComponents() map[string][]ClusterComponentSpec
- func (r ClusterSpec) ValidateEnabledLogs(cd *ClusterDefinition) error
- type ClusterStatus
- type ClusterStorage
- type ClusterSwitchPolicy
- type ClusterVersion
- func (in *ClusterVersion) DeepCopy() *ClusterVersion
- func (in *ClusterVersion) DeepCopyInto(out *ClusterVersion)
- func (in *ClusterVersion) DeepCopyObject() runtime.Object
- func (r *ClusterVersion) GetInconsistentComponentsInfo(clusterDef *ClusterDefinition) ([]string, []string)
- func (r *ClusterVersion) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (r *ClusterVersion) ValidateCreate() (admission.Warnings, error)
- func (r *ClusterVersion) ValidateDelete() (admission.Warnings, error)
- func (r *ClusterVersion) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
- type ClusterVersionList
- type ClusterVersionSpec
- type ClusterVersionStatus
- type CmdExecutorConfig
- type CommandExecutorEnvItem
- type CommandExecutorItem
- type Component
- func (in *Component) DeepCopy() *Component
- func (in *Component) DeepCopyInto(out *Component)
- func (in *Component) DeepCopyObject() runtime.Object
- func (r *Component) Default()
- func (r *Component) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (r *Component) ValidateCreate() (admission.Warnings, error)
- func (r *Component) ValidateDelete() (admission.Warnings, error)
- func (r *Component) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
- type ComponentClass
- type ComponentClassDefinition
- type ComponentClassDefinitionList
- type ComponentClassDefinitionSpec
- type ComponentClassDefinitionStatus
- type ComponentClassGroup
- type ComponentClassSeries
- type ComponentConfigSpec
- type ComponentDefRef
- type ComponentDefinition
- func (in *ComponentDefinition) DeepCopy() *ComponentDefinition
- func (in *ComponentDefinition) DeepCopyInto(out *ComponentDefinition)
- func (in *ComponentDefinition) DeepCopyObject() runtime.Object
- func (r *ComponentDefinition) Default()
- func (r *ComponentDefinition) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (r *ComponentDefinition) ValidateCreate() (admission.Warnings, error)
- func (r *ComponentDefinition) ValidateDelete() (admission.Warnings, error)
- func (r *ComponentDefinition) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
- type ComponentDefinitionList
- type ComponentDefinitionRef
- type ComponentDefinitionSpec
- type ComponentDefinitionStatus
- type ComponentLifecycleActions
- type ComponentList
- type ComponentMessageMap
- type ComponentNameSet
- type ComponentOps
- type ComponentRefEnv
- type ComponentResourceConstraint
- func (in *ComponentResourceConstraint) DeepCopy() *ComponentResourceConstraint
- func (in *ComponentResourceConstraint) DeepCopyInto(out *ComponentResourceConstraint)
- func (in *ComponentResourceConstraint) DeepCopyObject() runtime.Object
- func (c *ComponentResourceConstraint) FindMatchingRules(clusterDefRef string, componentDefRef string, resources corev1.ResourceList) []ResourceConstraintRule
- func (c *ComponentResourceConstraint) FindRules(clusterDefRef, componentDefRef string) []ResourceConstraintRule
- func (c *ComponentResourceConstraint) FindRulesWithCompDef(compDef string) []ResourceConstraintRule
- func (c *ComponentResourceConstraint) MatchClass(clusterDefRef, componentDefRef string, class *ComponentClass) bool
- type ComponentResourceConstraintList
- type ComponentResourceConstraintSelector
- type ComponentResourceConstraintSpec
- type ComponentResourceKey
- type ComponentService
- type ComponentSpec
- type ComponentStatus
- type ComponentSwitchover
- type ComponentTemplateSpec
- type ComponentValueFrom
- type ComponentValueFromType
- type ComponentVolume
- type ConfigConstraint
- type ConfigConstraintList
- type ConfigConstraintPhase
- type ConfigConstraintSpec
- type ConfigConstraintStatus
- type ConfigMapRef
- type ConfigParams
- type ConfigTemplateExtension
- type Configuration
- type ConfigurationItem
- type ConfigurationItemDetail
- type ConfigurationItemDetailStatus
- type ConfigurationItemStatus
- type ConfigurationList
- type ConfigurationPhase
- type ConfigurationSpec
- func (in *ConfigurationSpec) DeepCopy() *ConfigurationSpec
- func (in *ConfigurationSpec) DeepCopyInto(out *ConfigurationSpec)
- func (configuration *ConfigurationSpec) GetConfigSpec(configSpecName string) *ComponentConfigSpec
- func (configuration *ConfigurationSpec) GetConfigurationItem(name string) *ConfigurationItemDetail
- type ConfigurationStatus
- type ConnectionCredentialAuth
- type ConnectionCredentialKey
- type ConsensusMember
- type ConsensusMemberStatus
- type ConsensusSetSpec
- func (in *ConsensusSetSpec) DeepCopy() *ConsensusSetSpec
- func (in *ConsensusSetSpec) DeepCopyInto(out *ConsensusSetSpec)
- func (r *ConsensusSetSpec) FinalStsUpdateStrategy() (appsv1.PodManagementPolicyType, appsv1.StatefulSetUpdateStrategy)
- func (r *ConsensusSetSpec) GetUpdateStrategy() UpdateStrategy
- type ConsensusSetStatus
- type CredentialVar
- type CredentialVarSelector
- type CredentialVars
- type CustomLabelSpec
- type CustomOpsSpec
- type CustomParametersValidation
- type DownwardAPIOption
- type DynamicParameterSelectedPolicy
- type EnvMappingVar
- type EnvVar
- type EnvVarRef
- type ExecAction
- type ExporterConfig
- type Expose
- type ExposeSwitch
- type FailurePolicyType
- type FormatterConfig
- type FormatterOptions
- type GVKResource
- type HScaleDataClonePolicyType
- type HTTPAction
- type HorizontalScalePolicy
- type HorizontalScaling
- type IniConfig
- type Instance
- type Issuer
- type IssuerName
- type KBAccountType
- type LastComponentConfiguration
- type LastConfiguration
- type LegacyRenderedTemplateSpec
- type LetterCase
- type LifecycleActionHandler
- type LogConfig
- type MemoryConstraint
- type MergedPolicy
- type MonitorConfig
- type MultipleClusterObjectCombinedOption
- type MultipleClusterObjectOption
- type MultipleClusterObjectStrategy
- type MultipleClusterObjectValueFormat
- type MultipleClusterObjectValueFormatFlatten
- type NamedVar
- type OpsDefinition
- type OpsDefinitionList
- type OpsDefinitionSpec
- type OpsDefinitionStatus
- type OpsEnvVar
- type OpsPhase
- type OpsRecorder
- type OpsRequest
- func (in *OpsRequest) DeepCopy() *OpsRequest
- func (in *OpsRequest) DeepCopyInto(out *OpsRequest)
- func (in *OpsRequest) DeepCopyObject() runtime.Object
- func (r *OpsRequest) GetComponentNameSet() ComponentNameSet
- func (r *OpsRequest) GetUpgradeComponentNameSet() ComponentNameSet
- func (r *OpsRequest) IsComplete(phases ...OpsPhase) bool
- func (r *OpsRequest) SetStatusCondition(condition metav1.Condition)
- func (r *OpsRequest) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (r *OpsRequest) Validate(ctx context.Context, k8sClient client.Client, cluster *Cluster, ...) error
- func (r *OpsRequest) ValidateCreate() (admission.Warnings, error)
- func (r *OpsRequest) ValidateDelete() (admission.Warnings, error)
- func (r *OpsRequest) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
- type OpsRequestBehaviour
- type OpsRequestComponentStatus
- type OpsRequestList
- type OpsRequestSpec
- func (in *OpsRequestSpec) DeepCopy() *OpsRequestSpec
- func (in *OpsRequestSpec) DeepCopyInto(out *OpsRequestSpec)
- func (r OpsRequestSpec) GetDataScriptComponentNameSet() ComponentNameSet
- func (r OpsRequestSpec) GetExposeComponentNameSet() ComponentNameSet
- func (r OpsRequestSpec) GetHorizontalScalingComponentNameSet() ComponentNameSet
- func (r OpsRequestSpec) GetReconfiguringComponentNameSet() ComponentNameSet
- func (r OpsRequestSpec) GetRestartComponentNameSet() ComponentNameSet
- func (r OpsRequestSpec) GetSwitchoverComponentNameSet() ComponentNameSet
- func (r OpsRequestSpec) GetVerticalScalingComponentNameSet() ComponentNameSet
- func (r OpsRequestSpec) GetVolumeExpansionComponentNameSet() ComponentNameSet
- func (r OpsRequestSpec) ToExposeListToMap() map[string]Expose
- func (r OpsRequestSpec) ToHorizontalScalingListToMap() map[string]HorizontalScaling
- func (r OpsRequestSpec) ToVerticalScalingListToMap() map[string]VerticalScaling
- func (r OpsRequestSpec) ToVolumeExpansionListToMap() map[string]VolumeExpansion
- type OpsRequestStatus
- type OpsRequestVolumeClaimTemplate
- type OpsService
- type OpsType
- type OpsVarSource
- type ParameterConfig
- type ParameterPair
- type ParametersSchema
- type PasswordConfig
- type Payload
- type PersistentVolumeClaimSpec
- type Phase
- type PodAntiAffinity
- type PodSelectionStrategy
- type PointInTimeRefSpec
- type PostStartAction
- type PreCondition
- type PreConditionExec
- type PreConditionType
- type ProgressStatus
- type ProgressStatusDetail
- type ProtectedVolume
- type ProvisionPolicy
- type ProvisionPolicyType
- type ProvisionScope
- type ProvisionSecretRef
- type ProvisionStatements
- type RSMSpec
- type RebuildInstance
- type ReconcileDetail
- type Reconfigure
- type ReconfiguringStatus
- type RefNamespaceName
- type ReloadOptions
- type ReplicaRole
- type ReplicasLimit
- type ReplicationMemberStatus
- type ReplicationSetSpec
- func (in *ReplicationSetSpec) DeepCopy() *ReplicationSetSpec
- func (in *ReplicationSetSpec) DeepCopyInto(out *ReplicationSetSpec)
- func (r *ReplicationSetSpec) FinalStsUpdateStrategy() (appsv1.PodManagementPolicyType, appsv1.StatefulSetUpdateStrategy)
- func (r *ReplicationSetSpec) GetUpdateStrategy() UpdateStrategy
- type ReplicationSetStatus
- type ResourceConstraintRule
- func (m *ResourceConstraintRule) CompleteResources(r corev1.ResourceList) corev1.ResourceList
- func (in *ResourceConstraintRule) DeepCopy() *ResourceConstraintRule
- func (in *ResourceConstraintRule) DeepCopyInto(out *ResourceConstraintRule)
- func (m *ResourceConstraintRule) GetMinimalResources() corev1.ResourceList
- func (m *ResourceConstraintRule) ValidateCPU(cpu *resource.Quantity) bool
- func (m *ResourceConstraintRule) ValidateMemory(cpu *resource.Quantity, memory *resource.Quantity) bool
- func (m *ResourceConstraintRule) ValidateResources(r corev1.ResourceList) bool
- func (m *ResourceConstraintRule) ValidateStorage(storage *resource.Quantity) bool
- type ResourceMeta
- type RestoreFromSpec
- type RestoreSpec
- type RetryPolicy
- type RoleArbitrator
- type RoleProbe
- type Rule
- type SchedulePolicy
- type SchedulingPolicy
- type ScriptConfig
- type ScriptFrom
- type ScriptSecret
- type ScriptSpec
- type ScriptSpecSelector
- type SecretRef
- type Service
- type ServiceDescriptor
- func (in *ServiceDescriptor) DeepCopy() *ServiceDescriptor
- func (in *ServiceDescriptor) DeepCopyInto(out *ServiceDescriptor)
- func (in *ServiceDescriptor) DeepCopyObject() runtime.Object
- func (r *ServiceDescriptor) Default()
- func (r *ServiceDescriptor) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (r *ServiceDescriptor) ValidateCreate() (admission.Warnings, error)
- func (r *ServiceDescriptor) ValidateDelete() (admission.Warnings, error)
- func (r *ServiceDescriptor) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
- type ServiceDescriptorList
- type ServiceDescriptorSpec
- type ServiceDescriptorStatus
- type ServicePort
- type ServiceRef
- type ServiceRefDeclaration
- type ServiceRefDeclarationSpec
- type ServiceRefVarSelector
- type ServiceRefVars
- type ServiceSpec
- type ServiceVarSelector
- type ServiceVars
- type ShardingSpec
- type ShellTrigger
- type SignalType
- type StatefulSetSpec
- type StatefulSetWorkload
- type StatelessSetSpec
- type StorageConstraint
- type SwitchPolicyType
- type Switchover
- type SwitchoverAction
- type SwitchoverShortSpec
- type SwitchoverSpec
- type SystemAccount
- type SystemAccountConfig
- type SystemAccountShortSpec
- type SystemAccountSpec
- type TLSConfig
- type TLSSecretRef
- type TPLScriptTrigger
- type TargetInstance
- type TargetPodSelector
- type TenancyType
- type TerminationPolicyType
- type ToolConfig
- type ToolsImageSpec
- type UnixSignalTrigger
- type UpdateStrategy
- type UpdatedParameters
- type Upgrade
- type UpgradePolicy
- type UserResourceRefs
- type ValueFrom
- type ValueMapping
- type VarOption
- type VarSource
- type VarsRef
- type VersionsContext
- type VerticalScaling
- type VolumeExpansion
- type VolumeProtectionSpec
- type VolumeType
- type VolumeTypeSpec
- type WorkloadType
Constants ¶
const ( // condition types ConditionTypeCancelled = "Cancelled" ConditionTypeWaitForProgressing = "WaitForProgressing" ConditionTypeValidated = "Validated" ConditionTypeSucceed = "Succeed" ConditionTypeFailed = "Failed" ConditionTypeRestarting = "Restarting" ConditionTypeVerticalScaling = "VerticalScaling" ConditionTypeHorizontalScaling = "HorizontalScaling" ConditionTypeVolumeExpanding = "VolumeExpanding" ConditionTypeReconfigure = "Reconfigure" ConditionTypeSwitchover = "Switchover" ConditionTypeStop = "Stopping" ConditionTypeStart = "Starting" ConditionTypeVersionUpgrading = "VersionUpgrading" ConditionTypeExpose = "Exposing" ConditionTypeDataScript = "ExecuteDataScript" ConditionTypeBackup = "Backup" ConditionTypeInstanceRebuilding = "InstancesRebuilding" ConditionTypeCustomOperation = "CustomOperation" ReasonReconfigurePersisting = "ReconfigurePersisting" ReasonReconfigurePersisted = "ReconfigurePersisted" ReasonReconfigureFailed = "ReconfigureFailed" ReasonReconfigureRestartFailed = "ReconfigureRestartFailed" ReasonReconfigureRestart = "ReconfigureRestarted" ReasonReconfigureNoChanged = "ReconfigureNoChanged" ReasonReconfigureSucceed = "ReconfigureSucceed" ReasonReconfigureRunning = "ReconfigureRunning" ReasonClusterPhaseMismatch = "ClusterPhaseMismatch" ReasonOpsTypeNotSupported = "OpsTypeNotSupported" ReasonValidateFailed = "ValidateFailed" ReasonClusterNotFound = "ClusterNotFound" ReasonOpsRequestFailed = "OpsRequestFailed" ReasonOpsCanceling = "Canceling" ReasonOpsCancelFailed = "CancelFailed" ReasonOpsCancelSucceed = "CancelSucceed" ReasonOpsCancelByController = "CancelByController" )
const ( APIVersion = "apps.kubeblocks.io/v1alpha1" ClusterVersionKind = "ClusterVersion" ClusterDefinitionKind = "ClusterDefinition" ClusterKind = "Cluster" OpsRequestKind = "OpsRequestKind" )
const ( // define the cluster condition type ConditionTypeHaltRecovery = "HaltRecovery" // ConditionTypeHaltRecovery describe Halt recovery processing stage ConditionTypeProvisioningStarted = "ProvisioningStarted" // ConditionTypeProvisioningStarted the operator starts resource provisioning to create or change the cluster ConditionTypeApplyResources = "ApplyResources" // ConditionTypeApplyResources the operator start to apply resources to create or change the cluster ConditionTypeReplicasReady = "ReplicasReady" // ConditionTypeReplicasReady all pods of components are ready ConditionTypeReady = "Ready" // ConditionTypeReady all components are running ConditionTypeSwitchoverPrefix = "Switchover-" // ConditionTypeSwitchoverPrefix component status condition of switchover )
const ( KBAccountInvalid KBAccountType = 0 KBAccountAdmin = 1 KBAccountDataprotection = 1 << 1 KBAccountProbe = 1 << 2 KBAccountMonitor = 1 << 3 KBAccountReplicator = 1 << 4 KBAccountMAX = KBAccountReplicator // KBAccountMAX indicates the max value of KBAccountType, used for validation. )
System accounts represented in bit.
const DefaultRoleProbeTimeoutAfterPodsReady int32 = 60
DefaultRoleProbeTimeoutAfterPodsReady the default role probe timeout for application when all pods of component are ready. default values are 60 seconds.
const (
KBSwitchoverCandidateInstanceForAnyPod = "*"
)
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "apps.kubeblocks.io", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
var ( ErrWorkloadTypeIsUnknown = errors.New("workloadType is unknown") ErrWorkloadTypeIsStateless = errors.New("workloadType should not be stateless") ErrNotMatchingCompDef = errors.New("not matching componentDefRef") )
var DefaultLeader = ConsensusMember{ Name: "leader", AccessMode: ReadWrite, }
var ( // OpsRequestBehaviourMapper records the opsRequest behaviour according to the OpsType. OpsRequestBehaviourMapper = map[OpsType]OpsRequestBehaviour{} )
log is for logging in this package.
var SchemeGroupVersion = GroupVersion
SchemeGroupVersion is group version used to register these objects.
var WorkloadTypes = []string{"Stateless", "Stateful", "Consensus", "Replication"}
Functions ¶
func ComponentPodsAreReady ¶ added in v0.6.0
ComponentPodsAreReady checks if the pods of component are ready.
func NewBackupCondition ¶ added in v0.7.0
func NewBackupCondition(ops *OpsRequest) *metav1.Condition
NewBackupCondition creates a condition that the OpsRequest backup the cluster.
func NewCancelFailedCondition ¶ added in v0.6.0
func NewCancelFailedCondition(ops *OpsRequest, err error) *metav1.Condition
NewCancelFailedCondition creates a condition for canceling failed.
func NewCancelSucceedCondition ¶ added in v0.6.0
NewCancelSucceedCondition creates a condition for canceling successfully.
func NewCancelingCondition ¶ added in v0.6.0
func NewCancelingCondition(ops *OpsRequest) *metav1.Condition
NewCancelingCondition the controller is canceling the OpsRequest
func NewDataScriptCondition ¶ added in v0.6.0
func NewDataScriptCondition(ops *OpsRequest) *metav1.Condition
func NewExposingCondition ¶
func NewExposingCondition(ops *OpsRequest) *metav1.Condition
func NewFailedCondition ¶
func NewFailedCondition(ops *OpsRequest, err error) *metav1.Condition
NewFailedCondition creates a condition that the OpsRequest processing failed
func NewHorizontalScalingCondition ¶
func NewHorizontalScalingCondition(ops *OpsRequest) *metav1.Condition
NewHorizontalScalingCondition creates a condition that the OpsRequest starts to horizontal scale cluster
func NewInstancesRebuildingCondition ¶ added in v0.8.3
func NewInstancesRebuildingCondition(ops *OpsRequest) *metav1.Condition
NewInstancesRebuildingCondition creates a condition that the operation starts to rebuild the instances.
func NewReconfigureCondition ¶
func NewReconfigureCondition(ops *OpsRequest) *metav1.Condition
NewReconfigureCondition creates a condition that the OpsRequest updating component configuration
func NewReconfigureFailedCondition ¶
func NewReconfigureFailedCondition(ops *OpsRequest, err error) *metav1.Condition
NewReconfigureFailedCondition creates a condition for the failed reconfigure.
func NewReconfigureRunningCondition ¶
func NewReconfigureRunningCondition(ops *OpsRequest, conditionType string, configSpecName string, info ...string) *metav1.Condition
NewReconfigureRunningCondition creates a condition that the OpsRequest reconfigure workflow
func NewRestartingCondition ¶
func NewRestartingCondition(ops *OpsRequest) *metav1.Condition
NewRestartingCondition creates a condition that the operation starts to restart components
func NewRestoreCondition ¶ added in v0.8.0
func NewRestoreCondition(ops *OpsRequest) *metav1.Condition
NewRestoreCondition creates a condition that the OpsRequest restore the cluster.
func NewStartCondition ¶
func NewStartCondition(ops *OpsRequest) *metav1.Condition
NewStartCondition creates a condition that the OpsRequest starts the cluster.
func NewStopCondition ¶
func NewStopCondition(ops *OpsRequest) *metav1.Condition
NewStopCondition creates a condition that the OpsRequest starts to stop the cluster.
func NewSucceedCondition ¶
func NewSucceedCondition(ops *OpsRequest) *metav1.Condition
NewSucceedCondition creates a condition that the controller has successfully processed the OpsRequest
func NewSwitchoveringCondition ¶ added in v0.6.0
NewSwitchoveringCondition creates a condition that the operation starts to switchover components
func NewUpgradingCondition ¶
func NewUpgradingCondition(ops *OpsRequest) *metav1.Condition
NewUpgradingCondition creates a condition that the OpsRequest starts to upgrade the cluster version
func NewValidateFailedCondition ¶
NewValidateFailedCondition creates a condition for operation validation failure.
func NewValidatePassedCondition ¶
NewValidatePassedCondition creates a condition for operation validation to pass.
func NewVerticalScalingCondition ¶
func NewVerticalScalingCondition(ops *OpsRequest) *metav1.Condition
NewVerticalScalingCondition creates a condition that the OpsRequest starts to vertical scale cluster
func NewVolumeExpandingCondition ¶
func NewVolumeExpandingCondition(ops *OpsRequest) *metav1.Condition
NewVolumeExpandingCondition creates a condition that the OpsRequest starts to expand volume
func NewWaitForProcessingCondition ¶ added in v0.8.0
func NewWaitForProcessingCondition(ops *OpsRequest) *metav1.Condition
NewWaitForProcessingCondition waits the controller to process the opsRequest.
func RegisterWebhookManager ¶
func Resource ¶ added in v0.6.0
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type AccessMode ¶
type AccessMode string
AccessMode defines SVC access mode enums. +enum +kubebuilder:validation:Enum={None,Readonly,ReadWrite}
const ( ReadWrite AccessMode = "ReadWrite" Readonly AccessMode = "Readonly" None AccessMode = "None" )
type AccountName ¶
type AccountName string
AccountName defines system account names. +enum +kubebuilder:validation:Enum={kbadmin,kbdataprotection,kbprobe,kbmonitoring,kbreplicator}
const ( AdminAccount AccountName = "kbadmin" DataprotectionAccount AccountName = "kbdataprotection" ProbeAccount AccountName = "kbprobe" MonitorAccount AccountName = "kbmonitoring" ReplicatorAccount AccountName = "kbreplicator" )
func (AccountName) GetAccountID ¶
func (r AccountName) GetAccountID() KBAccountType
type Action ¶ added in v0.8.0
type Action struct { // Image defines the container image to run the action. // Cannot be updated. // +optional Image string `json:"image,omitempty"` // Exec specifies the action to take. // Cannot be updated. // +optional Exec *ExecAction `json:"exec,omitempty"` // HTTP specifies the http request to perform. // Cannot be updated. // +optional HTTP *HTTPAction `json:"http,omitempty"` // List of environment variables to set in the container. // Cannot be updated. // +optional // +patchMergeKey=name // +patchStrategy=merge Env []corev1.EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name"` // 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. // +optional TargetPodSelector TargetPodSelector `json:"targetPodSelector,omitempty"` // 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. // +optional MatchingKey string `json:"matchingKey,omitempty"` // 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. // +optional Container string `json:"container,omitempty"` // TimeoutSeconds defines the timeout duration for the action in seconds. // Cannot be updated. // +kubebuilder:default=0 // +optional TimeoutSeconds int32 `json:"timeoutSeconds,omitempty"` // RetryPolicy defines the strategy for retrying the action in case of failure. // Cannot be updated. // +optional RetryPolicy *RetryPolicy `json:"retryPolicy,omitempty"` // PreCondition defines the condition when the action will be executed. // // - Immediately: The Action is executed immediately after the Component object is created, // without guaranteeing the availability of the Component and its underlying resources. only after the action is successfully executed will the Component's state turn to ready. // - RuntimeReady: The Action is executed after the Component object is created and once all underlying Runtimes are ready. // only after the action is successfully executed will the Component's state turn to ready. // - ComponentReady: The Action is executed after the Component object is created and once the Component is ready. // the execution process does not impact the state of the Component and the Cluster. // - ClusterReady: The Action is executed after the Cluster object is created and once the Cluster is ready. // // the execution process does not impact the state of the Component and the Cluster. // Cannot be updated. // +optional PreCondition *PreConditionType `json:"preCondition,omitempty"` }
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).
func (*Action) DeepCopy ¶ added in v0.8.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Action.
func (*Action) DeepCopyInto ¶ added in v0.8.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Affinity ¶
type Affinity struct { // podAntiAffinity describes the anti-affinity level of pods within a component. // Preferred means try spread pods by `TopologyKeys`. // Required means must spread pods by `TopologyKeys`. // +kubebuilder:default=Preferred // +optional PodAntiAffinity PodAntiAffinity `json:"podAntiAffinity,omitempty"` // topologyKey is the key of node labels. // Nodes that have a label with this key and identical values are considered to be in the same topology. // It's used as the topology domain for pod anti-affinity and pod spread constraint. // Some well-known label keys, such as `kubernetes.io/hostname` and `topology.kubernetes.io/zone` // are often used as TopologyKey, as well as any other custom label key. // // +listType=set // +optional TopologyKeys []string `json:"topologyKeys,omitempty"` // nodeLabels describes that pods must be scheduled to the nodes with the specified node labels. // +optional NodeLabels map[string]string `json:"nodeLabels,omitempty"` // 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. // +kubebuilder:default=SharedNode // +optional Tenancy TenancyType `json:"tenancy,omitempty"` }
func (*Affinity) DeepCopy ¶ added in v0.6.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Affinity.
func (*Affinity) DeepCopyInto ¶ added in v0.6.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AutoTrigger ¶ added in v0.8.0
type AutoTrigger struct { // processName is process name // +optional ProcessName string `json:"processName,omitempty"` }
func (*AutoTrigger) DeepCopy ¶ added in v0.8.0
func (in *AutoTrigger) DeepCopy() *AutoTrigger
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutoTrigger.
func (*AutoTrigger) DeepCopyInto ¶ added in v0.8.0
func (in *AutoTrigger) DeepCopyInto(out *AutoTrigger)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AvailabilityPolicyType ¶ added in v0.6.0
type AvailabilityPolicyType string
AvailabilityPolicyType for cluster affinity policy. +enum +kubebuilder:validation:Enum={zone,node,none}
const ( AvailabilityPolicyZone AvailabilityPolicyType = "zone" AvailabilityPolicyNode AvailabilityPolicyType = "node" AvailabilityPolicyNone AvailabilityPolicyType = "none" )
type BackupMethod ¶ added in v0.7.0
type BackupMethod struct { dpv1alpha1.BackupMethod `json:",inline"` // target instance for backup. // +optional Target *TargetInstance `json:"target"` // envMapping defines the variables of cluster mapped to env values' keys. // +optional EnvMapping []EnvMappingVar `json:"envMapping,omitempty"` }
func (*BackupMethod) DeepCopy ¶ added in v0.7.0
func (in *BackupMethod) DeepCopy() *BackupMethod
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupMethod.
func (*BackupMethod) DeepCopyInto ¶ added in v0.7.0
func (in *BackupMethod) DeepCopyInto(out *BackupMethod)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BackupPolicy ¶
type BackupPolicy struct { // componentDefRef references componentDef defined in ClusterDefinition spec. Need to // comply with IANA Service Naming rule. // +kubebuilder:validation:MaxLength=22 // +kubebuilder:validation:Pattern:=`^[a-z]([a-z0-9\-]*[a-z0-9])?$` // +optional ComponentDefRef string `json:"componentDefRef,omitempty"` // componentDef references componentDefinition. Need to // comply with IANA Service Naming rule. // +optional ComponentDefs []string `json:"componentDefs,omitempty"` // target instance for backup. // +optional Target TargetInstance `json:"target"` // schedule policy for backup. // +optional Schedules []SchedulePolicy `json:"schedules,omitempty"` // backupMethods defines the backup methods. // +kubebuilder:validation:Required BackupMethods []BackupMethod `json:"backupMethods"` // Specifies the number of retries before marking the backup failed. // +optional // +kubebuilder:validation:Minimum=0 // +kubebuilder:validation:Maximum=10 BackoffLimit *int32 `json:"backoffLimit,omitempty"` }
func (*BackupPolicy) DeepCopy ¶ added in v0.6.0
func (in *BackupPolicy) DeepCopy() *BackupPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupPolicy.
func (*BackupPolicy) DeepCopyInto ¶ added in v0.6.0
func (in *BackupPolicy) DeepCopyInto(out *BackupPolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BackupPolicyTemplate ¶
type BackupPolicyTemplate struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec BackupPolicyTemplateSpec `json:"spec,omitempty"` Status BackupPolicyTemplateStatus `json:"status,omitempty"` }
BackupPolicyTemplate is the Schema for the BackupPolicyTemplates API (defined by provider)
func (*BackupPolicyTemplate) DeepCopy ¶ added in v0.6.0
func (in *BackupPolicyTemplate) DeepCopy() *BackupPolicyTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupPolicyTemplate.
func (*BackupPolicyTemplate) DeepCopyInto ¶ added in v0.6.0
func (in *BackupPolicyTemplate) DeepCopyInto(out *BackupPolicyTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BackupPolicyTemplate) DeepCopyObject ¶ added in v0.6.0
func (in *BackupPolicyTemplate) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type BackupPolicyTemplateList ¶
type BackupPolicyTemplateList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []BackupPolicyTemplate `json:"items"` }
BackupPolicyTemplateList contains a list of BackupPolicyTemplate
func (*BackupPolicyTemplateList) DeepCopy ¶ added in v0.6.0
func (in *BackupPolicyTemplateList) DeepCopy() *BackupPolicyTemplateList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupPolicyTemplateList.
func (*BackupPolicyTemplateList) DeepCopyInto ¶ added in v0.6.0
func (in *BackupPolicyTemplateList) DeepCopyInto(out *BackupPolicyTemplateList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BackupPolicyTemplateList) DeepCopyObject ¶ added in v0.6.0
func (in *BackupPolicyTemplateList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type BackupPolicyTemplateSpec ¶
type BackupPolicyTemplateSpec struct { // clusterDefinitionRef references ClusterDefinition name, this is an immutable attribute. // +kubebuilder:validation:Required // +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$` // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="clusterDefinitionRef is immutable" ClusterDefRef string `json:"clusterDefinitionRef"` // backupPolicies is a list of backup policy template for the specified componentDefinition. // +kubebuilder:validation:Required // +kubebuilder:validation:MinItems=1 BackupPolicies []BackupPolicy `json:"backupPolicies"` // 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. // +optional // +kubebuilder:validation:MaxLength=20 Identifier string `json:"identifier,omitempty"` }
BackupPolicyTemplateSpec defines the desired state of BackupPolicyTemplate
func (*BackupPolicyTemplateSpec) DeepCopy ¶ added in v0.6.0
func (in *BackupPolicyTemplateSpec) DeepCopy() *BackupPolicyTemplateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupPolicyTemplateSpec.
func (*BackupPolicyTemplateSpec) DeepCopyInto ¶ added in v0.6.0
func (in *BackupPolicyTemplateSpec) DeepCopyInto(out *BackupPolicyTemplateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BackupPolicyTemplateStatus ¶
type BackupPolicyTemplateStatus struct { }
BackupPolicyTemplateStatus defines the observed state of BackupPolicyTemplate
func (*BackupPolicyTemplateStatus) DeepCopy ¶ added in v0.6.0
func (in *BackupPolicyTemplateStatus) DeepCopy() *BackupPolicyTemplateStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupPolicyTemplateStatus.
func (*BackupPolicyTemplateStatus) DeepCopyInto ¶ added in v0.6.0
func (in *BackupPolicyTemplateStatus) DeepCopyInto(out *BackupPolicyTemplateStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BackupRefSpec ¶
type BackupRefSpec struct { // Refers to a reference backup that needs to be restored. // +optional Ref RefNamespaceName `json:"ref,omitempty"` }
func (*BackupRefSpec) DeepCopy ¶ added in v0.6.0
func (in *BackupRefSpec) DeepCopy() *BackupRefSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupRefSpec.
func (*BackupRefSpec) DeepCopyInto ¶ added in v0.6.0
func (in *BackupRefSpec) DeepCopyInto(out *BackupRefSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BackupSpec ¶ added in v0.7.0
type BackupSpec struct { // Specifies the name of the backup. // +optional BackupName string `json:"backupName,omitempty"` // Indicates the backupPolicy applied to perform this backup. // +optional BackupPolicyName string `json:"backupPolicyName,omitempty"` // Defines the backup method that is defined in backupPolicy. // +optional BackupMethod string `json:"backupMethod,omitempty"` // Determines whether the backup contents stored in backup repository // should be deleted when the backup custom resource is deleted. // Supported values are `Retain` and `Delete`. // - `Retain` means that the backup content and its physical snapshot on backup repository are kept. // - `Delete` means that the backup content and its physical snapshot on backup repository are deleted. // +kubebuilder:validation:Enum=Delete;Retain // +kubebuilder:validation:Required // +kubebuilder:default=Delete // +optional DeletionPolicy string `json:"deletionPolicy,omitempty"` // Determines a duration up to which the backup should be kept. // Controller will remove all backups that are older than the RetentionPeriod. // For example, RetentionPeriod of `30d` will keep only the backups of last 30 days. // Sample duration format: // // - years: 2y // - months: 6mo // - days: 30d // - hours: 12h // - minutes: 30m // // You can also combine the above durations. For example: 30d12h30m. // If not set, the backup will be kept forever. // +optional RetentionPeriod string `json:"retentionPeriod,omitempty"` // If backupType is incremental, parentBackupName is required. // +optional ParentBackupName string `json:"parentBackupName,omitempty"` }
func (*BackupSpec) DeepCopy ¶ added in v0.7.0
func (in *BackupSpec) DeepCopy() *BackupSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupSpec.
func (*BackupSpec) DeepCopyInto ¶ added in v0.7.0
func (in *BackupSpec) DeepCopyInto(out *BackupSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BackupStatusUpdateStage ¶
type BackupStatusUpdateStage string
BackupStatusUpdateStage defines the stage of backup status update. +enum +kubebuilder:validation:Enum={pre,post}
type BaseBackupType ¶
type BaseBackupType string
BaseBackupType the base backup type, keep synchronized with the BaseBackupType of the data protection API. +enum +kubebuilder:validation:Enum={full,snapshot}
type BuiltinActionHandlerType ¶ added in v0.8.0
type BuiltinActionHandlerType string
BuiltinActionHandlerType defines build-in action handlers provided by Lorry.
const ( MySQLBuiltinActionHandler BuiltinActionHandlerType = "mysql" WeSQLBuiltinActionHandler BuiltinActionHandlerType = "wesql" OceanbaseBuiltinActionHandler BuiltinActionHandlerType = "oceanbase" RedisBuiltinActionHandler BuiltinActionHandlerType = "redis" MongoDBBuiltinActionHandler BuiltinActionHandlerType = "mongodb" ETCDBuiltinActionHandler BuiltinActionHandlerType = "etcd" PostgresqlBuiltinActionHandler BuiltinActionHandlerType = "postgresql" OfficialPostgresqlBuiltinActionHandler BuiltinActionHandlerType = "official-postgresql" ApeCloudPostgresqlBuiltinActionHandler BuiltinActionHandlerType = "apecloud-postgresql" PolarDBXBuiltinActionHandler BuiltinActionHandlerType = "polardbx" CustomActionHandler BuiltinActionHandlerType = "custom" UnknownBuiltinActionHandler BuiltinActionHandlerType = "unknown" )
type CPUConstraint ¶
type CPUConstraint struct { // 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 // +optional Max *resource.Quantity `json:"max,omitempty"` // 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 // +optional Min *resource.Quantity `json:"min,omitempty"` // The minimum granularity of vcpu cores, [Min, Max] defines a range for valid vcpu cores and the value in this range must be // multiple times of Step. // For example: // 1. Min is 2, Max is 8, Step is 2, and the valid vcpu core is {2, 4, 6, 8}. // 2. Min is 0.5, Max is 2, Step is 0.5, and the valid vcpu core is {0.5, 1, 1.5, 2}. // +optional Step *resource.Quantity `json:"step,omitempty"` // 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 // +optional Slots []resource.Quantity `json:"slots,omitempty"` }
func (*CPUConstraint) DeepCopy ¶ added in v0.6.0
func (in *CPUConstraint) DeepCopy() *CPUConstraint
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPUConstraint.
func (*CPUConstraint) DeepCopyInto ¶ added in v0.6.0
func (in *CPUConstraint) DeepCopyInto(out *CPUConstraint)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CfgFileFormat ¶
type CfgFileFormat string
CfgFileFormat defines formatter of configuration files. +enum +kubebuilder:validation:Enum={xml,ini,yaml,json,hcl,dotenv,toml,properties,redis,props-plus}
const ( Ini CfgFileFormat = "ini" YAML CfgFileFormat = "yaml" JSON CfgFileFormat = "json" XML CfgFileFormat = "xml" HCL CfgFileFormat = "hcl" Dotenv CfgFileFormat = "dotenv" TOML CfgFileFormat = "toml" Properties CfgFileFormat = "properties" RedisCfg CfgFileFormat = "redis" PropertiesPlus CfgFileFormat = "props-plus" )
type CfgReloadType ¶
type CfgReloadType string
CfgReloadType defines reload method. +enum
const ( UnixSignalType CfgReloadType = "signal" SQLType CfgReloadType = "sql" ShellType CfgReloadType = "exec" HTTPType CfgReloadType = "http" TPLScriptType CfgReloadType = "tpl" AutoType CfgReloadType = "auto" )
type ClassDefRef ¶
type ClassDefRef struct { // Name refers to the name of the ComponentClassDefinition. // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$` // +optional Name string `json:"name,omitempty"` // Class refers to the name of the class that is defined in the ComponentClassDefinition. // +kubebuilder:validation:Required Class string `json:"class"` }
func (*ClassDefRef) DeepCopy ¶ added in v0.6.0
func (in *ClassDefRef) DeepCopy() *ClassDefRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClassDefRef.
func (*ClassDefRef) DeepCopyInto ¶ added in v0.6.0
func (in *ClassDefRef) DeepCopyInto(out *ClassDefRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Cluster ¶
type Cluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ClusterSpec `json:"spec,omitempty"` Status ClusterStatus `json:"status,omitempty"` }
Cluster is the Schema for the clusters API.
func (*Cluster) DeepCopy ¶ added in v0.6.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster.
func (*Cluster) DeepCopyInto ¶ added in v0.6.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Cluster) DeepCopyObject ¶ added in v0.6.0
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Cluster) GetVolumeClaimNames ¶
GetVolumeClaimNames gets all PVC names of component compName.
r.Spec.GetComponentByName(compName).VolumeClaimTemplates[*].Name will be used if no claimNames provided
nil return if: 1. component compName not found or 2. len(VolumeClaimTemplates)==0 or 3. any claimNames not found
func (Cluster) IsDeleting ¶ added in v0.6.0
func (Cluster) IsStatusUpdating ¶ added in v0.6.0
func (Cluster) IsUpdating ¶ added in v0.6.0
func (*Cluster) SetupWebhookWithManager ¶
func (*Cluster) ValidateCreate ¶
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*Cluster) ValidateDelete ¶
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
type ClusterBackup ¶ added in v0.6.0
type ClusterBackup struct { // enabled defines whether to enable automated backup. // +kubebuilder:default=false // +optional Enabled *bool `json:"enabled,omitempty"` // retentionPeriod determines a duration up to which the backup should be kept. // controller will remove all backups that are older than the RetentionPeriod. // For example, RetentionPeriod of `30d` will keep only the backups of last 30 days. // Sample duration format: // // - years: 2y // - months: 6mo // - days: 30d // - hours: 12h // - minutes: 30m // // You can also combine the above durations. For example: 30d12h30m // // +kubebuilder:default="7d" // +optional RetentionPeriod dpv1alpha1.RetentionPeriod `json:"retentionPeriod,omitempty"` // backup method name to use, that is defined in backupPolicy. // +optional Method string `json:"method"` // the cron expression for schedule, the timezone is in UTC. see https://en.wikipedia.org/wiki/Cron. // +optional CronExpression string `json:"cronExpression,omitempty"` // startingDeadlineMinutes defines the deadline in minutes for starting the backup job // if it misses scheduled time for any reason. // +kubebuilder:validation:Minimum=0 // +kubebuilder:validation:Maximum=1440 // +optional StartingDeadlineMinutes *int64 `json:"startingDeadlineMinutes,omitempty"` // repoName is the name of the backupRepo, if not set, will use the default backupRepo. // +optional RepoName string `json:"repoName,omitempty"` // pitrEnabled defines whether to enable point-in-time recovery. // +kubebuilder:default=false // +optional PITREnabled *bool `json:"pitrEnabled,omitempty"` }
func (*ClusterBackup) DeepCopy ¶ added in v0.6.0
func (in *ClusterBackup) DeepCopy() *ClusterBackup
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterBackup.
func (*ClusterBackup) DeepCopyInto ¶ added in v0.6.0
func (in *ClusterBackup) DeepCopyInto(out *ClusterBackup)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterComponentDefinition ¶
type ClusterComponentDefinition struct { // A component definition name, this name could be used as default name of `Cluster.spec.componentSpecs.name`, // and so this name is need to conform with same validation rules as `Cluster.spec.componentSpecs.name`, that // is currently comply with IANA Service Naming rule. This name will apply to "apps.kubeblocks.io/component-name" // object label value. // +kubebuilder:validation:Required // +kubebuilder:validation:MaxLength=22 // +kubebuilder:validation:Pattern:=`^[a-z]([a-z0-9\-]*[a-z0-9])?$` Name string `json:"name"` // The description of component definition. // +optional Description string `json:"description,omitempty"` // workloadType defines type of the workload. // // - `Stateless` is a stateless workload type used to describe stateless applications. // - `Stateful` is a stateful workload type used to describe common stateful applications. // - `Consensus` is a stateful workload type used to describe applications based on consensus protocols, common consensus protocols such as raft and paxos. // - `Replication` is a stateful workload type used to describe applications based on the primary-secondary data replication protocol. // // +kubebuilder:validation:Required WorkloadType WorkloadType `json:"workloadType"` // 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. // // +optional CharacterType string `json:"characterType,omitempty"` // 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. // +optional // +patchMergeKey=name // +patchStrategy=merge,retainKeys // +listType=map // +listMapKey=name ConfigSpecs []ComponentConfigSpec `json:"configSpecs,omitempty"` // 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. // +optional // +patchMergeKey=name // +patchStrategy=merge,retainKeys // +listType=map // +listMapKey=name // +optional ScriptSpecs []ComponentTemplateSpec `json:"scriptSpecs,omitempty"` // probes setting for healthy checks. // +optional Probes *ClusterDefinitionProbes `json:"probes,omitempty"` // monitor is monitoring config which provided by provider. // +optional Monitor *MonitorConfig `json:"monitor,omitempty"` // logConfigs is detail log file config which provided by provider. // +optional // +patchMergeKey=name // +patchStrategy=merge,retainKeys // +listType=map // +listMapKey=name LogConfigs []LogConfig `json:"logConfigs,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name"` // podSpec define pod spec template of the cluster component. // +kubebuilder:pruning:PreserveUnknownFields // +optional PodSpec *corev1.PodSpec `json:"podSpec,omitempty"` // service defines the behavior of a service spec. // provide read-write service when WorkloadType is Consensus. // +optional Service *ServiceSpec `json:"service,omitempty"` // statelessSpec defines stateless related spec if workloadType is Stateless. // +optional // +kubebuilder:deprecatedversion:warning="This field is deprecated from KB 0.7.0, use RSMSpec instead." StatelessSpec *StatelessSetSpec `json:"statelessSpec,omitempty"` // statefulSpec defines stateful related spec if workloadType is Stateful. // +optional // +kubebuilder:deprecatedversion:warning="This field is deprecated from KB 0.7.0, use RSMSpec instead." StatefulSpec *StatefulSetSpec `json:"statefulSpec,omitempty"` // consensusSpec defines consensus related spec if workloadType is Consensus, required if workloadType is Consensus. // +optional // +kubebuilder:deprecatedversion:warning="This field is deprecated from KB 0.7.0, use RSMSpec instead." ConsensusSpec *ConsensusSetSpec `json:"consensusSpec,omitempty"` // replicationSpec defines replication related spec if workloadType is Replication. // +optional // +kubebuilder:deprecatedversion:warning="This field is deprecated from KB 0.7.0, use RSMSpec instead." ReplicationSpec *ReplicationSetSpec `json:"replicationSpec,omitempty"` // 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. // +optional RSMSpec *RSMSpec `json:"rsmSpec,omitempty"` // horizontalScalePolicy controls the behavior of horizontal scale. // +optional HorizontalScalePolicy *HorizontalScalePolicy `json:"horizontalScalePolicy,omitempty"` // Statement to create system account. // +optional SystemAccounts *SystemAccountSpec `json:"systemAccounts,omitempty"` // volumeTypes is used to describe the purpose of the volumes // mapping the name of the VolumeMounts in the PodSpec.Container field, // such as data volume, log volume, etc. // When backing up the volume, the volume can be correctly backed up // according to the volumeType. // // For example: // // - `name: data, type: data` means that the volume named `data` is used to store `data`. // - `name: binlog, type: log` means that the volume named `binlog` is used to store `log`. // // NOTE: When volumeTypes is not defined, the backup function will not be supported, // even if a persistent volume has been specified. // // +listType=map // +listMapKey=name // +optional VolumeTypes []VolumeTypeSpec `json:"volumeTypes,omitempty"` // customLabelSpecs is used for custom label tags which you want to add to the component resources. // +listType=map // +listMapKey=key // +optional CustomLabelSpecs []CustomLabelSpec `json:"customLabelSpecs,omitempty"` // 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. // +optional SwitchoverSpec *SwitchoverSpec `json:"switchoverSpec,omitempty"` // 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. // +optional PostStartSpec *PostStartAction `json:"postStartSpec,omitempty"` // +optional VolumeProtectionSpec *VolumeProtectionSpec `json:"volumeProtectionSpec,omitempty"` // 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. // +patchMergeKey=componentDefName // +patchStrategy=merge,retainKeys // +listType=map // +listMapKey=componentDefName // +optional ComponentDefRef []ComponentDefRef `json:"componentDefRef,omitempty" patchStrategy:"merge" patchMergeKey:"componentDefName"` // serviceRefDeclarations is used to declare the service reference of the current component. // +optional ServiceRefDeclarations []ServiceRefDeclaration `json:"serviceRefDeclarations,omitempty"` }
ClusterComponentDefinition provides a workload component specification template, with attributes that strongly work with stateful workloads and day-2 operations behaviors. +kubebuilder:validation:XValidation:rule="has(self.workloadType) && self.workloadType == 'Consensus' ? (has(self.consensusSpec) || has(self.rsmSpec)) : !has(self.consensusSpec)",message="componentDefs.consensusSpec(deprecated) or componentDefs.rsmSpec(recommended) is required when componentDefs.workloadType is Consensus, and forbidden otherwise"
func (*ClusterComponentDefinition) DeepCopy ¶ added in v0.6.0
func (in *ClusterComponentDefinition) DeepCopy() *ClusterComponentDefinition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterComponentDefinition.
func (*ClusterComponentDefinition) DeepCopyInto ¶ added in v0.6.0
func (in *ClusterComponentDefinition) DeepCopyInto(out *ClusterComponentDefinition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterComponentDefinition) GetCommonStatefulSpec ¶ added in v0.6.0
func (r *ClusterComponentDefinition) GetCommonStatefulSpec() (*StatefulSetSpec, error)
func (*ClusterComponentDefinition) GetMaxUnavailable ¶ added in v0.6.0
func (r *ClusterComponentDefinition) GetMaxUnavailable() *intstr.IntOrString
GetMaxUnavailable get workload's maxUnavailable settings, this value is not suitable for PDB.spec.maxUnavailable usage, as a PDB with maxUnavailable=49% and if workload's replicaCount=3 and allowed disruption pod count is 2, check following setup:
#cmd: kubectl get sts,po,pdb -l app.kubernetes.io/instance=consul NAME READY AGE statefulset.apps/consul 3/3 3h23m
NAME READY STATUS RESTARTS AGE pod/consul-0 1/1 Running 0 3h pod/consul-2 1/1 Running 0 16s pod/consul-1 1/1 Running 0 16s
NAME MIN AVAILABLE MAX UNAVAILABLE ALLOWED DISRUPTIONS AGE poddisruptionbudget.policy/consul N/A 49% 2 3h23m
VS. using minAvailable=51% will result allowed disruption pod count is 1
NAME READY AGE statefulset.apps/consul 3/3 3h26m
NAME READY STATUS RESTARTS AGE pod/consul-0 1/1 Running 0 3h3m pod/consul-2 1/1 Running 0 3m35s pod/consul-1 1/1 Running 0 3m35s
NAME MIN AVAILABLE MAX UNAVAILABLE ALLOWED DISRUPTIONS AGE poddisruptionbudget.policy/consul 51% N/A 1 3h26m
func (*ClusterComponentDefinition) GetMinAvailable ¶ added in v0.6.0
func (r *ClusterComponentDefinition) GetMinAvailable() *intstr.IntOrString
GetMinAvailable get workload's minAvailable settings, return 51% for workloadType=Consensus, value 1 pod for workloadType=[Stateless|Stateful|Replication].
func (*ClusterComponentDefinition) GetStatefulSetWorkload ¶ added in v0.6.0
func (r *ClusterComponentDefinition) GetStatefulSetWorkload() StatefulSetWorkload
func (*ClusterComponentDefinition) IsStatelessWorkload ¶ added in v0.6.0
func (r *ClusterComponentDefinition) IsStatelessWorkload() bool
type ClusterComponentPhase ¶
type ClusterComponentPhase string
ClusterComponentPhase defines the Cluster CR .status.components.phase +enum +kubebuilder:validation:Enum={Creating,Running,Updating,Stopping,Stopped,Deleting,Failed,Abnormal}
const ( CreatingClusterCompPhase ClusterComponentPhase = "Creating" RunningClusterCompPhase ClusterComponentPhase = "Running" UpdatingClusterCompPhase ClusterComponentPhase = "Updating" StoppingClusterCompPhase ClusterComponentPhase = "Stopping" StoppedClusterCompPhase ClusterComponentPhase = "Stopped" DeletingClusterCompPhase ClusterComponentPhase = "Deleting" FailedClusterCompPhase ClusterComponentPhase = "Failed" AbnormalClusterCompPhase ClusterComponentPhase = "Abnormal" )
func GetComponentTerminalPhases ¶
func GetComponentTerminalPhases() []ClusterComponentPhase
GetComponentTerminalPhases return Cluster's component terminal phases.
func GetComponentUpRunningPhase ¶ added in v0.6.0
func GetComponentUpRunningPhase() []ClusterComponentPhase
GetComponentUpRunningPhase returns component running or partially running phases.
type ClusterComponentService ¶
type ClusterComponentService struct { // Service name // +kubebuilder:validation:Required // +kubebuilder:validation:MaxLength=15 Name string `json:"name"` // serviceType determines how the Service is exposed. Valid // options are ClusterIP, NodePort, and LoadBalancer. // // - `ClusterIP` allocates a cluster-internal IP address for load-balancing // to endpoints. Endpoints are determined by the selector or if that is not // specified, they are determined by manual construction of an Endpoints object or // EndpointSlice objects. If clusterIP is "None", no virtual IP is // allocated and the endpoints are published as a set of endpoints rather // than a virtual IP. // - `NodePort` builds on ClusterIP and allocates a port on every node which // routes to the same endpoints as the clusterIP. // - `LoadBalancer` builds on NodePort and creates an external load-balancer // (if supported in the current cloud) which routes to the same endpoints // as the clusterIP. // // More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types. // // +kubebuilder:default=ClusterIP // +kubebuilder:validation:Enum={ClusterIP,NodePort,LoadBalancer} // +kubebuilder:pruning:PreserveUnknownFields // +optional ServiceType corev1.ServiceType `json:"serviceType,omitempty"` // If ServiceType is LoadBalancer, cloud provider related parameters can be put here // More info: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer. // +optional Annotations map[string]string `json:"annotations,omitempty"` }
func (*ClusterComponentService) DeepCopy ¶ added in v0.6.0
func (in *ClusterComponentService) DeepCopy() *ClusterComponentService
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterComponentService.
func (*ClusterComponentService) DeepCopyInto ¶ added in v0.6.0
func (in *ClusterComponentService) DeepCopyInto(out *ClusterComponentService)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterComponentSpec ¶
type ClusterComponentSpec struct { // 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. // +kubebuilder:validation:MaxLength=22 // +kubebuilder:validation:Pattern:=`^[a-z]([a-z0-9\-]*[a-z0-9])?$` // TODO +kubebuilder:validation:XValidation:rule="self == oldSelf",message="name is immutable" // +optional Name string `json:"name"` // componentDefRef references componentDef defined in ClusterDefinition spec. Need to comply with IANA Service Naming rule. // +kubebuilder:validation:MaxLength=22 // +kubebuilder:validation:Pattern:=`^[a-z]([a-z0-9\-]*[a-z0-9])?$` // TODO +kubebuilder:validation:XValidation:rule="self == oldSelf",message="componentDefRef is immutable" // +optional ComponentDefRef string `json:"componentDefRef,omitempty"` // componentDef references the name of the ComponentDefinition. // If both componentDefRef and componentDef are provided, the componentDef will take precedence over componentDefRef. // +kubebuilder:validation:MaxLength=22 // +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$` // TODO +kubebuilder:validation:XValidation:rule="self == oldSelf",message="componentDef is immutable" // +optional ComponentDef string `json:"componentDef,omitempty"` // classDefRef references the class defined in ComponentClassDefinition. // +kubebuilder:deprecatedversion:warning="Due to the lack of practical use cases, this field is deprecated from KB 0.9.0." // +optional ClassDefRef *ClassDefRef `json:"classDefRef,omitempty"` // serviceRefs define service references for the current component. Based on the referenced services, they can be categorized into two types: // // - Service provided by external sources: These services are provided by external sources and are not managed by KubeBlocks. They can be Kubernetes-based or non-Kubernetes services. For external services, you need to provide an additional ServiceDescriptor object to establish the service binding. // - Service provided by other KubeBlocks clusters: These services are provided by other KubeBlocks clusters. You can bind to these services by specifying the name of the hosting cluster. // // Each type of service reference requires specific configurations and bindings to establish the connection and interaction with the respective services. // It should be noted that the ServiceRef has cluster-level semantic consistency, meaning that within the same Cluster, service references with the same ServiceRef.Name are considered to be the same service. It is only allowed to bind to the same Cluster or ServiceDescriptor. // // +optional ServiceRefs []ServiceRef `json:"serviceRefs,omitempty"` // 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. // +kubebuilder:default=false // +optional Monitor bool `json:"monitor,omitempty"` // 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. // +listType=set // +optional EnabledLogs []string `json:"enabledLogs,omitempty"` // Specifies Labels to override or add for underlying Pods. // // +optional Labels map[string]string `json:"labels,omitempty"` // Specifies Annotations to override or add for underlying Pods. // // +optional Annotations map[string]string `json:"annotations,omitempty"` // List of environment variables to add. // These environment variables will be placed after the environment variables declared in the Pod. // // +optional Env []corev1.EnvVar `json:"env,omitempty"` // Component replicas. // +kubebuilder:validation:Required // +kubebuilder:validation:Minimum=0 // +kubebuilder:default=1 Replicas int32 `json:"replicas"` // Specifies the scheduling policy for the component. // // +optional SchedulingPolicy *SchedulingPolicy `json:"schedulingPolicy,omitempty"` // affinity describes affinities specified by users. // +optional Affinity *Affinity `json:"affinity,omitempty"` // Component tolerations will override ClusterSpec.Tolerations if specified. // +kubebuilder:pruning:PreserveUnknownFields // +optional Tolerations []corev1.Toleration `json:"tolerations,omitempty"` // Resources requests and limits of workload. // +kubebuilder:pruning:PreserveUnknownFields // +optional Resources corev1.ResourceRequirements `json:"resources,omitempty"` // volumeClaimTemplates information for statefulset.spec.volumeClaimTemplates. // +optional // +patchMergeKey=name // +patchStrategy=merge,retainKeys VolumeClaimTemplates []ClusterComponentVolumeClaimTemplate `json:"volumeClaimTemplates,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name"` // List of volumes to override. // // +optional Volumes []corev1.Volume `json:"volumes,omitempty"` // Services expose endpoints that can be accessed by clients. // +optional Services []ClusterComponentService `json:"services,omitempty"` // switchPolicy defines the strategy for switchover and failover when workloadType is Replication. // +optional SwitchPolicy *ClusterSwitchPolicy `json:"switchPolicy,omitempty"` // Enables or disables TLS certs. // +optional TLS bool `json:"tls,omitempty"` // issuer defines provider context for TLS certs. // required when TLS enabled // +optional Issuer *Issuer `json:"issuer,omitempty"` // serviceAccountName is the name of the ServiceAccount that running component depends on. // +optional ServiceAccountName string `json:"serviceAccountName,omitempty"` // 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. // +kubebuilder:default=false // +optional NoCreatePDB bool `json:"noCreatePDB,omitempty"` // updateStrategy defines the update strategy for the component. // +optional UpdateStrategy *UpdateStrategy `json:"updateStrategy,omitempty"` // userResourceRefs defines the user-defined volumes. // +optional UserResourceRefs *UserResourceRefs `json:"userResourceRefs,omitempty"` // RsmTransformPolicy defines the policy generate sts using rsm. // ToSts: rsm transforms to statefulSet // ToPod: rsm transforms to pods // +kubebuilder:validation:Required // +kubebuilder:default=ToSts // +optional RsmTransformPolicy workloads.RsmTransformPolicy `json:"rsmTransformPolicy,omitempty"` // 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. // +optional Nodes []types.NodeName `json:"nodes,omitempty"` // Instances defines the list of instance to be deleted priorly // If the RsmTransformPolicy is specified as ToPod,the list of instances will be used. // +optional Instances []string `json:"instances,omitempty"` }
ClusterComponentSpec defines the cluster component spec. +kubebuilder:validation:XValidation:rule="has(self.componentDefRef) || has(self.componentDef)",message="either componentDefRef or componentDef should be provided" TODO +kubebuilder:validation:XValidation:rule="!has(oldSelf.componentDefRef) || has(self.componentDefRef)", message="componentDefRef is required once set" TODO +kubebuilder:validation:XValidation:rule="!has(oldSelf.componentDef) || has(self.componentDef)", message="componentDef is required once set"
func (*ClusterComponentSpec) DeepCopy ¶ added in v0.6.0
func (in *ClusterComponentSpec) DeepCopy() *ClusterComponentSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterComponentSpec.
func (*ClusterComponentSpec) DeepCopyInto ¶ added in v0.6.0
func (in *ClusterComponentSpec) DeepCopyInto(out *ClusterComponentSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterComponentSpec) GetMinAvailable ¶ added in v0.6.0
func (r *ClusterComponentSpec) GetMinAvailable(prefer *intstr.IntOrString) *intstr.IntOrString
GetMinAvailable wraps the 'prefer' value return. As for component replicaCount <= 1, it will return 0, and as for replicaCount=2 it will return 1.
func (*ClusterComponentSpec) ToVolumeClaimTemplates ¶
func (r *ClusterComponentSpec) ToVolumeClaimTemplates() []corev1.PersistentVolumeClaimTemplate
ToVolumeClaimTemplates convert r.VolumeClaimTemplates to []corev1.PersistentVolumeClaimTemplate.
type ClusterComponentStatus ¶
type ClusterComponentStatus struct { // phase describes the phase of the component and the detail information of the phases are as following: // // - Creating: `Creating` is a special `Updating` with previous phase `empty`(means "") or `Creating`. // - Running: component replicas > 0 and all pod specs are latest with a Running state. // - Updating: component replicas > 0 and has no failed pods. the component is being updated. // - Abnormal: component replicas > 0 but having some failed pods. the component basically works but in a fragile state. // - Failed: component replicas > 0 but having some failed pods. the component doesn't work anymore. // - Stopping: component replicas = 0 and has terminating pods. // - Stopped: component replicas = 0 and all pods have been deleted. // - Deleting: the component is being deleted. Phase ClusterComponentPhase `json:"phase,omitempty"` // message records the component details message in current phase. // Keys are podName or deployName or statefulSetName. The format is `ObjectKind/Name`. // +optional Message ComponentMessageMap `json:"message,omitempty"` // podsReady checks if all pods of the component are ready. // +optional PodsReady *bool `json:"podsReady,omitempty"` // podsReadyTime what time point of all component pods are ready, // this time is the ready time of the last component pod. // +optional PodsReadyTime *metav1.Time `json:"podsReadyTime,omitempty"` // consensusSetStatus specifies the mapping of role and pod name. // +optional // +kubebuilder:deprecatedversion:warning="This field is deprecated from KB 0.7.0, use MembersStatus instead." ConsensusSetStatus *ConsensusSetStatus `json:"consensusSetStatus,omitempty"` // replicationSetStatus specifies the mapping of role and pod name. // +optional // +kubebuilder:deprecatedversion:warning="This field is deprecated from KB 0.7.0, use MembersStatus instead." ReplicationSetStatus *ReplicationSetStatus `json:"replicationSetStatus,omitempty"` // members' status. // +optional MembersStatus []workloads.MemberStatus `json:"membersStatus,omitempty"` }
ClusterComponentStatus records components status.
func (*ClusterComponentStatus) DeepCopy ¶ added in v0.6.0
func (in *ClusterComponentStatus) DeepCopy() *ClusterComponentStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterComponentStatus.
func (*ClusterComponentStatus) DeepCopyInto ¶ added in v0.6.0
func (in *ClusterComponentStatus) DeepCopyInto(out *ClusterComponentStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ClusterComponentStatus) GetMessage ¶
func (r ClusterComponentStatus) GetMessage() ComponentMessageMap
GetMessage gets message map deep copy object.
func (ClusterComponentStatus) GetObjectMessage ¶
func (r ClusterComponentStatus) GetObjectMessage(objectKind, objectName string) string
GetObjectMessage gets the k8s workload message in component status message map
func (*ClusterComponentStatus) SetMessage ¶
func (r *ClusterComponentStatus) SetMessage(messageMap ComponentMessageMap)
SetMessage overrides message map object.
func (*ClusterComponentStatus) SetObjectMessage ¶
func (r *ClusterComponentStatus) SetObjectMessage(objectKind, objectName, message string)
SetObjectMessage sets K8s workload message to component status message map.
type ClusterComponentVersion ¶
type ClusterComponentVersion struct { // componentDefRef reference one of the cluster component definition names in ClusterDefinition API (spec.componentDefs.name). // +kubebuilder:validation:Required // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$` ComponentDefRef string `json:"componentDefRef"` // 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. // +optional // +patchMergeKey=name // +patchStrategy=merge,retainKeys // +listType=map // +listMapKey=name ConfigSpecs []ComponentConfigSpec `json:"configSpecs,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name"` // systemAccountSpec define image for the component to connect database or engines. // It overrides `image` and `env` attributes defined in ClusterDefinition.spec.componentDefs.systemAccountSpec.cmdExecutorConfig. // To clean default envs settings, set `SystemAccountSpec.CmdExecutorConfig.Env` to empty list. // +optional SystemAccountSpec *SystemAccountShortSpec `json:"systemAccountSpec,omitempty"` // versionContext defines containers images' context for component versions, // this value replaces ClusterDefinition.spec.componentDefs.podSpec.[initContainers | containers] VersionsCtx VersionsContext `json:"versionsContext"` // switchoverSpec defines images for the component to do switchover. // It overrides `image` and `env` attributes defined in ClusterDefinition.spec.componentDefs.SwitchoverSpec.CommandExecutorEnvItem. // +optional SwitchoverSpec *SwitchoverShortSpec `json:"switchoverSpec,omitempty"` }
ClusterComponentVersion is an application version component spec.
func (*ClusterComponentVersion) DeepCopy ¶ added in v0.6.0
func (in *ClusterComponentVersion) DeepCopy() *ClusterComponentVersion
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterComponentVersion.
func (*ClusterComponentVersion) DeepCopyInto ¶ added in v0.6.0
func (in *ClusterComponentVersion) DeepCopyInto(out *ClusterComponentVersion)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterComponentVolumeClaimTemplate ¶
type ClusterComponentVolumeClaimTemplate struct { // Reference `ClusterDefinition.spec.componentDefs.containers.volumeMounts.name`. // +kubebuilder:validation:Required Name string `json:"name"` // spec defines the desired characteristics of a volume requested by a pod author. // +optional Spec PersistentVolumeClaimSpec `json:"spec,omitempty"` }
func (*ClusterComponentVolumeClaimTemplate) DeepCopy ¶ added in v0.6.0
func (in *ClusterComponentVolumeClaimTemplate) DeepCopy() *ClusterComponentVolumeClaimTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterComponentVolumeClaimTemplate.
func (*ClusterComponentVolumeClaimTemplate) DeepCopyInto ¶ added in v0.6.0
func (in *ClusterComponentVolumeClaimTemplate) DeepCopyInto(out *ClusterComponentVolumeClaimTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterDefinition ¶
type ClusterDefinition struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ClusterDefinitionSpec `json:"spec,omitempty"` Status ClusterDefinitionStatus `json:"status,omitempty"` }
ClusterDefinition is the Schema for the clusterdefinitions API
func (*ClusterDefinition) DeepCopy ¶ added in v0.6.0
func (in *ClusterDefinition) DeepCopy() *ClusterDefinition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterDefinition.
func (*ClusterDefinition) DeepCopyInto ¶ added in v0.6.0
func (in *ClusterDefinition) DeepCopyInto(out *ClusterDefinition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterDefinition) DeepCopyObject ¶ added in v0.6.0
func (in *ClusterDefinition) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ClusterDefinition) Default ¶
func (r *ClusterDefinition) Default()
Default implements webhook.Defaulter so a webhook will be registered for the type
func (*ClusterDefinition) GetComponentDefByName ¶
func (r *ClusterDefinition) GetComponentDefByName(compDefName string) *ClusterComponentDefinition
GetComponentDefByName gets component definition from ClusterDefinition with compDefName
func (*ClusterDefinition) SetupWebhookWithManager ¶
func (r *ClusterDefinition) SetupWebhookWithManager(mgr ctrl.Manager) error
func (*ClusterDefinition) ValidateCreate ¶
func (r *ClusterDefinition) ValidateCreate() (admission.Warnings, error)
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*ClusterDefinition) ValidateDelete ¶
func (r *ClusterDefinition) ValidateDelete() (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (*ClusterDefinition) ValidateEnabledLogConfigs ¶
func (r *ClusterDefinition) ValidateEnabledLogConfigs(compDefName string, enabledLogs []string) []string
ValidateEnabledLogConfigs validates enabledLogs against component compDefName, and returns the invalid logNames undefined in ClusterDefinition.
func (*ClusterDefinition) ValidateUpdate ¶
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
type ClusterDefinitionList ¶
type ClusterDefinitionList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ClusterDefinition `json:"items"` }
ClusterDefinitionList contains a list of ClusterDefinition
func (*ClusterDefinitionList) DeepCopy ¶ added in v0.6.0
func (in *ClusterDefinitionList) DeepCopy() *ClusterDefinitionList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterDefinitionList.
func (*ClusterDefinitionList) DeepCopyInto ¶ added in v0.6.0
func (in *ClusterDefinitionList) DeepCopyInto(out *ClusterDefinitionList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterDefinitionList) DeepCopyObject ¶ added in v0.6.0
func (in *ClusterDefinitionList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterDefinitionProbe ¶
type ClusterDefinitionProbe struct { // How often (in seconds) to perform the probe. // +kubebuilder:default=1 // +kubebuilder:validation:Minimum=1 PeriodSeconds int32 `json:"periodSeconds,omitempty"` // Number of seconds after which the probe times out. Defaults to 1 second. // +kubebuilder:default=1 // +kubebuilder:validation:Minimum=1 TimeoutSeconds int32 `json:"timeoutSeconds,omitempty"` // Minimum consecutive failures for the probe to be considered failed after having succeeded. // +kubebuilder:default=3 // +kubebuilder:validation:Minimum=2 FailureThreshold int32 `json:"failureThreshold,omitempty"` // commands used to execute for probe. // +optional Commands *ClusterDefinitionProbeCMDs `json:"commands,omitempty"` }
func (*ClusterDefinitionProbe) DeepCopy ¶ added in v0.6.0
func (in *ClusterDefinitionProbe) DeepCopy() *ClusterDefinitionProbe
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterDefinitionProbe.
func (*ClusterDefinitionProbe) DeepCopyInto ¶ added in v0.6.0
func (in *ClusterDefinitionProbe) DeepCopyInto(out *ClusterDefinitionProbe)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterDefinitionProbeCMDs ¶
type ClusterDefinitionProbeCMDs struct { // Write check executed on probe sidecar, used to check workload's allow write access. // +optional Writes []string `json:"writes,omitempty"` // Read check executed on probe sidecar, used to check workload's readonly access. // +optional Queries []string `json:"queries,omitempty"` }
func (*ClusterDefinitionProbeCMDs) DeepCopy ¶ added in v0.6.0
func (in *ClusterDefinitionProbeCMDs) DeepCopy() *ClusterDefinitionProbeCMDs
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterDefinitionProbeCMDs.
func (*ClusterDefinitionProbeCMDs) DeepCopyInto ¶ added in v0.6.0
func (in *ClusterDefinitionProbeCMDs) DeepCopyInto(out *ClusterDefinitionProbeCMDs)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterDefinitionProbes ¶
type ClusterDefinitionProbes struct { // Probe for DB running check. // +optional RunningProbe *ClusterDefinitionProbe `json:"runningProbe,omitempty"` // Probe for DB status check. // +optional StatusProbe *ClusterDefinitionProbe `json:"statusProbe,omitempty"` // Probe for DB role changed check. // +optional // +kubebuilder:deprecatedversion:warning="This field is deprecated from KB 0.7.0, use RSMSpec instead." RoleProbe *ClusterDefinitionProbe `json:"roleProbe,omitempty"` // 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. // // +optional // +kubebuilder:validation:Minimum=30 RoleProbeTimeoutAfterPodsReady int32 `json:"roleProbeTimeoutAfterPodsReady,omitempty"` }
func (*ClusterDefinitionProbes) DeepCopy ¶ added in v0.6.0
func (in *ClusterDefinitionProbes) DeepCopy() *ClusterDefinitionProbes
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterDefinitionProbes.
func (*ClusterDefinitionProbes) DeepCopyInto ¶ added in v0.6.0
func (in *ClusterDefinitionProbes) DeepCopyInto(out *ClusterDefinitionProbes)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterDefinitionSpec ¶
type ClusterDefinitionSpec struct { // Cluster definition type defines well known application cluster type, e.g. mysql/redis/mongodb // +kubebuilder:validation:MaxLength=24 // +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$` // +optional Type string `json:"type,omitempty"` // componentDefs provides cluster components definitions. // +kubebuilder:validation:Required // +kubebuilder:validation:MinItems=1 // +patchMergeKey=name // +patchStrategy=merge,retainKeys // +listType=map // +listMapKey=name ComponentDefs []ClusterComponentDefinition `json:"componentDefs" patchStrategy:"merge,retainKeys" patchMergeKey:"name"` // Connection credential template used for creating a connection credential // secret for cluster.apps.kubeblocks.io object. // // Built-in objects are: // // - `$(RANDOM_PASSWD)` random 8 characters. // dfjksgks // - `$(STRONG_RANDOM_PASSWD)` random 16 characters, with mixed cases, digits and symbols. // - `$(UUID)` generate a random UUID v4 string. // - `$(UUID_B64)` generate a random UUID v4 BASE64 encoded string. // - `$(UUID_STR_B64)` generate a random UUID v4 string then BASE64 encoded. // - `$(UUID_HEX)` generate a random UUID v4 HEX representation. // - `$(HEADLESS_SVC_FQDN)` headless service FQDN placeholder, value pattern is `$(CLUSTER_NAME)-$(1ST_COMP_NAME)-headless.$(NAMESPACE).svc`, // where 1ST_COMP_NAME is the 1st component that provide `ClusterDefinition.spec.componentDefs[].service` attribute; // - `$(SVC_FQDN)` service FQDN placeholder, value pattern is `$(CLUSTER_NAME)-$(1ST_COMP_NAME).$(NAMESPACE).svc`, // where 1ST_COMP_NAME is the 1st component that provide `ClusterDefinition.spec.componentDefs[].service` attribute; // - `$(SVC_PORT_{PORT-NAME})` is ServicePort's port value with specified port name, i.e, a servicePort JSON struct: // `{"name": "mysql", "targetPort": "mysqlContainerPort", "port": 3306}`, and `$(SVC_PORT_mysql)` in the // connection credential value is 3306. // +optional ConnectionCredential map[string]string `json:"connectionCredential,omitempty"` }
ClusterDefinitionSpec defines the desired state of ClusterDefinition
func (*ClusterDefinitionSpec) DeepCopy ¶ added in v0.6.0
func (in *ClusterDefinitionSpec) DeepCopy() *ClusterDefinitionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterDefinitionSpec.
func (*ClusterDefinitionSpec) DeepCopyInto ¶ added in v0.6.0
func (in *ClusterDefinitionSpec) DeepCopyInto(out *ClusterDefinitionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterDefinitionStatus ¶
type ClusterDefinitionStatus struct { // ClusterDefinition phase, valid values are `empty`, `Available`, `Unavailable`. // Available is ClusterDefinition become available, and can be referenced for co-related objects. Phase Phase `json:"phase,omitempty"` // Extra message in current phase // +optional Message string `json:"message,omitempty"` // 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. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` }
ClusterDefinitionStatus defines the observed state of ClusterDefinition
func (*ClusterDefinitionStatus) DeepCopy ¶ added in v0.6.0
func (in *ClusterDefinitionStatus) DeepCopy() *ClusterDefinitionStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterDefinitionStatus.
func (*ClusterDefinitionStatus) DeepCopyInto ¶ added in v0.6.0
func (in *ClusterDefinitionStatus) DeepCopyInto(out *ClusterDefinitionStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ClusterDefinitionStatus) GetTerminalPhases ¶
func (r ClusterDefinitionStatus) GetTerminalPhases() []Phase
type ClusterList ¶
type ClusterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Cluster `json:"items"` }
ClusterList contains a list of Cluster.
func (*ClusterList) DeepCopy ¶ added in v0.6.0
func (in *ClusterList) DeepCopy() *ClusterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterList.
func (*ClusterList) DeepCopyInto ¶ added in v0.6.0
func (in *ClusterList) DeepCopyInto(out *ClusterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterList) DeepCopyObject ¶ added in v0.6.0
func (in *ClusterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterMonitor ¶ added in v0.6.0
type ClusterMonitor struct { // monitoringInterval specifies interval of monitoring, no monitor if set to 0 // +kubebuilder:validation:XIntOrString // +optional MonitoringInterval *intstr.IntOrString `json:"monitoringInterval,omitempty"` }
func (*ClusterMonitor) DeepCopy ¶ added in v0.6.0
func (in *ClusterMonitor) DeepCopy() *ClusterMonitor
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterMonitor.
func (*ClusterMonitor) DeepCopyInto ¶ added in v0.6.0
func (in *ClusterMonitor) DeepCopyInto(out *ClusterMonitor)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterNetwork ¶ added in v0.6.0
type ClusterNetwork struct { // hostNetworkAccessible specifies whether host network is accessible. It defaults to false // +kubebuilder:default=false // +optional HostNetworkAccessible bool `json:"hostNetworkAccessible,omitempty"` // publiclyAccessible specifies whether it is publicly accessible. It defaults to false // +kubebuilder:default=false // +optional PubliclyAccessible bool `json:"publiclyAccessible,omitempty"` }
func (*ClusterNetwork) DeepCopy ¶ added in v0.6.0
func (in *ClusterNetwork) DeepCopy() *ClusterNetwork
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterNetwork.
func (*ClusterNetwork) DeepCopyInto ¶ added in v0.6.0
func (in *ClusterNetwork) DeepCopyInto(out *ClusterNetwork)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterObjectReference ¶ added in v0.8.0
type ClusterObjectReference struct { // CompDef specifies the definition used by the component that the referent object resident in. // If not specified, the component itself will be used. // +optional CompDef string `json:"compDef,omitempty"` // Name of the referent object. // +optional Name string `json:"name,omitempty"` // Specify whether the object must be defined. // +optional Optional *bool `json:"optional,omitempty"` // 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. // // +optional MultipleClusterObjectOption *MultipleClusterObjectOption `json:"multipleClusterObjectOption,omitempty"` }
ClusterObjectReference defines information to let you locate the referenced object inside the same cluster.
func (*ClusterObjectReference) DeepCopy ¶ added in v0.8.0
func (in *ClusterObjectReference) DeepCopy() *ClusterObjectReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterObjectReference.
func (*ClusterObjectReference) DeepCopyInto ¶ added in v0.8.0
func (in *ClusterObjectReference) DeepCopyInto(out *ClusterObjectReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterPhase ¶
type ClusterPhase string
ClusterPhase defines the Cluster CR .status.phase +enum +kubebuilder:validation:Enum={Creating,Running,Updating,Stopping,Stopped,Deleting,Failed,Abnormal}
const ( CreatingClusterPhase ClusterPhase = "Creating" RunningClusterPhase ClusterPhase = "Running" UpdatingClusterPhase ClusterPhase = "Updating" StoppingClusterPhase ClusterPhase = "Stopping" StoppedClusterPhase ClusterPhase = "Stopped" DeletingClusterPhase ClusterPhase = "Deleting" FailedClusterPhase ClusterPhase = "Failed" AbnormalClusterPhase ClusterPhase = "Abnormal" )
func GetClusterUpRunningPhases ¶
func GetClusterUpRunningPhases() []ClusterPhase
GetClusterUpRunningPhases returns Cluster running or partially running phases.
func GetReconfiguringRunningPhases ¶ added in v0.6.0
func GetReconfiguringRunningPhases() []ClusterPhase
GetReconfiguringRunningPhases return Cluster running or partially running phases.
type ClusterResourceConstraintSelector ¶ added in v0.6.0
type ClusterResourceConstraintSelector struct { // clusterDefRef is the name of the cluster definition. // +kubebuilder:validation:Required ClusterDefRef string `json:"clusterDefRef"` // selector is used to bind the resource constraint to components. // +listType=map // +listMapKey=componentDefRef // +kubebuilder:validation:Required Components []ComponentResourceConstraintSelector `json:"components"` }
func (*ClusterResourceConstraintSelector) DeepCopy ¶ added in v0.6.0
func (in *ClusterResourceConstraintSelector) DeepCopy() *ClusterResourceConstraintSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterResourceConstraintSelector.
func (*ClusterResourceConstraintSelector) DeepCopyInto ¶ added in v0.6.0
func (in *ClusterResourceConstraintSelector) DeepCopyInto(out *ClusterResourceConstraintSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterResources ¶ added in v0.6.0
type ClusterResources struct { // cpu resource needed, more info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ // +optional CPU resource.Quantity `json:"cpu,omitempty"` // memory resource needed, more info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ // +optional Memory resource.Quantity `json:"memory,omitempty"` }
func (*ClusterResources) DeepCopy ¶ added in v0.6.0
func (in *ClusterResources) DeepCopy() *ClusterResources
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterResources.
func (*ClusterResources) DeepCopyInto ¶ added in v0.6.0
func (in *ClusterResources) DeepCopyInto(out *ClusterResources)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterService ¶ added in v0.8.0
type ClusterService struct { Service `json:",inline"` // 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. // +optional ShardingSelector string `json:"shardingSelector,omitempty"` // 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. // +optional ComponentSelector string `json:"componentSelector,omitempty"` }
ClusterService defines the service of a cluster.
func (*ClusterService) DeepCopy ¶ added in v0.8.0
func (in *ClusterService) DeepCopy() *ClusterService
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterService.
func (*ClusterService) DeepCopyInto ¶ added in v0.8.0
func (in *ClusterService) DeepCopyInto(out *ClusterService)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterSpec ¶
type ClusterSpec struct { // Cluster referencing ClusterDefinition name. This is an immutable attribute. // If ClusterDefRef is not specified, ComponentDef must be specified for each Component in ComponentSpecs. // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$` // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="clusterDefinitionRef is immutable" // +optional ClusterDefRef string `json:"clusterDefinitionRef,omitempty"` // Cluster referencing ClusterVersion name. // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$` // +optional ClusterVersionRef string `json:"clusterVersionRef,omitempty"` // Cluster termination policy. Valid values are `DoNotTerminate`, `Halt`, `Delete`, `WipeOut`. // // - DoNotTerminate will block delete operation. // - Halt will delete workload resources such as statefulset, deployment workloads but keep PVCs. // - Delete is based on Halt and deletes PVCs. // - WipeOut is based on Delete and wipe out all volume snapshots and snapshot data from backup storage location. // // +kubebuilder:validation:Required TerminationPolicy TerminationPolicyType `json:"terminationPolicy"` // 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. // +patchMergeKey=name // +patchStrategy=merge,retainKeys // +listType=map // +listMapKey=name // +kubebuilder:validation:MinItems=1 // +kubebuilder:validation:MaxItems=128 // +optional ShardingSpecs []ShardingSpec `json:"shardingSpecs,omitempty"` // 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. // +kubebuilder:validation:MinItems=1 // +kubebuilder:validation:MaxItems=128 // +kubebuilder:validation:XValidation:rule="self.all(x, size(self.filter(c, c.name == x.name)) == 1)",message="duplicated component" // +optional ComponentSpecs []ClusterComponentSpec `json:"componentSpecs,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name"` // services defines the services to access a cluster. // +kubebuilder:pruning:PreserveUnknownFields // +optional Services []ClusterService `json:"services,omitempty"` // Specifies the scheduling policy for the component. // // +optional SchedulingPolicy *SchedulingPolicy `json:"schedulingPolicy,omitempty"` // affinity is a group of affinity scheduling rules. // +optional Affinity *Affinity `json:"affinity,omitempty"` // tolerations are attached to tolerate any taint that matches the triple `key,value,effect` using the matching operator `operator`. // +kubebuilder:pruning:PreserveUnknownFields // +optional Tolerations []corev1.Toleration `json:"tolerations,omitempty"` // 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. // +optional Tenancy TenancyType `json:"tenancy,omitempty"` // availabilityPolicy describes the availability policy, including zone, node, and none. // +optional AvailabilityPolicy AvailabilityPolicyType `json:"availabilityPolicy,omitempty"` // replicas specifies the replicas of the first componentSpec, if the replicas of the first componentSpec is specified, this value will be ignored. // +optional Replicas *int32 `json:"replicas,omitempty"` // resources specifies the resources of the first componentSpec, if the resources of the first componentSpec is specified, this value will be ignored. // +optional Resources ClusterResources `json:"resources,omitempty"` // storage specifies the storage of the first componentSpec, if the storage of the first componentSpec is specified, this value will be ignored. // +optional Storage ClusterStorage `json:"storage,omitempty"` // monitor specifies the configuration of monitor // +optional Monitor ClusterMonitor `json:"monitor,omitempty"` // network specifies the configuration of network // +optional Network *ClusterNetwork `json:"network,omitempty"` // cluster backup configuration. // +optional Backup *ClusterBackup `json:"backup,omitempty"` }
ClusterSpec defines the desired state of Cluster.
func (*ClusterSpec) DeepCopy ¶ added in v0.6.0
func (in *ClusterSpec) DeepCopy() *ClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec.
func (*ClusterSpec) DeepCopyInto ¶ added in v0.6.0
func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ClusterSpec) GetComponentByName ¶
func (r ClusterSpec) GetComponentByName(componentName string) *ClusterComponentSpec
GetComponentByName gets component by name.
func (ClusterSpec) GetComponentDefRefName ¶
func (r ClusterSpec) GetComponentDefRefName(componentName string) string
GetComponentDefRefName gets the name of referenced component definition.
func (ClusterSpec) GetDefNameMappingComponents ¶
func (r ClusterSpec) GetDefNameMappingComponents() map[string][]ClusterComponentSpec
GetDefNameMappingComponents returns ComponentDefRef name mapping ClusterComponentSpec.
func (ClusterSpec) ValidateEnabledLogs ¶
func (r ClusterSpec) ValidateEnabledLogs(cd *ClusterDefinition) error
ValidateEnabledLogs validates enabledLogs config in cluster.yaml, and returns metav1.Condition when detecting invalid values.
type ClusterStatus ¶
type ClusterStatus struct { // 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. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` // phase describes the phase of the Cluster, the detail information of the phases are as following: // // - Creating: all components are in `Creating` phase. // - Running: all components are in `Running` phase, means the cluster is working well. // - Updating: all components are in `Creating`, `Running` or `Updating` phase, // and at least one component is in `Creating` or `Updating` phase, means the cluster is doing an update. // - Stopping: at least one component is in `Stopping` phase, means the cluster is in a stop progress. // - Stopped: all components are in `Stopped` phase, means the cluster has stopped and didn't provide any function anymore. // - Failed: all components are in `Failed` phase, means the cluster is unavailable. // - Abnormal: some components are in `Failed` or `Abnormal` phase, means the cluster in a fragile state. troubleshoot need to be done. // - Deleting: the cluster is being deleted. // // +optional Phase ClusterPhase `json:"phase,omitempty"` // message describes cluster details message in current phase. // +optional Message string `json:"message,omitempty"` // components record the current status information of all components of the cluster. // +optional Components map[string]ClusterComponentStatus `json:"components,omitempty"` // clusterDefGeneration represents the generation number of ClusterDefinition referenced. // +optional ClusterDefGeneration int64 `json:"clusterDefGeneration,omitempty"` // Describe current state of cluster API Resource, like warning. // +optional Conditions []metav1.Condition `json:"conditions,omitempty"` }
ClusterStatus defines the observed state of Cluster.
func (*ClusterStatus) DeepCopy ¶ added in v0.6.0
func (in *ClusterStatus) DeepCopy() *ClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterStatus.
func (*ClusterStatus) DeepCopyInto ¶ added in v0.6.0
func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterStatus) SetComponentStatus ¶
func (r *ClusterStatus) SetComponentStatus(name string, status ClusterComponentStatus)
SetComponentStatus does safe operation on ClusterStatus.Components map object update.
type ClusterStorage ¶ added in v0.6.0
type ClusterStorage struct { // storage size needed, more info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ // +optional Size resource.Quantity `json:"size,omitempty"` }
func (*ClusterStorage) DeepCopy ¶ added in v0.6.0
func (in *ClusterStorage) DeepCopy() *ClusterStorage
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterStorage.
func (*ClusterStorage) DeepCopyInto ¶ added in v0.6.0
func (in *ClusterStorage) DeepCopyInto(out *ClusterStorage)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterSwitchPolicy ¶
type ClusterSwitchPolicy struct { // clusterSwitchPolicy defines type of the switchPolicy when workloadType is Replication. // // - MaximumAvailability: [WIP] when the primary is active, do switch if the synchronization delay = 0 in the user-defined lagProbe data delay detection logic, otherwise do not switch. The primary is down, switch immediately. It will be available in future versions. // - MaximumDataProtection: [WIP] when the primary is active, do switch if synchronization delay = 0 in the user-defined lagProbe data lag detection logic, otherwise do not switch. If the primary is down, if it can be judged that the primary and secondary data are consistent, then do the switch, otherwise do not switch. It will be available in future versions. // - Noop: KubeBlocks will not perform high-availability switching on components. Users need to implement HA by themselves or integrate open source HA solution. // // +kubebuilder:validation:Required // +kubebuilder:default=Noop // +optional Type SwitchPolicyType `json:"type"` }
func (*ClusterSwitchPolicy) DeepCopy ¶ added in v0.6.0
func (in *ClusterSwitchPolicy) DeepCopy() *ClusterSwitchPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSwitchPolicy.
func (*ClusterSwitchPolicy) DeepCopyInto ¶ added in v0.6.0
func (in *ClusterSwitchPolicy) DeepCopyInto(out *ClusterSwitchPolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterVersion ¶
type ClusterVersion struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ClusterVersionSpec `json:"spec,omitempty"` Status ClusterVersionStatus `json:"status,omitempty"` }
ClusterVersion is the Schema for the ClusterVersions API
func (*ClusterVersion) DeepCopy ¶ added in v0.6.0
func (in *ClusterVersion) DeepCopy() *ClusterVersion
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVersion.
func (*ClusterVersion) DeepCopyInto ¶ added in v0.6.0
func (in *ClusterVersion) DeepCopyInto(out *ClusterVersion)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterVersion) DeepCopyObject ¶ added in v0.6.0
func (in *ClusterVersion) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ClusterVersion) GetInconsistentComponentsInfo ¶
func (r *ClusterVersion) GetInconsistentComponentsInfo(clusterDef *ClusterDefinition) ([]string, []string)
GetInconsistentComponentsInfo get clusterVersion invalid component name and no containers component compared with clusterDefinitionDef
func (*ClusterVersion) SetupWebhookWithManager ¶
func (r *ClusterVersion) SetupWebhookWithManager(mgr ctrl.Manager) error
func (*ClusterVersion) ValidateCreate ¶
func (r *ClusterVersion) ValidateCreate() (admission.Warnings, error)
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*ClusterVersion) ValidateDelete ¶
func (r *ClusterVersion) ValidateDelete() (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (*ClusterVersion) ValidateUpdate ¶
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
type ClusterVersionList ¶
type ClusterVersionList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ClusterVersion `json:"items"` }
ClusterVersionList contains a list of ClusterVersion
func (*ClusterVersionList) DeepCopy ¶ added in v0.6.0
func (in *ClusterVersionList) DeepCopy() *ClusterVersionList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVersionList.
func (*ClusterVersionList) DeepCopyInto ¶ added in v0.6.0
func (in *ClusterVersionList) DeepCopyInto(out *ClusterVersionList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterVersionList) DeepCopyObject ¶ added in v0.6.0
func (in *ClusterVersionList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterVersionSpec ¶
type ClusterVersionSpec struct { // ref ClusterDefinition. // +kubebuilder:validation:Required // +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$` ClusterDefinitionRef string `json:"clusterDefinitionRef"` // List of components' containers versioning context, i.e., container image ID, container commands, args, and environments. // +kubebuilder:validation:Required // +kubebuilder:validation:MinItems=1 // +patchMergeKey=componentDefRef // +patchStrategy=merge,retainKeys // +listType=map // +listMapKey=componentDefRef ComponentVersions []ClusterComponentVersion `json:"componentVersions" patchStrategy:"merge,retainKeys" patchMergeKey:"componentDefRef"` }
ClusterVersionSpec defines the desired state of ClusterVersion
func (*ClusterVersionSpec) DeepCopy ¶ added in v0.6.0
func (in *ClusterVersionSpec) DeepCopy() *ClusterVersionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVersionSpec.
func (*ClusterVersionSpec) DeepCopyInto ¶ added in v0.6.0
func (in *ClusterVersionSpec) DeepCopyInto(out *ClusterVersionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ClusterVersionSpec) GetDefNameMappingComponents ¶
func (r ClusterVersionSpec) GetDefNameMappingComponents() map[string]*ClusterComponentVersion
GetDefNameMappingComponents returns ComponentDefRef name mapping ClusterComponentVersion.
type ClusterVersionStatus ¶
type ClusterVersionStatus struct { // phase - in list of [Available,Unavailable] // +optional Phase Phase `json:"phase,omitempty"` // A human readable message indicating details about why the ClusterVersion is in this phase. // +optional Message string `json:"message,omitempty"` // generation number // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` // clusterDefGeneration represents the generation number of ClusterDefinition referenced. // +optional ClusterDefGeneration int64 `json:"clusterDefGeneration,omitempty"` }
ClusterVersionStatus defines the observed state of ClusterVersion
func (*ClusterVersionStatus) DeepCopy ¶ added in v0.6.0
func (in *ClusterVersionStatus) DeepCopy() *ClusterVersionStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVersionStatus.
func (*ClusterVersionStatus) DeepCopyInto ¶ added in v0.6.0
func (in *ClusterVersionStatus) DeepCopyInto(out *ClusterVersionStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ClusterVersionStatus) GetTerminalPhases ¶
func (r ClusterVersionStatus) GetTerminalPhases() []Phase
type CmdExecutorConfig ¶
type CmdExecutorConfig struct { CommandExecutorEnvItem `json:",inline"` CommandExecutorItem `json:",inline"` }
CmdExecutorConfig specifies how to perform creation and deletion statements.
func (*CmdExecutorConfig) DeepCopy ¶ added in v0.6.0
func (in *CmdExecutorConfig) DeepCopy() *CmdExecutorConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CmdExecutorConfig.
func (*CmdExecutorConfig) DeepCopyInto ¶ added in v0.6.0
func (in *CmdExecutorConfig) DeepCopyInto(out *CmdExecutorConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CommandExecutorEnvItem ¶
type CommandExecutorEnvItem struct { // image for Connector when executing the command. // +kubebuilder:validation:Required Image string `json:"image"` // envs is a list of environment variables. // +kubebuilder:pruning:PreserveUnknownFields // +patchMergeKey=name // +patchStrategy=merge,retainKeys // +optional Env []corev1.EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name"` }
func (*CommandExecutorEnvItem) DeepCopy ¶ added in v0.6.0
func (in *CommandExecutorEnvItem) DeepCopy() *CommandExecutorEnvItem
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommandExecutorEnvItem.
func (*CommandExecutorEnvItem) DeepCopyInto ¶ added in v0.6.0
func (in *CommandExecutorEnvItem) DeepCopyInto(out *CommandExecutorEnvItem)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CommandExecutorItem ¶
type CommandExecutorItem struct { // command to perform statements. // +kubebuilder:validation:Required // +kubebuilder:validation:MinItems=1 Command []string `json:"command"` // args is used to perform statements. // +optional Args []string `json:"args,omitempty"` }
func (*CommandExecutorItem) DeepCopy ¶ added in v0.6.0
func (in *CommandExecutorItem) DeepCopy() *CommandExecutorItem
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommandExecutorItem.
func (*CommandExecutorItem) DeepCopyInto ¶ added in v0.6.0
func (in *CommandExecutorItem) DeepCopyInto(out *CommandExecutorItem)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Component ¶ added in v0.8.0
type Component struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ComponentSpec `json:"spec,omitempty"` Status ComponentStatus `json:"status,omitempty"` }
Component is the Schema for the components API
func (*Component) DeepCopy ¶ added in v0.8.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Component.
func (*Component) DeepCopyInto ¶ added in v0.8.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Component) DeepCopyObject ¶ added in v0.8.0
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Component) Default ¶ added in v0.8.0
func (r *Component) Default()
Default implements webhook.Defaulter so a webhook will be registered for the type
func (*Component) SetupWebhookWithManager ¶ added in v0.8.0
func (*Component) ValidateCreate ¶ added in v0.8.0
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*Component) ValidateDelete ¶ added in v0.8.0
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
type ComponentClass ¶
type ComponentClass struct { // name is the class name // +optional Name string `json:"name,omitempty"` // args are variable's value // +optional Args []string `json:"args,omitempty"` // the CPU of the class // +optional CPU resource.Quantity `json:"cpu,omitempty"` // the memory of the class // +optional Memory resource.Quantity `json:"memory,omitempty"` }
func (*ComponentClass) Cmp ¶ added in v0.6.0
func (r *ComponentClass) Cmp(b *ComponentClass) int
func (*ComponentClass) DeepCopy ¶ added in v0.6.0
func (in *ComponentClass) DeepCopy() *ComponentClass
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentClass.
func (*ComponentClass) DeepCopyInto ¶ added in v0.6.0
func (in *ComponentClass) DeepCopyInto(out *ComponentClass)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ComponentClass) ToResourceRequirements ¶
func (r *ComponentClass) ToResourceRequirements() corev1.ResourceRequirements
type ComponentClassDefinition ¶
type ComponentClassDefinition struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ComponentClassDefinitionSpec `json:"spec,omitempty"` Status ComponentClassDefinitionStatus `json:"status,omitempty"` }
ComponentClassDefinition is the Schema for the componentclassdefinitions API
func (*ComponentClassDefinition) DeepCopy ¶ added in v0.6.0
func (in *ComponentClassDefinition) DeepCopy() *ComponentClassDefinition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentClassDefinition.
func (*ComponentClassDefinition) DeepCopyInto ¶ added in v0.6.0
func (in *ComponentClassDefinition) DeepCopyInto(out *ComponentClassDefinition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ComponentClassDefinition) DeepCopyObject ¶ added in v0.6.0
func (in *ComponentClassDefinition) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ComponentClassDefinitionList ¶
type ComponentClassDefinitionList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ComponentClassDefinition `json:"items"` }
ComponentClassDefinitionList contains a list of ComponentClassDefinition
func (*ComponentClassDefinitionList) DeepCopy ¶ added in v0.6.0
func (in *ComponentClassDefinitionList) DeepCopy() *ComponentClassDefinitionList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentClassDefinitionList.
func (*ComponentClassDefinitionList) DeepCopyInto ¶ added in v0.6.0
func (in *ComponentClassDefinitionList) DeepCopyInto(out *ComponentClassDefinitionList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ComponentClassDefinitionList) DeepCopyObject ¶ added in v0.6.0
func (in *ComponentClassDefinitionList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ComponentClassDefinitionSpec ¶
type ComponentClassDefinitionSpec struct { // group defines a list of class series that conform to the same constraint. // +optional Groups []ComponentClassGroup `json:"groups,omitempty"` }
ComponentClassDefinitionSpec defines the desired state of ComponentClassDefinition
func (*ComponentClassDefinitionSpec) DeepCopy ¶ added in v0.6.0
func (in *ComponentClassDefinitionSpec) DeepCopy() *ComponentClassDefinitionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentClassDefinitionSpec.
func (*ComponentClassDefinitionSpec) DeepCopyInto ¶ added in v0.6.0
func (in *ComponentClassDefinitionSpec) DeepCopyInto(out *ComponentClassDefinitionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentClassDefinitionStatus ¶
type ComponentClassDefinitionStatus struct { // 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. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` // classes is the list of classes that have been observed for this ComponentClassDefinition Classes []ComponentClass `json:"classes,omitempty"` }
ComponentClassDefinitionStatus defines the observed state of ComponentClassDefinition
func (*ComponentClassDefinitionStatus) DeepCopy ¶ added in v0.6.0
func (in *ComponentClassDefinitionStatus) DeepCopy() *ComponentClassDefinitionStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentClassDefinitionStatus.
func (*ComponentClassDefinitionStatus) DeepCopyInto ¶ added in v0.6.0
func (in *ComponentClassDefinitionStatus) DeepCopyInto(out *ComponentClassDefinitionStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentClassGroup ¶
type ComponentClassGroup struct { // 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: // // “`yaml // template: | // cpu: "{{ or .cpu 1 }}" // memory: "{{ or .memory 4 }}Gi" // “` // // +optional Template string `json:"template,omitempty"` // vars defines the variables declared in the template and will be used to generating the complete class definition by // render the template. // +listType=set // +optional Vars []string `json:"vars,omitempty"` // series is a series of class definitions. // +optional Series []ComponentClassSeries `json:"series,omitempty"` }
func (*ComponentClassGroup) DeepCopy ¶ added in v0.6.0
func (in *ComponentClassGroup) DeepCopy() *ComponentClassGroup
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentClassGroup.
func (*ComponentClassGroup) DeepCopyInto ¶ added in v0.6.0
func (in *ComponentClassGroup) DeepCopyInto(out *ComponentClassGroup)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentClassSeries ¶
type ComponentClassSeries struct { // 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" // +optional NamingTemplate string `json:"namingTemplate,omitempty"` // 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. // +optional Classes []ComponentClass `json:"classes,omitempty"` }
func (*ComponentClassSeries) DeepCopy ¶ added in v0.6.0
func (in *ComponentClassSeries) DeepCopy() *ComponentClassSeries
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentClassSeries.
func (*ComponentClassSeries) DeepCopyInto ¶ added in v0.6.0
func (in *ComponentClassSeries) DeepCopyInto(out *ComponentClassSeries)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentConfigSpec ¶
type ComponentConfigSpec struct { ComponentTemplateSpec `json:",inline"` // Specify a list of keys. // If empty, ConfigConstraint takes effect for all keys in configmap. // +listType=set // +optional Keys []string `json:"keys,omitempty"` // lazyRenderedConfigSpec is optional: specify the secondary rendered config spec. // +optional LegacyRenderedConfigSpec *LegacyRenderedTemplateSpec `json:"legacyRenderedConfigSpec,omitempty"` // Specify the name of the referenced the configuration constraints object. // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$` // +optional ConfigConstraintRef string `json:"constraintRef,omitempty"` // asEnvFrom is optional: the list of containers will be injected into EnvFrom. // +listType=set // +optional AsEnvFrom []string `json:"asEnvFrom,omitempty"` }
func (*ComponentConfigSpec) DeepCopy ¶ added in v0.6.0
func (in *ComponentConfigSpec) DeepCopy() *ComponentConfigSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentConfigSpec.
func (*ComponentConfigSpec) DeepCopyInto ¶ added in v0.6.0
func (in *ComponentConfigSpec) DeepCopyInto(out *ComponentConfigSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentDefRef ¶ added in v0.6.0
type ComponentDefRef struct { // componentDefName is the name of the componentDef to select. // +kubebuilder:validation:Required ComponentDefName string `json:"componentDefName"` // failurePolicy is the failure policy of the component. // If failed to find the component, the failure policy will be used. // +kubebuilder:validation:Enum={Ignore,Fail} // +default="Ignore" // +optional FailurePolicy FailurePolicyType `json:"failurePolicy,omitempty"` // componentRefEnv specifies a list of values to be injected as env variables to each component. // +kbubebuilder:validation:Required // +patchMergeKey=name // +patchStrategy=merge,retainKeys // +listType=map // +listMapKey=name // +optional ComponentRefEnvs []ComponentRefEnv `json:"componentRefEnv" patchStrategy:"merge" patchMergeKey:"name"` }
ComponentDefRef is used to select the component and its fields to be referenced.
func (*ComponentDefRef) DeepCopy ¶ added in v0.6.0
func (in *ComponentDefRef) DeepCopy() *ComponentDefRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentDefRef.
func (*ComponentDefRef) DeepCopyInto ¶ added in v0.6.0
func (in *ComponentDefRef) DeepCopyInto(out *ComponentDefRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentDefinition ¶ added in v0.8.0
type ComponentDefinition struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ComponentDefinitionSpec `json:"spec,omitempty"` Status ComponentDefinitionStatus `json:"status,omitempty"` }
ComponentDefinition is the Schema for the componentdefinitions API
func (*ComponentDefinition) DeepCopy ¶ added in v0.8.0
func (in *ComponentDefinition) DeepCopy() *ComponentDefinition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentDefinition.
func (*ComponentDefinition) DeepCopyInto ¶ added in v0.8.0
func (in *ComponentDefinition) DeepCopyInto(out *ComponentDefinition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ComponentDefinition) DeepCopyObject ¶ added in v0.8.0
func (in *ComponentDefinition) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ComponentDefinition) Default ¶ added in v0.8.0
func (r *ComponentDefinition) Default()
Default implements webhook.Defaulter so a webhook will be registered for the type
func (*ComponentDefinition) SetupWebhookWithManager ¶ added in v0.8.0
func (r *ComponentDefinition) SetupWebhookWithManager(mgr ctrl.Manager) error
func (*ComponentDefinition) ValidateCreate ¶ added in v0.8.0
func (r *ComponentDefinition) ValidateCreate() (admission.Warnings, error)
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*ComponentDefinition) ValidateDelete ¶ added in v0.8.0
func (r *ComponentDefinition) ValidateDelete() (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (*ComponentDefinition) ValidateUpdate ¶ added in v0.8.0
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
type ComponentDefinitionList ¶ added in v0.8.0
type ComponentDefinitionList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ComponentDefinition `json:"items"` }
ComponentDefinitionList contains a list of ComponentDefinition
func (*ComponentDefinitionList) DeepCopy ¶ added in v0.8.0
func (in *ComponentDefinitionList) DeepCopy() *ComponentDefinitionList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentDefinitionList.
func (*ComponentDefinitionList) DeepCopyInto ¶ added in v0.8.0
func (in *ComponentDefinitionList) DeepCopyInto(out *ComponentDefinitionList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ComponentDefinitionList) DeepCopyObject ¶ added in v0.8.0
func (in *ComponentDefinitionList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ComponentDefinitionRef ¶ added in v0.8.0
type ComponentDefinitionRef struct { // Refers to the name of the component definition. This is a required field with a maximum length of 32 characters. // // +kubebuilder:validation:MaxLength=32 // +kubebuilder:validation:Required Name string `json:"name"` // Represents the account name of the component. // If provided, the account username and password will be injected into the job environment variables `KB_ACCOUNT_USERNAME` and `KB_ACCOUNT_PASSWORD`. // // +optional AccountName string `json:"accountName,omitempty"` // References the name of the service. // If provided, the service name and ports will be mapped to the job environment variables `KB_COMP_SVC_NAME` and `KB_COMP_SVC_PORT_$(portName)`. // Note that the portName will replace the characters '-' with '_' and convert to uppercase. // // +optional ServiceName string `json:"serviceName,omitempty"` // 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. // // +optional VarsRef *VarsRef `json:"varsRef,omitempty"` }
func (*ComponentDefinitionRef) DeepCopy ¶ added in v0.8.0
func (in *ComponentDefinitionRef) DeepCopy() *ComponentDefinitionRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentDefinitionRef.
func (*ComponentDefinitionRef) DeepCopyInto ¶ added in v0.8.0
func (in *ComponentDefinitionRef) DeepCopyInto(out *ComponentDefinitionRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentDefinitionSpec ¶ added in v0.8.0
type ComponentDefinitionSpec struct { // Provider is the name of the component provider. // +kubebuilder:validation:MaxLength=32 // +optional Provider string `json:"provider,omitempty"` // Description is a brief description of the component. // +kubebuilder:validation:MaxLength=256 // +optional Description string `json:"description,omitempty"` // ServiceKind defines what kind of well-known service that the component provides (e.g., MySQL, Redis, ETCD, case insensitive). // Cannot be updated. // +kubebuilder:validation:MaxLength=32 // +optional ServiceKind string `json:"serviceKind,omitempty"` // ServiceVersion defines the version of the well-known service that the component provides. // Cannot be updated. // +kubebuilder:validation:MaxLength=32 // +optional ServiceVersion string `json:"serviceVersion,omitempty"` // Runtime defines primarily runtime information for the component, including: // // - Init containers // - Containers // - Image // - Commands // - Args // - Envs // - Mounts // - Ports // - Security context // - Probes // - Lifecycle // - Volumes // // CPU and memory resource limits, as well as scheduling settings (affinity, toleration, priority), should not be configured within this structure. // Cannot be updated. // // +kubebuilder:pruning:PreserveUnknownFields // +kubebuilder:validation:Required Runtime corev1.PodSpec `json:"runtime"` // 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. // // +optional Vars []EnvVar `json:"vars,omitempty"` // 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. // +optional Volumes []ComponentVolume `json:"volumes"` // Services defines endpoints that can be used to access the component service to manage the component. // // In addition, a reserved headless service will be created by default, with the name pattern `{clusterName}-{componentName}-headless`. // Cannot be updated. // // +optional Services []ComponentService `json:"services,omitempty"` // 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. // +patchMergeKey=name // +patchStrategy=merge,retainKeys // +listType=map // +listMapKey=name // +optional // TODO: support referencing configs from other components or clusters. Configs []ComponentConfigSpec `json:"configs,omitempty"` // LogConfigs is detail log file config which provided by provider. // Cannot be updated. // +patchMergeKey=name // +patchStrategy=merge,retainKeys // +listType=map // +listMapKey=name // +optional LogConfigs []LogConfig `json:"logConfigs,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name"` // Monitor is monitoring config which provided by provider. // Cannot be updated. // +optional Monitor *MonitorConfig `json:"monitor,omitempty"` // 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. // +patchMergeKey=name // +patchStrategy=merge,retainKeys // +listType=map // +listMapKey=name // +optional Scripts []ComponentTemplateSpec `json:"scripts,omitempty"` // 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. // +optional PolicyRules []rbacv1.PolicyRule `json:"policyRules,omitempty"` // 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. // +optional Labels map[string]string `json:"labels,omitempty"` // ReplicasLimit defines the limit of valid replicas supported. // Cannot be updated. // +optional ReplicasLimit *ReplicasLimit `json:"replicasLimit,omitempty"` // SystemAccounts defines the pre-defined system accounts required to manage the component. // TODO(component): accounts KB required // Cannot be updated. // +optional SystemAccounts []SystemAccount `json:"systemAccounts,omitempty"` // UpdateStrategy defines the strategy for updating the component instance. // Cannot be updated. // +kubebuilder:default=Serial // +optional UpdateStrategy *UpdateStrategy `json:"updateStrategy,omitempty"` // Roles defines all the roles that the component can assume. // Cannot be updated. // +optional Roles []ReplicaRole `json:"roles,omitempty"` // RoleArbitrator defines the strategy for electing the component's active role. // Cannot be updated. // +kubebuilder:default=External // +optional RoleArbitrator *RoleArbitrator `json:"roleArbitrator,omitempty"` // LifecycleActions defines the operational actions that needed to interoperate with the component // service and processes for lifecycle management. // Cannot be updated. // +optional LifecycleActions *ComponentLifecycleActions `json:"lifecycleActions,omitempty"` // ServiceRefDeclarations is used to declare the service reference of the current component. // Cannot be updated. // +optional ServiceRefDeclarations []ServiceRefDeclaration `json:"serviceRefDeclarations,omitempty"` }
ComponentDefinitionSpec provides a workload component specification with attributes that strongly work with stateful workloads and day-2 operation behaviors.
func (*ComponentDefinitionSpec) DeepCopy ¶ added in v0.8.0
func (in *ComponentDefinitionSpec) DeepCopy() *ComponentDefinitionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentDefinitionSpec.
func (*ComponentDefinitionSpec) DeepCopyInto ¶ added in v0.8.0
func (in *ComponentDefinitionSpec) DeepCopyInto(out *ComponentDefinitionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentDefinitionStatus ¶ added in v0.8.0
type ComponentDefinitionStatus struct { // ObservedGeneration is the most recent generation observed for this ComponentDefinition. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` // Phase valid values are “, `Available`, `Unavailable`. // Available is ComponentDefinition become available, and can be used for co-related objects. // +optional Phase Phase `json:"phase,omitempty"` // Extra message for current phase. // +optional Message string `json:"message,omitempty"` }
ComponentDefinitionStatus defines the observed state of ComponentDefinition.
func (*ComponentDefinitionStatus) DeepCopy ¶ added in v0.8.0
func (in *ComponentDefinitionStatus) DeepCopy() *ComponentDefinitionStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentDefinitionStatus.
func (*ComponentDefinitionStatus) DeepCopyInto ¶ added in v0.8.0
func (in *ComponentDefinitionStatus) DeepCopyInto(out *ComponentDefinitionStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentLifecycleActions ¶ added in v0.8.0
type ComponentLifecycleActions struct { // PostProvision defines the actions to be executed and the corresponding policy when a component is created. // You can define the preCondition for executing PostProvision using Action.PreCondition. The default PostProvision action preCondition is ComponentReady. // The PostProvision Action will be executed only once. // Dedicated env vars for the action: // // - KB_CLUSTER_COMPONENT_LIST: The list of all components in the cluster, joined by ',' (e.g., "comp1,comp2"). // - KB_CLUSTER_COMPONENT_POD_NAME_LIST: The list of all pods name in this component, joined by ',' (e.g., "pod1,pod2"). // - KB_CLUSTER_COMPONENT_POD_IP_LIST: The list of pod IPs where each pod resides in this component, corresponding one-to-one with each pod in the KB_CLUSTER_COMPONENT_POD_NAME_LIST. joined by ',' (e.g., "podIp1,podIp2"). // - KB_CLUSTER_COMPONENT_POD_HOST_NAME_LIST: The list of hostName where each pod resides in this component, corresponding one-to-one with each pod in the KB_CLUSTER_COMPONENT_POD_NAME_LIST. joined by ',' (e.g., "hostName1,hostName2"). // - KB_CLUSTER_COMPONENT_POD_HOST_IP_LIST: The list of host IPs where each pod resides in this component, corresponding one-to-one with each pod in the KB_CLUSTER_COMPONENT_POD_NAME_LIST. joined by ',' (e.g., "hostIp1,hostIp2"). // // Cannot be updated. // // +optional PostProvision *LifecycleActionHandler `json:"postProvision,omitempty"` // 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. // +optional PreTerminate *LifecycleActionHandler `json:"preTerminate,omitempty"` // 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: // // - KB_POD_FQDN: The pod FQDN of the replica to check the role. // - KB_SERVICE_PORT: The port on which the DB service listens. // - KB_SERVICE_USER: The username used to access the DB service and retrieve the role information with sufficient privileges. // - KB_SERVICE_PASSWORD: The password of the user used to access the DB service and retrieve the role information. // // Output of the action: // - ROLE: the role of the replica. It must be one of the names defined in the roles. // - ERROR: Any error message if the action fails. // // This field cannot be updated. // // +optional RoleProbe *RoleProbe `json:"roleProbe,omitempty"` // Switchover defines how to proactively switch the current leader to a new replica to minimize the impact on availability. // This action is typically invoked when the leader is about to become unavailable due to events, such as: // // - switchover // - stop // - restart // - scale-in // // Dedicated env vars for the action: // // - KB_SWITCHOVER_CANDIDATE_NAME: The name of the new candidate replica's Pod. It may be empty. // - KB_SWITCHOVER_CANDIDATE_FQDN: The FQDN of the new candidate replica. It may be empty. // - KB_LEADER_POD_IP: The IP address of the original leader's Pod before switchover. // - KB_LEADER_POD_NAME: The name of the original leader's Pod before switchover. // - KB_LEADER_POD_FQDN: The FQDN of the original leader's Pod before switchover. // // The env vars with following prefix are deprecated and will be removed in the future: // // - KB_REPLICATION_PRIMARY_POD_: The prefix of the environment variables of the original primary's Pod before switchover. // - KB_CONSENSUS_LEADER_POD_: The prefix of the environment variables of the original leader's Pod before switchover. // // Cannot be updated. // // +optional Switchover *ComponentSwitchover `json:"switchover,omitempty"` // 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: // // - KB_SERVICE_PORT: The port on which the DB service listens. // - KB_SERVICE_USER: The username used to access the DB service with sufficient privileges. // - KB_SERVICE_PASSWORD: The password of the user used to access the DB service . // - KB_PRIMARY_POD_FQDN: The FQDN of the original primary Pod. // - KB_MEMBER_ADDRESSES: The addresses of all members. // - KB_NEW_MEMBER_POD_NAME: The name of the new member's Pod. // - KB_NEW_MEMBER_POD_IP: The name of the new member's Pod. // // Output of the action: // - ERROR: Any error message if the action fails. // // For example, the following command can be used to add a new OBServer to the OceanBase Cluster in zone1: // command: // - bash // - -c // - | // ADDRESS=$(KB_MEMBER_ADDRESSES%%,*) // HOST=$(echo $ADDRESS | cut -d ':' -f 1) // PORT=$(echo $ADDRESS | cut -d ':' -f 2) // CLIENT="mysql -u $KB_SERVICE_USER -p$KB_SERVICE_PASSWORD -P $PORT -h $HOST -e" // $CLIENT "ALTER SYSTEM ADD SERVER '$KB_NEW_MEMBER_POD_IP:$KB_SERVICE_PORT' ZONE 'zone1'" // // This field cannot be updated. // // +optional MemberJoin *LifecycleActionHandler `json:"memberJoin,omitempty"` // 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: // // - KB_SERVICE_PORT: The port on which the DB service listens. // - KB_SERVICE_USER: The username used to access the DB service with sufficient privileges. // - KB_SERVICE_PASSWORD: The password of the user used to access the DB service. // - KB_PRIMARY_POD_FQDN: The FQDN of the original primary Pod. // - KB_MEMBER_ADDRESSES: The addresses of all members. // - KB_LEAVE_MEMBER_POD_NAME: The name of the leave member's Pod. // - KB_LEAVE_MEMBER_POD_IP: The IP of the leave member's Pod. // // Output of the action: // - ERROR: Any error message if the action fails. // // For example, the following command can be used to delete a OBServer from the OceanBase Cluster in zone1: // command: // - bash // - -c // - | // ADDRESS=$(KB_MEMBER_ADDRESSES%%,*) // HOST=$(echo $ADDRESS | cut -d ':' -f 1) // PORT=$(echo $ADDRESS | cut -d ':' -f 2) // CLIENT="mysql -u $KB_SERVICE_USER -p$KB_SERVICE_PASSWORD -P $PORT -h $HOST -e" // $CLIENT "ALTER SYSTEM DELETE SERVER '$KB_NEW_MEMBER_POD_IP:$KB_SERVICE_PORT' ZONE 'zone1'" // // This field cannot be updated. // // +optional MemberLeave *LifecycleActionHandler `json:"memberLeave,omitempty"` // 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: // // - KB_POD_FQDN: The FQDN of the replica pod to check the role. // - KB_SERVICE_PORT: The port on which the DB service listens. // - KB_SERVICE_USER: The username used to access the DB service with sufficient privileges. // - KB_SERVICE_PASSWORD: The password of the user used to access the DB service. // // Output of the action: // - ERROR: Any error message if the action fails. // // This field cannot be updated. // // +optional Readonly *LifecycleActionHandler `json:"readonly,omitempty"` // Readwrite defines how to set a replica service as read-write. // // The following dedicated environment variables are available for the action: // // - KB_POD_FQDN: The FQDN of the replica pod to check the role. // - KB_SERVICE_PORT: The port on which the DB service listens. // - KB_SERVICE_USER: The username used to access the DB service with sufficient privileges. // - KB_SERVICE_PASSWORD: The password of the user used to access the DB service. // // Output of the action: // - ERROR: Any error message if the action fails. // // This field cannot be updated. // // +optional Readwrite *LifecycleActionHandler `json:"readwrite,omitempty"` // DataPopulate defines how to populate the data to create new replicas. // This action is typically used when a new replica needs to be constructed, such as: // // - scale-out // - rebuild // - clone // // It should write the valid data to stdout without including any extraneous information. // Cannot be updated. // // +optional DataPopulate *LifecycleActionHandler `json:"dataPopulate,omitempty"` // DataAssemble defines how to assemble data synchronized from external before starting the service for a new replica. // This action is typically used when creating a new replica, such as: // // - scale-out // - rebuild // - clone // // The data will be streamed in via stdin. If any error occurs during the assembly process, // the action must be able to guarantee idempotence to allow for retries from the beginning. // Cannot be updated. // // +optional DataAssemble *LifecycleActionHandler `json:"dataAssemble,omitempty"` // Reconfigure defines how to notify the replica service that there is a configuration update. // Cannot be updated. // +optional Reconfigure *LifecycleActionHandler `json:"reconfigure,omitempty"` // AccountProvision defines how to provision accounts. // Cannot be updated. // +optional AccountProvision *LifecycleActionHandler `json:"accountProvision,omitempty"` }
ComponentLifecycleActions defines a set of operational actions for interacting with component services and processes.
func (*ComponentLifecycleActions) DeepCopy ¶ added in v0.8.0
func (in *ComponentLifecycleActions) DeepCopy() *ComponentLifecycleActions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentLifecycleActions.
func (*ComponentLifecycleActions) DeepCopyInto ¶ added in v0.8.0
func (in *ComponentLifecycleActions) DeepCopyInto(out *ComponentLifecycleActions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentList ¶ added in v0.8.0
type ComponentList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Component `json:"items"` }
ComponentList contains a list of Component
func (*ComponentList) DeepCopy ¶ added in v0.8.0
func (in *ComponentList) DeepCopy() *ComponentList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentList.
func (*ComponentList) DeepCopyInto ¶ added in v0.8.0
func (in *ComponentList) DeepCopyInto(out *ComponentList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ComponentList) DeepCopyObject ¶ added in v0.8.0
func (in *ComponentList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ComponentMessageMap ¶
func (ComponentMessageMap) DeepCopy ¶ added in v0.6.0
func (in ComponentMessageMap) DeepCopy() ComponentMessageMap
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentMessageMap.
func (ComponentMessageMap) DeepCopyInto ¶ added in v0.6.0
func (in ComponentMessageMap) DeepCopyInto(out *ComponentMessageMap)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ComponentMessageMap) SetObjectMessage ¶
func (r ComponentMessageMap) SetObjectMessage(objectKind, objectName, message string)
SetObjectMessage sets k8s workload message to component status message map
type ComponentNameSet ¶
type ComponentNameSet map[string]struct{}
func (ComponentNameSet) DeepCopy ¶ added in v0.6.0
func (in ComponentNameSet) DeepCopy() ComponentNameSet
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentNameSet.
func (ComponentNameSet) DeepCopyInto ¶ added in v0.6.0
func (in ComponentNameSet) DeepCopyInto(out *ComponentNameSet)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentOps ¶
type ComponentOps struct { // Specifies the name of the cluster component. // +kubebuilder:validation:Required ComponentName string `json:"componentName"` }
ComponentOps represents the common variables required for operations within the scope of a component.
func (*ComponentOps) DeepCopy ¶ added in v0.6.0
func (in *ComponentOps) DeepCopy() *ComponentOps
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentOps.
func (*ComponentOps) DeepCopyInto ¶ added in v0.6.0
func (in *ComponentOps) DeepCopyInto(out *ComponentOps)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentRefEnv ¶ added in v0.6.0
type ComponentRefEnv struct { // name is the name of the env to be injected, and it must be a C identifier. // +kubebuilder:validation:Required // +kubebuilder:validation:Pattern=`^[A-Za-z_][A-Za-z0-9_]*$` Name string `json:"name"` // value is the value of the env to be injected. // +optional Value string `json:"value,omitempty"` // valueFrom specifies the source of the env to be injected. // +optional ValueFrom *ComponentValueFrom `json:"valueFrom,omitempty"` }
ComponentRefEnv specifies name and value of an env.
func (*ComponentRefEnv) DeepCopy ¶ added in v0.6.0
func (in *ComponentRefEnv) DeepCopy() *ComponentRefEnv
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentRefEnv.
func (*ComponentRefEnv) DeepCopyInto ¶ added in v0.6.0
func (in *ComponentRefEnv) DeepCopyInto(out *ComponentRefEnv)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentResourceConstraint ¶
type ComponentResourceConstraint struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ComponentResourceConstraintSpec `json:"spec,omitempty"` }
ComponentResourceConstraint is the Schema for the componentresourceconstraints API
func (*ComponentResourceConstraint) DeepCopy ¶ added in v0.6.0
func (in *ComponentResourceConstraint) DeepCopy() *ComponentResourceConstraint
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentResourceConstraint.
func (*ComponentResourceConstraint) DeepCopyInto ¶ added in v0.6.0
func (in *ComponentResourceConstraint) DeepCopyInto(out *ComponentResourceConstraint)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ComponentResourceConstraint) DeepCopyObject ¶ added in v0.6.0
func (in *ComponentResourceConstraint) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ComponentResourceConstraint) FindMatchingRules ¶ added in v0.6.0
func (c *ComponentResourceConstraint) FindMatchingRules( clusterDefRef string, componentDefRef string, resources corev1.ResourceList) []ResourceConstraintRule
FindMatchingRules find all constraint rules that resource satisfies.
func (*ComponentResourceConstraint) FindRules ¶ added in v0.6.0
func (c *ComponentResourceConstraint) FindRules(clusterDefRef, componentDefRef string) []ResourceConstraintRule
FindRules find all constraint rules that the component should conform to based on ClusterDefinition API. TODO(xingran): it will be deprecated in the future, use FindRulesWithCompDef instead.
func (*ComponentResourceConstraint) FindRulesWithCompDef ¶ added in v0.8.0
func (c *ComponentResourceConstraint) FindRulesWithCompDef(compDef string) []ResourceConstraintRule
FindRulesWithCompDef find all constraint rules that the component should conform to based on ComponentDefinition API.
func (*ComponentResourceConstraint) MatchClass ¶
func (c *ComponentResourceConstraint) MatchClass(clusterDefRef, componentDefRef string, class *ComponentClass) bool
MatchClass checks if the class meets the constraint rules.
type ComponentResourceConstraintList ¶
type ComponentResourceConstraintList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ComponentResourceConstraint `json:"items"` }
ComponentResourceConstraintList contains a list of ComponentResourceConstraint
func (*ComponentResourceConstraintList) DeepCopy ¶ added in v0.6.0
func (in *ComponentResourceConstraintList) DeepCopy() *ComponentResourceConstraintList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentResourceConstraintList.
func (*ComponentResourceConstraintList) DeepCopyInto ¶ added in v0.6.0
func (in *ComponentResourceConstraintList) DeepCopyInto(out *ComponentResourceConstraintList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ComponentResourceConstraintList) DeepCopyObject ¶ added in v0.6.0
func (in *ComponentResourceConstraintList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ComponentResourceConstraintSelector ¶ added in v0.6.0
type ComponentResourceConstraintSelector struct { // 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. // +kubebuilder:validation:Required ComponentDefRef string `json:"componentDefRef"` // rules are the constraint rules that will be applied to the component. // +kubebuilder:validation:Required Rules []string `json:"rules"` }
func (*ComponentResourceConstraintSelector) DeepCopy ¶ added in v0.6.0
func (in *ComponentResourceConstraintSelector) DeepCopy() *ComponentResourceConstraintSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentResourceConstraintSelector.
func (*ComponentResourceConstraintSelector) DeepCopyInto ¶ added in v0.6.0
func (in *ComponentResourceConstraintSelector) DeepCopyInto(out *ComponentResourceConstraintSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentResourceConstraintSpec ¶
type ComponentResourceConstraintSpec struct { // Component resource constraint rules. // +patchMergeKey=name // +patchStrategy=merge,retainKeys // +listType=map // +listMapKey=name // +kubebuilder:validation:Required Rules []ResourceConstraintRule `json:"rules"` // selector is used to bind the resource constraint to cluster definitions based on ClusterDefinition API. // +listType=map // +listMapKey=clusterDefRef //+kubebuilder:deprecatedversion:warning="This field is deprecated from KB 0.8.0, use ComponentSelector instead." // +optional Selector []ClusterResourceConstraintSelector `json:"selector,omitempty"` // componentSelector is used to bind the resource constraint to components based on ComponentDefinition API. // +listType=map // +listMapKey=componentDefRef // +optional ComponentSelector []ComponentResourceConstraintSelector `json:"componentSelector,omitempty"` }
ComponentResourceConstraintSpec defines the desired state of ComponentResourceConstraint
func (*ComponentResourceConstraintSpec) DeepCopy ¶ added in v0.6.0
func (in *ComponentResourceConstraintSpec) DeepCopy() *ComponentResourceConstraintSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentResourceConstraintSpec.
func (*ComponentResourceConstraintSpec) DeepCopyInto ¶ added in v0.6.0
func (in *ComponentResourceConstraintSpec) DeepCopyInto(out *ComponentResourceConstraintSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentResourceKey ¶
type ComponentResourceKey string
ComponentResourceKey defines the resource key of component, such as pod/pvc. +enum +kubebuilder:validation:Enum={pods}
const PodsCompResourceKey ComponentResourceKey = "pods"
type ComponentService ¶ added in v0.8.0
type ComponentService struct { Service `json:",inline"` // GeneratePodOrdinalService indicates whether to create a corresponding Service for each Pod of the selected Component. // If sets to true, a set of Service will be automatically generated for each Pod. And Service.RoleSelector will be ignored. // They can be referred to by adding the PodOrdinal to the defined ServiceName with named pattern `$(Service.ServiceName)-$(PodOrdinal)`. // And the Service.Name will also be generated with named pattern `$(Service.Name)-$(PodOrdinal)`. // The PodOrdinal is zero-based, and the number of generated Services is equal to the number of replicas of the Component. // For example, a Service might be defined as follows: // // “`yaml // name: my-service // serviceName: my-service // generatePodOrdinalService: true // spec: // type: NodePort // ports: // - name: http // port: 80 // targetPort: 8080 // “` // // Assuming that the Component has 3 replicas, then three services would be generated: my-service-0, my-service-1, and my-service-2, each pointing to its respective Pod. // // +kubebuilder:default=false // +optional GeneratePodOrdinalService bool `json:"generatePodOrdinalService,omitempty"` }
func (*ComponentService) DeepCopy ¶ added in v0.8.0
func (in *ComponentService) DeepCopy() *ComponentService
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentService.
func (*ComponentService) DeepCopyInto ¶ added in v0.8.0
func (in *ComponentService) DeepCopyInto(out *ComponentService)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentSpec ¶ added in v0.8.0
type ComponentSpec struct { // compDef is the name of the referenced componentDefinition. // +kubebuilder:validation:Required CompDef string `json:"compDef"` // classDefRef references the class defined in ComponentClassDefinition. // +kubebuilder:deprecatedversion:warning="Due to the lack of practical use cases, this field is deprecated from KB 0.9.0." // +optional ClassDefRef *ClassDefRef `json:"classDefRef,omitempty"` // serviceRefs define service references for the current component. Based on the referenced services, they can be categorized into two types: // // - Service provided by external sources: These services are provided by external sources and are not managed by KubeBlocks. They can be Kubernetes-based or non-Kubernetes services. For external services, you need to provide an additional ServiceDescriptor object to establish the service binding. // - Service provided by other KubeBlocks clusters: These services are provided by other KubeBlocks clusters. You can bind to these services by specifying the name of the hosting cluster. // // Each type of service reference requires specific configurations and bindings to establish the connection and interaction with the respective services. // It should be noted that the ServiceRef has cluster-level semantic consistency, meaning that within the same Cluster, service references with the same ServiceRef.Name are considered to be the same service. It is only allowed to bind to the same Cluster or ServiceDescriptor. // // +optional ServiceRefs []ServiceRef `json:"serviceRefs,omitempty"` // Specifies Labels to override or add for underlying Pods. // // +optional Labels map[string]string `json:"labels,omitempty"` // Specifies Annotations to override or add for underlying Pods. // // +optional Annotations map[string]string `json:"annotations,omitempty"` // List of environment variables to add. // // +optional Env []corev1.EnvVar `json:"env,omitempty"` // Resources requests and limits of workload. // +kubebuilder:pruning:PreserveUnknownFields // +optional Resources corev1.ResourceRequirements `json:"resources,omitempty"` // VolumeClaimTemplates information for statefulset.spec.volumeClaimTemplates. // +optional // +patchMergeKey=name // +patchStrategy=merge,retainKeys VolumeClaimTemplates []ClusterComponentVolumeClaimTemplate `json:"volumeClaimTemplates,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name"` // List of volumes to override. // // +optional Volumes []corev1.Volume `json:"volumes,omitempty"` // Component replicas. The default value is used in ClusterDefinition spec if not specified. // +kubebuilder:validation:Required // +kubebuilder:validation:Minimum=0 // +kubebuilder:default=1 Replicas int32 `json:"replicas"` // +optional Configs []ComponentConfigSpec `json:"configs,omitempty"` // 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. // +kubebuilder:default=false // +optional Monitor bool `json:"monitor,omitempty"` // 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. // +listType=set // +optional EnabledLogs []string `json:"enabledLogs,omitempty"` // +optional UpdateStrategy *UpdateStrategy `json:"updateStrategy,omitempty"` // serviceAccountName is the name of the ServiceAccount that running component depends on. // +optional ServiceAccountName string `json:"serviceAccountName,omitempty"` // Specifies the scheduling policy for the component. // // +optional SchedulingPolicy *SchedulingPolicy `json:"schedulingPolicy,omitempty"` // +optional Affinity *Affinity `json:"affinity,omitempty"` // +optional Tolerations []corev1.Toleration `json:"tolerations,omitempty"` // +optional TLSConfig *TLSConfig `json:"tlsConfig,omitempty"` // RsmTransformPolicy defines the policy generate sts using rsm. // ToSts: rsm transform to statefulSet // ToPod: rsm transform to pods // +kubebuilder:validation:Required // +kubebuilder:default=ToSts // +optional RsmTransformPolicy workloads.RsmTransformPolicy `json:"rsmTransformPolicy,omitempty"` // 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. // +optional Nodes []types.NodeName `json:"nodes,omitempty"` // Instances defines the list of instance to be deleted priorly // +optional Instances []string `json:"instances,omitempty"` }
ComponentSpec defines the desired state of Component
func (*ComponentSpec) DeepCopy ¶ added in v0.8.0
func (in *ComponentSpec) DeepCopy() *ComponentSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentSpec.
func (*ComponentSpec) DeepCopyInto ¶ added in v0.8.0
func (in *ComponentSpec) DeepCopyInto(out *ComponentSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentStatus ¶ added in v0.8.0
type ComponentStatus struct { // 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. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` // Describe current state of component API Resource, like warning. // +optional Conditions []metav1.Condition `json:"conditions,omitempty"` // phase describes the phase of the component and the detail information of the phases are as following: // // - Creating: `Creating` is a special `Updating` with previous phase `empty`(means "") or `Creating`. // - Running: component replicas > 0 and all pod specs are latest with a Running state. // - Updating: component replicas > 0 and has no failed pods. the component is being updated. // - Abnormal: component replicas > 0 but having some failed pods. the component basically works but in a fragile state. // - Failed: component replicas > 0 but having some failed pods. the component doesn't work anymore. // - Stopping: component replicas = 0 and has terminating pods. // - Stopped: component replicas = 0 and all pods have been deleted. // - Deleting: the component is being deleted. Phase ClusterComponentPhase `json:"phase,omitempty"` // message records the component details message in current phase. // Keys are podName or deployName or statefulSetName. The format is `ObjectKind/Name`. // +optional Message ComponentMessageMap `json:"message,omitempty"` }
ComponentStatus defines the observed state of Component
func (*ComponentStatus) DeepCopy ¶ added in v0.8.0
func (in *ComponentStatus) DeepCopy() *ComponentStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentStatus.
func (*ComponentStatus) DeepCopyInto ¶ added in v0.8.0
func (in *ComponentStatus) DeepCopyInto(out *ComponentStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentSwitchover ¶ added in v0.8.0
type ComponentSwitchover struct { // withCandidate corresponds to the switchover of the specified candidate primary or leader instance. // Currently, only Action.Exec is supported, Action.HTTP is not supported. // +optional WithCandidate *Action `json:"withCandidate,omitempty"` // 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. // +optional WithoutCandidate *Action `json:"withoutCandidate,omitempty"` // 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. // +optional ScriptSpecSelectors []ScriptSpecSelector `json:"scriptSpecSelectors,omitempty"` }
func (*ComponentSwitchover) DeepCopy ¶ added in v0.8.0
func (in *ComponentSwitchover) DeepCopy() *ComponentSwitchover
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentSwitchover.
func (*ComponentSwitchover) DeepCopyInto ¶ added in v0.8.0
func (in *ComponentSwitchover) DeepCopyInto(out *ComponentSwitchover)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentTemplateSpec ¶
type ComponentTemplateSpec struct { // Specify the name of configuration template. // +kubebuilder:validation:Required // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$` Name string `json:"name"` // Specify the name of the referenced the configuration template ConfigMap object. // +kubebuilder:validation:Required // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$` TemplateRef string `json:"templateRef"` // Specify the namespace of the referenced the configuration template ConfigMap object. // An empty namespace is equivalent to the "default" namespace. // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$` // +kubebuilder:default="default" // +optional Namespace string `json:"namespace,omitempty"` // 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. // +kubebuilder:validation:Required // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:Pattern:=`^[a-z]([a-z0-9\-]*[a-z0-9])?$` VolumeName string `json:"volumeName"` // 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. // // +optional DefaultMode *int32 `json:"defaultMode,omitempty" protobuf:"varint,3,opt,name=defaultMode"` }
func (*ComponentTemplateSpec) DeepCopy ¶ added in v0.6.0
func (in *ComponentTemplateSpec) DeepCopy() *ComponentTemplateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentTemplateSpec.
func (*ComponentTemplateSpec) DeepCopyInto ¶ added in v0.6.0
func (in *ComponentTemplateSpec) DeepCopyInto(out *ComponentTemplateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentValueFrom ¶ added in v0.6.0
type ComponentValueFrom struct { // type is the type of the source to select. There are three types: `FieldRef`, `ServiceRef`, `HeadlessServiceRef`. // +kubebuilder:validation:Enum={FieldRef,ServiceRef,HeadlessServiceRef} // +kubebuilder:validation:Required Type ComponentValueFromType `json:"type"` // fieldRef is the jsonpath of the source to select when type is `FieldRef`. // there are two objects registered in the jsonpath: `componentDef` and `components`: // // - componentDef is the component definition object specified in `componentRef.componentDefName`. // - components is the component list objects referring to the component definition object. // // +optional FieldPath string `json:"fieldPath,omitempty"` // format is the format of each headless service address. // there are three builtin variables can be used as placeholder: $POD_ORDINAL, $POD_FQDN, $POD_NAME // // - $POD_ORDINAL is the ordinal of the pod. // - $POD_FQDN is the fully qualified domain name of the pod. // - $POD_NAME is the name of the pod // // +optional // +kubebuilder:default=="$POD_FQDN" Format string `json:"format,omitempty"` // joinWith is the string to join the values of headless service addresses. // +optional // +kubebuilder:default="," JoinWith string `json:"joinWith,omitempty"` }
func (*ComponentValueFrom) DeepCopy ¶ added in v0.6.0
func (in *ComponentValueFrom) DeepCopy() *ComponentValueFrom
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentValueFrom.
func (*ComponentValueFrom) DeepCopyInto ¶ added in v0.6.0
func (in *ComponentValueFrom) DeepCopyInto(out *ComponentValueFrom)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentValueFromType ¶ added in v0.6.0
type ComponentValueFromType string
ComponentValueFromType specifies the type of component value from. +enum +kubebuilder:validation:Enum={FieldRef,ServiceRef,HeadlessServiceRef}
const ( FromFieldRef ComponentValueFromType = "FieldRef" FromServiceRef ComponentValueFromType = "ServiceRef" FromHeadlessServiceRef ComponentValueFromType = "HeadlessServiceRef" )
type ComponentVolume ¶ added in v0.8.0
type ComponentVolume struct { // 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. // +required Name string `json:"name"` // NeedSnapshot indicates whether the volume need to snapshot when making a backup for the component. // Cannot be updated. // +kubebuilder:default=false // +optional NeedSnapshot bool `json:"needSnapshot,omitempty"` // 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. // // +kubebuilder:validation:Maximum=100 // +kubebuilder:validation:Minimum=0 // +kubebuilder:default=0 // +optional HighWatermark int `json:"highWatermark,omitempty"` }
func (*ComponentVolume) DeepCopy ¶ added in v0.8.0
func (in *ComponentVolume) DeepCopy() *ComponentVolume
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentVolume.
func (*ComponentVolume) DeepCopyInto ¶ added in v0.8.0
func (in *ComponentVolume) DeepCopyInto(out *ComponentVolume)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConfigConstraint ¶
type ConfigConstraint struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ConfigConstraintSpec `json:"spec,omitempty"` Status ConfigConstraintStatus `json:"status,omitempty"` }
ConfigConstraint is the Schema for the configconstraint API
func (*ConfigConstraint) DeepCopy ¶ added in v0.6.0
func (in *ConfigConstraint) DeepCopy() *ConfigConstraint
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigConstraint.
func (*ConfigConstraint) DeepCopyInto ¶ added in v0.6.0
func (in *ConfigConstraint) DeepCopyInto(out *ConfigConstraint)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ConfigConstraint) DeepCopyObject ¶ added in v0.6.0
func (in *ConfigConstraint) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ConfigConstraintList ¶
type ConfigConstraintList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ConfigConstraint `json:"items"` }
ConfigConstraintList contains a list of ConfigConstraints.
func (*ConfigConstraintList) DeepCopy ¶ added in v0.6.0
func (in *ConfigConstraintList) DeepCopy() *ConfigConstraintList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigConstraintList.
func (*ConfigConstraintList) DeepCopyInto ¶ added in v0.6.0
func (in *ConfigConstraintList) DeepCopyInto(out *ConfigConstraintList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ConfigConstraintList) DeepCopyObject ¶ added in v0.6.0
func (in *ConfigConstraintList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ConfigConstraintPhase ¶
type ConfigConstraintPhase string
ConfigConstraintPhase defines the ConfigConstraint CR .status.phase +enum +kubebuilder:validation:Enum={Available,Unavailable, Deleting}
const ( CCAvailablePhase ConfigConstraintPhase = "Available" CCDeletingPhase ConfigConstraintPhase = "Deleting" )
type ConfigConstraintSpec ¶
type ConfigConstraintSpec struct { // 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. // // +optional ReloadOptions *ReloadOptions `json:"reloadOptions,omitempty"` // Indicates the dynamic reload action and restart action can be merged to a restart action. // // When a batch of parameters updates incur both restart & dynamic reload, it works as: // - set to true, the two actions merged to only one restart action // - set to false, the two actions cannot be merged, the actions executed in order [dynamic reload, restart] // // +optional DynamicActionCanBeMerged *bool `json:"dynamicActionCanBeMerged,omitempty"` // Specifies the policy for selecting the parameters of dynamic reload actions. // // +optional DynamicParameterSelectedPolicy *DynamicParameterSelectedPolicy `json:"dynamicParameterSelectedPolicy,omitempty"` // toolConfig used to config init container. // +optional ToolsImageSpec *ToolsImageSpec `json:"toolsImageSpec,omitempty"` // downwardAPIOptions is used to watch pod fields. // +optional DownwardAPIOptions []DownwardAPIOption `json:"downwardAPIOptions,omitempty"` // scriptConfigs, list of ScriptConfig, witch these scripts can be used by volume trigger,downward trigger, or tool image // +optional // +patchMergeKey=scriptConfigMapRef // +patchStrategy=merge,retainKeys // +listType=map // +listMapKey=scriptConfigMapRef ScriptConfigs []ScriptConfig `json:"scriptConfigs,omitempty"` // cfgSchemaTopLevelName is cue type name, which generates openapi schema. // +optional CfgSchemaTopLevelName string `json:"cfgSchemaTopLevelName,omitempty"` // configurationSchema imposes restrictions on database parameter's rule. // +optional ConfigurationSchema *CustomParametersValidation `json:"configurationSchema,omitempty"` // staticParameters, list of StaticParameter, modifications of them trigger a process restart. // +listType=set // +optional StaticParameters []string `json:"staticParameters,omitempty"` // dynamicParameters, list of DynamicParameter, modifications of them trigger a config dynamic reload without process restart. // +listType=set // +optional DynamicParameters []string `json:"dynamicParameters,omitempty"` // immutableParameters describes parameters that prohibit user from modification. // +listType=set // +optional ImmutableParameters []string `json:"immutableParameters,omitempty"` // selector is used to match the label on the pod, // for example, a pod of the primary is match on the patroni cluster. Selector *metav1.LabelSelector `json:"selector,omitempty"` // formatterConfig describes the format of the configuration file, the controller will: // // 1. parses configuration file // 2. analyzes the modified parameters // 3. applies corresponding policies. // // +kubebuilder:validation:Required FormatterConfig *FormatterConfig `json:"formatterConfig"` }
ConfigConstraintSpec defines the desired state of ConfigConstraint
func (*ConfigConstraintSpec) DeepCopy ¶ added in v0.6.0
func (in *ConfigConstraintSpec) DeepCopy() *ConfigConstraintSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigConstraintSpec.
func (*ConfigConstraintSpec) DeepCopyInto ¶ added in v0.6.0
func (in *ConfigConstraintSpec) DeepCopyInto(out *ConfigConstraintSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ConfigConstraintSpec) DynamicParametersPolicy ¶ added in v0.8.2
func (in *ConfigConstraintSpec) DynamicParametersPolicy() DynamicParameterSelectedPolicy
func (*ConfigConstraintSpec) NeedDynamicReloadAction ¶ added in v0.8.2
func (in *ConfigConstraintSpec) NeedDynamicReloadAction() bool
type ConfigConstraintStatus ¶
type ConfigConstraintStatus struct { // phase is status of configuration template, when set to CCAvailablePhase, it can be referenced by ClusterDefinition or ClusterVersion. // +optional Phase ConfigConstraintPhase `json:"phase,omitempty"` // message field describes the reasons of abnormal status. // +optional Message string `json:"message,omitempty"` // observedGeneration is the latest generation observed for this // ClusterDefinition. It refers to the ConfigConstraint's generation, which is // updated by the API Server. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` }
ConfigConstraintStatus defines the observed state of ConfigConstraint.
func (*ConfigConstraintStatus) DeepCopy ¶ added in v0.6.0
func (in *ConfigConstraintStatus) DeepCopy() *ConfigConstraintStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigConstraintStatus.
func (*ConfigConstraintStatus) DeepCopyInto ¶ added in v0.6.0
func (in *ConfigConstraintStatus) DeepCopyInto(out *ConfigConstraintStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ConfigConstraintStatus) IsConfigConstraintTerminalPhases ¶
func (cs ConfigConstraintStatus) IsConfigConstraintTerminalPhases() bool
type ConfigMapRef ¶ added in v0.8.0
type ConfigMapRef struct { ResourceMeta `json:",inline"` // configMap defines the configmap volume source. // +kubebuilder:validation:Required ConfigMap corev1.ConfigMapVolumeSource `json:"configMap"` }
func (*ConfigMapRef) DeepCopy ¶ added in v0.8.0
func (in *ConfigMapRef) DeepCopy() *ConfigMapRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapRef.
func (*ConfigMapRef) DeepCopyInto ¶ added in v0.8.0
func (in *ConfigMapRef) DeepCopyInto(out *ConfigMapRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConfigParams ¶ added in v0.7.0
type ConfigParams struct { // fileContent indicates the configuration file content. // +optional Content *string `json:"content"` // updated parameters for a single configuration file. // +optional Parameters map[string]*string `json:"parameters,omitempty"` }
func (*ConfigParams) DeepCopy ¶ added in v0.7.0
func (in *ConfigParams) DeepCopy() *ConfigParams
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigParams.
func (*ConfigParams) DeepCopyInto ¶ added in v0.7.0
func (in *ConfigParams) DeepCopyInto(out *ConfigParams)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConfigTemplateExtension ¶ added in v0.7.0
type ConfigTemplateExtension struct { // Specify the name of the referenced the configuration template ConfigMap object. // +kubebuilder:validation:Required // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$` TemplateRef string `json:"templateRef"` // Specify the namespace of the referenced the configuration template ConfigMap object. // An empty namespace is equivalent to the "default" namespace. // +kubebuilder:default="default" // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$` // +optional Namespace string `json:"namespace,omitempty"` // policy defines how to merge external imported templates into component templates. // +kubebuilder:default="none" // +optional Policy MergedPolicy `json:"policy,omitempty"` }
func (*ConfigTemplateExtension) DeepCopy ¶ added in v0.7.0
func (in *ConfigTemplateExtension) DeepCopy() *ConfigTemplateExtension
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigTemplateExtension.
func (*ConfigTemplateExtension) DeepCopyInto ¶ added in v0.7.0
func (in *ConfigTemplateExtension) DeepCopyInto(out *ConfigTemplateExtension)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Configuration ¶
type Configuration struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ConfigurationSpec `json:"spec,omitempty"` Status ConfigurationStatus `json:"status,omitempty"` }
Configuration is the Schema for the configurations API
func (*Configuration) DeepCopy ¶ added in v0.6.0
func (in *Configuration) DeepCopy() *Configuration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Configuration.
func (*Configuration) DeepCopyInto ¶ added in v0.6.0
func (in *Configuration) DeepCopyInto(out *Configuration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Configuration) DeepCopyObject ¶ added in v0.7.0
func (in *Configuration) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ConfigurationItem ¶ added in v0.7.0
type ConfigurationItem struct { // Specifies the name of the configuration template. // +kubebuilder:validation:Required // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$` Name string `json:"name"` // Defines the upgrade policy for the configuration. This field is optional. // +optional Policy *UpgradePolicy `json:"policy,omitempty"` // Sets the parameters to be updated. It should contain at least one item. The keys are merged and retained during patch operations. // +kubebuilder:validation:Required // +kubebuilder:validation:MinItems=1 // +patchMergeKey=key // +patchStrategy=merge,retainKeys // +listType=map // +listMapKey=key Keys []ParameterConfig `json:"keys" patchStrategy:"merge,retainKeys" patchMergeKey:"key"` }
func (*ConfigurationItem) DeepCopy ¶ added in v0.7.0
func (in *ConfigurationItem) DeepCopy() *ConfigurationItem
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigurationItem.
func (*ConfigurationItem) DeepCopyInto ¶ added in v0.7.0
func (in *ConfigurationItem) DeepCopyInto(out *ConfigurationItem)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConfigurationItemDetail ¶ added in v0.7.0
type ConfigurationItemDetail struct { // Specify the name of configuration template. // +kubebuilder:validation:Required // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$` Name string `json:"name"` // Deprecated: Please use payload instead. // version is the version of configuration template. // +optional Version string `json:"version,omitempty"` // Payload holds the configuration-related rerender. // +kubebuilder:pruning:PreserveUnknownFields // +optional Payload Payload `json:"payload,omitempty"` // configSpec is used to set the configuration template. // +optional ConfigSpec *ComponentConfigSpec `json:"configSpec"` // Specify the configuration template. // +optional ImportTemplateRef *ConfigTemplateExtension `json:"importTemplateRef"` // configFileParams is used to set the parameters to be updated. // +optional ConfigFileParams map[string]ConfigParams `json:"configFileParams,omitempty"` }
func (*ConfigurationItemDetail) DeepCopy ¶ added in v0.7.0
func (in *ConfigurationItemDetail) DeepCopy() *ConfigurationItemDetail
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigurationItemDetail.
func (*ConfigurationItemDetail) DeepCopyInto ¶ added in v0.7.0
func (in *ConfigurationItemDetail) DeepCopyInto(out *ConfigurationItemDetail)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConfigurationItemDetailStatus ¶ added in v0.7.0
type ConfigurationItemDetailStatus struct { // name is a config template name. // +kubebuilder:validation:Required // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$` Name string `json:"name"` // phase is status of configurationItem. // +optional Phase ConfigurationPhase `json:"phase,omitempty"` // lastDoneRevision is the last done revision of configurationItem. // +optional LastDoneRevision string `json:"lastDoneRevision,omitempty"` // updateRevision is the update revision of configurationItem. // +optional UpdateRevision string `json:"updateRevision,omitempty"` // message field describes the reasons of abnormal status. // +optional Message *string `json:"message,omitempty"` // reconcileDetail describes the details of the configuration change execution. // +optional ReconcileDetail *ReconcileDetail `json:"reconcileDetail,omitempty"` }
func (*ConfigurationItemDetailStatus) DeepCopy ¶ added in v0.7.0
func (in *ConfigurationItemDetailStatus) DeepCopy() *ConfigurationItemDetailStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigurationItemDetailStatus.
func (*ConfigurationItemDetailStatus) DeepCopyInto ¶ added in v0.7.0
func (in *ConfigurationItemDetailStatus) DeepCopyInto(out *ConfigurationItemDetailStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConfigurationItemStatus ¶ added in v0.7.0
type ConfigurationItemStatus struct { // Specifies the name of the configuration template. // +kubebuilder:validation:Required // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$` Name string `json:"name"` // Defines the policy for reconfiguration. // +optional UpdatePolicy UpgradePolicy `json:"updatePolicy,omitempty"` // Indicates the current state of the reconfiguration state machine. // +optional Status string `json:"status,omitempty"` // Provides details about the operation. // +optional Message string `json:"message,omitempty"` // Counts the number of successful reconfigurations. // +kubebuilder:default=0 // +optional SucceedCount int32 `json:"succeedCount"` // Specifies the number of expected reconfigurations. // +kubebuilder:default=-1 // +optional ExpectedCount int32 `json:"expectedCount"` // Records the last status of the reconfiguration controller. // +optional LastAppliedStatus string `json:"lastStatus,omitempty"` // Stores the last applied configuration. // +optional LastAppliedConfiguration map[string]string `json:"lastAppliedConfiguration,omitempty"` // Contains the updated parameters. // +optional UpdatedParameters UpdatedParameters `json:"updatedParameters"` }
func (*ConfigurationItemStatus) DeepCopy ¶ added in v0.7.0
func (in *ConfigurationItemStatus) DeepCopy() *ConfigurationItemStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigurationItemStatus.
func (*ConfigurationItemStatus) DeepCopyInto ¶ added in v0.7.0
func (in *ConfigurationItemStatus) DeepCopyInto(out *ConfigurationItemStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConfigurationList ¶ added in v0.7.0
type ConfigurationList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Configuration `json:"items"` }
ConfigurationList contains a list of Configuration
func (*ConfigurationList) DeepCopy ¶ added in v0.7.0
func (in *ConfigurationList) DeepCopy() *ConfigurationList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigurationList.
func (*ConfigurationList) DeepCopyInto ¶ added in v0.7.0
func (in *ConfigurationList) DeepCopyInto(out *ConfigurationList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ConfigurationList) DeepCopyObject ¶ added in v0.7.0
func (in *ConfigurationList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ConfigurationPhase ¶ added in v0.7.0
type ConfigurationPhase string
ConfigurationPhase defines the Configuration FSM phase +enum +kubebuilder:validation:Enum={Creating,Init,Running,Pending,Merged,MergeFailed,FailedAndPause,Upgrading,Deleting,FailedAndRetry,Finished}
const ( CCreatingPhase ConfigurationPhase = "Creating" CInitPhase ConfigurationPhase = "Init" CRunningPhase ConfigurationPhase = "Running" CPendingPhase ConfigurationPhase = "Pending" CFailedPhase ConfigurationPhase = "FailedAndRetry" CFailedAndPausePhase ConfigurationPhase = "FailedAndPause" CMergedPhase ConfigurationPhase = "Merged" CMergeFailedPhase ConfigurationPhase = "MergeFailed" CDeletingPhase ConfigurationPhase = "Deleting" CUpgradingPhase ConfigurationPhase = "Upgrading" CFinishedPhase ConfigurationPhase = "Finished" )
type ConfigurationSpec ¶ added in v0.7.0
type ConfigurationSpec struct { // clusterRef references Cluster name. // +kubebuilder:validation:Required // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.clusterRef" ClusterRef string `json:"clusterRef"` // componentName is cluster component name. // +kubebuilder:validation:Required // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.clusterRef" ComponentName string `json:"componentName"` // customConfigurationItems describes user-defined config template. // +optional // +patchMergeKey=name // +patchStrategy=merge,retainKeys // +listType=map // +listMapKey=name ConfigItemDetails []ConfigurationItemDetail `json:"configItemDetails,omitempty"` }
ConfigurationSpec defines the desired state of Configuration
func (*ConfigurationSpec) DeepCopy ¶ added in v0.7.0
func (in *ConfigurationSpec) DeepCopy() *ConfigurationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigurationSpec.
func (*ConfigurationSpec) DeepCopyInto ¶ added in v0.7.0
func (in *ConfigurationSpec) DeepCopyInto(out *ConfigurationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ConfigurationSpec) GetConfigSpec ¶ added in v0.8.2
func (configuration *ConfigurationSpec) GetConfigSpec(configSpecName string) *ComponentConfigSpec
func (*ConfigurationSpec) GetConfigurationItem ¶ added in v0.7.0
func (configuration *ConfigurationSpec) GetConfigurationItem(name string) *ConfigurationItemDetail
type ConfigurationStatus ¶
type ConfigurationStatus struct { // message field describes the reasons of abnormal status. // +optional Message string `json:"message,omitempty"` // observedGeneration is the latest generation observed for this // ClusterDefinition. It refers to the ConfigConstraint's generation, which is // updated by the API Server. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` // conditions describes opsRequest detail status. // +optional // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty"` // configurationStatus describes the status of the component reconfiguring. // +patchMergeKey=name // +patchStrategy=merge,retainKeys // +listType=map // +listMapKey=name ConfigurationItemStatus []ConfigurationItemDetailStatus `json:"configurationStatus"` }
ConfigurationStatus defines the observed state of Configuration
func (*ConfigurationStatus) DeepCopy ¶ added in v0.6.0
func (in *ConfigurationStatus) DeepCopy() *ConfigurationStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigurationStatus.
func (*ConfigurationStatus) DeepCopyInto ¶ added in v0.6.0
func (in *ConfigurationStatus) DeepCopyInto(out *ConfigurationStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ConfigurationStatus) GetItemStatus ¶ added in v0.7.0
func (status *ConfigurationStatus) GetItemStatus(name string) *ConfigurationItemDetailStatus
type ConnectionCredentialAuth ¶ added in v0.7.0
type ConnectionCredentialAuth struct { // service connection based-on username and password credential. // +optional Username *CredentialVar `json:"username,omitempty"` // service connection based-on username and password credential. // +optional Password *CredentialVar `json:"password,omitempty"` }
func (*ConnectionCredentialAuth) DeepCopy ¶ added in v0.7.0
func (in *ConnectionCredentialAuth) DeepCopy() *ConnectionCredentialAuth
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectionCredentialAuth.
func (*ConnectionCredentialAuth) DeepCopyInto ¶ added in v0.7.0
func (in *ConnectionCredentialAuth) DeepCopyInto(out *ConnectionCredentialAuth)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConnectionCredentialKey ¶
type ConnectionCredentialKey struct { // the key of password in the ConnectionCredential secret. // if not set, the default key is "password". // +optional PasswordKey *string `json:"passwordKey,omitempty"` // the key of username in the ConnectionCredential secret. // if not set, the default key is "username". // +optional UsernameKey *string `json:"usernameKey,omitempty"` // hostKey specifies the map key of the host in the connection credential secret. HostKey *string `json:"hostKey,omitempty"` // portKey specifies the map key of the port in the connection credential secret. PortKey *string `json:"portKey,omitempty"` }
func (*ConnectionCredentialKey) DeepCopy ¶ added in v0.6.0
func (in *ConnectionCredentialKey) DeepCopy() *ConnectionCredentialKey
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectionCredentialKey.
func (*ConnectionCredentialKey) DeepCopyInto ¶ added in v0.6.0
func (in *ConnectionCredentialKey) DeepCopyInto(out *ConnectionCredentialKey)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConsensusMember ¶
type ConsensusMember struct { // name, role name. // +kubebuilder:validation:Required // +kubebuilder:default=leader Name string `json:"name"` // accessMode, what service this member capable. // +kubebuilder:validation:Required // +kubebuilder:default=ReadWrite AccessMode AccessMode `json:"accessMode"` // replicas, number of Pods of this role. // // - default 1 for Leader // - default 0 for Learner // - default `Cluster.spec.componentSpec[*].Replicas - Leader.Replicas - Learner.Replicas` for Followers // // +kubebuilder:default=0 // +kubebuilder:validation:Minimum=0 // +optional Replicas *int32 `json:"replicas,omitempty"` }
func (*ConsensusMember) DeepCopy ¶ added in v0.6.0
func (in *ConsensusMember) DeepCopy() *ConsensusMember
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsensusMember.
func (*ConsensusMember) DeepCopyInto ¶ added in v0.6.0
func (in *ConsensusMember) DeepCopyInto(out *ConsensusMember)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConsensusMemberStatus ¶
type ConsensusMemberStatus struct { // Defines the role name. // +kubebuilder:validation:Required // +kubebuilder:default=leader Name string `json:"name"` // accessMode defines what service this pod provides. // +kubebuilder:validation:Required // +kubebuilder:default=ReadWrite AccessMode AccessMode `json:"accessMode"` // Pod name. // +kubebuilder:validation:Required // +kubebuilder:default=Unknown Pod string `json:"pod"` }
func (*ConsensusMemberStatus) DeepCopy ¶ added in v0.6.0
func (in *ConsensusMemberStatus) DeepCopy() *ConsensusMemberStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsensusMemberStatus.
func (*ConsensusMemberStatus) DeepCopyInto ¶ added in v0.6.0
func (in *ConsensusMemberStatus) DeepCopyInto(out *ConsensusMemberStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConsensusSetSpec ¶
type ConsensusSetSpec struct { StatefulSetSpec `json:",inline"` // leader, one single leader. // +kubebuilder:validation:Required Leader ConsensusMember `json:"leader"` // followers, has voting right but not Leader. // +optional Followers []ConsensusMember `json:"followers,omitempty"` // learner, no voting right. // +optional Learner *ConsensusMember `json:"learner,omitempty"` }
func NewConsensusSetSpec ¶ added in v0.6.0
func NewConsensusSetSpec() *ConsensusSetSpec
func (*ConsensusSetSpec) DeepCopy ¶ added in v0.6.0
func (in *ConsensusSetSpec) DeepCopy() *ConsensusSetSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsensusSetSpec.
func (*ConsensusSetSpec) DeepCopyInto ¶ added in v0.6.0
func (in *ConsensusSetSpec) DeepCopyInto(out *ConsensusSetSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ConsensusSetSpec) FinalStsUpdateStrategy ¶ added in v0.6.0
func (r *ConsensusSetSpec) FinalStsUpdateStrategy() (appsv1.PodManagementPolicyType, appsv1.StatefulSetUpdateStrategy)
func (*ConsensusSetSpec) GetUpdateStrategy ¶ added in v0.6.0
func (r *ConsensusSetSpec) GetUpdateStrategy() UpdateStrategy
type ConsensusSetStatus ¶
type ConsensusSetStatus struct { // Leader status. // +kubebuilder:validation:Required Leader ConsensusMemberStatus `json:"leader"` // Followers status. // +optional Followers []ConsensusMemberStatus `json:"followers,omitempty"` // Learner status. // +optional Learner *ConsensusMemberStatus `json:"learner,omitempty"` }
func (*ConsensusSetStatus) DeepCopy ¶ added in v0.6.0
func (in *ConsensusSetStatus) DeepCopy() *ConsensusSetStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsensusSetStatus.
func (*ConsensusSetStatus) DeepCopyInto ¶ added in v0.6.0
func (in *ConsensusSetStatus) DeepCopyInto(out *ConsensusSetStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CredentialVar ¶ added in v0.7.0
type CredentialVar struct { // 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 "". // +optional Value string `json:"value,omitempty" protobuf:"bytes,2,opt,name=value"` // Source for the environment variable's value. Cannot be used if value is not empty. // +optional ValueFrom *corev1.EnvVarSource `json:"valueFrom,omitempty" protobuf:"bytes,3,opt,name=valueFrom"` }
func (*CredentialVar) DeepCopy ¶ added in v0.7.0
func (in *CredentialVar) DeepCopy() *CredentialVar
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialVar.
func (*CredentialVar) DeepCopyInto ¶ added in v0.7.0
func (in *CredentialVar) DeepCopyInto(out *CredentialVar)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CredentialVarSelector ¶ added in v0.8.0
type CredentialVarSelector struct { // The Credential (SystemAccount) to select from. ClusterObjectReference `json:",inline"` CredentialVars `json:",inline"` }
CredentialVarSelector selects a var from a Credential (SystemAccount).
func (*CredentialVarSelector) DeepCopy ¶ added in v0.8.0
func (in *CredentialVarSelector) DeepCopy() *CredentialVarSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialVarSelector.
func (*CredentialVarSelector) DeepCopyInto ¶ added in v0.8.0
func (in *CredentialVarSelector) DeepCopyInto(out *CredentialVarSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CredentialVars ¶ added in v0.8.0
type CredentialVars struct { // +optional Username *VarOption `json:"username,omitempty"` // +optional Password *VarOption `json:"password,omitempty"` }
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.
func (*CredentialVars) DeepCopy ¶ added in v0.8.0
func (in *CredentialVars) DeepCopy() *CredentialVars
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialVars.
func (*CredentialVars) DeepCopyInto ¶ added in v0.8.0
func (in *CredentialVars) DeepCopyInto(out *CredentialVars)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CustomLabelSpec ¶
type CustomLabelSpec struct { // key name of label // +kubebuilder:validation:Required Key string `json:"key"` // value of label // +kubebuilder:validation:Required Value string `json:"value"` // resources defines the resources to be labeled. // +kubebuilder:validation:Required Resources []GVKResource `json:"resources,omitempty"` }
func (*CustomLabelSpec) DeepCopy ¶ added in v0.6.0
func (in *CustomLabelSpec) DeepCopy() *CustomLabelSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomLabelSpec.
func (*CustomLabelSpec) DeepCopyInto ¶ added in v0.6.0
func (in *CustomLabelSpec) DeepCopyInto(out *CustomLabelSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CustomOpsSpec ¶ added in v0.8.0
type CustomOpsSpec struct { // Refers to the name of the cluster component. // +kubebuilder:validation:Required ComponentName string `json:"componentName"` // Is a reference to an OpsDefinition. // +kubebuilder:validation:Required OpsDefinitionRef string `json:"opsDefinitionRef"` // 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". // +kubebuilder:validation:MaxItem=10 // +optional Params []map[string]string `json:"params,omitempty"` }
func (*CustomOpsSpec) DeepCopy ¶ added in v0.8.0
func (in *CustomOpsSpec) DeepCopy() *CustomOpsSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomOpsSpec.
func (*CustomOpsSpec) DeepCopyInto ¶ added in v0.8.0
func (in *CustomOpsSpec) DeepCopyInto(out *CustomOpsSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CustomParametersValidation ¶
type CustomParametersValidation struct { // schema provides a way for providers to validate the changed parameters through json. // +kubebuilder:validation:Schemaless // +kubebuilder:validation:ComponentDefRef=object // +kubebuilder:pruning:PreserveUnknownFields Schema *apiext.JSONSchemaProps `json:"schema,omitempty"` // cue that to let provider verify user configuration through cue language. // +optional CUE string `json:"cue,omitempty"` }
func (*CustomParametersValidation) DeepCopy ¶ added in v0.6.0
func (in *CustomParametersValidation) DeepCopy() *CustomParametersValidation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomParametersValidation.
func (*CustomParametersValidation) DeepCopyInto ¶ added in v0.6.0
func (in *CustomParametersValidation) DeepCopyInto(out *CustomParametersValidation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DownwardAPIOption ¶ added in v0.6.0
type DownwardAPIOption struct { // Specify the name of the field. // +kubebuilder:validation:Required // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$` Name string `json:"name"` // mountPoint is the mount point of the scripts file. // +kubebuilder:validation:Required // +kubebuilder:validation:MaxLength=128 MountPoint string `json:"mountPoint"` // Items is a list of downward API volume file // +kubebuilder:validation:Required Items []corev1.DownwardAPIVolumeFile `json:"items"` // command used to execute for downwrad api. // +optional Command []string `json:"command,omitempty"` }
func (*DownwardAPIOption) DeepCopy ¶ added in v0.6.0
func (in *DownwardAPIOption) DeepCopy() *DownwardAPIOption
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DownwardAPIOption.
func (*DownwardAPIOption) DeepCopyInto ¶ added in v0.6.0
func (in *DownwardAPIOption) DeepCopyInto(out *DownwardAPIOption)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DynamicParameterSelectedPolicy ¶ added in v0.8.2
type DynamicParameterSelectedPolicy string
DynamicParameterSelectedPolicy determines how to select the parameters of dynamic reload actions
+enum +kubebuilder:validation:Enum={all,dynamic}
const ( SelectedAllParameters DynamicParameterSelectedPolicy = "all" SelectedDynamicParameters DynamicParameterSelectedPolicy = "dynamic" )
type EnvMappingVar ¶ added in v0.7.0
type EnvMappingVar struct { // env key which needs to mapping. // +kubebuilder:validation:Required Key string `json:"key"` // valueFrom defines source of the env value. // +kubebuilder:validation:Required ValueFrom ValueFrom `json:"valueFrom"` }
func (*EnvMappingVar) DeepCopy ¶ added in v0.7.0
func (in *EnvMappingVar) DeepCopy() *EnvMappingVar
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvMappingVar.
func (*EnvMappingVar) DeepCopyInto ¶ added in v0.7.0
func (in *EnvMappingVar) DeepCopyInto(out *EnvMappingVar)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EnvVar ¶ added in v0.8.0
type EnvVar struct { // Name of the variable. Must be a C_IDENTIFIER. // +required Name string `json:"name"` // Variable references $(VAR_NAME) are expanded using the previously defined variables in the current context. // // If a variable cannot be resolved, the reference in the input string will be unchanged. // Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. // // - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". // // Escaped references will never be expanded, regardless of whether the variable exists or not. // Defaults to "". // // +optional Value string `json:"value,omitempty"` // Source for the variable's value. Cannot be used if value is not empty. // +optional ValueFrom *VarSource `json:"valueFrom,omitempty"` }
EnvVar represents a variable present in the env of Pod/Action or the template of config/script.
func (*EnvVar) DeepCopy ¶ added in v0.8.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvVar.
func (*EnvVar) DeepCopyInto ¶ added in v0.8.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EnvVarRef ¶ added in v0.8.0
type EnvVarRef struct { // 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. // // +optional ContainerName string `json:"containerName,omitempty"` // Defines the name of the environment variable. // // +kubebuilder:validation:Required EnvName string `json:"envName"` }
func (*EnvVarRef) DeepCopy ¶ added in v0.8.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvVarRef.
func (*EnvVarRef) DeepCopyInto ¶ added in v0.8.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExecAction ¶ added in v0.8.0
type ExecAction struct { // 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. // +optional Command []string `json:"command,omitempty" protobuf:"bytes,1,rep,name=command"` // args is used to perform statements. // +optional Args []string `json:"args,omitempty"` }
func (*ExecAction) DeepCopy ¶ added in v0.8.0
func (in *ExecAction) DeepCopy() *ExecAction
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecAction.
func (*ExecAction) DeepCopyInto ¶ added in v0.8.0
func (in *ExecAction) DeepCopyInto(out *ExecAction)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExporterConfig ¶
type ExporterConfig struct { // scrapePort is exporter port for Time Series Database to scrape metrics. // +kubebuilder:validation:Required // +kubebuilder:validation:XIntOrString ScrapePort intstr.IntOrString `json:"scrapePort"` // scrapePath is exporter url path for Time Series Database to scrape metrics. // +kubebuilder:validation:MaxLength=128 // +kubebuilder:default="/metrics" // +optional ScrapePath string `json:"scrapePath,omitempty"` }
func (*ExporterConfig) DeepCopy ¶ added in v0.6.0
func (in *ExporterConfig) DeepCopy() *ExporterConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExporterConfig.
func (*ExporterConfig) DeepCopyInto ¶ added in v0.6.0
func (in *ExporterConfig) DeepCopyInto(out *ExporterConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Expose ¶
type Expose struct { ComponentOps `json:",inline"` // Controls the expose operation. // If set to Enable, the corresponding service will be exposed. Conversely, if set to Disable, the service will be removed. // // +kubebuilder:validation:Required Switch ExposeSwitch `json:"switch"` // A list of services that are to be exposed or removed. // If componentNamem is not specified, each `OpsService` in the list must specify ports and selectors. // // +kubebuilder:validation:Required // +kubebuilder:validation:Minitems=0 Services []OpsService `json:"services"` }
func (*Expose) DeepCopy ¶ added in v0.6.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Expose.
func (*Expose) DeepCopyInto ¶ added in v0.6.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExposeSwitch ¶ added in v0.8.0
type ExposeSwitch string
ExposeSwitch Specifies the switch for the expose operation. This switch can be used to enable or disable the expose operation. +enum +kubebuilder:validation:Enum={Enable, Disable}
const ( EnableExposeSwitch ExposeSwitch = "Enable" DisableExposeSwitch ExposeSwitch = "Disable" )
type FailurePolicyType ¶ added in v0.6.0
type FailurePolicyType string
FailurePolicyType specifies the type of failure policy +enum +kubebuilder:validation:Enum={Ignore,Fail}
const ( // Ignore means that an error will be ignored but logged. FailurePolicyIgnore FailurePolicyType = "Ignore" // ReportError means that an error will be reported. FailurePolicyFail FailurePolicyType = "Fail" )
type FormatterConfig ¶
type FormatterConfig struct { // The FormatterOptions represents the special options of configuration file. // This is optional for now. If not specified. // +optional FormatterOptions `json:",inline"` // The configuration file format. Valid values are `ini`, `xml`, `yaml`, `json`, // `hcl`, `dotenv`, `properties` and `toml`. // // - ini: a configuration file that consists of a text-based content with a structure and syntax comprising key–value pairs for properties, reference wiki: https://en.wikipedia.org/wiki/INI_file // - xml: reference wiki: https://en.wikipedia.org/wiki/XML // - yaml: a configuration file support for complex data types and structures. // - json: reference wiki: https://en.wikipedia.org/wiki/JSON // - hcl: The HashiCorp Configuration Language (HCL) is a configuration language authored by HashiCorp, reference url: https://www.linode.com/docs/guides/introduction-to-hcl/ // - dotenv: this was a plain text file with simple key–value pairs, reference wiki: https://en.wikipedia.org/wiki/Configuration_file#MS-DOS // - properties: a file extension mainly used in Java, reference wiki: https://en.wikipedia.org/wiki/.properties // - toml: reference wiki: https://en.wikipedia.org/wiki/TOML // - props-plus: a file extension mainly used in Java, support CamelCase(e.g: brokerMaxConnectionsPerIp) // // +kubebuilder:validation:Required Format CfgFileFormat `json:"format"` }
func (*FormatterConfig) DeepCopy ¶ added in v0.6.0
func (in *FormatterConfig) DeepCopy() *FormatterConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FormatterConfig.
func (*FormatterConfig) DeepCopyInto ¶ added in v0.6.0
func (in *FormatterConfig) DeepCopyInto(out *FormatterConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FormatterOptions ¶
type FormatterOptions struct { // iniConfig represents the ini options. // +optional IniConfig *IniConfig `json:"iniConfig,omitempty"` }
FormatterOptions represents the special options of configuration file. Only one of its members may be specified.
func (*FormatterOptions) DeepCopy ¶ added in v0.6.0
func (in *FormatterOptions) DeepCopy() *FormatterOptions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FormatterOptions.
func (*FormatterOptions) DeepCopyInto ¶ added in v0.6.0
func (in *FormatterOptions) DeepCopyInto(out *FormatterOptions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GVKResource ¶
type GVKResource struct { // 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. // // +kubebuilder:validation:Required GVK string `json:"gvk"` // selector is a label query over a set of resources. // +optional Selector map[string]string `json:"selector,omitempty"` }
func (*GVKResource) DeepCopy ¶ added in v0.6.0
func (in *GVKResource) DeepCopy() *GVKResource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GVKResource.
func (*GVKResource) DeepCopyInto ¶ added in v0.6.0
func (in *GVKResource) DeepCopyInto(out *GVKResource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HScaleDataClonePolicyType ¶
type HScaleDataClonePolicyType string
HScaleDataClonePolicyType defines data clone policy when horizontal scaling. +enum +kubebuilder:validation:Enum={None,CloneVolume,Snapshot}
const ( HScaleDataClonePolicyNone HScaleDataClonePolicyType = "None" HScaleDataClonePolicyCloneVolume HScaleDataClonePolicyType = "CloneVolume" HScaleDataClonePolicyFromSnapshot HScaleDataClonePolicyType = "Snapshot" )
type HTTPAction ¶ added in v0.8.0
type HTTPAction struct { // Path to access on the HTTP server. // +optional Path string `json:"path,omitempty"` // 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. Port intstr.IntOrString `json:"port"` // Host name to connect to, defaults to the pod IP. You probably want to set // "Host" in httpHeaders instead. // +optional Host string `json:"host,omitempty"` // Scheme to use for connecting to the host. // Defaults to HTTP. // +optional Scheme corev1.URIScheme `json:"scheme,omitempty"` // Method represents the HTTP request method, which can be one of the standard HTTP methods like "GET," "POST," "PUT," etc. // Defaults to Get. // +optional Method string `json:"method,omitempty"` // Custom headers to set in the request. HTTP allows repeated headers. // +optional HTTPHeaders []corev1.HTTPHeader `json:"httpHeaders,omitempty"` }
HTTPAction describes an action based on HTTP requests.
func (*HTTPAction) DeepCopy ¶ added in v0.8.0
func (in *HTTPAction) DeepCopy() *HTTPAction
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPAction.
func (*HTTPAction) DeepCopyInto ¶ added in v0.8.0
func (in *HTTPAction) DeepCopyInto(out *HTTPAction)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HorizontalScalePolicy ¶
type HorizontalScalePolicy struct { // type controls what kind of data synchronization do when component scale out. // Policy is in enum of {None, CloneVolume}. The default policy is `None`. // // - None: Default policy, create empty volume and no data clone. // - CloneVolume: Do data clone to newly scaled pods. Prefer to use volume snapshot first, // and will try backup tool if volume snapshot is not enabled, finally report error if both above cannot work. // - Snapshot: Deprecated, alias for CloneVolume. // // +kubebuilder:default=None // +optional Type HScaleDataClonePolicyType `json:"type,omitempty"` // BackupPolicyTemplateName reference the backup policy template. // +optional BackupPolicyTemplateName string `json:"backupPolicyTemplateName,omitempty"` // 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 // +optional VolumeMountsName string `json:"volumeMountsName,omitempty"` }
func (*HorizontalScalePolicy) DeepCopy ¶ added in v0.6.0
func (in *HorizontalScalePolicy) DeepCopy() *HorizontalScalePolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HorizontalScalePolicy.
func (*HorizontalScalePolicy) DeepCopyInto ¶ added in v0.6.0
func (in *HorizontalScalePolicy) DeepCopyInto(out *HorizontalScalePolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HorizontalScaling ¶
type HorizontalScaling struct { ComponentOps `json:",inline"` // Specifies the number of replicas for the workloads. // +kubebuilder:validation:Required // +kubebuilder:validation:Minimum=0 Replicas int32 `json:"replicas"` // 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. // +optional Nodes []types.NodeName `json:"nodes,omitempty"` // 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. // // - `current replicas - expected replicas > len(Instances)`: Scale down from the list of Instances priorly, the others // will select from NodeAssignment. // - `current replicas - expected replicas < len(Instances)`: Scale down from the list of Instances. // - `current replicas - expected replicas < len(Instances)`: Scale down from a part of Instances. // // +optional Instances []string `json:"instances,omitempty"` }
HorizontalScaling defines the variables of horizontal scaling operation
func (*HorizontalScaling) DeepCopy ¶ added in v0.6.0
func (in *HorizontalScaling) DeepCopy() *HorizontalScaling
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HorizontalScaling.
func (*HorizontalScaling) DeepCopyInto ¶ added in v0.6.0
func (in *HorizontalScaling) DeepCopyInto(out *HorizontalScaling)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IniConfig ¶
type IniConfig struct { // sectionName describes ini section. // +optional SectionName string `json:"sectionName,omitempty"` }
func (*IniConfig) DeepCopy ¶ added in v0.6.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IniConfig.
func (*IniConfig) DeepCopyInto ¶ added in v0.6.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Instance ¶ added in v0.8.3
type Instance struct { // Pod name of the instance. // +kubebuilder:validation:Required Name string `json:"name"` // 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. // +optional TargetNodeName string `json:"targetNodeName,omitempty"` }
func (*Instance) DeepCopy ¶ added in v0.8.3
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Instance.
func (*Instance) DeepCopyInto ¶ added in v0.8.3
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Issuer ¶
type Issuer struct { // Name of issuer. // Options supported: // // - KubeBlocks - Certificates signed by KubeBlocks Operator. // - UserProvided - User provided own CA-signed certificates. // // +kubebuilder:validation:Enum={KubeBlocks, UserProvided} // +kubebuilder:default=KubeBlocks // +kubebuilder:validation:Required Name IssuerName `json:"name"` // secretRef. TLS certs Secret reference // required when from is UserProvided // +optional SecretRef *TLSSecretRef `json:"secretRef,omitempty"` }
Issuer defines Tls certs issuer
func (*Issuer) DeepCopy ¶ added in v0.6.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Issuer.
func (*Issuer) DeepCopyInto ¶ added in v0.6.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IssuerName ¶
type IssuerName string
IssuerName defines Tls certs issuer name +enum
const ( // IssuerKubeBlocks Certificates signed by KubeBlocks Operator. IssuerKubeBlocks IssuerName = "KubeBlocks" // IssuerUserProvided User provided own CA-signed certificates. IssuerUserProvided IssuerName = "UserProvided" )
type LastComponentConfiguration ¶
type LastComponentConfiguration struct { // Represents the last replicas of the component. // +optional Replicas *int32 `json:"replicas,omitempty"` // Represents the last resources of the component. // +kubebuilder:pruning:PreserveUnknownFields // +optional corev1.ResourceRequirements `json:",inline,omitempty"` // References a class defined in ComponentClassDefinition. // +kubebuilder:deprecatedversion:warning="Due to the lack of practical use cases, this field is deprecated from KB 0.9.0." // +optional ClassDefRef *ClassDefRef `json:"classDefRef,omitempty"` // Records the last volumeClaimTemplates of the component. // +optional VolumeClaimTemplates []OpsRequestVolumeClaimTemplate `json:"volumeClaimTemplates,omitempty"` // Records the last services of the component. // +optional Services []ClusterComponentService `json:"services,omitempty"` // Records the information about the target resources affected by the component. // The resource key is in the list of [pods]. // +optional TargetResources map[ComponentResourceKey][]string `json:"targetResources,omitempty"` }
func (*LastComponentConfiguration) DeepCopy ¶ added in v0.6.0
func (in *LastComponentConfiguration) DeepCopy() *LastComponentConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LastComponentConfiguration.
func (*LastComponentConfiguration) DeepCopyInto ¶ added in v0.6.0
func (in *LastComponentConfiguration) DeepCopyInto(out *LastComponentConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LastConfiguration ¶
type LastConfiguration struct { // Specifies the reference to the ClusterVersion name. // +optional ClusterVersionRef string `json:"clusterVersionRef,omitempty"` // Records the last configuration of the component. // +optional Components map[string]LastComponentConfiguration `json:"components,omitempty"` }
func (*LastConfiguration) DeepCopy ¶ added in v0.6.0
func (in *LastConfiguration) DeepCopy() *LastConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LastConfiguration.
func (*LastConfiguration) DeepCopyInto ¶ added in v0.6.0
func (in *LastConfiguration) DeepCopyInto(out *LastConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LegacyRenderedTemplateSpec ¶ added in v0.7.0
type LegacyRenderedTemplateSpec struct {
ConfigTemplateExtension `json:",inline"`
}
func (*LegacyRenderedTemplateSpec) DeepCopy ¶ added in v0.7.0
func (in *LegacyRenderedTemplateSpec) DeepCopy() *LegacyRenderedTemplateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LegacyRenderedTemplateSpec.
func (*LegacyRenderedTemplateSpec) DeepCopyInto ¶ added in v0.7.0
func (in *LegacyRenderedTemplateSpec) DeepCopyInto(out *LegacyRenderedTemplateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LetterCase ¶
type LetterCase string
LetterCase defines cases to use in password generation. +enum
const ( LowerCases LetterCase = "LowerCases" UpperCases LetterCase = "UpperCases" MixedCases LetterCase = "MixedCases" )
type LifecycleActionHandler ¶ added in v0.8.0
type LifecycleActionHandler struct { // 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. // +optional BuiltinHandler *BuiltinActionHandlerType `json:"builtinHandler,omitempty"` // customHandler defines the custom way to do action. // +optional CustomHandler *Action `json:"customHandler,omitempty"` }
func (*LifecycleActionHandler) DeepCopy ¶ added in v0.8.0
func (in *LifecycleActionHandler) DeepCopy() *LifecycleActionHandler
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LifecycleActionHandler.
func (*LifecycleActionHandler) DeepCopyInto ¶ added in v0.8.0
func (in *LifecycleActionHandler) DeepCopyInto(out *LifecycleActionHandler)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LogConfig ¶
type LogConfig struct { // name log type name, such as slow for MySQL slow log file. // +kubebuilder:validation:Required // +kubebuilder:validation:MaxLength=128 Name string `json:"name"` // 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. // +kubebuilder:validation:Required // +kubebuilder:validation:MaxLength=4096 FilePathPattern string `json:"filePathPattern"` }
func (*LogConfig) DeepCopy ¶ added in v0.6.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogConfig.
func (*LogConfig) DeepCopyInto ¶ added in v0.6.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MemoryConstraint ¶
type MemoryConstraint struct { // The size of memory per vcpu core. // For example: 1Gi, 200Mi. // If SizePerCPU is specified, MinPerCPU and MaxPerCPU are ignore. // +optional SizePerCPU *resource.Quantity `json:"sizePerCPU,omitempty"` // 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 // +optional MaxPerCPU *resource.Quantity `json:"maxPerCPU,omitempty"` // 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 // +optional MinPerCPU *resource.Quantity `json:"minPerCPU,omitempty"` }
func (*MemoryConstraint) DeepCopy ¶ added in v0.6.0
func (in *MemoryConstraint) DeepCopy() *MemoryConstraint
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MemoryConstraint.
func (*MemoryConstraint) DeepCopyInto ¶ added in v0.6.0
func (in *MemoryConstraint) DeepCopyInto(out *MemoryConstraint)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MergedPolicy ¶ added in v0.6.0
type MergedPolicy string
MergedPolicy defines how to merge external imported templates into component templates. +enum +kubebuilder:validation:Enum={patch,replace,none}
const ( PatchPolicy MergedPolicy = "patch" ReplacePolicy MergedPolicy = "replace" OnlyAddPolicy MergedPolicy = "add" NoneMergePolicy MergedPolicy = "none" )
type MonitorConfig ¶
type MonitorConfig struct { // 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. // +kubebuilder:default=false // +optional BuiltIn bool `json:"builtIn,omitempty"` // exporterConfig provided by provider, which specify necessary information to Time Series Database. // exporterConfig is valid when builtIn is false. // +optional Exporter *ExporterConfig `json:"exporterConfig,omitempty"` }
func (*MonitorConfig) DeepCopy ¶ added in v0.6.0
func (in *MonitorConfig) DeepCopy() *MonitorConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MonitorConfig.
func (*MonitorConfig) DeepCopyInto ¶ added in v0.6.0
func (in *MonitorConfig) DeepCopyInto(out *MonitorConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MultipleClusterObjectCombinedOption ¶ added in v0.8.3
type MultipleClusterObjectCombinedOption struct { // 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. // // +optional NewVarSuffix *string `json:"newVarSuffix,omitempty"` // The format of the value that the operator will use to compose values from multiple components. // // +kubebuilder:default="Flatten" // +optional ValueFormat MultipleClusterObjectValueFormat `json:"valueFormat,omitempty"` // The flatten format, default is: $(comp-name-1):value,$(comp-name-2):value. // // +optional FlattenFormat *MultipleClusterObjectValueFormatFlatten `json:"flattenFormat,omitempty"` }
MultipleClusterObjectCombinedOption defines options for handling combined variables.
func (*MultipleClusterObjectCombinedOption) DeepCopy ¶ added in v0.8.3
func (in *MultipleClusterObjectCombinedOption) DeepCopy() *MultipleClusterObjectCombinedOption
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultipleClusterObjectCombinedOption.
func (*MultipleClusterObjectCombinedOption) DeepCopyInto ¶ added in v0.8.3
func (in *MultipleClusterObjectCombinedOption) DeepCopyInto(out *MultipleClusterObjectCombinedOption)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MultipleClusterObjectOption ¶ added in v0.8.3
type MultipleClusterObjectOption struct { // Define the strategy for handling multiple cluster objects. // +required Strategy MultipleClusterObjectStrategy `json:"strategy"` // Define the options for handling combined variables. // Valid only when the strategy is set to "combined". // // +optional CombinedOption *MultipleClusterObjectCombinedOption `json:"combinedOption,omitempty"` }
MultipleClusterObjectOption defines the options for handling multiple cluster objects matched.
func (*MultipleClusterObjectOption) DeepCopy ¶ added in v0.8.3
func (in *MultipleClusterObjectOption) DeepCopy() *MultipleClusterObjectOption
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultipleClusterObjectOption.
func (*MultipleClusterObjectOption) DeepCopyInto ¶ added in v0.8.3
func (in *MultipleClusterObjectOption) DeepCopyInto(out *MultipleClusterObjectOption)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MultipleClusterObjectStrategy ¶ added in v0.8.3
type MultipleClusterObjectStrategy string
MultipleClusterObjectStrategy defines the strategy for handling multiple cluster objects. +enum +kubebuilder:validation:Enum={individual,combined}
const ( // 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. MultipleClusterObjectStrategyIndividual MultipleClusterObjectStrategy = "individual" // MultipleClusterObjectStrategyCombined - the values from all matched components will be combined into a single // variable using the specified option. MultipleClusterObjectStrategyCombined MultipleClusterObjectStrategy = "combined" )
type MultipleClusterObjectValueFormat ¶ added in v0.8.3
type MultipleClusterObjectValueFormat string
MultipleClusterObjectValueFormat defines the format details for the value.
const (
FlattenFormat MultipleClusterObjectValueFormat = "Flatten"
)
type MultipleClusterObjectValueFormatFlatten ¶ added in v0.8.3
type MultipleClusterObjectValueFormatFlatten struct { // Pair delimiter. // // +kubebuilder:default="," // +required Delimiter string `json:"delimiter"` // Key-value delimiter. // // +kubebuilder:default=":" // +required KeyValueDelimiter string `json:"keyValueDelimiter"` }
MultipleClusterObjectValueFormatFlatten defines the flatten format for the value.
func (*MultipleClusterObjectValueFormatFlatten) DeepCopy ¶ added in v0.8.3
func (in *MultipleClusterObjectValueFormatFlatten) DeepCopy() *MultipleClusterObjectValueFormatFlatten
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultipleClusterObjectValueFormatFlatten.
func (*MultipleClusterObjectValueFormatFlatten) DeepCopyInto ¶ added in v0.8.3
func (in *MultipleClusterObjectValueFormatFlatten) DeepCopyInto(out *MultipleClusterObjectValueFormatFlatten)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NamedVar ¶ added in v0.8.0
type NamedVar struct { // +optional Name string `json:"name,omitempty"` // +optional Option *VarOption `json:"option,omitempty"` }
func (*NamedVar) DeepCopy ¶ added in v0.8.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedVar.
func (*NamedVar) DeepCopyInto ¶ added in v0.8.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OpsDefinition ¶ added in v0.8.0
type OpsDefinition struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec OpsDefinitionSpec `json:"spec,omitempty"` Status OpsDefinitionStatus `json:"status,omitempty"` }
OpsDefinition is the Schema for the opsdefinitions API
func (*OpsDefinition) DeepCopy ¶ added in v0.8.0
func (in *OpsDefinition) DeepCopy() *OpsDefinition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpsDefinition.
func (*OpsDefinition) DeepCopyInto ¶ added in v0.8.0
func (in *OpsDefinition) DeepCopyInto(out *OpsDefinition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*OpsDefinition) DeepCopyObject ¶ added in v0.8.0
func (in *OpsDefinition) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*OpsDefinition) GetComponentDefRef ¶ added in v0.8.0
func (o *OpsDefinition) GetComponentDefRef(compDefName string) *ComponentDefinitionRef
type OpsDefinitionList ¶ added in v0.8.0
type OpsDefinitionList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []OpsDefinition `json:"items"` }
OpsDefinitionList contains a list of OpsDefinition
func (*OpsDefinitionList) DeepCopy ¶ added in v0.8.0
func (in *OpsDefinitionList) DeepCopy() *OpsDefinitionList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpsDefinitionList.
func (*OpsDefinitionList) DeepCopyInto ¶ added in v0.8.0
func (in *OpsDefinitionList) DeepCopyInto(out *OpsDefinitionList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*OpsDefinitionList) DeepCopyObject ¶ added in v0.8.0
func (in *OpsDefinitionList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type OpsDefinitionSpec ¶ added in v0.8.0
type OpsDefinitionSpec struct { // 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. // // +kubebuilder:validation:MinItems=1 // +patchMergeKey=name // +patchStrategy=merge,retainKeys // +listType=map // +listMapKey=name ComponentDefinitionRefs []ComponentDefinitionRef `json:"componentDefinitionRefs,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name"` // Defines the environment variables that need to be referenced from the target component pod, and will be injected into the job's containers. // // +optional VarsRef *VarsRef `json:"varsRef,omitempty"` // Describes the schema used for validation, pruning, and defaulting. // // +optional ParametersSchema *ParametersSchema `json:"parametersSchema,omitempty"` // Describes the job specification for the operation. // // +kubebuilder:validation:Required JobSpec batchv1.JobSpec `json:"jobSpec"` // Specifies the preconditions that must be met to run the job for the operation. // // +optional PreConditions []PreCondition `json:"preConditions,omitempty"` }
OpsDefinitionSpec defines the desired state of OpsDefinition
func (*OpsDefinitionSpec) DeepCopy ¶ added in v0.8.0
func (in *OpsDefinitionSpec) DeepCopy() *OpsDefinitionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpsDefinitionSpec.
func (*OpsDefinitionSpec) DeepCopyInto ¶ added in v0.8.0
func (in *OpsDefinitionSpec) DeepCopyInto(out *OpsDefinitionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OpsDefinitionStatus ¶ added in v0.8.0
type OpsDefinitionStatus struct { // Refers to the most recent generation observed for this OpsDefinition. // // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` // Represents the current state of the OpsDefinition. Valid values are “, `Available`, `Unavailable`. // When the state is `Available`, the OpsDefinition is ready and can be used for related objects. // // +optional Phase Phase `json:"phase,omitempty"` // Provides additional information about the current phase. // // +optional Message string `json:"message,omitempty"` }
OpsDefinitionStatus defines the observed state of OpsDefinition
func (*OpsDefinitionStatus) DeepCopy ¶ added in v0.8.0
func (in *OpsDefinitionStatus) DeepCopy() *OpsDefinitionStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpsDefinitionStatus.
func (*OpsDefinitionStatus) DeepCopyInto ¶ added in v0.8.0
func (in *OpsDefinitionStatus) DeepCopyInto(out *OpsDefinitionStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OpsEnvVar ¶ added in v0.8.0
type OpsEnvVar struct { // Specifies the name of the variable. This must be a C_IDENTIFIER. // // +kubebuilder:validation:Required Name string `json:"name"` // Defines the source for the variable's value. // // +kubebuilder:validation:Required ValueFrom *OpsVarSource `json:"valueFrom"` }
func (*OpsEnvVar) DeepCopy ¶ added in v0.8.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpsEnvVar.
func (*OpsEnvVar) DeepCopyInto ¶ added in v0.8.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OpsPhase ¶
type OpsPhase string
OpsPhase defines opsRequest phase. +enum +kubebuilder:validation:Enum={Pending,Creating,Running,Cancelling,Cancelled,Failed,Succeed}
type OpsRecorder ¶
type OpsRecorder struct { // name OpsRequest name Name string `json:"name"` // opsRequest type Type OpsType `json:"type"` // indicates whether the current opsRequest is in the queue InQueue bool `json:"inQueue,omitempty"` }
func (*OpsRecorder) DeepCopy ¶ added in v0.6.0
func (in *OpsRecorder) DeepCopy() *OpsRecorder
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpsRecorder.
func (*OpsRecorder) DeepCopyInto ¶ added in v0.6.0
func (in *OpsRecorder) DeepCopyInto(out *OpsRecorder)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OpsRequest ¶
type OpsRequest struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec OpsRequestSpec `json:"spec,omitempty"` Status OpsRequestStatus `json:"status,omitempty"` }
OpsRequest is the Schema for the opsrequests API
func GetRunningOpsByOpsType ¶ added in v0.6.0
func GetRunningOpsByOpsType(ctx context.Context, cli client.Client, clusterName, namespace, opsType string) ([]OpsRequest, error)
GetRunningOpsByOpsType gets the running opsRequests by type.
func (*OpsRequest) DeepCopy ¶ added in v0.6.0
func (in *OpsRequest) DeepCopy() *OpsRequest
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpsRequest.
func (*OpsRequest) DeepCopyInto ¶ added in v0.6.0
func (in *OpsRequest) DeepCopyInto(out *OpsRequest)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*OpsRequest) DeepCopyObject ¶ added in v0.6.0
func (in *OpsRequest) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*OpsRequest) GetComponentNameSet ¶
func (r *OpsRequest) GetComponentNameSet() ComponentNameSet
GetComponentNameSet if the operations are within the scope of component, this function should be implemented
func (*OpsRequest) GetUpgradeComponentNameSet ¶
func (r *OpsRequest) GetUpgradeComponentNameSet() ComponentNameSet
GetUpgradeComponentNameSet gets the component name map with upgrade operation.
func (*OpsRequest) IsComplete ¶ added in v0.6.0
func (r *OpsRequest) IsComplete(phases ...OpsPhase) bool
IsComplete checks if opsRequest has been completed.
func (*OpsRequest) SetStatusCondition ¶
func (r *OpsRequest) SetStatusCondition(condition metav1.Condition)
func (*OpsRequest) SetupWebhookWithManager ¶
func (r *OpsRequest) SetupWebhookWithManager(mgr ctrl.Manager) error
func (*OpsRequest) Validate ¶
func (r *OpsRequest) Validate(ctx context.Context, k8sClient client.Client, cluster *Cluster, needCheckClusterPhase bool) error
Validate validates OpsRequest
func (*OpsRequest) ValidateCreate ¶
func (r *OpsRequest) ValidateCreate() (admission.Warnings, error)
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*OpsRequest) ValidateDelete ¶
func (r *OpsRequest) ValidateDelete() (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (*OpsRequest) ValidateUpdate ¶
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
type OpsRequestBehaviour ¶
type OpsRequestBehaviour struct { FromClusterPhases []ClusterPhase ToClusterPhase ClusterPhase }
func (*OpsRequestBehaviour) DeepCopy ¶ added in v0.6.0
func (in *OpsRequestBehaviour) DeepCopy() *OpsRequestBehaviour
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpsRequestBehaviour.
func (*OpsRequestBehaviour) DeepCopyInto ¶ added in v0.6.0
func (in *OpsRequestBehaviour) DeepCopyInto(out *OpsRequestBehaviour)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OpsRequestComponentStatus ¶
type OpsRequestComponentStatus struct { // Describes the component phase, referencing Cluster.status.component.phase. // +optional Phase ClusterComponentPhase `json:"phase,omitempty"` // Indicates the last time the component phase transitioned to Failed or Abnormal. // +optional LastFailedTime metav1.Time `json:"lastFailedTime,omitempty"` // Describes the progress details of the component for this operation. // +optional ProgressDetails []ProgressStatusDetail `json:"progressDetails,omitempty"` // References the workload type of component in ClusterDefinition. // +optional WorkloadType WorkloadType `json:"workloadType,omitempty"` // Describes the reason for the component phase. // +kubebuilder:validation:MaxLength=1024 // +optional Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"` // Provides a human-readable message indicating details about this operation. // +kubebuilder:validation:MaxLength=32768 // +optional Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"` }
func (*OpsRequestComponentStatus) DeepCopy ¶ added in v0.6.0
func (in *OpsRequestComponentStatus) DeepCopy() *OpsRequestComponentStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpsRequestComponentStatus.
func (*OpsRequestComponentStatus) DeepCopyInto ¶ added in v0.6.0
func (in *OpsRequestComponentStatus) DeepCopyInto(out *OpsRequestComponentStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OpsRequestList ¶
type OpsRequestList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []OpsRequest `json:"items"` }
OpsRequestList contains a list of OpsRequest
func (*OpsRequestList) DeepCopy ¶ added in v0.6.0
func (in *OpsRequestList) DeepCopy() *OpsRequestList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpsRequestList.
func (*OpsRequestList) DeepCopyInto ¶ added in v0.6.0
func (in *OpsRequestList) DeepCopyInto(out *OpsRequestList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*OpsRequestList) DeepCopyObject ¶ added in v0.6.0
func (in *OpsRequestList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type OpsRequestSpec ¶
type OpsRequestSpec struct { // References the cluster object. // +kubebuilder:validation:Required // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.clusterRef" ClusterRef string `json:"clusterRef"` // Defines the action to cancel the `Pending/Creating/Running` opsRequest, supported types: `VerticalScaling/HorizontalScaling`. // Once set to true, this opsRequest will be canceled and modifying this property again will not take effect. // +optional Cancel bool `json:"cancel,omitempty"` // Defines the operation type. // +kubebuilder:validation:Required // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.type" Type OpsType `json:"type"` // OpsRequest will be deleted after TTLSecondsAfterSucceed second when OpsRequest.status.phase is Succeed. // +optional TTLSecondsAfterSucceed int32 `json:"ttlSecondsAfterSucceed,omitempty"` // Specifies the cluster version by specifying clusterVersionRef. // +optional // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.upgrade" Upgrade *Upgrade `json:"upgrade,omitempty"` // Defines what component need to horizontal scale the specified replicas. // +optional // +patchMergeKey=componentName // +patchStrategy=merge,retainKeys // +listType=map // +listMapKey=componentName // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.horizontalScaling" HorizontalScalingList []HorizontalScaling `json:"horizontalScaling,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"componentName"` // Note: Quantity struct can not do immutable check by CEL. // Defines what component and volumeClaimTemplate need to expand the specified storage. // +optional // +patchMergeKey=componentName // +patchStrategy=merge,retainKeys // +listType=map // +listMapKey=componentName VolumeExpansionList []VolumeExpansion `json:"volumeExpansion,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"componentName"` // Restarts the specified components. // +optional // +patchMergeKey=componentName // +patchStrategy=merge,retainKeys // +listType=map // +listMapKey=componentName // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.restart" RestartList []ComponentOps `json:"restart,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"componentName"` // Switches over the specified components. // +optional // +patchMergeKey=componentName // +patchStrategy=merge,retainKeys // +listType=map // +listMapKey=componentName // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.switchover" SwitchoverList []Switchover `json:"switchover,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"componentName"` // Note: Quantity struct can not do immutable check by CEL. // Defines what component need to vertical scale the specified compute resources. // +optional // +patchMergeKey=componentName // +patchStrategy=merge,retainKeys // +listType=map // +listMapKey=componentName VerticalScalingList []VerticalScaling `json:"verticalScaling,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"componentName"` // Deprecated: replace by reconfigures. // Defines the variables that need to input when updating configuration. // +optional // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.reconfigure" // +kubebuilder:validation:XValidation:rule="self.configurations.size() > 0", message="Value can not be empty" Reconfigure *Reconfigure `json:"reconfigure,omitempty"` // Defines the variables that need to input when updating configuration. // +optional // +patchMergeKey=componentName // +patchStrategy=merge,retainKeys // +listType=map // +listMapKey=componentName Reconfigures []Reconfigure `json:"reconfigures,omitempty"` // Defines services the component needs to expose. // +optional // +patchMergeKey=componentName // +patchStrategy=merge,retainKeys // +listType=map // +listMapKey=componentName // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.expose" ExposeList []Expose `json:"expose,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"componentName"` // Cluster RestoreFrom backup or point in time. // +optional // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.restoreFrom" RestoreFrom *RestoreFromSpec `json:"restoreFrom,omitempty"` // 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. // +kubebuilder:default=0 // +optional TTLSecondsBeforeAbort *int32 `json:"ttlSecondsBeforeAbort,omitempty"` // Defines the script to be executed. // +optional ScriptSpec *ScriptSpec `json:"scriptSpec,omitempty"` // Specifies the instances that require re-creation. // +patchMergeKey=componentName // +patchStrategy=merge,retainKeys // +listType=map // +listMapKey=componentName // +optional // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.rebuildFrom" RebuildFrom []RebuildInstance `json:"rebuildFrom,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"componentName"` // Defines how to backup the cluster. // +optional BackupSpec *BackupSpec `json:"backupSpec,omitempty"` // Defines how to restore the cluster. // Note that this restore operation will roll back cluster services. // +optional RestoreSpec *RestoreSpec `json:"restoreSpec,omitempty"` // Specifies a custom operation as defined by OpsDefinition. // +optional CustomSpec *CustomOpsSpec `json:"customSpec,omitempty"` }
OpsRequestSpec defines the desired state of OpsRequest +kubebuilder:validation:XValidation:rule="has(self.cancel) && self.cancel ? (self.type in ['VerticalScaling', 'HorizontalScaling']) : true",message="forbidden to cancel the opsRequest which type not in ['VerticalScaling','HorizontalScaling']"
func (*OpsRequestSpec) DeepCopy ¶ added in v0.6.0
func (in *OpsRequestSpec) DeepCopy() *OpsRequestSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpsRequestSpec.
func (*OpsRequestSpec) DeepCopyInto ¶ added in v0.6.0
func (in *OpsRequestSpec) DeepCopyInto(out *OpsRequestSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (OpsRequestSpec) GetDataScriptComponentNameSet ¶ added in v0.6.0
func (r OpsRequestSpec) GetDataScriptComponentNameSet() ComponentNameSet
GetDataScriptComponentNameSet gets the component name map with switchover operation.
func (OpsRequestSpec) GetExposeComponentNameSet ¶
func (r OpsRequestSpec) GetExposeComponentNameSet() ComponentNameSet
func (OpsRequestSpec) GetHorizontalScalingComponentNameSet ¶
func (r OpsRequestSpec) GetHorizontalScalingComponentNameSet() ComponentNameSet
GetHorizontalScalingComponentNameSet gets the component name map with horizontal scaling operation.
func (OpsRequestSpec) GetReconfiguringComponentNameSet ¶
func (r OpsRequestSpec) GetReconfiguringComponentNameSet() ComponentNameSet
GetReconfiguringComponentNameSet gets the component name map with reconfiguring operation.
func (OpsRequestSpec) GetRestartComponentNameSet ¶
func (r OpsRequestSpec) GetRestartComponentNameSet() ComponentNameSet
GetRestartComponentNameSet gets the component name map with restart operation.
func (OpsRequestSpec) GetSwitchoverComponentNameSet ¶ added in v0.6.0
func (r OpsRequestSpec) GetSwitchoverComponentNameSet() ComponentNameSet
GetSwitchoverComponentNameSet gets the component name map with switchover operation.
func (OpsRequestSpec) GetVerticalScalingComponentNameSet ¶
func (r OpsRequestSpec) GetVerticalScalingComponentNameSet() ComponentNameSet
GetVerticalScalingComponentNameSet gets the component name map with vertical scaling operation.
func (OpsRequestSpec) GetVolumeExpansionComponentNameSet ¶
func (r OpsRequestSpec) GetVolumeExpansionComponentNameSet() ComponentNameSet
GetVolumeExpansionComponentNameSet gets the component name map with volume expansion operation.
func (OpsRequestSpec) ToExposeListToMap ¶
func (r OpsRequestSpec) ToExposeListToMap() map[string]Expose
ToExposeListToMap build expose map
func (OpsRequestSpec) ToHorizontalScalingListToMap ¶
func (r OpsRequestSpec) ToHorizontalScalingListToMap() map[string]HorizontalScaling
ToHorizontalScalingListToMap converts OpsRequest.spec.horizontalScaling list to map
func (OpsRequestSpec) ToVerticalScalingListToMap ¶
func (r OpsRequestSpec) ToVerticalScalingListToMap() map[string]VerticalScaling
ToVerticalScalingListToMap converts OpsRequest.spec.verticalScaling list to map
func (OpsRequestSpec) ToVolumeExpansionListToMap ¶
func (r OpsRequestSpec) ToVolumeExpansionListToMap() map[string]VolumeExpansion
ToVolumeExpansionListToMap converts volumeExpansionList to map
type OpsRequestStatus ¶
type OpsRequestStatus struct { // Specifies the cluster generation after the OpsRequest action has been handled. // +optional ClusterGeneration int64 `json:"clusterGeneration,omitempty"` // Defines the phase of the OpsRequest. Phase OpsPhase `json:"phase,omitempty"` // Represents the progress of the OpsRequest. // +kubebuilder:validation:Pattern:=`^(\d+|\-)/(\d+|\-)$` // +kubebuilder:default=-/- Progress string `json:"progress"` // Records the last configuration before this operation took effect. // +optional LastConfiguration LastConfiguration `json:"lastConfiguration,omitempty"` // Records the status information of components changed due to the operation request. // +optional Components map[string]OpsRequestComponentStatus `json:"components,omitempty"` // Indicates the time when the OpsRequest started processing. // +optional StartTimestamp metav1.Time `json:"startTimestamp,omitempty"` // Specifies the time when the OpsRequest was completed. // +optional CompletionTimestamp metav1.Time `json:"completionTimestamp,omitempty"` // Defines the time when the OpsRequest was cancelled. // +optional CancelTimestamp metav1.Time `json:"cancelTimestamp,omitempty"` // Deprecated: Replaced by ReconfiguringStatusAsComponent. // Defines the status information of reconfiguring. // +optional ReconfiguringStatus *ReconfiguringStatus `json:"reconfiguringStatus,omitempty"` // Represents the status information of reconfiguring. // +optional ReconfiguringStatusAsComponent map[string]*ReconfiguringStatus `json:"reconfiguringStatusAsComponent,omitempty"` // Describes the detailed status of the OpsRequest. // +optional // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty"` }
OpsRequestStatus represents the observed state of an OpsRequest.
func (*OpsRequestStatus) DeepCopy ¶ added in v0.6.0
func (in *OpsRequestStatus) DeepCopy() *OpsRequestStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpsRequestStatus.
func (*OpsRequestStatus) DeepCopyInto ¶ added in v0.6.0
func (in *OpsRequestStatus) DeepCopyInto(out *OpsRequestStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OpsRequestVolumeClaimTemplate ¶
type OpsRequestVolumeClaimTemplate struct { // Specifies the requested storage size for the volume. // +kubebuilder:validation:Required Storage resource.Quantity `json:"storage"` // A reference to the volumeClaimTemplate name from the cluster components. // +kubebuilder:validation:Required Name string `json:"name"` }
func (*OpsRequestVolumeClaimTemplate) DeepCopy ¶ added in v0.6.0
func (in *OpsRequestVolumeClaimTemplate) DeepCopy() *OpsRequestVolumeClaimTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpsRequestVolumeClaimTemplate.
func (*OpsRequestVolumeClaimTemplate) DeepCopyInto ¶ added in v0.6.0
func (in *OpsRequestVolumeClaimTemplate) DeepCopyInto(out *OpsRequestVolumeClaimTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OpsService ¶ added in v0.8.0
type OpsService struct { // 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. // +required Name string `json:"name"` // Contains cloud provider related parameters if ServiceType is LoadBalancer. // More info: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer. // +optional Annotations map[string]string `json:"annotations,omitempty"` // 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 // +patchMergeKey=port // +patchStrategy=merge // +listType=map // +listMapKey=port // +listMapKey=protocol // +optional Ports []corev1.ServicePort `json:"ports,omitempty" patchStrategy:"merge" patchMergeKey:"port" protobuf:"bytes,1,rep,name=ports"` // Allows you to specify a defined role as a selector for the service, extending the ServiceSpec.Selector. // +optional RoleSelector string `json:"roleSelector,omitempty"` // 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/ // +optional // +mapType=atomic Selector map[string]string `json:"selector,omitempty" protobuf:"bytes,2,rep,name=selector"` // Determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. // - `ClusterIP` allocates a cluster-internal IP address for load-balancing to endpoints. // - `NodePort` builds on ClusterIP and allocates a port on every node which routes to the same endpoints as the clusterIP. // - `LoadBalancer` builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the same endpoints as the clusterIP. // More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types. // +optional ServiceType corev1.ServiceType `json:"serviceType,omitempty"` // 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. // +listType=atomic // +optional IPFamilies []corev1.IPFamily `json:"ipFamilies,omitempty" protobuf:"bytes,19,opt,name=ipFamilies,casttype=IPFamily"` // 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. // +optional IPFamilyPolicy *corev1.IPFamilyPolicy `json:"ipFamilyPolicy,omitempty" protobuf:"bytes,17,opt,name=ipFamilyPolicy,casttype=IPFamilyPolicy"` }
func (*OpsService) DeepCopy ¶ added in v0.8.0
func (in *OpsService) DeepCopy() *OpsService
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpsService.
func (*OpsService) DeepCopyInto ¶ added in v0.8.0
func (in *OpsService) DeepCopyInto(out *OpsService)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OpsType ¶
type OpsType string
OpsType defines operation types. +enum +kubebuilder:validation:Enum={Upgrade,VerticalScaling,VolumeExpansion,HorizontalScaling,Restart,Reconfiguring,Start,Stop,Expose,Switchover,DataScript,Backup,Restore,RebuildInstance,Custom}
const ( VerticalScalingType OpsType = "VerticalScaling" HorizontalScalingType OpsType = "HorizontalScaling" VolumeExpansionType OpsType = "VolumeExpansion" UpgradeType OpsType = "Upgrade" ReconfiguringType OpsType = "Reconfiguring" SwitchoverType OpsType = "Switchover" RestartType OpsType = "Restart" // RestartType the restart operation is a special case of the rolling update operation. StopType OpsType = "Stop" // StopType the stop operation will delete all pods in a cluster concurrently. StartType OpsType = "Start" // StartType the start operation will start the pods which is deleted in stop operation. ExposeType OpsType = "Expose" DataScriptType OpsType = "DataScript" // DataScriptType the data script operation will execute the data script against the cluster. BackupType OpsType = "Backup" RestoreType OpsType = "Restore" RebuildInstanceType OpsType = "RebuildInstance" // RebuildInstance rebuilding an instance is very useful when a node is offline or an instance is unrecoverable. CustomType OpsType = "Custom" // use opsDefinition )
type OpsVarSource ¶ added in v0.8.0
type OpsVarSource struct { // 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". // EnvVarRef *EnvVarRef `json:"envVarRef,omitempty"` }
func (*OpsVarSource) DeepCopy ¶ added in v0.8.0
func (in *OpsVarSource) DeepCopy() *OpsVarSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpsVarSource.
func (*OpsVarSource) DeepCopyInto ¶ added in v0.8.0
func (in *OpsVarSource) DeepCopyInto(out *OpsVarSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ParameterConfig ¶
type ParameterConfig struct { // Represents the unique identifier for the ConfigMap. // +kubebuilder:validation:Required Key string `json:"key"` // Defines a list of key-value pairs for a single configuration file. // These parameters are used to update the specified configuration settings. // +optional Parameters []ParameterPair `json:"parameters,omitempty"` // Represents the content of the configuration file. // This field is used to update the entire content of the file. // +optional FileContent string `json:"fileContent,omitempty"` }
func (*ParameterConfig) DeepCopy ¶ added in v0.6.0
func (in *ParameterConfig) DeepCopy() *ParameterConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParameterConfig.
func (*ParameterConfig) DeepCopyInto ¶ added in v0.6.0
func (in *ParameterConfig) DeepCopyInto(out *ParameterConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ParameterPair ¶
type ParameterPair struct { // Represents the name of the parameter that is to be updated. // +kubebuilder:validation:Required Key string `json:"key"` // 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. // +optional Value *string `json:"value"` }
func (*ParameterPair) DeepCopy ¶ added in v0.6.0
func (in *ParameterPair) DeepCopy() *ParameterPair
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParameterPair.
func (*ParameterPair) DeepCopyInto ¶ added in v0.6.0
func (in *ParameterPair) DeepCopyInto(out *ParameterPair)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ParametersSchema ¶ added in v0.8.0
type ParametersSchema struct { // Defines the OpenAPI v3 schema used for the parameter schema. // The supported property types include: // - string // - number // - integer // - array: Note that only items of string type are supported. // // +kubebuilder:validation:Schemaless // +kubebuilder:validation:Type=object // +kubebuilder:pruning:PreserveUnknownFields // +k8s:conversion-gen=false // +optional OpenAPIV3Schema *apiextensionsv1.JSONSchemaProps `json:"openAPIV3Schema,omitempty"` }
func (*ParametersSchema) DeepCopy ¶ added in v0.8.0
func (in *ParametersSchema) DeepCopy() *ParametersSchema
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParametersSchema.
func (*ParametersSchema) DeepCopyInto ¶ added in v0.8.0
func (in *ParametersSchema) DeepCopyInto(out *ParametersSchema)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PasswordConfig ¶
type PasswordConfig struct { // length defines the length of password. // +kubebuilder:validation:Maximum=32 // +kubebuilder:validation:Minimum=8 // +kubebuilder:default=16 // +optional Length int32 `json:"length,omitempty"` // numDigits defines number of digits. // +kubebuilder:validation:Maximum=8 // +kubebuilder:validation:Minimum=0 // +kubebuilder:default=4 // +optional NumDigits int32 `json:"numDigits,omitempty"` // numSymbols defines number of symbols. // +kubebuilder:validation:Maximum=8 // +kubebuilder:validation:Minimum=0 // +kubebuilder:default=0 // +optional NumSymbols int32 `json:"numSymbols,omitempty"` // letterCase defines to use lower-cases, upper-cases or mixed-cases of letters. // +kubebuilder:default=MixedCases // +optional LetterCase LetterCase `json:"letterCase,omitempty"` // seed specifies the seed used to generate the account's password. // Cannot be updated. // +optional Seed string `json:"seed,omitempty"` }
PasswordConfig helps provide to customize complexity of password generation pattern.
func (*PasswordConfig) DeepCopy ¶ added in v0.6.0
func (in *PasswordConfig) DeepCopy() *PasswordConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PasswordConfig.
func (*PasswordConfig) DeepCopyInto ¶ added in v0.6.0
func (in *PasswordConfig) DeepCopyInto(out *PasswordConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Payload ¶ added in v0.8.0
type Payload struct { // +kubebuilder:pruning:PreserveUnknownFields // +optional Data map[string]any `json:"-"` }
func (*Payload) DeepCopy ¶ added in v0.8.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Payload.
func (*Payload) DeepCopyInto ¶ added in v0.8.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. This exists here to work around https://github.com/kubernetes/code-generator/issues/50
func (*Payload) MarshalJSON ¶ added in v0.8.0
MarshalJSON implements the Marshaler interface.
func (*Payload) UnmarshalJSON ¶ added in v0.8.0
UnmarshalJSON implements the Unmarshaler interface.
type PersistentVolumeClaimSpec ¶
type PersistentVolumeClaimSpec struct { // accessModes contains the desired access modes the volume should have. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1. // +kubebuilder:pruning:PreserveUnknownFields // +optional AccessModes []corev1.PersistentVolumeAccessMode `json:"accessModes,omitempty" protobuf:"bytes,1,rep,name=accessModes,casttype=PersistentVolumeAccessMode"` // 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. // +kubebuilder:pruning:PreserveUnknownFields // +optional Resources corev1.ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,2,opt,name=resources"` // storageClassName is the name of the StorageClass required by the claim. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1. // +optional StorageClassName *string `json:"storageClassName,omitempty" protobuf:"bytes,5,opt,name=storageClassName"` // volumeMode defines what type of volume is required by the claim. // +optional VolumeMode *corev1.PersistentVolumeMode `json:"volumeMode,omitempty" protobuf:"bytes,6,opt,name=volumeMode,casttype=PersistentVolumeMode"` }
func (*PersistentVolumeClaimSpec) DeepCopy ¶ added in v0.6.0
func (in *PersistentVolumeClaimSpec) DeepCopy() *PersistentVolumeClaimSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistentVolumeClaimSpec.
func (*PersistentVolumeClaimSpec) DeepCopyInto ¶ added in v0.6.0
func (in *PersistentVolumeClaimSpec) DeepCopyInto(out *PersistentVolumeClaimSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PersistentVolumeClaimSpec) ToV1PersistentVolumeClaimSpec ¶
func (r *PersistentVolumeClaimSpec) ToV1PersistentVolumeClaimSpec() corev1.PersistentVolumeClaimSpec
ToV1PersistentVolumeClaimSpec converts to corev1.PersistentVolumeClaimSpec.
type Phase ¶
type Phase string
Phase defines the ClusterDefinition and ClusterVersion CR .status.phase +enum +kubebuilder:validation:Enum={Available,Unavailable}
const ( AvailablePhase Phase = "Available" )
type PodAntiAffinity ¶
type PodAntiAffinity string
PodAntiAffinity defines pod anti-affinity strategy. +enum +kubebuilder:validation:Enum={Preferred,Required}
const ( Preferred PodAntiAffinity = "Preferred" Required PodAntiAffinity = "Required" )
type PodSelectionStrategy ¶ added in v0.8.0
type PodSelectionStrategy string
PodSelectionStrategy pod selection strategy. +enum +kubebuilder:validation:Enum={Available,PreferredAvailable}
const ( Available PodSelectionStrategy = "Available" PreferredAvailable PodSelectionStrategy = "PreferredAvailable" )
type PointInTimeRefSpec ¶
type PointInTimeRefSpec struct { // Refers to the specific time point for restoration, with UTC as the time zone. // +optional Time *metav1.Time `json:"time,omitempty"` // Refers to a reference source cluster that needs to be restored. // +optional Ref RefNamespaceName `json:"ref,omitempty"` }
func (*PointInTimeRefSpec) DeepCopy ¶ added in v0.6.0
func (in *PointInTimeRefSpec) DeepCopy() *PointInTimeRefSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PointInTimeRefSpec.
func (*PointInTimeRefSpec) DeepCopyInto ¶ added in v0.6.0
func (in *PointInTimeRefSpec) DeepCopyInto(out *PointInTimeRefSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PostStartAction ¶ added in v0.7.1
type PostStartAction struct { // cmdExecutorConfig is the executor configuration of the post-start command. // +kubebuilder:validation:Required CmdExecutorConfig CmdExecutorConfig `json:"cmdExecutorConfig"` // 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. // +optional ScriptSpecSelectors []ScriptSpecSelector `json:"scriptSpecSelectors,omitempty"` }
func (*PostStartAction) DeepCopy ¶ added in v0.7.1
func (in *PostStartAction) DeepCopy() *PostStartAction
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostStartAction.
func (*PostStartAction) DeepCopyInto ¶ added in v0.7.1
func (in *PostStartAction) DeepCopyInto(out *PostStartAction)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PreCondition ¶ added in v0.8.0
type PreCondition struct { // Defines the conditions under which the operation can be executed. Rule *Rule `json:"rule,omitempty"` // Represents a job that will be run to execute the PreCondition. // The operation will only be executed if the job is successful. // // +optional Exec *PreConditionExec `json:"exec,omitempty"` }
func (*PreCondition) DeepCopy ¶ added in v0.8.0
func (in *PreCondition) DeepCopy() *PreCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PreCondition.
func (*PreCondition) DeepCopyInto ¶ added in v0.8.0
func (in *PreCondition) DeepCopyInto(out *PreCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PreConditionExec ¶ added in v0.8.0
type PreConditionExec struct { // Specifies the name of the Docker image to be used for the execution. // // +kubebuilder:validation:Required Image string `json:"image"` // Defines the environment variables to be set in the container. // // +optional Env []corev1.EnvVar `json:"env,omitempty"` // Specifies the commands to be executed in the container. // // +optional Command []string `json:"command,omitempty"` // Represents the arguments to be passed to the command in the container. // // +optional Args []string `json:"args,omitempty"` }
func (*PreConditionExec) DeepCopy ¶ added in v0.8.0
func (in *PreConditionExec) DeepCopy() *PreConditionExec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PreConditionExec.
func (*PreConditionExec) DeepCopyInto ¶ added in v0.8.0
func (in *PreConditionExec) DeepCopyInto(out *PreConditionExec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PreConditionType ¶ added in v0.8.0
type PreConditionType string
PreConditionType defines the preCondition type of the action execution.
const ( ImmediatelyPreConditionType PreConditionType = "Immediately" RuntimeReadyPreConditionType PreConditionType = "RuntimeReady" ComponentReadyPreConditionType PreConditionType = "ComponentReady" ClusterReadyPreConditionType PreConditionType = "ClusterReady" )
type ProgressStatus ¶
type ProgressStatus string
ProgressStatus defines the status of the opsRequest progress. +enum +kubebuilder:validation:Enum={Processing,Pending,Failed,Succeed}
const ( PendingProgressStatus ProgressStatus = "Pending" ProcessingProgressStatus ProgressStatus = "Processing" FailedProgressStatus ProgressStatus = "Failed" SucceedProgressStatus ProgressStatus = "Succeed" )
type ProgressStatusDetail ¶
type ProgressStatusDetail struct { // Specifies the group to which the current object belongs. // If the objects of a component belong to the same group, they can be ignored. // +optional Group string `json:"group,omitempty"` // Represents the unique key of the object. // +kubebuilder:validation:Required ObjectKey string `json:"objectKey"` // Indicates the state of processing the object. // +kubebuilder:validation:Required Status ProgressStatus `json:"status"` // Provides a human-readable message detailing the condition of the object. // +optional Message string `json:"message,omitempty"` // Represents the start time of object processing. // +optional StartTime metav1.Time `json:"startTime,omitempty"` // Represents the completion time of object processing. // +optional EndTime metav1.Time `json:"endTime,omitempty"` }
func (*ProgressStatusDetail) DeepCopy ¶ added in v0.6.0
func (in *ProgressStatusDetail) DeepCopy() *ProgressStatusDetail
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProgressStatusDetail.
func (*ProgressStatusDetail) DeepCopyInto ¶ added in v0.6.0
func (in *ProgressStatusDetail) DeepCopyInto(out *ProgressStatusDetail)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ProgressStatusDetail) SetStatusAndMessage ¶
func (p *ProgressStatusDetail) SetStatusAndMessage(status ProgressStatus, message string)
type ProtectedVolume ¶ added in v0.6.0
type ProtectedVolume struct { // Name of volume to protect. // +optional Name string `json:"name,omitempty"` // 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. // +kubebuilder:validation:Maximum=100 // +kubebuilder:validation:Minimum=0 // +optional HighWatermark *int `json:"highWatermark,omitempty"` }
func (*ProtectedVolume) DeepCopy ¶ added in v0.6.0
func (in *ProtectedVolume) DeepCopy() *ProtectedVolume
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProtectedVolume.
func (*ProtectedVolume) DeepCopyInto ¶ added in v0.6.0
func (in *ProtectedVolume) DeepCopyInto(out *ProtectedVolume)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ProvisionPolicy ¶
type ProvisionPolicy struct { // type defines the way to provision an account, either `CreateByStmt` or `ReferToExisting`. // +kubebuilder:validation:Required Type ProvisionPolicyType `json:"type"` // scope is the scope to provision account, and the scope could be `AnyPods` or `AllPods`. // +kubebuilder:default=AnyPods Scope ProvisionScope `json:"scope"` // statements will be used when Type is CreateByStmt. // +optional Statements *ProvisionStatements `json:"statements,omitempty"` // secretRef will be used when Type is ReferToExisting. // +optional SecretRef *ProvisionSecretRef `json:"secretRef,omitempty"` }
ProvisionPolicy defines the policy details for creating accounts.
func (*ProvisionPolicy) DeepCopy ¶ added in v0.6.0
func (in *ProvisionPolicy) DeepCopy() *ProvisionPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProvisionPolicy.
func (*ProvisionPolicy) DeepCopyInto ¶ added in v0.6.0
func (in *ProvisionPolicy) DeepCopyInto(out *ProvisionPolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ProvisionPolicyType ¶
type ProvisionPolicyType string
ProvisionPolicyType defines the policy for creating accounts. +enum
const ( // CreateByStmt will create account w.r.t. deletion and creation statement given by provider. CreateByStmt ProvisionPolicyType = "CreateByStmt" // ReferToExisting will not create account, but create a secret by copying data from referred secret file. ReferToExisting ProvisionPolicyType = "ReferToExisting" )
type ProvisionScope ¶
type ProvisionScope string
ProvisionScope defines the scope (within component) of provision. +enum
const ( // AllPods will create accounts for all pods belong to the component. AllPods ProvisionScope = "AllPods" // AnyPods will only create accounts on one pod. AnyPods ProvisionScope = "AnyPods" )
type ProvisionSecretRef ¶
type ProvisionSecretRef struct { // name refers to the name of the secret. // +kubebuilder:validation:Required Name string `json:"name"` // namespace refers to the namespace of the secret. // +kubebuilder:validation:Required Namespace string `json:"namespace"` }
ProvisionSecretRef defines the information of secret referred to.
func (*ProvisionSecretRef) DeepCopy ¶ added in v0.6.0
func (in *ProvisionSecretRef) DeepCopy() *ProvisionSecretRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProvisionSecretRef.
func (*ProvisionSecretRef) DeepCopyInto ¶ added in v0.6.0
func (in *ProvisionSecretRef) DeepCopyInto(out *ProvisionSecretRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ProvisionStatements ¶
type ProvisionStatements struct { // creation specifies statement how to create this account with required privileges. // +kubebuilder:validation:Required CreationStatement string `json:"creation"` // update specifies statement how to update account's password. // +optional UpdateStatement string `json:"update,omitempty"` // deletion specifies statement how to delete this account. // Used in combination with `CreateionStatement` to delete the account before create it. // For instance, one usually uses `drop user if exists` statement followed by `create user` statement to create an account. // Deprecated: this field is deprecated, use `update` instead. // +optional DeletionStatement string `json:"deletion,omitempty"` }
ProvisionStatements defines the statements used to create accounts.
func (*ProvisionStatements) DeepCopy ¶ added in v0.6.0
func (in *ProvisionStatements) DeepCopy() *ProvisionStatements
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProvisionStatements.
func (*ProvisionStatements) DeepCopyInto ¶ added in v0.6.0
func (in *ProvisionStatements) DeepCopyInto(out *ProvisionStatements)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RSMSpec ¶ added in v0.7.0
type RSMSpec struct { // Roles, a list of roles defined in the system. // +optional Roles []workloads.ReplicaRole `json:"roles,omitempty"` // RoleProbe provides method to probe role. // +optional RoleProbe *workloads.RoleProbe `json:"roleProbe,omitempty"` // MembershipReconfiguration provides actions to do membership dynamic reconfiguration. // +optional MembershipReconfiguration *workloads.MembershipReconfiguration `json:"membershipReconfiguration,omitempty"` // MemberUpdateStrategy, Members(Pods) update strategy. // // - serial: update Members one by one that guarantee minimum component unavailable time. // `Learner -> Follower(with AccessMode=none) -> Follower(with AccessMode=readonly) -> Follower(with AccessMode=readWrite) -> Leader` // - bestEffortParallel: update Members in parallel that guarantee minimum component un-writable time. // `Learner, Follower(minority) in parallel -> Follower(majority) -> Leader`, keep majority online all the time. // - parallel: force parallel // // +kubebuilder:validation:Enum={Serial,BestEffortParallel,Parallel} // +optional MemberUpdateStrategy *workloads.MemberUpdateStrategy `json:"memberUpdateStrategy,omitempty"` }
func (*RSMSpec) DeepCopy ¶ added in v0.7.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RSMSpec.
func (*RSMSpec) DeepCopyInto ¶ added in v0.7.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RebuildInstance ¶ added in v0.8.3
type RebuildInstance struct { ComponentOps `json:",inline"` // Defines the instances that need to be rebuilt. // +kubebuilder:validation:Required Instances []Instance `json:"instances"` // 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'. // +optional BackupName string `json:"backupName,omitempty"` // 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: `Restore env > Backup env > ActionSet env`. // // +kubebuilder:pruning:PreserveUnknownFields // +optional EnvForRestore []corev1.EnvVar `json:"envForRestore,omitempty" patchStrategy:"merge" patchMergeKey:"name"` }
func (*RebuildInstance) DeepCopy ¶ added in v0.8.3
func (in *RebuildInstance) DeepCopy() *RebuildInstance
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RebuildInstance.
func (*RebuildInstance) DeepCopyInto ¶ added in v0.8.3
func (in *RebuildInstance) DeepCopyInto(out *RebuildInstance)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReconcileDetail ¶ added in v0.7.0
type ReconcileDetail struct { // policy is the policy of the latest execution. // +optional Policy string `json:"policy"` // execResult is the result of the latest execution. // +optional ExecResult string `json:"execResult"` // currentRevision is the current revision of configurationItem. // +optional CurrentRevision string `json:"currentRevision,omitempty"` // succeedCount is the number of pods for which configuration changes were successfully executed. // +kubebuilder:default=-1 // +optional SucceedCount int32 `json:"succeedCount,omitempty"` // expectedCount is the number of pods that need to be executed for configuration changes. // +kubebuilder:default=-1 // +optional ExpectedCount int32 `json:"expectedCount,omitempty"` // errMessage is the error message when the configuration change execution fails. // +optional ErrMessage string `json:"errMessage,omitempty"` }
func (*ReconcileDetail) DeepCopy ¶ added in v0.7.0
func (in *ReconcileDetail) DeepCopy() *ReconcileDetail
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReconcileDetail.
func (*ReconcileDetail) DeepCopyInto ¶ added in v0.7.0
func (in *ReconcileDetail) DeepCopyInto(out *ReconcileDetail)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Reconfigure ¶
type Reconfigure struct { ComponentOps `json:",inline"` // Specifies the components that will perform the operation. // +kubebuilder:validation:Required // +kubebuilder:validation:MinItems=1 // +patchMergeKey=name // +patchStrategy=merge,retainKeys // +listType=map // +listMapKey=name Configurations []ConfigurationItem `json:"configurations" patchStrategy:"merge,retainKeys" patchMergeKey:"name"` }
Reconfigure represents the variables required for updating a configuration.
func (*Reconfigure) DeepCopy ¶ added in v0.6.0
func (in *Reconfigure) DeepCopy() *Reconfigure
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Reconfigure.
func (*Reconfigure) DeepCopyInto ¶ added in v0.6.0
func (in *Reconfigure) DeepCopyInto(out *Reconfigure)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReconfiguringStatus ¶
type ReconfiguringStatus struct { // Describes the reconfiguring detail status. // +optional // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty"` // Describes the status of the component reconfiguring. // +kubebuilder:validation:Required // +patchMergeKey=name // +patchStrategy=merge,retainKeys // +listType=map // +listMapKey=name ConfigurationStatus []ConfigurationItemStatus `json:"configurationStatus"` }
func (*ReconfiguringStatus) DeepCopy ¶ added in v0.6.0
func (in *ReconfiguringStatus) DeepCopy() *ReconfiguringStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReconfiguringStatus.
func (*ReconfiguringStatus) DeepCopyInto ¶ added in v0.6.0
func (in *ReconfiguringStatus) DeepCopyInto(out *ReconfiguringStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RefNamespaceName ¶
type RefNamespaceName struct { // Refers to the specific name of the resource. // +optional Name string `json:"name,omitempty"` // Refers to the specific namespace of the resource. // +optional Namespace string `json:"namespace,omitempty"` }
func (*RefNamespaceName) DeepCopy ¶ added in v0.6.0
func (in *RefNamespaceName) DeepCopy() *RefNamespaceName
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RefNamespaceName.
func (*RefNamespaceName) DeepCopyInto ¶ added in v0.6.0
func (in *RefNamespaceName) DeepCopyInto(out *RefNamespaceName)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReloadOptions ¶
type ReloadOptions struct { // unixSignalTrigger used to reload by sending a signal. // +optional UnixSignalTrigger *UnixSignalTrigger `json:"unixSignalTrigger,omitempty"` // shellTrigger performs the reload command. // +optional ShellTrigger *ShellTrigger `json:"shellTrigger,omitempty"` // goTplTrigger performs the reload command. // +optional TPLScriptTrigger *TPLScriptTrigger `json:"tplScriptTrigger"` // autoTrigger performs the reload command. // +optional AutoTrigger *AutoTrigger `json:"autoTrigger,omitempty"` }
ReloadOptions defines reload options Only one of its members may be specified.
func (*ReloadOptions) DeepCopy ¶ added in v0.6.0
func (in *ReloadOptions) DeepCopy() *ReloadOptions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReloadOptions.
func (*ReloadOptions) DeepCopyInto ¶ added in v0.6.0
func (in *ReloadOptions) DeepCopyInto(out *ReloadOptions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReplicaRole ¶ added in v0.8.0
type ReplicaRole struct { // Name of the role. It will apply to "apps.kubeblocks.io/role" object label value. // Cannot be updated. // +kubebuilder:validation:Required // +kubebuilder:validation:MaxLength=32 // +kubebuilder:validation:Pattern=`^.*[^\s]+.*$` Name string `json:"name"` // Serviceable indicates whether a replica with this role can provide services. // Cannot be updated. // +kubebuilder:default=false // +optional Serviceable bool `json:"serviceable,omitempty"` // Writable indicates whether a replica with this role is allowed to write data. // Cannot be updated. // +kubebuilder:default=false // +optional Writable bool `json:"writable,omitempty"` // Votable indicates whether a replica with this role is allowed to vote. // Cannot be updated. // +kubebuilder:default=false // +optional Votable bool `json:"votable,omitempty"` }
ReplicaRole represents a role that can be assumed by a component instance.
func (*ReplicaRole) DeepCopy ¶ added in v0.8.0
func (in *ReplicaRole) DeepCopy() *ReplicaRole
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaRole.
func (*ReplicaRole) DeepCopyInto ¶ added in v0.8.0
func (in *ReplicaRole) DeepCopyInto(out *ReplicaRole)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReplicasLimit ¶ added in v0.8.0
type ReplicasLimit struct { // The minimum limit of replicas. // +required MinReplicas int32 `json:"minReplicas"` // The maximum limit of replicas. // +required MaxReplicas int32 `json:"maxReplicas"` }
ReplicasLimit defines the limit of valid replicas supported. +kubebuilder:validation:XValidation:rule="self.minReplicas >= 0 && self.maxReplicas <= 128",message="the minimum and maximum limit of replicas should be in the range of [0, 128]" +kubebuilder:validation:XValidation:rule="self.minReplicas <= self.maxReplicas",message="the minimum replicas limit should be no greater than the maximum"
func (*ReplicasLimit) DeepCopy ¶ added in v0.8.0
func (in *ReplicasLimit) DeepCopy() *ReplicasLimit
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicasLimit.
func (*ReplicasLimit) DeepCopyInto ¶ added in v0.8.0
func (in *ReplicasLimit) DeepCopyInto(out *ReplicasLimit)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReplicationMemberStatus ¶
type ReplicationMemberStatus struct { // Pod name. // +kubebuilder:validation:Required // +kubebuilder:default=Unknown Pod string `json:"pod"` }
func (*ReplicationMemberStatus) DeepCopy ¶ added in v0.6.0
func (in *ReplicationMemberStatus) DeepCopy() *ReplicationMemberStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicationMemberStatus.
func (*ReplicationMemberStatus) DeepCopyInto ¶ added in v0.6.0
func (in *ReplicationMemberStatus) DeepCopyInto(out *ReplicationMemberStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReplicationSetSpec ¶ added in v0.6.0
type ReplicationSetSpec struct {
StatefulSetSpec `json:",inline"`
}
func (*ReplicationSetSpec) DeepCopy ¶ added in v0.6.0
func (in *ReplicationSetSpec) DeepCopy() *ReplicationSetSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicationSetSpec.
func (*ReplicationSetSpec) DeepCopyInto ¶ added in v0.6.0
func (in *ReplicationSetSpec) DeepCopyInto(out *ReplicationSetSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ReplicationSetSpec) FinalStsUpdateStrategy ¶ added in v0.6.0
func (r *ReplicationSetSpec) FinalStsUpdateStrategy() (appsv1.PodManagementPolicyType, appsv1.StatefulSetUpdateStrategy)
func (*ReplicationSetSpec) GetUpdateStrategy ¶ added in v0.6.0
func (r *ReplicationSetSpec) GetUpdateStrategy() UpdateStrategy
type ReplicationSetStatus ¶
type ReplicationSetStatus struct { // Primary status. // +kubebuilder:validation:Required Primary ReplicationMemberStatus `json:"primary"` // Secondaries status. // +optional Secondaries []ReplicationMemberStatus `json:"secondaries,omitempty"` }
func (*ReplicationSetStatus) DeepCopy ¶ added in v0.6.0
func (in *ReplicationSetStatus) DeepCopy() *ReplicationSetStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicationSetStatus.
func (*ReplicationSetStatus) DeepCopyInto ¶ added in v0.6.0
func (in *ReplicationSetStatus) DeepCopyInto(out *ReplicationSetStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceConstraintRule ¶ added in v0.6.0
type ResourceConstraintRule struct { // The name of the constraint. // +kubebuilder:validation:Required Name string `json:"name"` // The constraint for vcpu cores. // +kubebuilder:validation:Required CPU CPUConstraint `json:"cpu"` // The constraint for memory size. // +kubebuilder:validation:Required Memory MemoryConstraint `json:"memory"` // The constraint for storage size. // +optional Storage StorageConstraint `json:"storage"` }
func (*ResourceConstraintRule) CompleteResources ¶ added in v0.6.0
func (m *ResourceConstraintRule) CompleteResources(r corev1.ResourceList) corev1.ResourceList
func (*ResourceConstraintRule) DeepCopy ¶ added in v0.6.0
func (in *ResourceConstraintRule) DeepCopy() *ResourceConstraintRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceConstraintRule.
func (*ResourceConstraintRule) DeepCopyInto ¶ added in v0.6.0
func (in *ResourceConstraintRule) DeepCopyInto(out *ResourceConstraintRule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResourceConstraintRule) GetMinimalResources ¶ added in v0.6.0
func (m *ResourceConstraintRule) GetMinimalResources() corev1.ResourceList
GetMinimalResources gets the minimal resources meets the constraint
func (*ResourceConstraintRule) ValidateCPU ¶ added in v0.6.0
func (m *ResourceConstraintRule) ValidateCPU(cpu *resource.Quantity) bool
ValidateCPU validates if the CPU meets the constraint
func (*ResourceConstraintRule) ValidateMemory ¶ added in v0.6.0
func (m *ResourceConstraintRule) ValidateMemory(cpu *resource.Quantity, memory *resource.Quantity) bool
ValidateMemory validates if the memory meets the constraint
func (*ResourceConstraintRule) ValidateResources ¶ added in v0.6.0
func (m *ResourceConstraintRule) ValidateResources(r corev1.ResourceList) bool
ValidateResources validates if the resources meets the constraint
func (*ResourceConstraintRule) ValidateStorage ¶ added in v0.6.0
func (m *ResourceConstraintRule) ValidateStorage(storage *resource.Quantity) bool
ValidateStorage validates if the storage meets the constraint
type ResourceMeta ¶ added in v0.8.0
type ResourceMeta struct { // name is the name of the referenced the Configmap/Secret object. // +kubebuilder:validation:Required // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$` Name string `json:"name"` // mountPath is the path at which to mount the volume. // +kubebuilder:validation:Required // +kubebuilder:validation:MaxLength=256 // +kubebuilder:validation:Pattern:=`^/[a-z]([a-z0-9\-]*[a-z0-9])?$` MountPoint string `json:"mountPoint"` // subPath is a relative file path within the volume to mount. // +optional SubPath string `json:"subPath,omitempty"` // asVolumeFrom defines the list of containers where volumeMounts will be injected into. // +listType=set // +optional AsVolumeFrom []string `json:"asVolumeFrom,omitempty"` }
func (*ResourceMeta) DeepCopy ¶ added in v0.8.0
func (in *ResourceMeta) DeepCopy() *ResourceMeta
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceMeta.
func (*ResourceMeta) DeepCopyInto ¶ added in v0.8.0
func (in *ResourceMeta) DeepCopyInto(out *ResourceMeta)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RestoreFromSpec ¶
type RestoreFromSpec struct { // Refers to the backup name and component name used for restoration. Supports recovery of multiple components. // +optional Backup []BackupRefSpec `json:"backup,omitempty"` // Refers to the specific point in time for recovery. // +optional PointInTime *PointInTimeRefSpec `json:"pointInTime,omitempty"` }
func (*RestoreFromSpec) DeepCopy ¶ added in v0.6.0
func (in *RestoreFromSpec) DeepCopy() *RestoreFromSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RestoreFromSpec.
func (*RestoreFromSpec) DeepCopyInto ¶ added in v0.6.0
func (in *RestoreFromSpec) DeepCopyInto(out *RestoreFromSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RestoreSpec ¶ added in v0.8.0
type RestoreSpec struct { // Specifies the name of the backup. // +kubebuilder:validation:Required BackupName string `json:"backupName"` // Indicates if this backup will be restored for all components which refer to common ComponentDefinition. EffectiveCommonComponentDef bool `json:"effectiveCommonComponentDef,omitempty"` // Defines the point in time to restore. RestoreTimeStr string `json:"restoreTimeStr,omitempty"` // Specifies the volume claim restore policy, support values: [Serial, Parallel] // +kubebuilder:validation:Enum=Serial;Parallel // +kubebuilder:default=Parallel VolumeRestorePolicy string `json:"volumeRestorePolicy,omitempty"` // 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. DoReadyRestoreAfterClusterRunning bool `json:"doReadyRestoreAfterClusterRunning,omitempty"` }
func (*RestoreSpec) DeepCopy ¶ added in v0.8.0
func (in *RestoreSpec) DeepCopy() *RestoreSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RestoreSpec.
func (*RestoreSpec) DeepCopyInto ¶ added in v0.8.0
func (in *RestoreSpec) DeepCopyInto(out *RestoreSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RetryPolicy ¶ added in v0.8.0
type RetryPolicy struct { // MaxRetries specifies the maximum number of times the action should be retried. // +kubebuilder:default=0 // +optional MaxRetries int `json:"maxRetries,omitempty"` // RetryInterval specifies the interval between retry attempts. // +kubebuilder:default=0 // +optional RetryInterval time.Duration `json:"retryInterval,omitempty"` }
func (*RetryPolicy) DeepCopy ¶ added in v0.8.0
func (in *RetryPolicy) DeepCopy() *RetryPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RetryPolicy.
func (*RetryPolicy) DeepCopyInto ¶ added in v0.8.0
func (in *RetryPolicy) DeepCopyInto(out *RetryPolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RoleArbitrator ¶ added in v0.8.0
type RoleArbitrator string
RoleArbitrator defines how to arbitrate the role of replicas. +enum +kubebuilder:validation:Enum={External,Lorry}
const ( ExternalRoleArbitrator RoleArbitrator = "External" LorryRoleArbitrator RoleArbitrator = "Lorry" )
type RoleProbe ¶ added in v0.8.0
type RoleProbe struct { LifecycleActionHandler `json:",inline"` // 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 // +optional InitialDelaySeconds int32 `json:"initialDelaySeconds,omitempty" protobuf:"varint,2,opt,name=initialDelaySeconds"` // 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 // +optional TimeoutSeconds int32 `json:"timeoutSeconds,omitempty" protobuf:"varint,3,opt,name=timeoutSeconds"` // How often (in seconds) to perform the probe. // Default to 10 seconds. Minimum value is 1. // +optional PeriodSeconds int32 `json:"periodSeconds,omitempty" protobuf:"varint,4,opt,name=periodSeconds"` }
func (*RoleProbe) DeepCopy ¶ added in v0.8.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleProbe.
func (*RoleProbe) DeepCopyInto ¶ added in v0.8.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Rule ¶ added in v0.8.0
type Rule struct { // Defines how the operation can be executed using a Go template expression. // Should return either `true` or `false`. The built-in objects available for use in the expression include: // - `params`: These are the input parameters. // - `cluster`: This is the referenced cluster object. // - `component`: This is the referenced component object. // // +kubebuilder:validation:Required Expression string `json:"expression"` // Reported if the rule is not matched. // // +kubebuilder:validation:Required Message string `json:"message"` }
func (*Rule) DeepCopy ¶ added in v0.8.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rule.
func (*Rule) DeepCopyInto ¶ added in v0.8.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SchedulePolicy ¶
type SchedulePolicy struct { // enabled specifies whether the backup schedule is enabled or not. // +optional Enabled *bool `json:"enabled,omitempty"` // backupMethod specifies the backup method name that is defined in backupPolicy. // +kubebuilder:validation:Required BackupMethod string `json:"backupMethod"` // the cron expression for schedule, the timezone is in UTC. // see https://en.wikipedia.org/wiki/Cron. // +kubebuilder:validation:Required CronExpression string `json:"cronExpression"` // retentionPeriod determines a duration up to which the backup should be kept. // controller will remove all backups that are older than the RetentionPeriod. // For example, RetentionPeriod of `30d` will keep only the backups of last 30 days. // Sample duration format: // // - years: 2y // - months: 6mo // - days: 30d // - hours: 12h // - minutes: 30m // You can also combine the above durations. For example: 30d12h30m // // +optional // +kubebuilder:default="7d" RetentionPeriod dpv1alpha1.RetentionPeriod `json:"retentionPeriod,omitempty"` }
func (*SchedulePolicy) DeepCopy ¶ added in v0.6.0
func (in *SchedulePolicy) DeepCopy() *SchedulePolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchedulePolicy.
func (*SchedulePolicy) DeepCopyInto ¶ added in v0.6.0
func (in *SchedulePolicy) DeepCopyInto(out *SchedulePolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SchedulingPolicy ¶ added in v0.9.1
type SchedulingPolicy struct { // If specified, the pod will be dispatched by specified scheduler. // If not specified, the pod will be dispatched by default scheduler. // // +optional SchedulerName string `json:"schedulerName,omitempty"` // 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/ // // +optional // +mapType=atomic NodeSelector map[string]string `json:"nodeSelector,omitempty"` // 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. // // +optional NodeName string `json:"nodeName,omitempty"` // If specified, the cluster's scheduling constraints. // // +optional Affinity *corev1.Affinity `json:"affinity,omitempty"` // Attached to tolerate any taint that matches the triple `key,value,effect` using the matching operator `operator`. // // +optional Tolerations []corev1.Toleration `json:"tolerations,omitempty"` // 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. // // +optional TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` }
func (*SchedulingPolicy) DeepCopy ¶ added in v0.9.1
func (in *SchedulingPolicy) DeepCopy() *SchedulingPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchedulingPolicy.
func (*SchedulingPolicy) DeepCopyInto ¶ added in v0.9.1
func (in *SchedulingPolicy) DeepCopyInto(out *SchedulingPolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ScriptConfig ¶ added in v0.6.0
type ScriptConfig struct { // scriptConfigMapRef used to execute for reload. // +kubebuilder:validation:Required ScriptConfigMapRef string `json:"scriptConfigMapRef"` // Specify the namespace of the referenced the tpl script ConfigMap object. // An empty namespace is equivalent to the "default" namespace. // +kubebuilder:validation:MaxLength=63 // +kubebuilder:default="default" // +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$` // +optional Namespace string `json:"namespace,omitempty"` }
func (*ScriptConfig) DeepCopy ¶ added in v0.6.0
func (in *ScriptConfig) DeepCopy() *ScriptConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScriptConfig.
func (*ScriptConfig) DeepCopyInto ¶ added in v0.6.0
func (in *ScriptConfig) DeepCopyInto(out *ScriptConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ScriptFrom ¶ added in v0.6.0
type ScriptFrom struct { // Specifies the configMap that is to be executed. // +optional // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.scriptSpec.scriptFrom.configMapRef" ConfigMapRef []corev1.ConfigMapKeySelector `json:"configMapRef,omitempty"` // Specifies the secret that is to be executed. // +optional // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.scriptSpec.scriptFrom.secretRef" SecretRef []corev1.SecretKeySelector `json:"secretRef,omitempty"` }
ScriptFrom represents the script that is to be executed from a configMap or a secret.
func (*ScriptFrom) DeepCopy ¶ added in v0.6.0
func (in *ScriptFrom) DeepCopy() *ScriptFrom
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScriptFrom.
func (*ScriptFrom) DeepCopyInto ¶ added in v0.6.0
func (in *ScriptFrom) DeepCopyInto(out *ScriptFrom)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ScriptSecret ¶ added in v0.6.0
type ScriptSecret struct { // Specifies the name of the secret. // +kubebuilder:validation:Required // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$` Name string `json:"name"` // Used to specify the username part of the secret. // +kubebuilder:default:="username" // +optional UsernameKey string `json:"usernameKey,omitempty"` // Used to specify the password part of the secret. // +kubebuilder:default:="password" // +optional PasswordKey string `json:"passwordKey,omitempty"` }
ScriptSecret represents the secret that is used to execute the script.
func (*ScriptSecret) DeepCopy ¶ added in v0.6.0
func (in *ScriptSecret) DeepCopy() *ScriptSecret
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScriptSecret.
func (*ScriptSecret) DeepCopyInto ¶ added in v0.6.0
func (in *ScriptSecret) DeepCopyInto(out *ScriptSecret)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ScriptSpec ¶ added in v0.6.0
type ScriptSpec struct { ComponentOps `json:",inline"` // Specifies the image to be used for the exec command. By default, the image of kubeblocks-datascript is used. // +optional Image string `json:"image,omitempty"` // Defines the secret to be used to execute the script. If not specified, the default cluster root credential secret is used. // +optional Secret *ScriptSecret `json:"secret,omitempty"` // Defines the script to be executed. // +optional // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.scriptSpec.script" Script []string `json:"script,omitempty"` // Defines the script to be executed from a configMap or secret. // +optional // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.scriptSpec.scriptFrom" ScriptFrom *ScriptFrom `json:"scriptFrom,omitempty"` // 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. // +optional // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.scriptSpec.script.selector" Selector *metav1.LabelSelector `json:"selector,omitempty"` }
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.
func (*ScriptSpec) DeepCopy ¶ added in v0.6.0
func (in *ScriptSpec) DeepCopy() *ScriptSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScriptSpec.
func (*ScriptSpec) DeepCopyInto ¶ added in v0.6.0
func (in *ScriptSpec) DeepCopyInto(out *ScriptSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ScriptSpecSelector ¶ added in v0.6.0
type ScriptSpecSelector struct { // ScriptSpec name of the referent, refer to componentDefs[x].scriptSpecs[y].Name. // +kubebuilder:validation:Required // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$` Name string `json:"name"` }
func (*ScriptSpecSelector) DeepCopy ¶ added in v0.6.0
func (in *ScriptSpecSelector) DeepCopy() *ScriptSpecSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScriptSpecSelector.
func (*ScriptSpecSelector) DeepCopyInto ¶ added in v0.6.0
func (in *ScriptSpecSelector) DeepCopyInto(out *ScriptSpecSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecretRef ¶ added in v0.8.0
type SecretRef struct { ResourceMeta `json:",inline"` // secret defines the secret volume source. // +kubebuilder:validation:Required Secret corev1.SecretVolumeSource `json:"secret"` }
func (*SecretRef) DeepCopy ¶ added in v0.8.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretRef.
func (*SecretRef) DeepCopyInto ¶ added in v0.8.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Service ¶ added in v0.8.0
type Service struct { // 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. // +required Name string `json:"name"` // ServiceName defines the name of the underlying service object. // If not specified, the default service name with different patterns will be used: // // - CLUSTER_NAME: for cluster-level services // - CLUSTER_NAME-COMPONENT_NAME: for component-level services // // Only one default service name is allowed. // Cannot be updated. // // +optional ServiceName string `json:"serviceName,omitempty"` // If ServiceType is LoadBalancer, cloud provider related parameters can be put here // More info: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer. // +optional Annotations map[string]string `json:"annotations,omitempty"` // Spec defines the behavior of a service. // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status // +optional Spec corev1.ServiceSpec `json:"spec,omitempty"` // 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. // +optional RoleSelector string `json:"roleSelector,omitempty"` }
func (*Service) DeepCopy ¶ added in v0.8.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Service.
func (*Service) DeepCopyInto ¶ added in v0.8.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServiceDescriptor ¶ added in v0.7.0
type ServiceDescriptor struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ServiceDescriptorSpec `json:"spec,omitempty"` Status ServiceDescriptorStatus `json:"status,omitempty"` }
ServiceDescriptor is the Schema for the servicedescriptors API
func (*ServiceDescriptor) DeepCopy ¶ added in v0.7.0
func (in *ServiceDescriptor) DeepCopy() *ServiceDescriptor
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceDescriptor.
func (*ServiceDescriptor) DeepCopyInto ¶ added in v0.7.0
func (in *ServiceDescriptor) DeepCopyInto(out *ServiceDescriptor)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ServiceDescriptor) DeepCopyObject ¶ added in v0.7.0
func (in *ServiceDescriptor) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ServiceDescriptor) Default ¶ added in v0.7.0
func (r *ServiceDescriptor) Default()
Default implements webhook.Defaulter so a webhook will be registered for the type
func (*ServiceDescriptor) SetupWebhookWithManager ¶ added in v0.7.0
func (r *ServiceDescriptor) SetupWebhookWithManager(mgr ctrl.Manager) error
func (*ServiceDescriptor) ValidateCreate ¶ added in v0.7.0
func (r *ServiceDescriptor) ValidateCreate() (admission.Warnings, error)
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*ServiceDescriptor) ValidateDelete ¶ added in v0.7.0
func (r *ServiceDescriptor) ValidateDelete() (admission.Warnings, error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (*ServiceDescriptor) ValidateUpdate ¶ added in v0.7.0
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
type ServiceDescriptorList ¶ added in v0.7.0
type ServiceDescriptorList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ServiceDescriptor `json:"items"` }
ServiceDescriptorList contains a list of ServiceDescriptor
func (*ServiceDescriptorList) DeepCopy ¶ added in v0.7.0
func (in *ServiceDescriptorList) DeepCopy() *ServiceDescriptorList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceDescriptorList.
func (*ServiceDescriptorList) DeepCopyInto ¶ added in v0.7.0
func (in *ServiceDescriptorList) DeepCopyInto(out *ServiceDescriptorList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ServiceDescriptorList) DeepCopyObject ¶ added in v0.7.0
func (in *ServiceDescriptorList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ServiceDescriptorSpec ¶ added in v0.7.0
type ServiceDescriptorSpec struct { // service kind, indicating the type or nature of the service. It should be well-known application cluster type, e.g. {mysql, redis, mongodb}. // The serviceKind is case-insensitive and supports abbreviations for some well-known databases. // For example, both `zk` and `zookeeper` will be considered as a ZooKeeper cluster, and `pg`, `postgres`, `postgresql` will all be considered as a PostgreSQL cluster. // // +kubebuilder:validation:Required ServiceKind string `json:"serviceKind"` // The version of the service reference. // +kubebuilder:validation:Required ServiceVersion string `json:"serviceVersion"` // endpoint is the endpoint of the service connection credential. // +optional Endpoint *CredentialVar `json:"endpoint,omitempty"` // auth is the auth of the service connection credential. // +optional Auth *ConnectionCredentialAuth `json:"auth,omitempty"` // port is the port of the service connection credential. // +optional Port *CredentialVar `json:"port,omitempty" protobuf:"bytes,4,opt,name=port"` }
ServiceDescriptorSpec defines the desired state of ServiceDescriptor
func (*ServiceDescriptorSpec) DeepCopy ¶ added in v0.7.0
func (in *ServiceDescriptorSpec) DeepCopy() *ServiceDescriptorSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceDescriptorSpec.
func (*ServiceDescriptorSpec) DeepCopyInto ¶ added in v0.7.0
func (in *ServiceDescriptorSpec) DeepCopyInto(out *ServiceDescriptorSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServiceDescriptorStatus ¶ added in v0.7.0
type ServiceDescriptorStatus struct { // phase - in list of [Available,Unavailable] // +optional Phase Phase `json:"phase,omitempty"` // A human-readable message indicating details about why the ServiceConnectionCredential is in this phase. // +optional Message string `json:"message,omitempty"` // generation number // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` }
ServiceDescriptorStatus defines the observed state of ServiceDescriptor
func (*ServiceDescriptorStatus) DeepCopy ¶ added in v0.7.0
func (in *ServiceDescriptorStatus) DeepCopy() *ServiceDescriptorStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceDescriptorStatus.
func (*ServiceDescriptorStatus) DeepCopyInto ¶ added in v0.7.0
func (in *ServiceDescriptorStatus) DeepCopyInto(out *ServiceDescriptorStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ServiceDescriptorStatus) GetTerminalPhases ¶ added in v0.7.0
func (r ServiceDescriptorStatus) GetTerminalPhases() []Phase
type ServicePort ¶
type ServicePort struct { // 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. // +kubebuilder:validation:Required Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` // The IP protocol for this port. Supports "TCP", "UDP", and "SCTP". // Default is TCP. // +kubebuilder:validation:Enum={TCP,UDP,SCTP} // +default="TCP" // +optional Protocol corev1.Protocol `json:"protocol,omitempty" protobuf:"bytes,2,opt,name=protocol,casttype=Protocol"` // 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. // +optional AppProtocol *string `json:"appProtocol,omitempty" protobuf:"bytes,6,opt,name=appProtocol"` // The port that will be exposed by this service. Port int32 `json:"port" protobuf:"varint,3,opt,name=port"` // Number or name of the port to access on the pods targeted by the service. // // Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. // // - If this is a string, it will be looked up as a named port in the target Pod's container ports. // - If this is not specified, the value of the `port` field is used (an identity map). // // This field is ignored for services with clusterIP=None, and should be // omitted or set equal to the `port` field. // // More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service // // +kubebuilder:validation:XIntOrString // +optional TargetPort intstr.IntOrString `json:"targetPort,omitempty" protobuf:"bytes,4,opt,name=targetPort"` }
func (*ServicePort) DeepCopy ¶ added in v0.6.0
func (in *ServicePort) DeepCopy() *ServicePort
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServicePort.
func (*ServicePort) DeepCopyInto ¶ added in v0.6.0
func (in *ServicePort) DeepCopyInto(out *ServicePort)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServiceRef ¶ added in v0.7.0
type ServiceRef struct { // name of the service reference declaration. references the serviceRefDeclaration name defined in clusterDefinition.componentDefs[*].serviceRefDeclarations[*].name // +kubebuilder:validation:Required Name string `json:"name"` // 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. // +optional Namespace string `json:"namespace,omitempty" protobuf:"bytes,3,opt,name=namespace"` // 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. // // +optional Cluster string `json:"cluster,omitempty"` // serviceDescriptor defines the service descriptor of the service provided by external sources. // // When referencing a service provided by external sources, you need to provide the ServiceDescriptor object name to establish the service binding. // And serviceDescriptor is the name of the ServiceDescriptor object, furthermore, the `ServiceDescriptor.spec.serviceKind` and `ServiceDescriptor.spec.serviceVersion` // should match `clusterDefinition.componentDefs[*].serviceRefDeclarations[*].serviceRefDeclarationSpecs[*].serviceKind` // and the regular expression defines in `clusterDefinition.componentDefs[*].serviceRefDeclarations[*].serviceRefDeclarationSpecs[*].serviceVersion`. // // If both Cluster and ServiceDescriptor are specified, the Cluster takes precedence. // // +optional ServiceDescriptor string `json:"serviceDescriptor,omitempty"` }
func (*ServiceRef) DeepCopy ¶ added in v0.7.0
func (in *ServiceRef) DeepCopy() *ServiceRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceRef.
func (*ServiceRef) DeepCopyInto ¶ added in v0.7.0
func (in *ServiceRef) DeepCopyInto(out *ServiceRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServiceRefDeclaration ¶ added in v0.7.0
type ServiceRefDeclaration struct { // 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. // +kubebuilder:validation:Required Name string `json:"name"` // 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. // // +kubebuilder:validation:Required ServiceRefDeclarationSpecs []ServiceRefDeclarationSpec `json:"serviceRefDeclarationSpecs"` }
func (*ServiceRefDeclaration) DeepCopy ¶ added in v0.7.0
func (in *ServiceRefDeclaration) DeepCopy() *ServiceRefDeclaration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceRefDeclaration.
func (*ServiceRefDeclaration) DeepCopyInto ¶ added in v0.7.0
func (in *ServiceRefDeclaration) DeepCopyInto(out *ServiceRefDeclaration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServiceRefDeclarationSpec ¶ added in v0.7.0
type ServiceRefDeclarationSpec struct { // service kind, indicating the type or nature of the service. It should be well-known application cluster type, e.g. {mysql, redis, mongodb}. // The serviceKind is case-insensitive and supports abbreviations for some well-known databases. // For example, both `zk` and `zookeeper` will be considered as a ZooKeeper cluster, and `pg`, `postgres`, `postgresql` will all be considered as a PostgreSQL cluster. // // +kubebuilder:validation:Required ServiceKind string `json:"serviceKind"` // The service version of the service reference. It is a regular expression that matches a version number pattern. // For example, `^8.0.8$`, `8.0.\d{1,2}$`, `^[v\-]*?(\d{1,2}\.){0,3}\d{1,2}$` // +kubebuilder:validation:Required ServiceVersion string `json:"serviceVersion"` }
func (*ServiceRefDeclarationSpec) DeepCopy ¶ added in v0.7.0
func (in *ServiceRefDeclarationSpec) DeepCopy() *ServiceRefDeclarationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceRefDeclarationSpec.
func (*ServiceRefDeclarationSpec) DeepCopyInto ¶ added in v0.7.0
func (in *ServiceRefDeclarationSpec) DeepCopyInto(out *ServiceRefDeclarationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServiceRefVarSelector ¶ added in v0.8.0
type ServiceRefVarSelector struct { // The ServiceRefDeclaration to select from. ClusterObjectReference `json:",inline"` ServiceRefVars `json:",inline"` }
ServiceRefVarSelector selects a var from a ServiceRefDeclaration.
func (*ServiceRefVarSelector) DeepCopy ¶ added in v0.8.0
func (in *ServiceRefVarSelector) DeepCopy() *ServiceRefVarSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceRefVarSelector.
func (*ServiceRefVarSelector) DeepCopyInto ¶ added in v0.8.0
func (in *ServiceRefVarSelector) DeepCopyInto(out *ServiceRefVarSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServiceRefVars ¶ added in v0.8.0
type ServiceRefVars struct { // +optional Endpoint *VarOption `json:"endpoint,omitempty"` // +optional Port *VarOption `json:"port,omitempty"` CredentialVars `json:",inline"` }
ServiceRefVars defines the vars can be referenced from a ServiceRef.
func (*ServiceRefVars) DeepCopy ¶ added in v0.8.0
func (in *ServiceRefVars) DeepCopy() *ServiceRefVars
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceRefVars.
func (*ServiceRefVars) DeepCopyInto ¶ added in v0.8.0
func (in *ServiceRefVars) DeepCopyInto(out *ServiceRefVars)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServiceSpec ¶
type ServiceSpec struct { // 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 // +patchMergeKey=port // +patchStrategy=merge // +listType=map // +listMapKey=port // +listMapKey=protocol // +optional Ports []ServicePort `json:"ports,omitempty" patchStrategy:"merge" patchMergeKey:"port" protobuf:"bytes,1,rep,name=ports"` }
func (*ServiceSpec) DeepCopy ¶ added in v0.6.0
func (in *ServiceSpec) DeepCopy() *ServiceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceSpec.
func (*ServiceSpec) DeepCopyInto ¶ added in v0.6.0
func (in *ServiceSpec) DeepCopyInto(out *ServiceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ServiceSpec) ToSVCPorts ¶ added in v0.8.0
func (r *ServiceSpec) ToSVCPorts() []corev1.ServicePort
func (ServiceSpec) ToSVCSpec ¶
func (r ServiceSpec) ToSVCSpec() corev1.ServiceSpec
type ServiceVarSelector ¶ added in v0.8.0
type ServiceVarSelector struct { // The Service to select from. // It can be referenced from the default headless service by setting the name to "headless". ClusterObjectReference `json:",inline"` ServiceVars `json:",inline"` // GeneratePodOrdinalServiceVar indicates whether to create a corresponding ServiceVars reference variable for each Pod. // If set to true, a set of ServiceVars that can be referenced will be automatically generated for each Pod Ordinal. // They can be referred to by adding the PodOrdinal to the defined name template with named pattern `$(Vars[x].Name)_$(PodOrdinal)`. // For example, a ServiceVarRef might be defined as follows: // // “`yaml // // name: MY_SERVICE_PORT // valueFrom: // serviceVarRef: // compDef: my-component-definition // name: my-service // optional: true // generatePodOrdinalServiceVar: true // port: // name: redis-sentinel // // “` // // Assuming that the Component has 3 replicas, then you can reference the port of existing services named my-service-0, my-service-1, // and my-service-2 with $MY_SERVICE_PORT_0, $MY_SERVICE_PORT_1, and $MY_SERVICE_PORT_2, respectively. // It should be used in conjunction with Service.GeneratePodOrdinalService. // +kubebuilder:default=false // +optional GeneratePodOrdinalServiceVar bool `json:"generatePodOrdinalServiceVar,omitempty"` }
ServiceVarSelector selects a var from a Service.
func (*ServiceVarSelector) DeepCopy ¶ added in v0.8.0
func (in *ServiceVarSelector) DeepCopy() *ServiceVarSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceVarSelector.
func (*ServiceVarSelector) DeepCopyInto ¶ added in v0.8.0
func (in *ServiceVarSelector) DeepCopyInto(out *ServiceVarSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServiceVars ¶ added in v0.8.0
type ServiceVars struct { // +optional Host *VarOption `json:"host,omitempty"` // +optional Port *NamedVar `json:"port,omitempty"` // +optional NodePort *NamedVar `json:"nodePort,omitempty"` }
ServiceVars defines the vars can be referenced from a Service.
func (*ServiceVars) DeepCopy ¶ added in v0.8.0
func (in *ServiceVars) DeepCopy() *ServiceVars
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceVars.
func (*ServiceVars) DeepCopyInto ¶ added in v0.8.0
func (in *ServiceVars) DeepCopyInto(out *ServiceVars)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ShardingSpec ¶ added in v0.8.2
type ShardingSpec struct { // name defines sharding name, this name is also part of Service DNS name, so this name will comply with IANA Service Naming rule. // The name is also used to generate the name of the underlying components with the naming pattern `$(ShardingSpec.Name)-$(ShardID)`. // At the same time, the name of component template defined in ShardingSpec.Template.Name will be ignored. // +kubebuilder:validation:Required // +kubebuilder:validation:MaxLength=15 // +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$` // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="name is immutable" Name string `json:"name"` // 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. // +kubebuilder:validation:Required Template ClusterComponentSpec `json:"template"` // shards indicates the number of component, and these components have the same specifications and definitions. // // It should be noted that the number of replicas for each component should be defined by template.replicas. // Moreover, the logical relationship between these components should be maintained by the components themselves, // KubeBlocks only provides the following capabilities for managing the lifecycle of sharding: // // 1. When the number of shards increases, the postProvision Action defined in the ComponentDefinition will be executed if the conditions are met. // 2. When the number of shards decreases, the preTerminate Action defined in the ComponentDefinition will be executed if the conditions are met. // Additionally, the resources and data associated with the corresponding Component will be deleted as well. // // +kubebuilder:validation:Required // +kubebuilder:validation:Minimum=0 // +kubebuilder:validation:Maximum=2048 Shards int32 `json:"shards,omitempty"` }
ShardingSpec defines the sharding spec.
func (*ShardingSpec) DeepCopy ¶ added in v0.8.2
func (in *ShardingSpec) DeepCopy() *ShardingSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShardingSpec.
func (*ShardingSpec) DeepCopyInto ¶ added in v0.8.2
func (in *ShardingSpec) DeepCopyInto(out *ShardingSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ShellTrigger ¶
type ShellTrigger struct { // command used to execute for reload. // +kubebuilder:validation:Required Command []string `json:"command"` // Specify synchronize updates parameters to the config manager. // +optional Sync *bool `json:"sync,omitempty"` }
func (*ShellTrigger) DeepCopy ¶ added in v0.6.0
func (in *ShellTrigger) DeepCopy() *ShellTrigger
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShellTrigger.
func (*ShellTrigger) DeepCopyInto ¶ added in v0.6.0
func (in *ShellTrigger) DeepCopyInto(out *ShellTrigger)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SignalType ¶
type SignalType string
SignalType defines which signals are valid. +enum +kubebuilder:validation:Enum={SIGHUP,SIGINT,SIGQUIT,SIGILL,SIGTRAP,SIGABRT,SIGBUS,SIGFPE,SIGKILL,SIGUSR1,SIGSEGV,SIGUSR2,SIGPIPE,SIGALRM,SIGTERM,SIGSTKFLT,SIGCHLD,SIGCONT,SIGSTOP,SIGTSTP,SIGTTIN,SIGTTOU,SIGURG,SIGXCPU,SIGXFSZ,SIGVTALRM,SIGPROF,SIGWINCH,SIGIO,SIGPWR,SIGSYS}
const ( SIGHUP SignalType = "SIGHUP" SIGINT SignalType = "SIGINT" SIGQUIT SignalType = "SIGQUIT" SIGILL SignalType = "SIGILL" SIGTRAP SignalType = "SIGTRAP" SIGABRT SignalType = "SIGABRT" SIGBUS SignalType = "SIGBUS" SIGFPE SignalType = "SIGFPE" SIGKILL SignalType = "SIGKILL" SIGUSR1 SignalType = "SIGUSR1" SIGSEGV SignalType = "SIGSEGV" SIGUSR2 SignalType = "SIGUSR2" SIGPIPE SignalType = "SIGPIPE" SIGALRM SignalType = "SIGALRM" SIGTERM SignalType = "SIGTERM" SIGSTKFLT SignalType = "SIGSTKFLT" SIGCHLD SignalType = "SIGCHLD" SIGCONT SignalType = "SIGCONT" SIGSTOP SignalType = "SIGSTOP" SIGTSTP SignalType = "SIGTSTP" SIGTTIN SignalType = "SIGTTIN" SIGTTOU SignalType = "SIGTTOU" SIGURG SignalType = "SIGURG" SIGXCPU SignalType = "SIGXCPU" SIGXFSZ SignalType = "SIGXFSZ" SIGVTALRM SignalType = "SIGVTALRM" SIGPROF SignalType = "SIGPROF" SIGWINCH SignalType = "SIGWINCH" SIGIO SignalType = "SIGIO" SIGPWR SignalType = "SIGPWR" SIGSYS SignalType = "SIGSYS" )
type StatefulSetSpec ¶ added in v0.6.0
type StatefulSetSpec struct { // updateStrategy, Pods update strategy. // In case of workloadType=Consensus the update strategy will be following: // // - serial: update Members one by one that guarantee minimum component unavailable time. // `Learner -> Follower(with AccessMode=none) -> Follower(with AccessMode=readonly) -> Follower(with AccessMode=readWrite) -> Leader` // - bestEffortParallel: update Members in parallel that guarantee minimum component un-writable time. // `Learner, Follower(minority) in parallel -> Follower(majority) -> Leader`, keep majority online all the time. // - parallel: force parallel // // +kubebuilder:default=Serial // +optional UpdateStrategy UpdateStrategy `json:"updateStrategy,omitempty"` // llPodManagementPolicy is the low-level controls how pods are created during initial scale up, // when replacing pods on nodes, or when scaling down. // // - `OrderedReady` policy specify where pods are created in increasing order (pod-0, then // pod-1, etc) and the controller will wait until each pod is ready before // continuing. When scaling down, the pods are removed in the opposite order. // - `Parallel` policy specify create pods in parallel // to match the desired scale without waiting, and on scale down will delete // all pods at once. // // +optional LLPodManagementPolicy appsv1.PodManagementPolicyType `json:"llPodManagementPolicy,omitempty"` // 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 `updateStrategy` attribute if provided. // +optional LLUpdateStrategy *appsv1.StatefulSetUpdateStrategy `json:"llUpdateStrategy,omitempty"` }
func (*StatefulSetSpec) DeepCopy ¶ added in v0.6.0
func (in *StatefulSetSpec) DeepCopy() *StatefulSetSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetSpec.
func (*StatefulSetSpec) DeepCopyInto ¶ added in v0.6.0
func (in *StatefulSetSpec) DeepCopyInto(out *StatefulSetSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*StatefulSetSpec) FinalStsUpdateStrategy ¶ added in v0.6.0
func (r *StatefulSetSpec) FinalStsUpdateStrategy() (appsv1.PodManagementPolicyType, appsv1.StatefulSetUpdateStrategy)
func (*StatefulSetSpec) GetUpdateStrategy ¶ added in v0.6.0
func (r *StatefulSetSpec) GetUpdateStrategy() UpdateStrategy
type StatefulSetWorkload ¶ added in v0.6.0
type StatefulSetWorkload interface { FinalStsUpdateStrategy() (appsv1.PodManagementPolicyType, appsv1.StatefulSetUpdateStrategy) GetUpdateStrategy() UpdateStrategy }
StatefulSetWorkload interface +kubebuilder:object:generate=false
type StatelessSetSpec ¶ added in v0.6.0
type StatelessSetSpec struct { // updateStrategy defines the underlying deployment strategy to use to replace existing pods with new ones. // +optional // +patchStrategy=retainKeys UpdateStrategy appsv1.DeploymentStrategy `json:"updateStrategy,omitempty"` }
func (*StatelessSetSpec) DeepCopy ¶ added in v0.6.0
func (in *StatelessSetSpec) DeepCopy() *StatelessSetSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatelessSetSpec.
func (*StatelessSetSpec) DeepCopyInto ¶ added in v0.6.0
func (in *StatelessSetSpec) DeepCopyInto(out *StatelessSetSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StorageConstraint ¶ added in v0.6.0
type StorageConstraint struct { // The minimum size of storage. // +kubebuilder:default="20Gi" // +optional Min *resource.Quantity `json:"min,omitempty"` // The maximum size of storage. // +kubebuilder:default="10Ti" // +optional Max *resource.Quantity `json:"max,omitempty"` }
func (*StorageConstraint) DeepCopy ¶ added in v0.6.0
func (in *StorageConstraint) DeepCopy() *StorageConstraint
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageConstraint.
func (*StorageConstraint) DeepCopyInto ¶ added in v0.6.0
func (in *StorageConstraint) DeepCopyInto(out *StorageConstraint)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SwitchPolicyType ¶
type SwitchPolicyType string
SwitchPolicyType defines switchPolicy type. Currently, only Noop is supported. MaximumAvailability and MaximumDataProtection will be supported in the future. +enum +kubebuilder:validation:Enum={Noop}
const ( MaximumAvailability SwitchPolicyType = "MaximumAvailability" MaximumDataProtection SwitchPolicyType = "MaximumDataProtection" Noop SwitchPolicyType = "Noop" )
type Switchover ¶ added in v0.6.0
type Switchover struct { ComponentOps `json:",inline"` // 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 `clusterDefinition.componentDefs[x].switchoverSpec.withoutCandidate` will be executed. // // It is mandatory that `clusterDefinition.componentDefs[x].switchoverSpec.withoutCandidate` is not left blank. // // 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 `kbcli cluster list-instances`, any other value is considered invalid. // // In this scenario, the `switchoverAction` defined in clusterDefinition.componentDefs[x].switchoverSpec.withCandidate will be executed, // and it is mandatory that clusterDefinition.componentDefs[x].switchoverSpec.withCandidate is not left blank. // // +kubebuilder:validation:Required InstanceName string `json:"instanceName"` }
func (*Switchover) DeepCopy ¶ added in v0.6.0
func (in *Switchover) DeepCopy() *Switchover
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Switchover.
func (*Switchover) DeepCopyInto ¶ added in v0.6.0
func (in *Switchover) DeepCopyInto(out *Switchover)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SwitchoverAction ¶ added in v0.6.0
type SwitchoverAction struct { // cmdExecutorConfig is the executor configuration of the switchover command. // +kubebuilder:validation:Required CmdExecutorConfig *CmdExecutorConfig `json:"cmdExecutorConfig"` // 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. // +optional ScriptSpecSelectors []ScriptSpecSelector `json:"scriptSpecSelectors,omitempty"` }
func (*SwitchoverAction) DeepCopy ¶ added in v0.6.0
func (in *SwitchoverAction) DeepCopy() *SwitchoverAction
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SwitchoverAction.
func (*SwitchoverAction) DeepCopyInto ¶ added in v0.6.0
func (in *SwitchoverAction) DeepCopyInto(out *SwitchoverAction)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SwitchoverShortSpec ¶ added in v0.6.0
type SwitchoverShortSpec struct { // CmdExecutorConfig is the command executor config. // +kubebuilder:validation:Required CmdExecutorConfig *CommandExecutorEnvItem `json:"cmdExecutorConfig"` }
SwitchoverShortSpec is a short version of SwitchoverSpec, with only CommandExecutorEnvItem field.
func (*SwitchoverShortSpec) DeepCopy ¶ added in v0.6.0
func (in *SwitchoverShortSpec) DeepCopy() *SwitchoverShortSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SwitchoverShortSpec.
func (*SwitchoverShortSpec) DeepCopyInto ¶ added in v0.6.0
func (in *SwitchoverShortSpec) DeepCopyInto(out *SwitchoverShortSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SwitchoverSpec ¶ added in v0.6.0
type SwitchoverSpec struct { // withCandidate corresponds to the switchover of the specified candidate primary or leader instance. // +optional WithCandidate *SwitchoverAction `json:"withCandidate,omitempty"` // withoutCandidate corresponds to a switchover that does not specify a candidate primary or leader instance. // +optional WithoutCandidate *SwitchoverAction `json:"withoutCandidate,omitempty"` }
func (*SwitchoverSpec) DeepCopy ¶ added in v0.6.0
func (in *SwitchoverSpec) DeepCopy() *SwitchoverSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SwitchoverSpec.
func (*SwitchoverSpec) DeepCopyInto ¶ added in v0.6.0
func (in *SwitchoverSpec) DeepCopyInto(out *SwitchoverSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SystemAccount ¶ added in v0.8.0
type SystemAccount struct { // The name of the account. // Others can refer to this account by the name. // Cannot be updated. // +kubebuilder:validation:Required Name string `json:"name"` // InitAccount indicates whether this is the unique system initialization account (e.g., MySQL root). // Only one system init account is allowed. // Cannot be updated. // +kubebuilder:default=false // +optional InitAccount bool `json:"initAccount,omitempty"` // Statement specifies the statement used to create the account with required privileges. // Cannot be updated. // +optional Statement string `json:"statement,omitempty"` // PasswordGenerationPolicy defines the policy for generating the account's password. // Cannot be updated. // +optional PasswordGenerationPolicy PasswordConfig `json:"passwordGenerationPolicy"` // SecretRef specifies the secret from which data will be copied to create the new account. // Cannot be updated. // +optional SecretRef *ProvisionSecretRef `json:"secretRef,omitempty"` }
func (*SystemAccount) DeepCopy ¶ added in v0.8.0
func (in *SystemAccount) DeepCopy() *SystemAccount
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SystemAccount.
func (*SystemAccount) DeepCopyInto ¶ added in v0.8.0
func (in *SystemAccount) DeepCopyInto(out *SystemAccount)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SystemAccountConfig ¶
type SystemAccountConfig struct { // name is the name of a system account. // +kubebuilder:validation:Required Name AccountName `json:"name"` // provisionPolicy defines how to create account. // +kubebuilder:validation:Required ProvisionPolicy ProvisionPolicy `json:"provisionPolicy"` }
SystemAccountConfig specifies how to create and delete system accounts.
func (*SystemAccountConfig) DeepCopy ¶ added in v0.6.0
func (in *SystemAccountConfig) DeepCopy() *SystemAccountConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SystemAccountConfig.
func (*SystemAccountConfig) DeepCopyInto ¶ added in v0.6.0
func (in *SystemAccountConfig) DeepCopyInto(out *SystemAccountConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SystemAccountShortSpec ¶ added in v0.6.0
type SystemAccountShortSpec struct { // cmdExecutorConfig configs how to get client SDK and perform statements. // +kubebuilder:validation:Required CmdExecutorConfig *CommandExecutorEnvItem `json:"cmdExecutorConfig"` }
SystemAccountShortSpec is a short version of SystemAccountSpec, with only CmdExecutorConfig field.
func (*SystemAccountShortSpec) DeepCopy ¶ added in v0.6.0
func (in *SystemAccountShortSpec) DeepCopy() *SystemAccountShortSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SystemAccountShortSpec.
func (*SystemAccountShortSpec) DeepCopyInto ¶ added in v0.6.0
func (in *SystemAccountShortSpec) DeepCopyInto(out *SystemAccountShortSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SystemAccountSpec ¶
type SystemAccountSpec struct { // cmdExecutorConfig configs how to get client SDK and perform statements. // +kubebuilder:validation:Required CmdExecutorConfig *CmdExecutorConfig `json:"cmdExecutorConfig"` // passwordConfig defines the pattern to generate password. // +kubebuilder:validation:Required PasswordConfig PasswordConfig `json:"passwordConfig"` // accounts defines system account config settings. // +kubebuilder:validation:Required // +kubebuilder:validation:MinItems=1 // +patchMergeKey=name // +patchStrategy=merge,retainKeys // +listType=map // +listMapKey=name Accounts []SystemAccountConfig `json:"accounts" patchStrategy:"merge,retainKeys" patchMergeKey:"name"` }
SystemAccountSpec specifies information to create system accounts.
func (*SystemAccountSpec) DeepCopy ¶ added in v0.6.0
func (in *SystemAccountSpec) DeepCopy() *SystemAccountSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SystemAccountSpec.
func (*SystemAccountSpec) DeepCopyInto ¶ added in v0.6.0
func (in *SystemAccountSpec) DeepCopyInto(out *SystemAccountSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TLSConfig ¶ added in v0.8.0
type TLSConfig struct { // +kubebuilder:default=false // +optional Enable bool `json:"enable,omitempty"` // +optional Issuer *Issuer `json:"issuer,omitempty"` }
func (*TLSConfig) DeepCopy ¶ added in v0.8.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSConfig.
func (*TLSConfig) DeepCopyInto ¶ added in v0.8.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TLSSecretRef ¶
type TLSSecretRef struct { // Name of the Secret // +kubebuilder:validation:Required Name string `json:"name"` // CA cert key in Secret // +kubebuilder:validation:Required CA string `json:"ca"` // Cert key in Secret // +kubebuilder:validation:Required Cert string `json:"cert"` // Key of TLS private key in Secret // +kubebuilder:validation:Required Key string `json:"key"` }
TLSSecretRef defines Secret contains Tls certs
func (*TLSSecretRef) DeepCopy ¶ added in v0.6.0
func (in *TLSSecretRef) DeepCopy() *TLSSecretRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSSecretRef.
func (*TLSSecretRef) DeepCopyInto ¶ added in v0.6.0
func (in *TLSSecretRef) DeepCopyInto(out *TLSSecretRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TPLScriptTrigger ¶
type TPLScriptTrigger struct { ScriptConfig `json:",inline"` // Specify synchronize updates parameters to the config manager. // +optional Sync *bool `json:"sync,omitempty"` }
func (*TPLScriptTrigger) DeepCopy ¶ added in v0.6.0
func (in *TPLScriptTrigger) DeepCopy() *TPLScriptTrigger
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TPLScriptTrigger.
func (*TPLScriptTrigger) DeepCopyInto ¶ added in v0.6.0
func (in *TPLScriptTrigger) DeepCopyInto(out *TPLScriptTrigger)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TargetInstance ¶
type TargetInstance struct { // select instance of corresponding role for backup, role are: // // - the name of Leader/Follower/Leaner for Consensus component. // - primary or secondary for Replication component. // // finally, invalid role of the component will be ignored. // such as if workload type is Replication and component's replicas is 1, // the secondary role is invalid. and it also will be ignored when component is Stateful/Stateless. // the role will be transformed to a role LabelSelector for BackupPolicy's target attribute. Role string `json:"role"` // 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. // +optional Account string `json:"account,omitempty"` // PodSelectionStrategy specifies the strategy to select when multiple pods are // selected for backup target. // Valid values are: // // - Any: select any one pod that match the labelsSelector. // - All: select all pods that match the labelsSelector. // // +optional Strategy dpv1alpha1.PodSelectionStrategy `json:"strategy,omitempty"` // connectionCredentialKey defines connection credential key in secret // which created by spec.ConnectionCredential of the ClusterDefinition. // it will be ignored when "account" is set. // +optional ConnectionCredentialKey ConnectionCredentialKey `json:"connectionCredentialKey,omitempty"` }
func (*TargetInstance) DeepCopy ¶ added in v0.6.0
func (in *TargetInstance) DeepCopy() *TargetInstance
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetInstance.
func (*TargetInstance) DeepCopyInto ¶ added in v0.6.0
func (in *TargetInstance) DeepCopyInto(out *TargetInstance)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TargetPodSelector ¶ added in v0.8.0
type TargetPodSelector string
TargetPodSelector defines how to select pod(s) to execute a action. +enum +kubebuilder:validation:Enum={Any,All,Role,Ordinal}
const ( AnyReplica TargetPodSelector = "Any" AllReplicas TargetPodSelector = "All" RoleSelector TargetPodSelector = "Role" OrdinalSelector TargetPodSelector = "Ordinal" )
type TenancyType ¶
type TenancyType string
TenancyType for cluster tenant resources. +enum +kubebuilder:validation:Enum={SharedNode,DedicatedNode}
const ( DedicatedNode TenancyType = "DedicatedNode" )
type TerminationPolicyType ¶
type TerminationPolicyType string
TerminationPolicyType defines termination policy types. +enum +kubebuilder:validation:Enum={DoNotTerminate,Halt,Delete,WipeOut}
const ( // DoNotTerminate will block delete operation. DoNotTerminate TerminationPolicyType = "DoNotTerminate" // Halt will delete workload resources such as statefulset, deployment workloads but keep PVCs. Halt TerminationPolicyType = "Halt" // Delete is based on Halt and deletes PVCs. Delete TerminationPolicyType = "Delete" // WipeOut is based on Delete and wipe out all volume snapshots and snapshot data from backup storage location. WipeOut TerminationPolicyType = "WipeOut" )
type ToolConfig ¶ added in v0.6.0
type ToolConfig struct { // Specify the name of initContainer. Must be a DNS_LABEL name. // +kubebuilder:validation:Required // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:Pattern:=`^[a-z]([a-z0-9\-]*[a-z0-9])?$` Name string `json:"name,omitempty"` // tools Container image name. // +optional Image string `json:"image,omitempty"` // exec used to execute for init containers. // +kubebuilder:validation:Required Command []string `json:"command"` }
func (*ToolConfig) DeepCopy ¶ added in v0.6.0
func (in *ToolConfig) DeepCopy() *ToolConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ToolConfig.
func (*ToolConfig) DeepCopyInto ¶ added in v0.6.0
func (in *ToolConfig) DeepCopyInto(out *ToolConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ToolsImageSpec ¶ added in v0.6.0
type ToolsImageSpec struct { // mountPoint is the mount point of the scripts file. // +kubebuilder:validation:Required // +kubebuilder:validation:MaxLength=128 MountPoint string `json:"mountPoint"` // toolConfig used to config init container. // +optional ToolConfigs []ToolConfig `json:"toolConfigs,omitempty"` }
func (*ToolsImageSpec) DeepCopy ¶ added in v0.6.0
func (in *ToolsImageSpec) DeepCopy() *ToolsImageSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ToolsImageSpec.
func (*ToolsImageSpec) DeepCopyInto ¶ added in v0.6.0
func (in *ToolsImageSpec) DeepCopyInto(out *ToolsImageSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UnixSignalTrigger ¶
type UnixSignalTrigger struct { // signal is valid for unix signal. // e.g: SIGHUP // url: ../../pkg/configuration/configmap/handler.go:allUnixSignals // +kubebuilder:validation:Required Signal SignalType `json:"signal"` // processName is process name, sends unix signal to proc. // +kubebuilder:validation:Required ProcessName string `json:"processName"` }
func (*UnixSignalTrigger) DeepCopy ¶ added in v0.6.0
func (in *UnixSignalTrigger) DeepCopy() *UnixSignalTrigger
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UnixSignalTrigger.
func (*UnixSignalTrigger) DeepCopyInto ¶ added in v0.6.0
func (in *UnixSignalTrigger) DeepCopyInto(out *UnixSignalTrigger)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UpdateStrategy ¶
type UpdateStrategy string
UpdateStrategy defines Cluster Component update strategy. +enum +kubebuilder:validation:Enum={Serial,BestEffortParallel,Parallel}
const ( SerialStrategy UpdateStrategy = "Serial" ParallelStrategy UpdateStrategy = "Parallel" BestEffortParallelStrategy UpdateStrategy = "BestEffortParallel" )
type UpdatedParameters ¶
type UpdatedParameters struct { // Lists the keys that have been added. // +optional AddedKeys map[string]string `json:"addedKeys,omitempty"` // Lists the keys that have been deleted. // +optional DeletedKeys map[string]string `json:"deletedKeys,omitempty"` // Lists the keys that have been updated. // +optional UpdatedKeys map[string]string `json:"updatedKeys,omitempty"` }
func (*UpdatedParameters) DeepCopy ¶ added in v0.6.0
func (in *UpdatedParameters) DeepCopy() *UpdatedParameters
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpdatedParameters.
func (*UpdatedParameters) DeepCopyInto ¶ added in v0.6.0
func (in *UpdatedParameters) DeepCopyInto(out *UpdatedParameters)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Upgrade ¶
type Upgrade struct { // A reference to the name of the ClusterVersion. // // +kubebuilder:validation:Required ClusterVersionRef string `json:"clusterVersionRef"` }
Upgrade represents the parameters required for an upgrade operation.
func (*Upgrade) DeepCopy ¶ added in v0.6.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Upgrade.
func (*Upgrade) DeepCopyInto ¶ added in v0.6.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UpgradePolicy ¶
type UpgradePolicy string
UpgradePolicy defines the policy of reconfiguring. +enum +kubebuilder:validation:Enum={simple,parallel,rolling,autoReload,operatorSyncUpdate,dynamicReloadBeginRestart}
const ( NonePolicy UpgradePolicy = "none" NormalPolicy UpgradePolicy = "simple" RestartPolicy UpgradePolicy = "parallel" RollingPolicy UpgradePolicy = "rolling" AsyncDynamicReloadPolicy UpgradePolicy = "autoReload" SyncDynamicReloadPolicy UpgradePolicy = "operatorSyncUpdate" DynamicReloadAndRestartPolicy UpgradePolicy = "dynamicReloadBeginRestart" )
type UserResourceRefs ¶ added in v0.8.0
type UserResourceRefs struct { // secretRefs defines the user-defined secrets. // +patchMergeKey=name // +patchStrategy=merge,retainKeys // +listType=map // +listMapKey=name // +optional SecretRefs []SecretRef `json:"secretRefs,omitempty"` // configMapRefs defines the user-defined configmaps. // +patchMergeKey=name // +patchStrategy=merge,retainKeys // +listType=map // +listMapKey=name // +optional ConfigMapRefs []ConfigMapRef `json:"configMapRefs,omitempty"` }
func (*UserResourceRefs) DeepCopy ¶ added in v0.8.0
func (in *UserResourceRefs) DeepCopy() *UserResourceRefs
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserResourceRefs.
func (*UserResourceRefs) DeepCopyInto ¶ added in v0.8.0
func (in *UserResourceRefs) DeepCopyInto(out *UserResourceRefs)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ValueFrom ¶ added in v0.7.0
type ValueFrom struct { // mapped ClusterVersionRef to env value. // +optional ClusterVersionRef []ValueMapping `json:"clusterVersionRef,omitempty"` // mapped ComponentDefinition to env value. // +optional ComponentDef []ValueMapping `json:"componentDef,omitempty"` }
func (*ValueFrom) DeepCopy ¶ added in v0.7.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValueFrom.
func (*ValueFrom) DeepCopyInto ¶ added in v0.7.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ValueMapping ¶ added in v0.8.0
type ValueMapping struct { // the array of ClusterVersion name which can be mapped to the env value. // +kubebuilder:validation:Required Names []string `json:"names"` // mapping value for the specified ClusterVersion names. // +kubebuilder:validation:Required MappingValue string `json:"mappingValue"` }
func (*ValueMapping) DeepCopy ¶ added in v0.8.0
func (in *ValueMapping) DeepCopy() *ValueMapping
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValueMapping.
func (*ValueMapping) DeepCopyInto ¶ added in v0.8.0
func (in *ValueMapping) DeepCopyInto(out *ValueMapping)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VarOption ¶ added in v0.8.0
type VarOption string
VarOption defines whether a variable is required or optional. +enum +kubebuilder:validation:Enum={Required,Optional}
type VarSource ¶ added in v0.8.0
type VarSource struct { // Selects a key of a ConfigMap. // +optional ConfigMapKeyRef *corev1.ConfigMapKeySelector `json:"configMapKeyRef,omitempty"` // Selects a key of a Secret. // +optional SecretKeyRef *corev1.SecretKeySelector `json:"secretKeyRef,omitempty"` // Selects a defined var of a Service. // +optional ServiceVarRef *ServiceVarSelector `json:"serviceVarRef,omitempty"` // Selects a defined var of a Credential (SystemAccount). // +optional CredentialVarRef *CredentialVarSelector `json:"credentialVarRef,omitempty"` // Selects a defined var of a ServiceRef. // +optional ServiceRefVarRef *ServiceRefVarSelector `json:"serviceRefVarRef,omitempty"` }
VarSource represents a source for the value of an EnvVar.
func (*VarSource) DeepCopy ¶ added in v0.8.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VarSource.
func (*VarSource) DeepCopyInto ¶ added in v0.8.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VarsRef ¶ added in v0.8.0
type VarsRef struct { // 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. // // +kubebuilder:validation:Required // +kubebuilder:default=PreferredAvailable PodSelectionStrategy PodSelectionStrategy `json:"podSelectionStrategy"` // Represents a list of environment variables to be set in the job's container. // // +kubebuilder:validation:Required // +kubebuilder:validation:MinItems=1 Vars []OpsEnvVar `json:"vars,omitempty"` }
func (*VarsRef) DeepCopy ¶ added in v0.8.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VarsRef.
func (*VarsRef) DeepCopyInto ¶ added in v0.8.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VersionsContext ¶
type VersionsContext struct { // Provide ClusterDefinition.spec.componentDefs.podSpec.initContainers override // values, typical scenarios are application container image updates. // +kubebuilder:pruning:PreserveUnknownFields // +patchMergeKey=name // +patchStrategy=merge // +listType=map // +listMapKey=name // +optional InitContainers []corev1.Container `json:"initContainers,omitempty"` // Provide ClusterDefinition.spec.componentDefs.podSpec.containers override // values, typical scenarios are application container image updates. // +kubebuilder:pruning:PreserveUnknownFields // +patchMergeKey=name // +patchStrategy=merge // +listType=map // +listMapKey=name // +optional Containers []corev1.Container `json:"containers,omitempty"` }
func (*VersionsContext) DeepCopy ¶ added in v0.6.0
func (in *VersionsContext) DeepCopy() *VersionsContext
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VersionsContext.
func (*VersionsContext) DeepCopyInto ¶ added in v0.6.0
func (in *VersionsContext) DeepCopyInto(out *VersionsContext)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VerticalScaling ¶
type VerticalScaling struct { ComponentOps `json:",inline"` // Defines the computational resource size for vertical scaling. // +kubebuilder:pruning:PreserveUnknownFields corev1.ResourceRequirements `json:",inline"` // A reference to a class defined in ComponentClassDefinition. // +kubebuilder:deprecatedversion:warning="Due to the lack of practical use cases, this field is deprecated from KB 0.9.0." // +optional ClassDefRef *ClassDefRef `json:"classDefRef,omitempty"` }
VerticalScaling defines the parameters required for scaling compute resources.
func (*VerticalScaling) DeepCopy ¶ added in v0.6.0
func (in *VerticalScaling) DeepCopy() *VerticalScaling
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VerticalScaling.
func (*VerticalScaling) DeepCopyInto ¶ added in v0.6.0
func (in *VerticalScaling) DeepCopyInto(out *VerticalScaling)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VolumeExpansion ¶
type VolumeExpansion struct { ComponentOps `json:",inline"` // volumeClaimTemplates specifies the storage size and volumeClaimTemplate name. // +kubebuilder:validation:Required // +patchMergeKey=name // +patchStrategy=merge,retainKeys // +listType=map // +listMapKey=name VolumeClaimTemplates []OpsRequestVolumeClaimTemplate `json:"volumeClaimTemplates" patchStrategy:"merge,retainKeys" patchMergeKey:"name"` }
VolumeExpansion encapsulates the parameters required for a volume expansion operation.
func (*VolumeExpansion) DeepCopy ¶ added in v0.6.0
func (in *VolumeExpansion) DeepCopy() *VolumeExpansion
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeExpansion.
func (*VolumeExpansion) DeepCopyInto ¶ added in v0.6.0
func (in *VolumeExpansion) DeepCopyInto(out *VolumeExpansion)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VolumeProtectionSpec ¶ added in v0.6.0
type VolumeProtectionSpec struct { // 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. // +kubebuilder:validation:Maximum=100 // +kubebuilder:validation:Minimum=0 // +kubebuilder:default=90 // +optional HighWatermark int `json:"highWatermark,omitempty"` // Volumes to protect. // +optional Volumes []ProtectedVolume `json:"volumes,omitempty"` }
func (*VolumeProtectionSpec) DeepCopy ¶ added in v0.6.0
func (in *VolumeProtectionSpec) DeepCopy() *VolumeProtectionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeProtectionSpec.
func (*VolumeProtectionSpec) DeepCopyInto ¶ added in v0.6.0
func (in *VolumeProtectionSpec) DeepCopyInto(out *VolumeProtectionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VolumeType ¶
type VolumeType string
VolumeType defines volume type for backup data or log. +enum +kubebuilder:validation:Enum={data,log}
const ( VolumeTypeData VolumeType = "data" VolumeTypeLog VolumeType = "log" )
type VolumeTypeSpec ¶
type VolumeTypeSpec struct { // 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. // +kubebuilder:validation:Required // +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$` Name string `json:"name"` // 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. // +optional Type VolumeType `json:"type,omitempty"` }
func (*VolumeTypeSpec) DeepCopy ¶ added in v0.6.0
func (in *VolumeTypeSpec) DeepCopy() *VolumeTypeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeTypeSpec.
func (*VolumeTypeSpec) DeepCopyInto ¶ added in v0.6.0
func (in *VolumeTypeSpec) DeepCopyInto(out *VolumeTypeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkloadType ¶
type WorkloadType string
WorkloadType defines ClusterDefinition's component workload type. +enum +kubebuilder:validation:Enum={Stateless,Stateful,Consensus,Replication}
const ( Stateless WorkloadType = "Stateless" Stateful WorkloadType = "Stateful" Consensus WorkloadType = "Consensus" Replication WorkloadType = "Replication" )
Source Files ¶
- backuppolicytemplate_types.go
- cluster_types.go
- cluster_webhook.go
- clusterdefinition_types.go
- clusterdefinition_webhook.go
- clusterversion_types.go
- clusterversion_webhook.go
- component_types.go
- component_webhook.go
- componentclassdefinition_types.go
- componentdefinition_types.go
- componentdefinition_webhook.go
- componentresourceconstraint_types.go
- config.go
- configconstraint_types.go
- configuration_types.go
- doc.go
- groupversion_info.go
- opsdefinition_types.go
- opsrequest_conditions.go
- opsrequest_types.go
- opsrequest_webhook.go
- register.go
- servicedescriptor_types.go
- servicedescriptor_webhook.go
- type.go
- zz_generated.deepcopy.go