Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the rds v1alpha1 API group +kubebuilder:object:generate=true +groupName=rds.valkey.buf.red
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "rds.valkey.buf.red", 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 )
Functions ¶
This section is empty.
Types ¶
type Valkey ¶
type Valkey struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ValkeySpec `json:"spec,omitempty"`
Status ValkeyStatus `json:"status,omitempty"`
}
Valkey is the Schema for the valkeys API
func (*Valkey) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Valkey.
func (*Valkey) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Valkey) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ValkeyExporter ¶
type ValkeyExporter struct {
core.Exporter `json:",inline"`
// Disable disable exporter
Disable bool `json:"disable,omitempty"`
}
ValkeyExporter defines the specification for the valkey exporter
func (*ValkeyExporter) DeepCopy ¶
func (in *ValkeyExporter) DeepCopy() *ValkeyExporter
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValkeyExporter.
func (*ValkeyExporter) DeepCopyInto ¶
func (in *ValkeyExporter) DeepCopyInto(out *ValkeyExporter)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ValkeyList ¶
type ValkeyList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Valkey `json:"items"`
}
ValkeyList contains a list of Valkey
func (*ValkeyList) DeepCopy ¶
func (in *ValkeyList) DeepCopy() *ValkeyList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValkeyList.
func (*ValkeyList) DeepCopyInto ¶
func (in *ValkeyList) DeepCopyInto(out *ValkeyList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ValkeyList) DeepCopyObject ¶
func (in *ValkeyList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ValkeyPhase ¶
type ValkeyPhase string
ValkeyPhase
const ( // Initializing Initializing ValkeyPhase = "Initializing" // Rebalancing Rebalancing ValkeyPhase = "Rebalancing" // Ready Ready ValkeyPhase = "Ready" // Failed Failed ValkeyPhase = "Failed" // Paused Paused ValkeyPhase = "Paused" )
type ValkeyReplicas ¶
type ValkeyReplicas struct {
// Shards defines the number of shards for Valkey
// for cluster arch, the default value is 3; for other arch, the value is always 1
// +optional
// +kubebuilder:validation:Minimum=0
Shards int32 `json:"shards,omitempty"`
// ShardsConfig is the configuration of each shard
// +kubebuilder:validation:MinItems=3
// +optional
ShardsConfig []*v1alpha1.ShardConfig `json:"shardsConfig,omitempty"`
// ReplicasOfShard is the number of replicas for each master node
// +kubebuilder:validation:Minimum=1
// +kubebuilder:validation:Maximum=5
ReplicasOfShard int32 `json:"replicasOfShard"`
}
ValkeyReplicas defines the replicas of Valkey
func (*ValkeyReplicas) DeepCopy ¶
func (in *ValkeyReplicas) DeepCopy() *ValkeyReplicas
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValkeyReplicas.
func (*ValkeyReplicas) DeepCopyInto ¶
func (in *ValkeyReplicas) DeepCopyInto(out *ValkeyReplicas)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ValkeySpec ¶
type ValkeySpec struct {
// Version supports 7.2, 8.0, 8.1
// +kubebuilder:validation:Enum="7.2";"8.0";"8.1"
Version string `json:"version"`
// Arch supports cluster, sentinel
// +kubebuilder:validation:Enum="cluster";"failover";"replica"
Arch core.Arch `json:"arch"`
// Replicas defines desired number of replicas for Valkey
Replicas *ValkeyReplicas `json:"replicas"`
// Resources for setting resource requirements for the Pod Resources *v1.ResourceRequirements
Resources corev1.ResourceRequirements `json:"resources"`
// CustomConfigs defines the configuration settings for Valkey
// for detailed settings, please refer to https://github.com/valkey-io/valkey/blob/unstable/valkey.conf
CustomConfigs map[string]string `json:"customConfigs,omitempty"`
// Modules defines the module settings for Valkey
Modules []core.ValkeyModule `json:"modules,omitempty"`
// Storage defines the storage settings for Valkey
Storage *core.Storage `json:"storage,omitempty"`
// Access defines information for Valkey nodePorts settings
// +optional
Access core.InstanceAccess `json:"access,omitempty"`
// PodAnnotations holds Kubernetes Pod annotations PodAnnotations
// +optional
PodAnnotations map[string]string `json:"podAnnotations,omitempty"`
// AffinityPolicy specifies the affinity policy for the Pod
// +optional
// +kubebuilder:validation:Enum="SoftAntiAffinity";"AntiAffinityInShard";"AntiAffinity";"CustomAffinity"
AffinityPolicy *core.AffinityPolicy `json:"affinityPolicy,omitempty"`
// CustomAffinity specifies the custom affinity settings for the Pod
// if AffinityPolicy is set to CustomAffinity, this field is required
// +optional
CustomAffinity *corev1.Affinity `json:"customAffinity,omitempty"`
// NodeSelector specifies the node selector for the Pod
// +optional
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
// tolerations defines tolerations for the Pod
// +optional
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
// SecurityContext sets security attributes for the Pod SecurityContex
// +optional
SecurityContext *corev1.PodSecurityContext `json:"securityContext,omitempty"`
// Exporter defines Valkey exporter settings
// +optional
Exporter *ValkeyExporter `json:"exporter,omitempty"`
// Sentinel defines Sentinel configuration settings Sentinel
// +optional
Sentinel *bufredv1alpha1.SentinelSettings `json:"sentinel,omitempty"`
}
ValkeySpec defines the desired state of Valkey
func (*ValkeySpec) DeepCopy ¶
func (in *ValkeySpec) DeepCopy() *ValkeySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValkeySpec.
func (*ValkeySpec) DeepCopyInto ¶
func (in *ValkeySpec) DeepCopyInto(out *ValkeySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ValkeyStatus ¶
type ValkeyStatus struct {
// Phase indicates whether all the resource for the instance is ok.
// Values are as below:
// Initializing - Resource is in Initializing or Reconcile
// Ready - All resources is ok. In most cases, Ready means the cluster is ok to use
// Rebalancing - Cluster instance is rebalancing
// Failed - Error found when do resource reconcile, which not recoverable
// Paused - Instance paused which means workload replicas is set to 0
Phase ValkeyPhase `json:"phase,omitempty"`
// This field contains an additional message for the instance's status
Message string `json:"message,omitempty"`
// Matching labels selector for Valkey
MatchLabels map[string]string `json:"matchLabels,omitempty"`
// ClusterNodes valkey nodes info
Nodes []core.ValkeyNode `json:"nodes,omitempty"`
// LastShardCount indicates the last number of shards in the Valkey Cluster.
LastShardCount int32 `json:"lastShardCount,omitempty"`
// LastVersion indicates the last version of the Valkey instance.
LastVersion string `json:"lastVersion,omitempty"`
}
ValkeyStatus defines the observed state of Valkey
func (*ValkeyStatus) DeepCopy ¶
func (in *ValkeyStatus) DeepCopy() *ValkeyStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValkeyStatus.
func (*ValkeyStatus) DeepCopyInto ¶
func (in *ValkeyStatus) DeepCopyInto(out *ValkeyStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.