Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the parameters v1alpha1 API group +kubebuilder:object:generate=true +groupName=parameters.kubeblocks.io
Index ¶
- Variables
- func Resource(resource string) schema.GroupResource
- type AutoTrigger
- type CfgFileFormat
- type ComponentConfigDescription
- type ComponentParameter
- type ComponentParameterList
- type ComponentParameterSpec
- type ComponentParameterStatus
- type ComponentParameters
- type ComponentParametersSpec
- type ComponentReconfiguringStatus
- type ConfigTemplateExtension
- type ConfigTemplateItemDetail
- type ConfigTemplateItemDetailStatus
- type DownwardAPIChangeTriggeredAction
- type DynamicParameterSelectedPolicy
- type DynamicReloadType
- type FileFormatConfig
- type FormatterAction
- type IniConfig
- type MergedPolicy
- type ParamConfigRenderer
- type ParamConfigRendererList
- type ParamConfigRendererSpec
- type ParamConfigRendererStatus
- type Parameter
- type ParameterDeletedMethod
- type ParameterDeletedPolicy
- type ParameterList
- type ParameterPhase
- type ParameterSpec
- type ParameterStatus
- type ParametersDefinition
- type ParametersDefinitionList
- type ParametersDefinitionSpec
- type ParametersDefinitionStatus
- type ParametersDescPhase
- type ParametersInFile
- type ParametersSchema
- type Payload
- type ReconcileDetail
- type ReconfiguringStatus
- type ReloadAction
- type ReloadPolicy
- type RerenderResourceType
- type ScriptConfig
- type ShellTrigger
- type SignalType
- type TPLScriptTrigger
- type ToolConfig
- type ToolsSetup
- type UnixSignalTrigger
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "parameters.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 SchemeGroupVersion = GroupVersion
SchemeGroupVersion is group version used to register these objects.
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type AutoTrigger ¶
type AutoTrigger struct { // The name of the process. // // +optional ProcessName string `json:"processName,omitempty"` }
AutoTrigger automatically perform the reload when specified conditions are met.
func (*AutoTrigger) DeepCopy ¶
func (in *AutoTrigger) DeepCopy() *AutoTrigger
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutoTrigger.
func (*AutoTrigger) DeepCopyInto ¶
func (in *AutoTrigger) DeepCopyInto(out *AutoTrigger)
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 ComponentConfigDescription ¶
type ComponentConfigDescription struct { // Specifies the config file name in the config template. // // +kubebuilder:validation:Required Name string `json:"name"` // Specifies the name of the referenced componentTemplateSpec. // // +optional TemplateName string `json:"templateName"` // Specifies the format of the configuration file and any associated parameters that are specific to the chosen format. // Supported formats include `ini`, `xml`, `yaml`, `json`, `hcl`, `dotenv`, `properties`, and `toml`. // // Each format may have its own set of parameters that can be configured. // For instance, when using the `ini` format, you can specify the section name. // // Example: // “` // fileFormatConfig: // format: ini // iniConfig: // sectionName: mysqld // “` // // +optional FileFormatConfig *FileFormatConfig `json:"fileFormatConfig,omitempty"` // Specifies whether the configuration needs to be re-rendered after v-scale or h-scale operations to reflect changes. // // In some scenarios, the configuration may need to be updated to reflect the changes in resource allocation // or cluster topology. Examples: // // - Redis: adjust maxmemory after v-scale operation. // - MySQL: increase max connections after v-scale operation. // - Zookeeper: update zoo.cfg with new node addresses after h-scale operation. // // +listType=set // +optional ReRenderResourceTypes []RerenderResourceType `json:"reRenderResourceTypes,omitempty"` }
func (*ComponentConfigDescription) DeepCopy ¶
func (in *ComponentConfigDescription) DeepCopy() *ComponentConfigDescription
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentConfigDescription.
func (*ComponentConfigDescription) DeepCopyInto ¶
func (in *ComponentConfigDescription) DeepCopyInto(out *ComponentConfigDescription)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentParameter ¶
type ComponentParameter struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ComponentParameterSpec `json:"spec,omitempty"` Status ComponentParameterStatus `json:"status,omitempty"` }
ComponentParameter is the Schema for the componentparameters API
func (*ComponentParameter) DeepCopy ¶
func (in *ComponentParameter) DeepCopy() *ComponentParameter
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentParameter.
func (*ComponentParameter) DeepCopyInto ¶
func (in *ComponentParameter) DeepCopyInto(out *ComponentParameter)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ComponentParameter) DeepCopyObject ¶
func (in *ComponentParameter) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ComponentParameterList ¶
type ComponentParameterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ComponentParameter `json:"items"` }
ComponentParameterList contains a list of ComponentParameter
func (*ComponentParameterList) DeepCopy ¶
func (in *ComponentParameterList) DeepCopy() *ComponentParameterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentParameterList.
func (*ComponentParameterList) DeepCopyInto ¶
func (in *ComponentParameterList) DeepCopyInto(out *ComponentParameterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ComponentParameterList) DeepCopyObject ¶
func (in *ComponentParameterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ComponentParameterSpec ¶
type ComponentParameterSpec struct { // Specifies the name of the Cluster that this configuration is associated with. // // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.clusterRef" // +optional ClusterName string `json:"clusterName,omitempty"` // Represents the name of the Component that this configuration pertains to. // // +kubebuilder:validation:Required // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.clusterRef" ComponentName string `json:"componentName"` // ConfigItemDetails is an array of ConfigTemplateItemDetail objects. // // Each ConfigTemplateItemDetail corresponds to a configuration template, // which is a ConfigMap that contains multiple configuration files. // Each configuration file is stored as a key-value pair within the ConfigMap. // // The ConfigTemplateItemDetail includes information such as: // // - The configuration template (a ConfigMap) // - The corresponding ConfigConstraint (constraints and validation rules for the configuration) // - Volume mounts (for mounting the configuration files) // // +optional // +patchMergeKey=name // +patchStrategy=merge,retainKeys // +listType=map // +listMapKey=name ConfigItemDetails []ConfigTemplateItemDetail `json:"configItemDetails,omitempty"` }
ComponentParameterSpec defines the desired state of ComponentConfiguration
func (*ComponentParameterSpec) DeepCopy ¶
func (in *ComponentParameterSpec) DeepCopy() *ComponentParameterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentParameterSpec.
func (*ComponentParameterSpec) DeepCopyInto ¶
func (in *ComponentParameterSpec) DeepCopyInto(out *ComponentParameterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentParameterStatus ¶
type ComponentParameterStatus struct { // Provides a description of any abnormal status. // +optional Message string `json:"message,omitempty"` // Indicates the current status of the configuration item. // // Possible values include "Creating", "Init", "Running", "Pending", "Merged", "MergeFailed", "FailedAndPause", // "Upgrading", "Deleting", "FailedAndRetry", "Finished". // // +optional Phase ParameterPhase `json:"phase,omitempty"` // Represents the latest generation observed for this // ClusterDefinition. It corresponds to the ConfigConstraint's generation, which is // updated by the API Server. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` // Provides detailed status information for opsRequest. // +optional // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty"` // Provides the status of each component undergoing reconfiguration. // +patchMergeKey=name // +patchStrategy=merge,retainKeys // +listType=map // +listMapKey=name ConfigurationItemStatus []ConfigTemplateItemDetailStatus `json:"configurationStatus"` }
ComponentParameterStatus defines the observed state of ComponentConfiguration
func (*ComponentParameterStatus) DeepCopy ¶
func (in *ComponentParameterStatus) DeepCopy() *ComponentParameterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentParameterStatus.
func (*ComponentParameterStatus) DeepCopyInto ¶
func (in *ComponentParameterStatus) DeepCopyInto(out *ComponentParameterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentParameters ¶
func (ComponentParameters) DeepCopy ¶
func (in ComponentParameters) DeepCopy() ComponentParameters
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentParameters.
func (ComponentParameters) DeepCopyInto ¶
func (in ComponentParameters) DeepCopyInto(out *ComponentParameters)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentParametersSpec ¶
type ComponentParametersSpec struct { // Specifies the name of the Component. // +kubebuilder:validation:Required ComponentName string `json:"componentName"` // Specifies the user-defined configuration template or parameters. // // +optional Parameters ComponentParameters `json:"parameters,omitempty"` // Specifies the user-defined configuration template. // // When provided, the `importTemplateRef` overrides the default configuration template // specified in `configSpec.templateRef`. // This allows users to customize the configuration template according to their specific requirements. // // +optional CustomTemplates map[string]ConfigTemplateExtension `json:"userConfigTemplates,omitempty"` }
func (*ComponentParametersSpec) DeepCopy ¶
func (in *ComponentParametersSpec) DeepCopy() *ComponentParametersSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentParametersSpec.
func (*ComponentParametersSpec) DeepCopyInto ¶
func (in *ComponentParametersSpec) DeepCopyInto(out *ComponentParametersSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComponentReconfiguringStatus ¶
type ComponentReconfiguringStatus struct { // Specifies the name of the Component. // +kubebuilder:validation:Required ComponentName string `json:"componentName"` // Indicates the current status of the configuration item. // // Possible values include "Creating", "Init", "Running", "Pending", "Merged", "MergeFailed", "FailedAndPause", // "Upgrading", "Deleting", "FailedAndRetry", "Finished". // // +optional Phase ParameterPhase `json:"phase,omitempty"` // Describes the status of the component reconfiguring. // +kubebuilder:validation:Required // +patchMergeKey=name // +patchStrategy=merge,retainKeys // +listType=map // +listMapKey=name ParameterStatus []ReconfiguringStatus `json:"parameterStatus,omitempty"` }
func (*ComponentReconfiguringStatus) DeepCopy ¶
func (in *ComponentReconfiguringStatus) DeepCopy() *ComponentReconfiguringStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentReconfiguringStatus.
func (*ComponentReconfiguringStatus) DeepCopyInto ¶
func (in *ComponentReconfiguringStatus) DeepCopyInto(out *ComponentReconfiguringStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConfigTemplateExtension ¶
type ConfigTemplateExtension struct { // Specifies the name of the referenced configuration template ConfigMap object. // // +kubebuilder:validation:Required // +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$` TemplateRef string `json:"templateRef"` // Specifies the namespace of the referenced configuration template ConfigMap object. // An empty namespace is equivalent to the "default" namespace. // // +kubebuilder:default="default" // +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\-]*[a-z0-9])?$` // +optional Namespace string `json:"namespace,omitempty"` // Defines the strategy for merging externally imported templates into component templates. // // +kubebuilder:default="none" // +optional Policy MergedPolicy `json:"policy,omitempty"` }
func (*ConfigTemplateExtension) DeepCopy ¶
func (in *ConfigTemplateExtension) DeepCopy() *ConfigTemplateExtension
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigTemplateExtension.
func (*ConfigTemplateExtension) DeepCopyInto ¶
func (in *ConfigTemplateExtension) DeepCopyInto(out *ConfigTemplateExtension)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConfigTemplateItemDetail ¶
type ConfigTemplateItemDetail struct { // Defines the unique identifier of the configuration template. // // It must be a string of maximum 63 characters, and can only include lowercase alphanumeric characters, // hyphens, and periods. // The name must start and end with an alphanumeric character. // // +kubebuilder:validation:Required // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$` Name string `json:"name"` // External controllers can trigger a configuration rerender by modifying this field. // // Note: Currently, the `payload` field is opaque and its content is not interpreted by the system. // Modifying this field will cause a rerender, regardless of the specific content of this field. // // +kubebuilder:validation:Schemaless // +kubebuilder:pruning:PreserveUnknownFields // +kubebuilder:validation:Type=object // +optional Payload Payload `json:"payload,omitempty"` // Specifies the name of the configuration template (a ConfigMap), ConfigConstraint, and other miscellaneous options. // // The configuration template is a ConfigMap that contains multiple configuration files. // Each configuration file is stored as a key-value pair within the ConfigMap. // // ConfigConstraint allows defining constraints and validation rules for configuration parameters. // It ensures that the configuration adheres to certain requirements and limitations. // // +optional ConfigSpec *appsv1.ComponentFileTemplate `json:"configSpec,omitempty"` // Specifies the user-defined configuration template. // // When provided, the `importTemplateRef` overrides the default configuration template // specified in `configSpec.templateRef`. // This allows users to customize the configuration template according to their specific requirements. // // +optional CustomTemplates *ConfigTemplateExtension `json:"userConfigTemplates,omitempty"` // Specifies the user-defined configuration parameters. // // When provided, the parameter values in `configFileParams` override the default configuration parameters. // This allows users to override the default configuration according to their specific needs. // // +optional ConfigFileParams map[string]ParametersInFile `json:"configFileParams,omitempty"` }
ConfigTemplateItemDetail corresponds to settings of a configuration template (a ConfigMap).
func (*ConfigTemplateItemDetail) DeepCopy ¶
func (in *ConfigTemplateItemDetail) DeepCopy() *ConfigTemplateItemDetail
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigTemplateItemDetail.
func (*ConfigTemplateItemDetail) DeepCopyInto ¶
func (in *ConfigTemplateItemDetail) DeepCopyInto(out *ConfigTemplateItemDetail)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConfigTemplateItemDetailStatus ¶
type ConfigTemplateItemDetailStatus struct { // Specifies the name of the configuration template. It is a required field and must be a string of maximum 63 characters. // The name should only contain lowercase alphanumeric characters, hyphens, or periods. It should start and end with an alphanumeric character. // // +kubebuilder:validation:Required // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$` Name string `json:"name"` // Indicates the current status of the configuration item. // // Possible values include "Creating", "Init", "Running", "Pending", "Merged", "MergeFailed", "FailedAndPause", // "Upgrading", "Deleting", "FailedAndRetry", "Finished". // // +optional Phase ParameterPhase `json:"phase,omitempty"` // Represents the last completed revision of the configuration item. This field is optional. // // +optional LastDoneRevision string `json:"lastDoneRevision,omitempty"` // Represents the updated revision of the configuration item. This field is optional. // // +optional UpdateRevision string `json:"updateRevision,omitempty"` // Provides a description of any abnormal status. This field is optional. // // +optional Message *string `json:"message,omitempty"` // Provides detailed information about the execution of the configuration change. This field is optional. // // +optional ReconcileDetail *ReconcileDetail `json:"reconcileDetail,omitempty"` }
func (*ConfigTemplateItemDetailStatus) DeepCopy ¶
func (in *ConfigTemplateItemDetailStatus) DeepCopy() *ConfigTemplateItemDetailStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigTemplateItemDetailStatus.
func (*ConfigTemplateItemDetailStatus) DeepCopyInto ¶
func (in *ConfigTemplateItemDetailStatus) DeepCopyInto(out *ConfigTemplateItemDetailStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DownwardAPIChangeTriggeredAction ¶
type DownwardAPIChangeTriggeredAction struct { // Specifies the name of the field. It must be a string of maximum length 63. // The name should match the regex pattern `^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$`. // // +kubebuilder:validation:Required // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$` Name string `json:"name"` // Specifies the mount point of the Downward API volume. // // +kubebuilder:validation:Required // +kubebuilder:validation:MaxLength=128 MountPoint string `json:"mountPoint"` // Represents a list of files under the Downward API volume. // // +kubebuilder:validation:Required Items []corev1.DownwardAPIVolumeFile `json:"items"` // Specifies the command to be triggered when changes are detected in Downward API volume files. // It relies on the inotify mechanism in the config-manager sidecar to monitor file changes. // // +optional Command []string `json:"command,omitempty"` // ScriptConfig object specifies a ConfigMap that contains script files that should be mounted inside the pod. // The scripts are mounted as volumes and can be referenced and executed by the DownwardAction to perform specific tasks or configurations. // // +optional ScriptConfig *ScriptConfig `json:"scriptConfig,omitempty"` }
DownwardAPIChangeTriggeredAction defines an action that triggers specific commands in response to changes in Pod labels. For example, a command might be executed when the 'role' label of the Pod is updated.
func (*DownwardAPIChangeTriggeredAction) DeepCopy ¶
func (in *DownwardAPIChangeTriggeredAction) DeepCopy() *DownwardAPIChangeTriggeredAction
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DownwardAPIChangeTriggeredAction.
func (*DownwardAPIChangeTriggeredAction) DeepCopyInto ¶
func (in *DownwardAPIChangeTriggeredAction) DeepCopyInto(out *DownwardAPIChangeTriggeredAction)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DynamicParameterSelectedPolicy ¶
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 DynamicReloadType ¶
type DynamicReloadType string
DynamicReloadType defines reload method. +enum
const ( UnixSignalType DynamicReloadType = "signal" SQLType DynamicReloadType = "sql" ShellType DynamicReloadType = "exec" HTTPType DynamicReloadType = "http" TPLScriptType DynamicReloadType = "tpl" AutoType DynamicReloadType = "auto" )
type FileFormatConfig ¶
type FileFormatConfig struct { // Each format may have its own set of parameters that can be configured. // For instance, when using the `ini` format, you can specify the section name. // // +optional FormatterAction `json:",inline"` // The config file format. Valid values are `ini`, `xml`, `yaml`, `json`, // `hcl`, `dotenv`, `properties` and `toml`. Each format has its own characteristics and use cases. // // - ini: is 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: refers to wiki: https://en.wikipedia.org/wiki/XML // - yaml: supports for complex data types and structures. // - json: refers to 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: is 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: refers to wiki: https://en.wikipedia.org/wiki/TOML // - props-plus: a file extension mainly used in Java, supports CamelCase(e.g: brokerMaxConnectionsPerIp) // // +kubebuilder:validation:Required Format CfgFileFormat `json:"format"` }
FileFormatConfig specifies the format of the configuration file and any associated parameters that are specific to the chosen format.
func (*FileFormatConfig) DeepCopy ¶
func (in *FileFormatConfig) DeepCopy() *FileFormatConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FileFormatConfig.
func (*FileFormatConfig) DeepCopyInto ¶
func (in *FileFormatConfig) DeepCopyInto(out *FileFormatConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FormatterAction ¶
type FormatterAction struct { // Holds options specific to the 'ini' file format. // // +optional IniConfig *IniConfig `json:"iniConfig,omitempty"` }
FormatterAction configures format-specific options for different configuration file format. Note: Only one of its members should be specified at any given time.
func (*FormatterAction) DeepCopy ¶
func (in *FormatterAction) DeepCopy() *FormatterAction
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FormatterAction.
func (*FormatterAction) DeepCopyInto ¶
func (in *FormatterAction) DeepCopyInto(out *FormatterAction)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IniConfig ¶
type IniConfig struct { // A string that describes the name of the ini section. // // +optional SectionName string `json:"sectionName,omitempty"` }
IniConfig holds options specific to the 'ini' file format.
func (*IniConfig) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IniConfig.
func (*IniConfig) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MergedPolicy ¶
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 ParamConfigRenderer ¶
type ParamConfigRenderer struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ParamConfigRendererSpec `json:"spec,omitempty"` Status ParamConfigRendererStatus `json:"status,omitempty"` }
ParamConfigRenderer is the Schema for the paramconfigrenderers API
func (*ParamConfigRenderer) DeepCopy ¶
func (in *ParamConfigRenderer) DeepCopy() *ParamConfigRenderer
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParamConfigRenderer.
func (*ParamConfigRenderer) DeepCopyInto ¶
func (in *ParamConfigRenderer) DeepCopyInto(out *ParamConfigRenderer)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ParamConfigRenderer) DeepCopyObject ¶
func (in *ParamConfigRenderer) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ParamConfigRendererList ¶
type ParamConfigRendererList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ParamConfigRenderer `json:"items"` }
ParamConfigRendererList contains a list of ParamConfigRenderer
func (*ParamConfigRendererList) DeepCopy ¶
func (in *ParamConfigRendererList) DeepCopy() *ParamConfigRendererList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParamConfigRendererList.
func (*ParamConfigRendererList) DeepCopyInto ¶
func (in *ParamConfigRendererList) DeepCopyInto(out *ParamConfigRendererList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ParamConfigRendererList) DeepCopyObject ¶
func (in *ParamConfigRendererList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ParamConfigRendererSpec ¶
type ParamConfigRendererSpec struct { // Specifies the ComponentDefinition custom resource (CR) that defines the Component's characteristics and behavior. // // +kubebuilder:validation:Required ComponentDef string `json:"componentDef"` // ServiceVersion specifies the version of the Service expected to be provisioned by this Component. // The version should follow the syntax and semantics of the "Semantic Versioning" specification (http://semver.org/). // If no version is specified, the latest available version will be used. // // +optional ServiceVersion string `json:"serviceVersion,omitempty"` // Specifies the ParametersDefinition custom resource (CR) that defines the Component parameter's schema and behavior. // // +optional ParametersDefs []string `json:"parametersDefs,omitempty"` // Specifies the configuration files. // // +patchMergeKey=name // +patchStrategy=merge,retainKeys // +listType=map // +listMapKey=name // +optional Configs []ComponentConfigDescription `json:"configs,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name"` }
ParamConfigRendererSpec defines the desired state of ParamConfigRenderer
func (*ParamConfigRendererSpec) DeepCopy ¶
func (in *ParamConfigRendererSpec) DeepCopy() *ParamConfigRendererSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParamConfigRendererSpec.
func (*ParamConfigRendererSpec) DeepCopyInto ¶
func (in *ParamConfigRendererSpec) DeepCopyInto(out *ParamConfigRendererSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ParamConfigRendererStatus ¶
type ParamConfigRendererStatus struct { // The most recent generation number of the ParamsDesc object that has been observed by the controller. // // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` // Provides additional information about the current phase. // // +optional Message string `json:"message,omitempty"` // Specifies the status of the configuration template. // When set to PDAvailablePhase, the ParamsDesc can be referenced by ComponentDefinition. // // +optional Phase ParametersDescPhase `json:"phase,omitempty"` }
ParamConfigRendererStatus defines the observed state of ParamConfigRenderer
func (*ParamConfigRendererStatus) DeepCopy ¶
func (in *ParamConfigRendererStatus) DeepCopy() *ParamConfigRendererStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParamConfigRendererStatus.
func (*ParamConfigRendererStatus) DeepCopyInto ¶
func (in *ParamConfigRendererStatus) DeepCopyInto(out *ParamConfigRendererStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Parameter ¶
type Parameter struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ParameterSpec `json:"spec,omitempty"` Status ParameterStatus `json:"status,omitempty"` }
Parameter is the Schema for the parameters API
func (*Parameter) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Parameter.
func (*Parameter) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Parameter) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ParameterDeletedMethod ¶
type ParameterDeletedMethod string
ParameterDeletedMethod defines how to handle parameter remove +enum +kubebuilder:validation:Enum={RestoreToDefault, Reset}
const ( PDPDefault ParameterDeletedMethod = "RestoreToDefault" PDPReset ParameterDeletedMethod = "Reset" )
type ParameterDeletedPolicy ¶
type ParameterDeletedPolicy struct { // Specifies the method to handle the deletion of a parameter. // If set to "RestoreToDefault", the parameter will be restored to its default value, // which requires engine support, such as pg. // If set to "Reset", the parameter will be re-rendered through the configuration template. // // +kubebuilder:validation:Required DeletedMethod ParameterDeletedMethod `json:"deletedMethod"` // Specifies the value to use if DeletedMethod is RestoreToDefault. // Example: pg // SET configuration_parameter TO DEFAULT; // // +optional DefaultValue *string `json:"defaultValue,omitempty"` }
func (*ParameterDeletedPolicy) DeepCopy ¶
func (in *ParameterDeletedPolicy) DeepCopy() *ParameterDeletedPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParameterDeletedPolicy.
func (*ParameterDeletedPolicy) DeepCopyInto ¶
func (in *ParameterDeletedPolicy) DeepCopyInto(out *ParameterDeletedPolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ParameterList ¶
type ParameterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Parameter `json:"items"` }
ParameterList contains a list of Parameter
func (*ParameterList) DeepCopy ¶
func (in *ParameterList) DeepCopy() *ParameterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParameterList.
func (*ParameterList) DeepCopyInto ¶
func (in *ParameterList) DeepCopyInto(out *ParameterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ParameterList) DeepCopyObject ¶
func (in *ParameterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ParameterPhase ¶
type ParameterPhase string
ParameterPhase defines the Configuration FSM phase +enum +kubebuilder:validation:Enum={Creating,Init,Running,Pending,Merged,MergeFailed,FailedAndPause,Upgrading,Deleting,FailedAndRetry,Finished}
const ( CCreatingPhase ParameterPhase = "Creating" CInitPhase ParameterPhase = "Init" CRunningPhase ParameterPhase = "Running" CPendingPhase ParameterPhase = "Pending" CFailedPhase ParameterPhase = "FailedAndRetry" CFailedAndPausePhase ParameterPhase = "FailedAndPause" CMergedPhase ParameterPhase = "Merged" CMergeFailedPhase ParameterPhase = "MergeFailed" CDeletingPhase ParameterPhase = "Deleting" CUpgradingPhase ParameterPhase = "Upgrading" CFinishedPhase ParameterPhase = "Finished" )
type ParameterSpec ¶
type ParameterSpec struct { // Specifies the name of the Cluster resource that this operation is targeting. // // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.clusterName" ClusterName string `json:"clusterName,omitempty"` // Lists ComponentParametersSpec objects, each specifying a Component and its parameters and template updates. // // +kubebuilder:validation:Required ComponentParameters []ComponentParametersSpec `json:"componentParameters"` }
ParameterSpec defines the desired state of Parameter
func (*ParameterSpec) DeepCopy ¶
func (in *ParameterSpec) DeepCopy() *ParameterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParameterSpec.
func (*ParameterSpec) DeepCopyInto ¶
func (in *ParameterSpec) DeepCopyInto(out *ParameterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ParameterStatus ¶
type ParameterStatus struct { // Provides a description of any abnormal status. // +optional Message string `json:"message,omitempty"` // Indicates the current status of the configuration item. // // Possible values include "Creating", "Init", "Running", "Pending", "Merged", "MergeFailed", "FailedAndPause", // "Upgrading", "Deleting", "FailedAndRetry", "Finished". // // +optional Phase ParameterPhase `json:"phase,omitempty"` // Represents the latest generation observed for this // ClusterDefinition. It corresponds to the ConfigConstraint's generation, which is // updated by the API Server. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` // Records the status of a reconfiguring operation if `opsRequest.spec.type` equals to "Reconfiguring". // +optional ReconfiguringStatus []ComponentReconfiguringStatus `json:"componentReconfiguringStatus"` }
ParameterStatus defines the observed state of Parameter
func (*ParameterStatus) DeepCopy ¶
func (in *ParameterStatus) DeepCopy() *ParameterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParameterStatus.
func (*ParameterStatus) DeepCopyInto ¶
func (in *ParameterStatus) DeepCopyInto(out *ParameterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ParametersDefinition ¶
type ParametersDefinition struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ParametersDefinitionSpec `json:"spec,omitempty"` Status ParametersDefinitionStatus `json:"status,omitempty"` }
ParametersDefinition is the Schema for the parametersdefinitions API
func (*ParametersDefinition) DeepCopy ¶
func (in *ParametersDefinition) DeepCopy() *ParametersDefinition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParametersDefinition.
func (*ParametersDefinition) DeepCopyInto ¶
func (in *ParametersDefinition) DeepCopyInto(out *ParametersDefinition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ParametersDefinition) DeepCopyObject ¶
func (in *ParametersDefinition) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ParametersDefinitionList ¶
type ParametersDefinitionList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ParametersDefinition `json:"items"` }
ParametersDefinitionList contains a list of ParametersDefinition
func (*ParametersDefinitionList) DeepCopy ¶
func (in *ParametersDefinitionList) DeepCopy() *ParametersDefinitionList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParametersDefinitionList.
func (*ParametersDefinitionList) DeepCopyInto ¶
func (in *ParametersDefinitionList) DeepCopyInto(out *ParametersDefinitionList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ParametersDefinitionList) DeepCopyObject ¶
func (in *ParametersDefinitionList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ParametersDefinitionSpec ¶
type ParametersDefinitionSpec struct { // Specifies the config file name in the config template. // // +optional FileName string `json:"fileName,omitempty"` // Defines a list of parameters including their names, default values, descriptions, // types, and constraints (permissible values or the range of valid values). // // +optional ParametersSchema *ParametersSchema `json:"parametersSchema,omitempty"` // Specifies the dynamic reload (dynamic reconfiguration) actions supported by the engine. // When set, the controller executes the scripts defined in these actions to handle dynamic parameter updates. // // Dynamic reloading is triggered only if both of the following conditions are met: // // 1. The modified parameters are listed in the `dynamicParameters` field. // If `dynamicParameterSelectedPolicy` is set to "all", modifications to `staticParameters` // can also trigger a reload. // 2. `reloadAction` is set. // // If `reloadAction` is not set or the modified parameters are not listed in `dynamicParameters`, // dynamic reloading will not be triggered. // // Example: // “`yaml // dynamicReloadAction: // tplScriptTrigger: // namespace: kb-system // scriptConfigMapRef: mysql-reload-script // sync: true // “` // // +optional ReloadAction *ReloadAction `json:"reloadAction,omitempty"` // TODO: migrate DownwardAPITriggeredActions to ComponentDefinition.spec.lifecycleActions // Specifies a list of actions to execute specified commands based on Pod labels. // // It utilizes the K8s Downward API to mount label information as a volume into the pod. // The 'config-manager' sidecar container watches for changes in the role label and dynamically invoke // registered commands (usually execute some SQL statements) when a change is detected. // // It is designed for scenarios where: // // - Replicas with different roles have different configurations, such as Redis primary & secondary replicas. // - After a role switch (e.g., from secondary to primary), some changes in configuration are needed // to reflect the new role. // // +optional DownwardAPIChangeTriggeredActions []DownwardAPIChangeTriggeredAction `json:"downwardAPIChangeTriggeredActions,omitempty"` // Specifies the policy when parameter be removed. // // +optional ParameterDeletedPolicy *ParameterDeletedPolicy `json:"deletedPolicy,omitempty"` // Indicates whether to consolidate dynamic reload and restart actions into a single restart. // // - If true, updates requiring both actions will result in only a restart, merging the actions. // - If false, updates will trigger both actions executed sequentially: first dynamic reload, then restart. // // This flag allows for more efficient handling of configuration changes by potentially eliminating // an unnecessary reload step. // // +optional MergeReloadAndRestart *bool `json:"mergeReloadAndRestart,omitempty"` // Configures whether the dynamic reload specified in `reloadAction` applies only to dynamic parameters or // to all parameters (including static parameters). // // - false (default): Only modifications to the dynamic parameters listed in `dynamicParameters` // will trigger a dynamic reload. // - true: Modifications to both dynamic parameters listed in `dynamicParameters` and static parameters // listed in `staticParameters` will trigger a dynamic reload. // The "all" option is for certain engines that require static parameters to be set // via SQL statements before they can take effect on restart. // // +optional ReloadStaticParamsBeforeRestart *bool `json:"reloadStaticParamsBeforeRestart,omitempty"` // List static parameters. // Modifications to any of these parameters require a restart of the process to take effect. // // +listType=set // +optional StaticParameters []string `json:"staticParameters,omitempty"` // List dynamic parameters. // Modifications to these parameters trigger a configuration reload without requiring a process restart. // // +listType=set // +optional DynamicParameters []string `json:"dynamicParameters,omitempty"` // Lists the parameters that cannot be modified once set. // Attempting to change any of these parameters will be ignored. // // +listType=set // +optional ImmutableParameters []string `json:"immutableParameters,omitempty"` }
ParametersDefinitionSpec defines the desired state of ParametersDefinition
func (*ParametersDefinitionSpec) DeepCopy ¶
func (in *ParametersDefinitionSpec) DeepCopy() *ParametersDefinitionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParametersDefinitionSpec.
func (*ParametersDefinitionSpec) DeepCopyInto ¶
func (in *ParametersDefinitionSpec) DeepCopyInto(out *ParametersDefinitionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ParametersDefinitionStatus ¶
type ParametersDefinitionStatus struct { // The most recent generation number of the ParamsDesc object that has been observed by the controller. // // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` // Specifies the status of the configuration template. // When set to PDAvailablePhase, the ParamsDesc can be referenced by ComponentDefinition. // // +optional Phase ParametersDescPhase `json:"phase,omitempty"` // Represents a list of detailed status of the ParametersDescription object. // // This field is crucial for administrators and developers to monitor and respond to changes within the ParametersDescription. // It provides a history of state transitions and a snapshot of the current state that can be used for // automated logic or direct inspection. // // +optional Conditions []metav1.Condition `json:"conditions,omitempty"` }
ParametersDefinitionStatus defines the observed state of ParametersDefinition
func (*ParametersDefinitionStatus) DeepCopy ¶
func (in *ParametersDefinitionStatus) DeepCopy() *ParametersDefinitionStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParametersDefinitionStatus.
func (*ParametersDefinitionStatus) DeepCopyInto ¶
func (in *ParametersDefinitionStatus) DeepCopyInto(out *ParametersDefinitionStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ParametersDescPhase ¶
type ParametersDescPhase string
ParametersDescPhase defines the ParametersDescription CR .status.phase +enum +kubebuilder:validation:Enum={Available,Unavailable, Deleting}
const ( PDAvailablePhase ParametersDescPhase = "Available" PDDeletingPhase ParametersDescPhase = "Deleting" )
type ParametersInFile ¶
type ParametersInFile struct { // Holds the configuration keys and values. This field is a workaround for issues found in kubebuilder and code-generator. // Refer to https://github.com/kubernetes-sigs/kubebuilder/issues/528 and https://github.com/kubernetes/code-generator/issues/50 for more details. // // Represents the content of the configuration file. // // +optional Content *string `json:"content"` // Represents the updated parameters for a single configuration file. // // +optional Parameters map[string]*string `json:"parameters,omitempty"` }
func (*ParametersInFile) DeepCopy ¶
func (in *ParametersInFile) DeepCopy() *ParametersInFile
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParametersInFile.
func (*ParametersInFile) DeepCopyInto ¶
func (in *ParametersInFile) DeepCopyInto(out *ParametersInFile)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ParametersSchema ¶
type ParametersSchema struct { // Specifies the top-level key in the 'configSchema.cue' that organizes the validation rules for parameters. // This key must exist within the CUE script defined in 'configSchema.cue'. // // +optional TopLevelKey string `json:"topLevelKey,omitempty"` // Hold a string that contains a script written in CUE language that defines a list of configuration items. // Each item is detailed with its name, default value, description, type (e.g. string, integer, float), // and constraints (permissible values or the valid range of values). // // CUE (Configure, Unify, Execute) is a declarative language designed for defining and validating // complex data configurations. // It is particularly useful in environments like K8s where complex configurations and validation rules are common. // // This script functions as a validator for user-provided configurations, ensuring compliance with // the established specifications and constraints. // // +optional CUE string `json:"cue,omitempty"` // Generated from the 'cue' field and transformed into a JSON format. // // +kubebuilder:validation:Schemaless // +kubebuilder:validation:ComponentDefRef=object // +kubebuilder:pruning:PreserveUnknownFields SchemaInJSON *apiext.JSONSchemaProps `json:"schemaInJSON,omitempty"` }
ParametersSchema Defines a list of configuration items with their names, default values, descriptions, types, and constraints.
func (*ParametersSchema) DeepCopy ¶
func (in *ParametersSchema) DeepCopy() *ParametersSchema
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParametersSchema.
func (*ParametersSchema) DeepCopyInto ¶
func (in *ParametersSchema) DeepCopyInto(out *ParametersSchema)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Payload ¶
type Payload map[string]json.RawMessage
Payload holds the payload data. This field is optional and can contain any type of data. Not included in the JSON representation of the object.
func (Payload) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Payload.
func (Payload) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReconcileDetail ¶
type ReconcileDetail struct { // Represents the policy applied during the most recent execution. // // +optional Policy string `json:"policy"` // Represents the outcome of the most recent execution. // // +optional ExecResult string `json:"execResult"` // Represents the current revision of the configuration item. // // +optional CurrentRevision string `json:"currentRevision,omitempty"` // Represents the number of pods where configuration changes were successfully applied. // // +kubebuilder:default=-1 // +optional SucceedCount int32 `json:"succeedCount,omitempty"` // Represents the total number of pods that require execution of configuration changes. // // +kubebuilder:default=-1 // +optional ExpectedCount int32 `json:"expectedCount,omitempty"` // Represents the error message generated when the execution of configuration changes fails. // // +optional ErrMessage string `json:"errMessage,omitempty"` }
func (*ReconcileDetail) DeepCopy ¶
func (in *ReconcileDetail) DeepCopy() *ReconcileDetail
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReconcileDetail.
func (*ReconcileDetail) DeepCopyInto ¶
func (in *ReconcileDetail) DeepCopyInto(out *ReconcileDetail)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReconfiguringStatus ¶
type ReconfiguringStatus struct { ConfigTemplateItemDetailStatus `json:",inline"` // Contains the updated parameters. // // +optional UpdatedParameters map[string]ParametersInFile `json:"updatedParameters,omitempty"` // Specifies the user-defined configuration template. // // When provided, the `importTemplateRef` overrides the default configuration template // specified in `configSpec.templateRef`. // This allows users to customize the configuration template according to their specific requirements. // // +optional CustomTemplate *ConfigTemplateExtension `json:"userConfigTemplates,omitempty"` }
func (*ReconfiguringStatus) DeepCopy ¶
func (in *ReconfiguringStatus) DeepCopy() *ReconfiguringStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReconfiguringStatus.
func (*ReconfiguringStatus) DeepCopyInto ¶
func (in *ReconfiguringStatus) DeepCopyInto(out *ReconfiguringStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReloadAction ¶
type ReloadAction struct { // Used to trigger a reload by sending a specific Unix signal to the process. // // +optional UnixSignalTrigger *UnixSignalTrigger `json:"unixSignalTrigger,omitempty"` // Allows to execute a custom shell script to reload the process. // // +optional ShellTrigger *ShellTrigger `json:"shellTrigger,omitempty"` // Enables reloading process using a Go template script. // // +optional TPLScriptTrigger *TPLScriptTrigger `json:"tplScriptTrigger"` // Automatically perform the reload when specified conditions are met. // // +optional AutoTrigger *AutoTrigger `json:"autoTrigger,omitempty"` // Used to match labels on the pod to determine whether a dynamic reload should be performed. // // In some scenarios, only specific pods (e.g., primary replicas) need to undergo a dynamic reload. // The `reloadedPodSelector` allows you to specify label selectors to target the desired pods for the reload process. // // If the `reloadedPodSelector` is not specified or is nil, all pods managed by the workload will be considered for the dynamic // reload. // // +optional TargetPodSelector *metav1.LabelSelector `json:"targetPodSelector,omitempty"` }
ReloadAction defines the mechanisms available for dynamically reloading a process within K8s without requiring a restart.
Only one of the mechanisms can be specified at a time.
func (*ReloadAction) DeepCopy ¶
func (in *ReloadAction) DeepCopy() *ReloadAction
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReloadAction.
func (*ReloadAction) DeepCopyInto ¶
func (in *ReloadAction) DeepCopyInto(out *ReloadAction)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReloadPolicy ¶
type ReloadPolicy string
ReloadPolicy defines the policy of reconfiguring. +enum +kubebuilder:validation:Enum={none,restart,rolling,asyncReload,syncReload,dynamicReloadBeginRestart}
const ( NonePolicy ReloadPolicy = "none" RestartPolicy ReloadPolicy = "restart" RestartContainerPolicy ReloadPolicy = "restartContainer" RollingPolicy ReloadPolicy = "rolling" AsyncDynamicReloadPolicy ReloadPolicy = "asyncReload" SyncDynamicReloadPolicy ReloadPolicy = "syncReload" DynamicReloadAndRestartPolicy ReloadPolicy = "dynamicReloadBeginRestart" )
type RerenderResourceType ¶
type RerenderResourceType string
RerenderResourceType defines the resource requirements for a component. +enum +kubebuilder:validation:Enum={vscale,hscale,tls,shardingHScale}
const ( ComponentVScaleType RerenderResourceType = "vscale" ComponentHScaleType RerenderResourceType = "hscale" ComponentTLSType RerenderResourceType = "tls" ShardingComponentHScaleType RerenderResourceType = "shardingHScale" )
type ScriptConfig ¶
type ScriptConfig struct { // Specifies the reference to the ConfigMap containing the scripts. // // +kubebuilder:validation:Required ScriptConfigMapRef string `json:"scriptConfigMapRef"` // Specifies the namespace for the ConfigMap. // If not specified, it defaults 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 ¶
func (in *ScriptConfig) DeepCopy() *ScriptConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScriptConfig.
func (*ScriptConfig) DeepCopyInto ¶
func (in *ScriptConfig) DeepCopyInto(out *ScriptConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ShellTrigger ¶
type ShellTrigger struct { // Specifies the command to execute in order to reload the process. It should be a valid shell command. // // +kubebuilder:validation:Required Command []string `json:"command"` // Determines the synchronization mode of parameter updates with "config-manager". // // - 'True': Executes reload actions synchronously, pausing until completion. // - 'False': Executes reload actions asynchronously, without waiting for completion. // // +optional Sync *bool `json:"sync,omitempty"` // Controls whether parameter updates are processed individually or collectively in a batch: // // - 'True': Processes all changes in one batch reload. // - 'False': Processes each change individually. // // Defaults to 'False' if unspecified. // // +optional BatchReload *bool `json:"batchReload,omitempty"` // Specifies a Go template string for formatting batch input data. // It's used when `batchReload` is 'True' to format data passed into STDIN of the script. // The template accesses key-value pairs of updated parameters via the '$' variable. // This allows for custom formatting of the input data. // // Example template: // // “`yaml // batchParamsFormatterTemplate: |- // {{- range $pKey, $pValue := $ }} // {{ printf "%s:%s" $pKey $pValue }} // {{- end }} // “` // // This example generates batch input data in a key:value format, sorted by keys. // “` // key1:value1 // key2:value2 // key3:value3 // “` // // If not specified, the default format is key=value, sorted by keys, for each updated parameter. // “` // key1=value1 // key2=value2 // key3=value3 // “` // // +optional BatchParamsFormatterTemplate string `json:"batchParamsFormatterTemplate,omitempty"` // Specifies the tools container image used by ShellTrigger for dynamic reload. // If the dynamic reload action is triggered by a ShellTrigger, this field is required. // This image must contain all necessary tools for executing the ShellTrigger scripts. // // Usually the specified image is referenced by the init container, // which is then responsible for copy the tools from the image to a bin volume. // This ensures that the tools are available to the 'config-manager' sidecar. // // +optional ToolsSetup *ToolsSetup `json:"toolsSetup,omitempty"` // ScriptConfig object specifies a ConfigMap that contains script files that should be mounted inside the pod. // The scripts are mounted as volumes and can be referenced and executed by the dynamic reload. // // +optional ScriptConfig *ScriptConfig `json:"scriptConfig,omitempty"` }
ShellTrigger allows to execute a custom shell script to reload the process.
func (*ShellTrigger) DeepCopy ¶
func (in *ShellTrigger) DeepCopy() *ShellTrigger
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShellTrigger.
func (*ShellTrigger) DeepCopyInto ¶
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 TPLScriptTrigger ¶
type TPLScriptTrigger struct { // Specifies the ConfigMap that contains the script to be executed for reload. // ScriptConfig `json:",inline"` // Determines whether parameter updates should be synchronized with the "config-manager". // Specifies the controller's reload strategy: // // - If set to 'True', the controller executes the reload action in synchronous mode, // pausing execution until the reload completes. // - If set to 'False', the controller executes the reload action in asynchronous mode, // updating the ConfigMap without waiting for the reload process to finish. // // +optional Sync *bool `json:"sync,omitempty"` }
TPLScriptTrigger Enables reloading process using a Go template script.
func (*TPLScriptTrigger) DeepCopy ¶
func (in *TPLScriptTrigger) DeepCopy() *TPLScriptTrigger
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TPLScriptTrigger.
func (*TPLScriptTrigger) DeepCopyInto ¶
func (in *TPLScriptTrigger) DeepCopyInto(out *TPLScriptTrigger)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ToolConfig ¶
type ToolConfig struct { // Specifies the name of the init container. // // +kubebuilder:validation:Required // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:Pattern:=`^[a-z]([a-z0-9\-]*[a-z0-9])?$` Name string `json:"name,omitempty"` // Indicates whether the tool image should be used as the container image for a sidecar. // This is useful for large tool images, such as those for C++ tools, which may depend on // numerous libraries (e.g., *.so files). // // If enabled, the tool image is deployed as a sidecar container image. // // Examples: // “`yaml // toolsSetup:: // mountPoint: /kb_tools // toolConfigs: // - name: kb-tools // asContainerImage: true // image: apecloud/oceanbase:4.2.0.0-100010032023083021 // “` // // generated containers: // “`yaml // initContainers: // - name: install-config-manager-tool // image: apecloud/kubeblocks-tools:${version} // command: // - cp // - /bin/config_render // - /opt/tools // volumemounts: // - name: kb-tools // mountpath: /opt/tools // // containers: // - name: config-manager // image: apecloud/oceanbase:4.2.0.0-100010032023083021 // imagePullPolicy: IfNotPresent // command: // - /opt/tools/reloader // - --log-level // - info // - --operator-update-enable // - --tcp // - "9901" // - --config // - /opt/config-manager/config-manager.yaml // volumemounts: // - name: kb-tools // mountpath: /opt/tools // “` // // +optional AsContainerImage *bool `json:"asContainerImage,omitempty"` // Specifies the tool container image. // // +optional Image string `json:"image,omitempty"` // Specifies the command to be executed by the init container. // // +optional Command []string `json:"command,omitempty"` }
ToolConfig specifies the settings of an init container that prepare tools for dynamic reload.
func (*ToolConfig) DeepCopy ¶
func (in *ToolConfig) DeepCopy() *ToolConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ToolConfig.
func (*ToolConfig) DeepCopyInto ¶
func (in *ToolConfig) DeepCopyInto(out *ToolConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ToolsSetup ¶
type ToolsSetup struct { // Specifies the directory path in the container where the tools-related files are to be copied. // This field is typically used with an emptyDir volume to ensure a temporary, empty directory is provided at pod creation. // // +kubebuilder:validation:Required // +kubebuilder:validation:MaxLength=128 MountPoint string `json:"mountPoint"` // Specifies a list of settings of init containers that prepare tools for dynamic reload. // // +optional ToolConfigs []ToolConfig `json:"toolConfigs,omitempty"` }
ToolsSetup prepares the tools for dynamic reloads used in ShellTrigger from a specified container image.
Example: ```yaml
toolsSetup: mountPoint: /kb_tools toolConfigs: - name: kb-tools command: - cp - /bin/ob-tools - /kb_tools/obtools image: docker.io/apecloud/obtools
``` This example copies the "/bin/ob-tools" binary from the image to "/kb_tools/obtools".
func (*ToolsSetup) DeepCopy ¶
func (in *ToolsSetup) DeepCopy() *ToolsSetup
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ToolsSetup.
func (*ToolsSetup) DeepCopyInto ¶
func (in *ToolsSetup) DeepCopyInto(out *ToolsSetup)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UnixSignalTrigger ¶
type UnixSignalTrigger struct { // Specifies a valid Unix signal to be sent. // For a comprehensive list of all Unix signals, see: ../../pkg/configuration/configmap/handler.go:allUnixSignals // // +kubebuilder:validation:Required Signal SignalType `json:"signal"` // Identifies the name of the process to which the Unix signal will be sent. // // +kubebuilder:validation:Required ProcessName string `json:"processName"` }
UnixSignalTrigger is used to trigger a reload by sending a specific Unix signal to the process.
func (*UnixSignalTrigger) DeepCopy ¶
func (in *UnixSignalTrigger) DeepCopy() *UnixSignalTrigger
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UnixSignalTrigger.
func (*UnixSignalTrigger) DeepCopyInto ¶
func (in *UnixSignalTrigger) DeepCopyInto(out *UnixSignalTrigger)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.